summaryrefslogtreecommitdiff
path: root/vmwgfx/vmwgfx_crtc.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2018-03-22 08:28:57 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2018-04-26 11:48:37 +0200
commit6b7dc2f9304298e669e7ac97594b948d1476ae52 (patch)
treea0a3abacfb836fef2faad4831212373c20309176 /vmwgfx/vmwgfx_crtc.c
parent0f90e2ed52082c1e2af3b47424a6c7c5d4c0c81e (diff)
vmwgfx: Clear the DRM mode before use
Avoid sending partially uninitialized data to the kernel. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'vmwgfx/vmwgfx_crtc.c')
-rw-r--r--vmwgfx/vmwgfx_crtc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vmwgfx/vmwgfx_crtc.c b/vmwgfx/vmwgfx_crtc.c
index 5705aaf..54b4c8a 100644
--- a/vmwgfx/vmwgfx_crtc.c
+++ b/vmwgfx/vmwgfx_crtc.c
@@ -172,6 +172,7 @@ crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
connector_id = xorg_output_get_id(output);
+ memset(&drm_mode, 0, sizeof(drm_mode));
drm_mode.clock = mode->Clock;
drm_mode.hdisplay = mode->HDisplay;
drm_mode.hsync_start = mode->HSyncStart;