drm/i915/sdvo: Reorder i2c initialisation before ddc proxy
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 May 2011 13:03:50 +0000 (14:03 +0100)
committerKeith Packard <keithp@keithp.com>
Wed, 18 May 2011 14:37:09 +0000 (07:37 -0700)
commit56184e3da005e0259fc628706351b54fcc4527db
treea4bc0d21785904c79da2e338a7e19b29b33f7654
parent61e499bf05254aca0fab08e2c91643331a15e725
drm/i915/sdvo: Reorder i2c initialisation before ddc proxy

The ddc proxy depends upon the underlying i2c bus being selected. Under
certain configurations, the i2c-adapter functionality is queried during
initialisation and so may trigger an OOPS during boot. Hence, we need to
reorder the initialisation of the ddc proxy until after we hook up the i2c
adapter for the SDVO device.

The condition under which it fails is when the i2c_add_adapter calls
into i2c_detect which will attempt to probe all valid addresses on the
adapter iff there is a pre-existing i2c_driver with the same class as
the freshly added i2c_adapter.

So it appears to depend upon having compiled in (or loaded such a
module before i915.ko) an i2c-driver that likes to futz over the
i2c_adapters claiming DDC support.

Reported-by: Mihai Moldovan <ionic@ionic.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/intel_sdvo.c