aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2018-05-16 02:40:23 +0200
committerAlex Deucher <alexander.deucher@amd.com>2020-10-30 14:27:22 -0400
commit53f4cb8b5580a20d01449a7d8e1cbfdaed9ff6b6 (patch)
tree761e116d197f6f07803e5b7cdae132b1eb6f95a4 /drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
parentdrm/amd/display: Do not silently accept DCC for multiplane formats. (diff)
downloadlinux-dev-53f4cb8b5580a20d01449a7d8e1cbfdaed9ff6b6.tar.xz
linux-dev-53f4cb8b5580a20d01449a7d8e1cbfdaed9ff6b6.zip
drm/amd: Init modifier field of helper fb.
Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. v4: Use memset Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (for v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index e2c2eb45a793..0bf7d36c6686 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -207,6 +207,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
int ret;
unsigned long tmp;
+ memset(&mode_cmd, 0, sizeof(mode_cmd));
mode_cmd.width = sizes->surface_width;
mode_cmd.height = sizes->surface_height;