Skip to content

Commit

Permalink
drm/amd/display: Implement interface for notify cursor support change
Browse files Browse the repository at this point in the history
[Description]
Add new interface for notifying OS of cursor support changes

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@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>
  • Loading branch information
Alvin Lee authored and Alex Deucher committed Aug 7, 2023
1 parent 07867a7 commit 17e349e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/gpu/drm/amd/display/dc/core/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5337,3 +5337,17 @@ bool dc_abm_save_restore(
return false;
}

void dc_query_current_properties(struct dc *dc, struct dc_current_properties *properties)
{
unsigned int i;
bool subvp_in_use = false;

for (i = 0; i < dc->current_state->stream_count; i++) {
if (dc->current_state->streams[i]->mall_stream_config.type != SUBVP_NONE) {
subvp_in_use = true;
break;
}
}
properties->cursor_size_limit = subvp_in_use ? 64 : dc->caps.max_cursor_size;
}

10 changes: 10 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dc.h
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,14 @@ struct dc_debug_options {
};

struct gpu_info_soc_bounding_box_v1_0;

/* Generic structure that can be used to query properties of DC. More fields
* can be added as required.
*/
struct dc_current_properties {
unsigned int cursor_size_limit;
};

struct dc {
struct dc_debug_options debug;
struct dc_versions versions;
Expand Down Expand Up @@ -2280,6 +2288,8 @@ void dc_process_dmub_dpia_hpd_int_enable(const struct dc *dc,

void dc_print_dmub_diagnostic_data(const struct dc *dc);

void dc_query_current_properties(struct dc *dc, struct dc_current_properties *properties);

/* DSC Interfaces */
#include "dc_dsc.h"

Expand Down

0 comments on commit 17e349e

Please sign in to comment.