drm/amd/display: Disable subvp based on HW cursor requirement
authorAlvin Lee <alvin.lee2@amd.com>
Thu, 27 Jun 2024 15:56:47 +0000 (11:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Jul 2024 21:07:10 +0000 (17:07 -0400)
[Description]
- There are situations where HW cursor is required
- In these scenarios we should disable subvp based on the HW cursor
  requirement

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc_stream.h
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c

index c35029c..9897e32 100644 (file)
@@ -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;
 
index 3d9ee4d..de9bd72 100644 (file)
@@ -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(
index 7c73efe..4055449 100644 (file)
@@ -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)