Commit a01befa0 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/hisilicon: Use drm_mode_init() for on-stack modes

Initialize on-stack modes with drm_mode_init() to guarantee
no stack garbage in the list head.

Cc: Xinliang Liu <xinliang.liu@linaro.org>
Cc: Tian Tao <tiantao6@hisilicon.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221107192545.9896-3-ville.syrjala@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 265751a5
...@@ -658,7 +658,7 @@ static enum drm_mode_status dsi_encoder_mode_valid(struct drm_encoder *encoder, ...@@ -658,7 +658,7 @@ static enum drm_mode_status dsi_encoder_mode_valid(struct drm_encoder *encoder,
* reset adj_mode to the mode value each time, * reset adj_mode to the mode value each time,
* so we don't adjust the mode twice * so we don't adjust the mode twice
*/ */
drm_mode_copy(&adj_mode, mode); drm_mode_init(&adj_mode, mode);
crtc_funcs = crtc->helper_private; crtc_funcs = crtc->helper_private;
if (crtc_funcs && crtc_funcs->mode_fixup) if (crtc_funcs && crtc_funcs->mode_fixup)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment