diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_modes.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_modes.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c index 8e5c83b2d120..4b1fd3d9c73c 100644 --- a/drivers/gpu/drm/i915/intel_modes.c +++ b/drivers/gpu/drm/i915/intel_modes.c | |||
@@ -54,9 +54,9 @@ bool intel_ddc_probe(struct intel_encoder *intel_encoder) | |||
54 | } | 54 | } |
55 | }; | 55 | }; |
56 | 56 | ||
57 | intel_i2c_quirk_set(intel_encoder->base.dev, true); | 57 | intel_i2c_quirk_set(intel_encoder->enc.dev, true); |
58 | ret = i2c_transfer(intel_encoder->ddc_bus, msgs, 2); | 58 | ret = i2c_transfer(intel_encoder->ddc_bus, msgs, 2); |
59 | intel_i2c_quirk_set(intel_encoder->base.dev, false); | 59 | intel_i2c_quirk_set(intel_encoder->enc.dev, false); |
60 | if (ret == 2) | 60 | if (ret == 2) |
61 | return true; | 61 | return true; |
62 | 62 | ||
@@ -66,22 +66,23 @@ bool intel_ddc_probe(struct intel_encoder *intel_encoder) | |||
66 | /** | 66 | /** |
67 | * intel_ddc_get_modes - get modelist from monitor | 67 | * intel_ddc_get_modes - get modelist from monitor |
68 | * @connector: DRM connector device to use | 68 | * @connector: DRM connector device to use |
69 | * @adapter: i2c adapter | ||
69 | * | 70 | * |
70 | * Fetch the EDID information from @connector using the DDC bus. | 71 | * Fetch the EDID information from @connector using the DDC bus. |
71 | */ | 72 | */ |
72 | int intel_ddc_get_modes(struct intel_encoder *intel_encoder) | 73 | int intel_ddc_get_modes(struct drm_connector *connector, |
74 | struct i2c_adapter *adapter) | ||
73 | { | 75 | { |
74 | struct edid *edid; | 76 | struct edid *edid; |
75 | int ret = 0; | 77 | int ret = 0; |
76 | 78 | ||
77 | intel_i2c_quirk_set(intel_encoder->base.dev, true); | 79 | intel_i2c_quirk_set(connector->dev, true); |
78 | edid = drm_get_edid(&intel_encoder->base, intel_encoder->ddc_bus); | 80 | edid = drm_get_edid(connector, adapter); |
79 | intel_i2c_quirk_set(intel_encoder->base.dev, false); | 81 | intel_i2c_quirk_set(connector->dev, false); |
80 | if (edid) { | 82 | if (edid) { |
81 | drm_mode_connector_update_edid_property(&intel_encoder->base, | 83 | drm_mode_connector_update_edid_property(connector, edid); |
82 | edid); | 84 | ret = drm_add_edid_modes(connector, edid); |
83 | ret = drm_add_edid_modes(&intel_encoder->base, edid); | 85 | connector->display_info.raw_edid = NULL; |
84 | intel_encoder->base.display_info.raw_edid = NULL; | ||
85 | kfree(edid); | 86 | kfree(edid); |
86 | } | 87 | } |
87 | 88 | ||