From 02b5c4706b7983ba4ccc582797611855e2c3f210 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Thu, 10 Dec 2015 23:13:56 +0200 Subject: [PATCH] drm: Allow override_edid to override the firmware EDID MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit IMO the override_edid should override any default EDID for the connector, whether that came in via the connector helper ->get_modes() vfunc or via the firmware EDID mechanism. Cc: Thomas Wood Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.kernel.org/patch/7822361/ Git-Commit: 0e8578c996a33c8da9c28f8ed2d1be68694070ee Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Change-Id: I247c19010434473c9af9e0bb8cdeed6b335e4714 Signed-off-by: Tanmay Shah --- drivers/gpu/drm/drm_probe_helper.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 1fe4b8e6596b..b7383f53358c 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -199,17 +199,16 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect goto prune; } + if (connector->override_edid) { + struct edid *edid = (struct edid *) connector->edid_blob_ptr->data; + + count = drm_add_edid_modes(connector, edid); + drm_edid_to_eld(connector, edid); + } else { #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE - count = drm_load_edid_firmware(connector); - if (count == 0) + count = drm_load_edid_firmware(connector); + if (count == 0) #endif - { - if (connector->override_edid) { - struct edid *edid = (struct edid *) connector->edid_blob_ptr->data; - - count = drm_add_edid_modes(connector, edid); - drm_edid_to_eld(connector, edid); - } else count = (*connector_funcs->get_modes)(connector); } -- 2.11.0