diff options
author | Alvin Lee <Alvin.Lee2@amd.com> | 2022-07-15 00:21:28 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-07-25 23:16:01 +0200 |
commit | a4f1b04216023ff0f4cd89328b59ee6890248130 (patch) | |
tree | 6b744fa2bd2176320be89aba0605b938bb74e113 /drivers/gpu | |
parent | drm/amd/display: Drop unnecessary FPU flags on dcn302 files (diff) | |
download | linux-a4f1b04216023ff0f4cd89328b59ee6890248130.tar.xz linux-a4f1b04216023ff0f4cd89328b59ee6890248130.zip |
drm/amd/display: Fallback to SW cursor if SubVP + cursor too big
[Description]
- For SubVP cursor cannot be cached in MALL, therefore
we will switch to SW cursor if the cursor size exceeds
what can fit in the local DCN buffers (64x64x4)
- Returning false / failure for set_cursor_attributes will
fallback to SW cursor
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Alex Hung <alex.hung@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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index 6752ca44e6e0..f62d50901d92 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c @@ -328,6 +328,11 @@ bool dc_stream_set_cursor_attributes( } dc = stream->ctx->dc; + + if (attributes->height * attributes->width * 4 > 16384) + if (stream->mall_stream_config.type == SUBVP_MAIN) + return false; + stream->cursor_attributes = *attributes; dc_z10_restore(dc); |