mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
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>
This commit is contained in:
parent
94cd4c4d71
commit
3967ab83a5
|
|
@ -2769,28 +2769,12 @@ static struct surface_update_descriptor get_plane_info_update_type(const struct
|
|||
|
||||
if (memcmp(tiling, &u->surface->tiling_info, sizeof(*tiling)) != 0) {
|
||||
update_flags->bits.swizzle_change = 1;
|
||||
elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STREAM);
|
||||
|
||||
switch (tiling->gfxversion) {
|
||||
case DcGfxVersion9:
|
||||
case DcGfxVersion10:
|
||||
case DcGfxVersion11:
|
||||
if (tiling->gfx9.swizzle != DC_SW_LINEAR) {
|
||||
update_flags->bits.bandwidth_change = 1;
|
||||
elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_GLOBAL);
|
||||
}
|
||||
break;
|
||||
case DcGfxAddr3:
|
||||
if (tiling->gfx_addr3.swizzle != DC_ADDR3_SW_LINEAR) {
|
||||
update_flags->bits.bandwidth_change = 1;
|
||||
elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_GLOBAL);
|
||||
}
|
||||
break;
|
||||
case DcGfxVersion7:
|
||||
case DcGfxVersion8:
|
||||
case DcGfxVersionUnknown:
|
||||
default:
|
||||
break;
|
||||
if (tiling->flags.avoid_full_update_on_tiling_change) {
|
||||
elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STREAM);
|
||||
} else {
|
||||
update_flags->bits.bandwidth_change = 1;
|
||||
elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_GLOBAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -445,6 +445,10 @@ enum dc_gfxversion {
|
|||
enum swizzle_mode_addr3_values swizzle;
|
||||
} gfx_addr3;/*gfx with addr3 and above*/
|
||||
};
|
||||
|
||||
struct {
|
||||
bool avoid_full_update_on_tiling_change;
|
||||
} flags;
|
||||
};
|
||||
|
||||
/* Rotation angle */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user