diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-06-18 12:52:33 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-06-19 02:56:28 -0400 |
commit | 4cf2b28146713d39f78bd62002a8ab00075c63b7 (patch) | |
tree | 15ca4887226be1bd45cd3334a4d0d2d383e855bb /drivers/gpu/drm/drm_probe_helper.c | |
parent | 30f6570798f6c897df4f1f2c676d803728bfec27 (diff) |
drm/debugfs: add an "edid_override" file per connector
Add a file to debugfs for each connector to allow the EDID to be
overridden.
v2: Copy ubuf before accessing it and reject invalid length data. (David
Herrmann)
Ensure override_edid is reset when a new EDID value is written.
(David Herrmann)
Fix the debugfs file permissions. (David Herrmann)
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_probe_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_probe_helper.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index d22676b89cbb..db7d250f7ac7 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c | |||
@@ -130,7 +130,14 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect | |||
130 | count = drm_load_edid_firmware(connector); | 130 | count = drm_load_edid_firmware(connector); |
131 | if (count == 0) | 131 | if (count == 0) |
132 | #endif | 132 | #endif |
133 | count = (*connector_funcs->get_modes)(connector); | 133 | { |
134 | if (connector->override_edid) { | ||
135 | struct edid *edid = (struct edid *) connector->edid_blob_ptr->data; | ||
136 | |||
137 | count = drm_add_edid_modes(connector, edid); | ||
138 | } else | ||
139 | count = (*connector_funcs->get_modes)(connector); | ||
140 | } | ||
134 | 141 | ||
135 | if (count == 0 && connector->status == connector_status_connected) | 142 | if (count == 0 && connector->status == connector_status_connected) |
136 | count = drm_add_modes_noedid(connector, 1024, 768); | 143 | count = drm_add_modes_noedid(connector, 1024, 768); |