From: Imre Deak Date: Thu, 25 Mar 2021 21:47:47 +0000 (+0200) Subject: drm/i915: Make sure i915_ggtt_view is inited when creating an FB X-Git-Tag: v5.15~303^2~29^2~272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a949222ea822ed1eb3f995006a2531cbee15e4d;p=platform%2Fkernel%2Flinux-starfive.git drm/i915: Make sure i915_ggtt_view is inited when creating an FB This probably doesn't cause an issue, since the code checks the view type dependent size of the views before comparing them, but let's follow the practice to bzero the whole struct when initializing it. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-5-imre.deak@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 2bc8f292..d77b01f 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1005,6 +1005,8 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, const struct drm_framebuffer *fb, unsigned int rotation) { + memset(view, 0, sizeof(*view)); + view->type = I915_GGTT_VIEW_NORMAL; if (drm_rotation_90_or_270(rotation)) { view->type = I915_GGTT_VIEW_ROTATED;