mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-27 06:42:31 +07:00
drm/amd/display: add plane size change check condition
[Why] Driver didn't check plane size and surface size is mismatch. It will cause pitch data incorrect. [How] Add condition to check is plane change and update surface Signed-off-by: Lewis Huang <Lewis.Huang@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d5cf79eeda
commit
ebd084cd65
@ -1220,6 +1220,12 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
|
||||
*/
|
||||
update_flags->bits.bpp_change = 1;
|
||||
|
||||
if (u->plane_info->plane_size.grph.surface_pitch != u->surface->plane_size.grph.surface_pitch
|
||||
|| u->plane_info->plane_size.video.luma_pitch != u->surface->plane_size.video.luma_pitch
|
||||
|| u->plane_info->plane_size.video.chroma_pitch != u->surface->plane_size.video.chroma_pitch)
|
||||
update_flags->bits.plane_size_change = 1;
|
||||
|
||||
|
||||
if (memcmp(&u->plane_info->tiling_info, &u->surface->tiling_info,
|
||||
sizeof(union dc_tiling_info)) != 0) {
|
||||
update_flags->bits.swizzle_change = 1;
|
||||
|
@ -445,6 +445,7 @@ union surface_update_flags {
|
||||
uint32_t coeff_reduction_change:1;
|
||||
uint32_t output_tf_change:1;
|
||||
uint32_t pixel_format_change:1;
|
||||
uint32_t plane_size_change:1;
|
||||
|
||||
/* Full updates */
|
||||
uint32_t new_plane:1;
|
||||
|
@ -2125,7 +2125,8 @@ void update_dchubp_dpp(
|
||||
plane_state->update_flags.bits.swizzle_change ||
|
||||
plane_state->update_flags.bits.dcc_change ||
|
||||
plane_state->update_flags.bits.bpp_change ||
|
||||
plane_state->update_flags.bits.scaling_change) {
|
||||
plane_state->update_flags.bits.scaling_change ||
|
||||
plane_state->update_flags.bits.plane_size_change) {
|
||||
hubp->funcs->hubp_program_surface_config(
|
||||
hubp,
|
||||
plane_state->format,
|
||||
|
Loading…
Reference in New Issue
Block a user