summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_probe_helper.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-02-17 18:20:51 +0300
committerJani Nikula <jani.nikula@intel.com>2017-02-21 16:41:24 +0300
commit07c2b84b9956dd5d0871d47f5f0bbf9388d2d83f (patch)
treea17daf31459a45c03965b507ed7668556d3f5acc /drivers/gpu/drm/drm_probe_helper.c
parentfb70046cf1743ade43116ef0c0876576fc6391b9 (diff)
downloadlinux-07c2b84b9956dd5d0871d47f5f0bbf9388d2d83f.tar.xz
drm: move edid property update and add modes out of edid firmware loader
Make the firmware loader more generic and generally useful. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-2-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_probe_helper.c')
-rw-r--r--drivers/gpu/drm/drm_probe_helper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 93381454bdf7..358957118ca9 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -311,7 +311,13 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
count = drm_add_edid_modes(connector, edid);
drm_edid_to_eld(connector, edid);
} else {
- count = drm_load_edid_firmware(connector);
+ struct edid *edid = drm_load_edid_firmware(connector);
+ if (!IS_ERR_OR_NULL(edid)) {
+ drm_mode_connector_update_edid_property(connector, edid);
+ count = drm_add_edid_modes(connector, edid);
+ drm_edid_to_eld(connector, edid);
+ kfree(edid);
+ }
if (count == 0)
count = (*connector_funcs->get_modes)(connector);
}