mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drm/mediatek: Add plumbing for layer_check hook
This allows components to implement a .layer_check callback for their layers which is called during atomic_check. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: CK Hu <ck.hu@mediatek.com>
This commit is contained in:
@@ -80,6 +80,9 @@ struct mtk_ddp_comp_funcs {
|
||||
unsigned int (*layer_nr)(struct mtk_ddp_comp *comp);
|
||||
void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx);
|
||||
void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx);
|
||||
int (*layer_check)(struct mtk_ddp_comp *comp,
|
||||
unsigned int idx,
|
||||
struct mtk_plane_state *state);
|
||||
void (*layer_config)(struct mtk_ddp_comp *comp, unsigned int idx,
|
||||
struct mtk_plane_state *state);
|
||||
void (*gamma_set)(struct mtk_ddp_comp *comp,
|
||||
@@ -152,6 +155,15 @@ static inline void mtk_ddp_comp_layer_off(struct mtk_ddp_comp *comp,
|
||||
comp->funcs->layer_off(comp, idx);
|
||||
}
|
||||
|
||||
static inline int mtk_ddp_comp_layer_check(struct mtk_ddp_comp *comp,
|
||||
unsigned int idx,
|
||||
struct mtk_plane_state *state)
|
||||
{
|
||||
if (comp->funcs && comp->funcs->layer_check)
|
||||
return comp->funcs->layer_check(comp, idx, state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void mtk_ddp_comp_layer_config(struct mtk_ddp_comp *comp,
|
||||
unsigned int idx,
|
||||
struct mtk_plane_state *state)
|
||||
|
||||
Reference in New Issue
Block a user