summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_edid.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-03-18 19:23:22 +1000
committerDave Airlie <airlied@redhat.com>2014-03-18 19:23:22 +1000
commit5a08c07526e9586318c5b57fd90af4350f83e26e (patch)
tree14a93206e71a98ec2f26a05c0edc0ce40cae0e5a /drivers/gpu/drm/drm_edid.c
parent7550e3668ce1414f6c7edbe8b13c1169a1aa5960 (diff)
parentc94adc4a65c67a79f0d19285bf5c32fe4c00176f (diff)
Merge branch 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel into drm-next
Merge straggling core drm patches. * 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel: drm: Fix use-after-free in the shadow-attache exit code drm/fb-helper: Do the 'max_conn_count' zero check drm: Check if the allocation has succeeded before dereferencing newmode drm/fb-helper: Use drm_fb_helper_restore_fbdev_mode() in drm_fb_helper_set_par() drm/edid: request HDMI underscan by default
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r--drivers/gpu/drm/drm_edid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 4f4d3408a30a..d4e3f9d9370f 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2590,6 +2590,9 @@ drm_display_mode_from_vic_index(struct drm_connector *connector,
return NULL;
newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
+ if (!newmode)
+ return NULL;
+
newmode->vrefresh = 0;
return newmode;
@@ -3611,6 +3614,7 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
+ frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
return 0;
}