]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Assign linear_pitch_alignment even for VM
authorAlvin Lee <alvin.lee2@amd.com>
Tue, 16 Apr 2024 18:42:18 +0000 (14:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Apr 2024 13:56:38 +0000 (09:56 -0400)
[Description]
Assign linear_pitch_alignment so we don't cause a divide by 0
error in VM environments

Reviewed-by: Sohaib Nadeem <sohaib.nadeem@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 0a91083a3e06e8149b4868447527c2b9aae09392..a8eb286ee4ff449449e30d0c4df5c67f00e740a1 100644 (file)
@@ -1425,6 +1425,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
                return NULL;
 
        if (init_params->dce_environment == DCE_ENV_VIRTUAL_HW) {
+               dc->caps.linear_pitch_alignment = 64;
                if (!dc_construct_ctx(dc, init_params))
                        goto destruct_dc;
        } else {