Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Extend dc_plane_get_status with flags

[WHY]
dc_plane_get_status may be used for reading other plane properties
in the future.

[HOW]
Provide API for choosing plane properties to read.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Swapnil Patel <swapnil.patel@amd.com>
Signed-off-by: Tomasz Siemek <Tomasz.Siemek@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tomasz Siemek and committed by
Alex Deucher
c9b4fa03 13d0724f

+14 -4
+5 -3
drivers/gpu/drm/amd/display/dc/core/dc_surface.c
··· 109 109 ***************************************************************************** 110 110 */ 111 111 const struct dc_plane_status *dc_plane_get_status( 112 - const struct dc_plane_state *plane_state) 112 + const struct dc_plane_state *plane_state, 113 + union dc_plane_status_update_flags flags) 113 114 { 114 115 const struct dc_plane_status *plane_status; 115 116 struct dc *dc; ··· 137 136 if (pipe_ctx->plane_state != plane_state) 138 137 continue; 139 138 140 - if (pipe_ctx->plane_state) 139 + if (pipe_ctx->plane_state && flags.bits.address) 141 140 pipe_ctx->plane_state->status.is_flip_pending = false; 142 141 143 142 break; ··· 152 151 if (pipe_ctx->plane_state != plane_state) 153 152 continue; 154 153 155 - dc->hwss.update_pending_status(pipe_ctx); 154 + if (flags.bits.address) 155 + dc->hwss.update_pending_status(pipe_ctx); 156 156 } 157 157 158 158 return plane_status;
+9 -1
drivers/gpu/drm/amd/display/dc/dc_plane.h
··· 28 28 29 29 #include "dc_hw_types.h" 30 30 31 + union dc_plane_status_update_flags { 32 + struct { 33 + uint32_t address : 1; 34 + } bits; 35 + uint32_t raw; 36 + }; 37 + 31 38 struct dc_plane_state *dc_create_plane_state(const struct dc *dc); 32 39 const struct dc_plane_status *dc_plane_get_status( 33 - const struct dc_plane_state *plane_state); 40 + const struct dc_plane_state *plane_state, 41 + union dc_plane_status_update_flags flags); 34 42 void dc_plane_state_retain(struct dc_plane_state *plane_state); 35 43 void dc_plane_state_release(struct dc_plane_state *plane_state); 36 44