diff options
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_drv.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_modes.c | 16 |
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h index a4435d8371f2..af34b244606e 100644 --- a/drivers/gpu/drm/gma500/psb_intel_drv.h +++ b/drivers/gpu/drm/gma500/psb_intel_drv.h | |||
@@ -166,8 +166,9 @@ struct psb_intel_crtc { | |||
166 | struct psb_intel_i2c_chan *psb_intel_i2c_create(struct drm_device *dev, | 166 | struct psb_intel_i2c_chan *psb_intel_i2c_create(struct drm_device *dev, |
167 | const u32 reg, const char *name); | 167 | const u32 reg, const char *name); |
168 | void psb_intel_i2c_destroy(struct psb_intel_i2c_chan *chan); | 168 | void psb_intel_i2c_destroy(struct psb_intel_i2c_chan *chan); |
169 | int psb_intel_ddc_get_modes(struct psb_intel_output *psb_intel_output); | 169 | int psb_intel_ddc_get_modes(struct drm_connector *connector, |
170 | extern bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output); | 170 | struct i2c_adapter *adapter); |
171 | extern bool psb_intel_ddc_probe(struct i2c_adapter *adapter); | ||
171 | 172 | ||
172 | extern void psb_intel_crtc_init(struct drm_device *dev, int pipe, | 173 | extern void psb_intel_crtc_init(struct drm_device *dev, int pipe, |
173 | struct psb_intel_mode_device *mode_dev); | 174 | struct psb_intel_mode_device *mode_dev); |
diff --git a/drivers/gpu/drm/gma500/psb_intel_modes.c b/drivers/gpu/drm/gma500/psb_intel_modes.c index bde1aff96190..4fca0d6feebe 100644 --- a/drivers/gpu/drm/gma500/psb_intel_modes.c +++ b/drivers/gpu/drm/gma500/psb_intel_modes.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * psb_intel_ddc_probe | 26 | * psb_intel_ddc_probe |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output) | 29 | bool psb_intel_ddc_probe(struct i2c_adapter *adapter) |
30 | { | 30 | { |
31 | u8 out_buf[] = { 0x0, 0x0 }; | 31 | u8 out_buf[] = { 0x0, 0x0 }; |
32 | u8 buf[2]; | 32 | u8 buf[2]; |
@@ -46,7 +46,7 @@ bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output) | |||
46 | } | 46 | } |
47 | }; | 47 | }; |
48 | 48 | ||
49 | ret = i2c_transfer(&psb_intel_output->ddc_bus->adapter, msgs, 2); | 49 | ret = i2c_transfer(adapter, msgs, 2); |
50 | if (ret == 2) | 50 | if (ret == 2) |
51 | return true; | 51 | return true; |
52 | 52 | ||
@@ -59,18 +59,16 @@ bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output) | |||
59 | * | 59 | * |
60 | * Fetch the EDID information from @connector using the DDC bus. | 60 | * Fetch the EDID information from @connector using the DDC bus. |
61 | */ | 61 | */ |
62 | int psb_intel_ddc_get_modes(struct psb_intel_output *psb_intel_output) | 62 | int psb_intel_ddc_get_modes(struct drm_connector *connector, |
63 | struct i2c_adapter *adapter) | ||
63 | { | 64 | { |
64 | struct edid *edid; | 65 | struct edid *edid; |
65 | int ret = 0; | 66 | int ret = 0; |
66 | 67 | ||
67 | edid = | 68 | edid = drm_get_edid(connector, adapter); |
68 | drm_get_edid(&psb_intel_output->base, | ||
69 | &psb_intel_output->ddc_bus->adapter); | ||
70 | if (edid) { | 69 | if (edid) { |
71 | drm_mode_connector_update_edid_property(&psb_intel_output-> | 70 | drm_mode_connector_update_edid_property(connector, edid); |
72 | base, edid); | 71 | ret = drm_add_edid_modes(connector, edid); |
73 | ret = drm_add_edid_modes(&psb_intel_output->base, edid); | ||
74 | kfree(edid); | 72 | kfree(edid); |
75 | } | 73 | } |
76 | return ret; | 74 | return ret; |