Skip to content

Commit 30194b7

Browse files
Samson Tamalexdeucher
authored andcommitted
drm/amd/display: update fullscreen status to SPL
[Why] Current fullscreen check in SPL using dm_helpers is out-of-sync with dc state. This causes an issue during minimal transition where we pick an invalid intermediate state because the pre and post fullscreen status are different. [How] Add sharpening_required flag to dc_stream_state. Use this flag to indicate if we are in fullscreen or not. Propagate flag to SPL for fullscreen status. Remove workaround in DML Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Samson Tam <Samson.Tam@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 6c5bb04 commit 30194b7

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2756,6 +2756,9 @@ static enum surface_update_type check_update_surfaces_for_stream(
27562756
if (stream_update->scaler_sharpener_update)
27572757
su_flags->bits.scaler_sharpener = 1;
27582758

2759+
if (stream_update->sharpening_required)
2760+
su_flags->bits.sharpening_required = 1;
2761+
27592762
if (su_flags->raw != 0)
27602763
overall_type = UPDATE_TYPE_FULL;
27612764

@@ -3107,6 +3110,8 @@ static void copy_stream_update_to_stream(struct dc *dc,
31073110
}
31083111
if (update->scaler_sharpener_update)
31093112
stream->scaler_sharpener_update = *update->scaler_sharpener_update;
3113+
if (update->sharpening_required)
3114+
stream->sharpening_required = *update->sharpening_required;
31103115
}
31113116

31123117
static void backup_planes_and_stream_state(

drivers/gpu/drm/amd/display/dc/dc_spl_translate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct spl
195195
/* Check if it is stream is in fullscreen and if its HDR.
196196
* Use this to determine sharpness levels
197197
*/
198-
spl_in->is_fullscreen = dm_helpers_is_fullscreen(pipe_ctx->stream->ctx, pipe_ctx->stream);
198+
spl_in->is_fullscreen = pipe_ctx->stream->sharpening_required;
199199
spl_in->is_hdr_on = dm_helpers_is_hdr_on(pipe_ctx->stream->ctx, pipe_ctx->stream);
200200
spl_in->sdr_white_level_nits = plane_state->sdr_white_level_nits;
201201
}

drivers/gpu/drm/amd/display/dc/dc_stream.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ union stream_update_flags {
143143
uint32_t crtc_timing_adjust : 1;
144144
uint32_t fams_changed : 1;
145145
uint32_t scaler_sharpener : 1;
146+
uint32_t sharpening_required : 1;
146147
} bits;
147148

148149
uint32_t raw;
@@ -310,6 +311,7 @@ struct dc_stream_state {
310311

311312
struct luminance_data lumin_data;
312313
bool scaler_sharpener_update;
314+
bool sharpening_required;
313315
};
314316

315317
#define ABM_LEVEL_IMMEDIATE_DISABLE 255
@@ -356,6 +358,7 @@ struct dc_stream_update {
356358
struct dc_cursor_position *cursor_position;
357359
bool *hw_cursor_req;
358360
bool *scaler_sharpener_update;
361+
bool *sharpening_required;
359362
};
360363

361364
bool dc_is_stream_unchanged(

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ static void populate_dml21_stream_overrides_from_stream_state(
514514
break;
515515
}
516516
if (!stream->ctx->dc->debug.enable_single_display_2to1_odm_policy ||
517-
((stream->ctx->dc->debug.force_sharpness > 1) && stream->ctx->dc->config.use_spl) ||
518517
stream->debug.force_odm_combine_segments > 0)
519518
stream_desc->overrides.disable_dynamic_odm = true;
520519
stream_desc->overrides.disable_subvp = stream->ctx->dc->debug.force_disable_subvp || stream->hw_cursor_req;

0 commit comments

Comments
 (0)