|
@@ -26,7 +26,7 @@
|
|
* psb_intel_ddc_probe
|
|
* psb_intel_ddc_probe
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
-bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output)
|
|
|
|
|
|
+bool psb_intel_ddc_probe(struct i2c_adapter *adapter)
|
|
{
|
|
{
|
|
u8 out_buf[] = { 0x0, 0x0 };
|
|
u8 out_buf[] = { 0x0, 0x0 };
|
|
u8 buf[2];
|
|
u8 buf[2];
|
|
@@ -46,7 +46,7 @@ bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output)
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
- ret = i2c_transfer(&psb_intel_output->ddc_bus->adapter, msgs, 2);
|
|
|
|
|
|
+ ret = i2c_transfer(adapter, msgs, 2);
|
|
if (ret == 2)
|
|
if (ret == 2)
|
|
return true;
|
|
return true;
|
|
|
|
|
|
@@ -59,18 +59,16 @@ bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output)
|
|
*
|
|
*
|
|
* Fetch the EDID information from @connector using the DDC bus.
|
|
* Fetch the EDID information from @connector using the DDC bus.
|
|
*/
|
|
*/
|
|
-int psb_intel_ddc_get_modes(struct psb_intel_output *psb_intel_output)
|
|
|
|
|
|
+int psb_intel_ddc_get_modes(struct drm_connector *connector,
|
|
|
|
+ struct i2c_adapter *adapter)
|
|
{
|
|
{
|
|
struct edid *edid;
|
|
struct edid *edid;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
- edid =
|
|
|
|
- drm_get_edid(&psb_intel_output->base,
|
|
|
|
- &psb_intel_output->ddc_bus->adapter);
|
|
|
|
|
|
+ edid = drm_get_edid(connector, adapter);
|
|
if (edid) {
|
|
if (edid) {
|
|
- drm_mode_connector_update_edid_property(&psb_intel_output->
|
|
|
|
- base, edid);
|
|
|
|
- ret = drm_add_edid_modes(&psb_intel_output->base, edid);
|
|
|
|
|
|
+ drm_mode_connector_update_edid_property(connector, edid);
|
|
|
|
+ ret = drm_add_edid_modes(connector, edid);
|
|
kfree(edid);
|
|
kfree(edid);
|
|
}
|
|
}
|
|
return ret;
|
|
return ret;
|