diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-04-14 17:24:07 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-04-15 09:06:01 +1000 |
commit | a70882aa3137fff9532b51ed5d6a92922e1c4c9c (patch) | |
tree | 934e0579d238777106bb5c406a9b936c3c46100f /drivers/gpu/drm/radeon/radeon_i2c.c | |
parent | 8e461123f28e6b17456225e70eb834b3b30d28bb (diff) | |
download | kernel_samsung_smdk4412-a70882aa3137fff9532b51ed5d6a92922e1c4c9c.zip kernel_samsung_smdk4412-a70882aa3137fff9532b51ed5d6a92922e1c4c9c.tar.gz kernel_samsung_smdk4412-a70882aa3137fff9532b51ed5d6a92922e1c4c9c.tar.bz2 |
drm/radeon/kms: add connectors even if i2c fails
Sometimes the i2c test in i2c_bit_add_bus fails
if this happens we fail to register the i2c adapter and
eventually fail to add the connector. If i2c fails,
add the connector to the user can at least force
it on.
Note that some distros set i2c-algo-bit.bit_test to 1 by
default which sometimes fails preventing the ddc i2c adapter
from being added. The i2c adapter works even if the bit test
fails, probably due to pre/post_xfer not getting called in
the test_bit function. I have another patch to follow
up on that.
See:
https://bugs.freedesktop.org/show_bug.cgi?id=36221
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_i2c.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_i2c.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index ccbabf7..983cbac 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -1096,6 +1096,9 @@ void radeon_router_select_ddc_port(struct radeon_connector *radeon_connector) if (!radeon_connector->router.ddc_valid) return; + if (!radeon_connector->router_bus) + return; + radeon_i2c_get_byte(radeon_connector->router_bus, radeon_connector->router.i2c_addr, 0x3, &val); @@ -1121,6 +1124,9 @@ void radeon_router_select_cd_port(struct radeon_connector *radeon_connector) if (!radeon_connector->router.cd_valid) return; + if (!radeon_connector->router_bus) + return; + radeon_i2c_get_byte(radeon_connector->router_bus, radeon_connector->router.i2c_addr, 0x3, &val); |