mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 01:37:17 -04:00
drm/amd/display: Block SubVP if rotation being used
[Description] - SubVP rotation support is not explicitly implemented, so block SubVP in rotation cases to avoid unexpected behaviors Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -108,6 +108,8 @@ bool dcn32_subvp_in_use(struct dc *dc,
|
||||
|
||||
bool dcn32_mpo_in_use(struct dc_state *context);
|
||||
|
||||
bool dcn32_any_surfaces_rotated(struct dc *dc, struct dc_state *context);
|
||||
|
||||
struct pipe_ctx *dcn32_acquire_idle_pipe_for_head_pipe_in_layer(
|
||||
struct dc_state *state,
|
||||
const struct resource_pool *pool,
|
||||
|
||||
@@ -233,6 +233,23 @@ bool dcn32_mpo_in_use(struct dc_state *context)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool dcn32_any_surfaces_rotated(struct dc *dc, struct dc_state *context)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < dc->res_pool->pipe_count; i++) {
|
||||
struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
|
||||
|
||||
if (!pipe->stream)
|
||||
continue;
|
||||
|
||||
if (pipe->plane_state && pipe->plane_state->rotation != ROTATION_ANGLE_0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* *******************************************************************************************
|
||||
* dcn32_determine_det_override: Determine DET allocation for each pipe
|
||||
|
||||
@@ -1115,7 +1115,8 @@ static void dcn32_full_validate_bw_helper(struct dc *dc,
|
||||
* 5. (Config doesn't support MCLK in VACTIVE/VBLANK || dc->debug.force_subvp_mclk_switch)
|
||||
*/
|
||||
if (!dc->debug.force_disable_subvp && dcn32_all_pipes_have_stream_and_plane(dc, context) &&
|
||||
!dcn32_mpo_in_use(context) && (*vlevel == context->bw_ctx.dml.soc.num_states ||
|
||||
!dcn32_mpo_in_use(context) && !dcn32_any_surfaces_rotated(dc, context) &&
|
||||
(*vlevel == context->bw_ctx.dml.soc.num_states ||
|
||||
vba->DRAMClockChangeSupport[*vlevel][vba->maxMpcComb] == dm_dram_clock_change_unsupported ||
|
||||
dc->debug.force_subvp_mclk_switch)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user