Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9dd9223 authored by Andrew Jiang's avatar Andrew Jiang Committed by Alex Deucher
Browse files

drm/amd/display: Add dcc_change surface update flag



Program the DCC registers when dcc_change is true.

Signed-off-by: default avatarAndrew Jiang <Andrew.Jiang@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5cc2687c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -985,6 +985,11 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
	if (u->plane_info->per_pixel_alpha != u->surface->per_pixel_alpha)
		update_flags->bits.per_pixel_alpha_change = 1;

	if (u->plane_info->dcc.enable != u->surface->dcc.enable
			|| u->plane_info->dcc.grph.independent_64b_blks != u->surface->dcc.grph.independent_64b_blks
			|| u->plane_info->dcc.grph.meta_pitch != u->surface->dcc.grph.meta_pitch)
		update_flags->bits.dcc_change = 1;

	if (pixel_format_to_bpp(u->plane_info->format) !=
			pixel_format_to_bpp(u->surface->format))
		/* different bytes per element will require full bandwidth
+1 −0
Original line number Diff line number Diff line
@@ -387,6 +387,7 @@ union surface_update_flags {

	struct {
		/* Medium updates */
		uint32_t dcc_change:1;
		uint32_t color_space_change:1;
		uint32_t input_tf_change:1;
		uint32_t horizontal_mirror_change:1;
+1 −0
Original line number Diff line number Diff line
@@ -2066,6 +2066,7 @@ static void update_dchubp_dpp(
		plane_state->update_flags.bits.horizontal_mirror_change ||
		plane_state->update_flags.bits.rotation_change ||
		plane_state->update_flags.bits.swizzle_change ||
		plane_state->update_flags.bits.dcc_change ||
		plane_state->update_flags.bits.bpp_change) {
		hubp->funcs->hubp_program_surface_config(
			hubp,