diff options
author | Imre Deak <[email protected]> | 2021-03-25 23:47:47 +0200 |
---|---|---|
committer | Imre Deak <[email protected]> | 2021-03-29 22:54:50 +0300 |
commit | 8a949222ea822ed1eb3f995006a2531cbee15e4d (patch) | |
tree | c5fb6f45e757268accd62cd022aebdd761510c87 | |
parent | 911e03327d4482c4c1f41164bfed9634c8ee598a (diff) |
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 <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 2bc8f292e0b7..d77b01f8d4e6 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; |