Commit c18fa08e authored by Alvin Lee's avatar Alvin Lee Committed by Alex Deucher

drm/amd/display: Disable subvp based on HW cursor requirement

[Description]
- There are situations where HW cursor is required
- In these scenarios we should disable subvp based on the HW cursor
  requirement
Reviewed-by: default avatarDillon Varone <dillon.varone@amd.com>
Signed-off-by: default avatarJerry Zuo <jerry.zuo@amd.com>
Signed-off-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b3c9c9af
......@@ -2717,6 +2717,10 @@ static enum surface_update_type check_update_surfaces_for_stream(
overall_type = UPDATE_TYPE_FULL;
}
if (stream_update && stream_update->hw_cursor_req) {
overall_type = UPDATE_TYPE_FULL;
}
/* some stream updates require passive update */
if (stream_update) {
union stream_update_flags *su_flags = &stream_update->stream->update_flags;
......@@ -3012,6 +3016,9 @@ static void copy_stream_update_to_stream(struct dc *dc,
if (update->vrr_infopacket)
stream->vrr_infopacket = *update->vrr_infopacket;
if (update->hw_cursor_req)
stream->hw_cursor_req = *update->hw_cursor_req;
if (update->allow_freesync)
stream->allow_freesync = *update->allow_freesync;
......
......@@ -266,6 +266,8 @@ struct dc_stream_state {
struct dc_cursor_attributes cursor_attributes;
struct dc_cursor_position cursor_position;
bool hw_cursor_req;
uint32_t sdr_white_level; // for boosting (SDR) cursor in HDR mode
/* from stream struct */
......@@ -350,6 +352,7 @@ struct dc_stream_update {
struct dc_cursor_attributes *cursor_attributes;
struct dc_cursor_position *cursor_position;
bool *hw_cursor_req;
};
bool dc_is_stream_unchanged(
......
......@@ -516,7 +516,7 @@ static void populate_dml21_stream_overrides_from_stream_state(
if (!stream->ctx->dc->debug.enable_single_display_2to1_odm_policy ||
stream->debug.force_odm_combine_segments > 0)
stream_desc->overrides.disable_dynamic_odm = true;
stream_desc->overrides.disable_subvp = stream->ctx->dc->debug.force_disable_subvp;
stream_desc->overrides.disable_subvp = stream->ctx->dc->debug.force_disable_subvp || stream->hw_cursor_req;
}
static enum dml2_swizzle_mode gfx_addr3_to_dml2_swizzle_mode(enum swizzle_mode_addr3_values addr3_mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment