From 136bfc59709339864babca1ef5f9a7975d2d9011 Mon Sep 17 00:00:00 2001 From: Alvin Lee Date: Mon, 30 Sep 2024 15:13:52 +0800 Subject: [PATCH] drm/amd/display: Assign linear_pitch_alignment even for VM stable inclusion from stable-v6.1.109 commit d219f902b16d42f0cb8c499ea8f31cf3c0f36349 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARVIX CVE: CVE-2024-46732 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d219f902b16d42f0cb8c499ea8f31cf3c0f36349 -------------------------------- [ Upstream commit 984debc133efa05e62f5aa1a7a1dd8ca0ef041f4 ] [Description] Assign linear_pitch_alignment so we don't cause a divide by 0 error in VM environments Reviewed-by: Sohaib Nadeem Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Conflicts: drivers/gpu/drm/amd/display/dc/core/dc.c [Context conflicts with dc_create().] Signed-off-by: Gu Bowen --- drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 050e46741c99..adcf5ba83703 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -938,6 +938,7 @@ struct dc *dc_create(const struct dc_init_data *init_params) goto alloc_fail; if (init_params->dce_environment == DCE_ENV_VIRTUAL_HW) { + dc->caps.linear_pitch_alignment = 64; if (false == dc_construct_ctx(dc, init_params)) { dc_destruct(dc); goto construct_fail; -- Gitee