Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Use pitch when calculating size to cache in MALL

[Description]
Use pitch when calculating size to cache in MALL

Reviewed-by: Samson Tam <Samson.Tam@amd.com>
Acked-by: Brian Chang <Brian.Chang@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>

authored by

Alvin Lee and committed by
Alex Deucher
c65c71ae 31ec699a

+1 -1
+1 -1
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
··· 63 63 if (pipe->stream && pipe->plane_state && !pipe->top_pipe && 64 64 pipe->stream->mall_stream_config.type == SUBVP_PHANTOM) { 65 65 bytes_per_pixel = pipe->plane_state->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 ? 8 : 4; 66 - mall_region_pixels = pipe->stream->timing.h_addressable * pipe->stream->timing.v_addressable; 66 + mall_region_pixels = pipe->plane_state->plane_size.surface_pitch * pipe->stream->timing.v_addressable; 67 67 68 68 // For bytes required in MALL, calculate based on number of MBlks required 69 69 num_mblks = (mall_region_pixels * bytes_per_pixel +