Skip to content

Commit c9b4fa0

Browse files
Tomasz Siemekalexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Reviewed-by: Swapnil Patel <[email protected]> Signed-off-by: Tomasz Siemek <[email protected]> Signed-off-by: Tom Chung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 13d0724 commit c9b4fa0

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_surface.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ struct dc_plane_state *dc_create_plane_state(const struct dc *dc)
109109
*****************************************************************************
110110
*/
111111
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)
113114
{
114115
const struct dc_plane_status *plane_status;
115116
struct dc *dc;
@@ -136,7 +137,7 @@ const struct dc_plane_status *dc_plane_get_status(
136137
if (pipe_ctx->plane_state != plane_state)
137138
continue;
138139

139-
if (pipe_ctx->plane_state)
140+
if (pipe_ctx->plane_state && flags.bits.address)
140141
pipe_ctx->plane_state->status.is_flip_pending = false;
141142

142143
break;
@@ -151,7 +152,8 @@ const struct dc_plane_status *dc_plane_get_status(
151152
if (pipe_ctx->plane_state != plane_state)
152153
continue;
153154

154-
dc->hwss.update_pending_status(pipe_ctx);
155+
if (flags.bits.address)
156+
dc->hwss.update_pending_status(pipe_ctx);
155157
}
156158

157159
return plane_status;

drivers/gpu/drm/amd/display/dc/dc_plane.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,17 @@
2828

2929
#include "dc_hw_types.h"
3030

31+
union dc_plane_status_update_flags {
32+
struct {
33+
uint32_t address : 1;
34+
} bits;
35+
uint32_t raw;
36+
};
37+
3138
struct dc_plane_state *dc_create_plane_state(const struct dc *dc);
3239
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);
3442
void dc_plane_state_retain(struct dc_plane_state *plane_state);
3543
void dc_plane_state_release(struct dc_plane_state *plane_state);
3644

0 commit comments

Comments
 (0)