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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Restore full update for tiling change to linear

[Why]
There was previously a dc debug flag to indicate that tiling
changes should only be a medium update instead of full. The
function get_plane_info_type was refactored to not rely on dc
state, but in the process the logic was unintentionally changed,
which leads to screen corruption in some cases.

[How]
- add flag to tiling struct to avoid full update when necessary

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Joshua Aberback and committed by
Alex Deucher
3967ab83 94cd4c4d

+9 -21
+5 -21
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 2769 2769 2770 2770 if (memcmp(tiling, &u->surface->tiling_info, sizeof(*tiling)) != 0) { 2771 2771 update_flags->bits.swizzle_change = 1; 2772 - elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STREAM); 2773 2772 2774 - switch (tiling->gfxversion) { 2775 - case DcGfxVersion9: 2776 - case DcGfxVersion10: 2777 - case DcGfxVersion11: 2778 - if (tiling->gfx9.swizzle != DC_SW_LINEAR) { 2779 - update_flags->bits.bandwidth_change = 1; 2780 - elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_GLOBAL); 2781 - } 2782 - break; 2783 - case DcGfxAddr3: 2784 - if (tiling->gfx_addr3.swizzle != DC_ADDR3_SW_LINEAR) { 2785 - update_flags->bits.bandwidth_change = 1; 2786 - elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_GLOBAL); 2787 - } 2788 - break; 2789 - case DcGfxVersion7: 2790 - case DcGfxVersion8: 2791 - case DcGfxVersionUnknown: 2792 - default: 2793 - break; 2773 + if (tiling->flags.avoid_full_update_on_tiling_change) { 2774 + elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STREAM); 2775 + } else { 2776 + update_flags->bits.bandwidth_change = 1; 2777 + elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_GLOBAL); 2794 2778 } 2795 2779 } 2796 2780
+4
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
··· 445 445 enum swizzle_mode_addr3_values swizzle; 446 446 } gfx_addr3;/*gfx with addr3 and above*/ 447 447 }; 448 + 449 + struct { 450 + bool avoid_full_update_on_tiling_change; 451 + } flags; 448 452 }; 449 453 450 454 /* Rotation angle */