]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/mediatek: add function to background color input select for ovl/ovl_2l direct...
authorYongqiang Niu <yongqiang.niu@mediatek.com>
Thu, 29 Aug 2019 14:50:42 +0000 (22:50 +0800)
committerCK Hu <ck.hu@mediatek.com>
Wed, 9 Oct 2019 08:58:11 +0000 (16:58 +0800)
This patch add function to background color input select for ovl/ovl_2l
direct link for ovl/ovl_2l direct link usecase, we need set background
color input select for these hardware. This is preparation patch for
ovl/ovl_2l usecase.

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h

index 61d53be9c33b421887d89defdeef6db4d2f6916a..26441f4d1ad377f4c9e2bc8f5f177d06b384566d 100644 (file)
@@ -84,6 +84,8 @@ struct mtk_ddp_comp_funcs {
                             struct mtk_plane_state *state);
        void (*gamma_set)(struct mtk_ddp_comp *comp,
                          struct drm_crtc_state *state);
+       void (*bgclr_in_on)(struct mtk_ddp_comp *comp);
+       void (*bgclr_in_off)(struct mtk_ddp_comp *comp);
 };
 
 struct mtk_ddp_comp {
@@ -165,6 +167,18 @@ static inline void mtk_ddp_gamma_set(struct mtk_ddp_comp *comp,
                comp->funcs->gamma_set(comp, state);
 }
 
+static inline void mtk_ddp_comp_bgclr_in_on(struct mtk_ddp_comp *comp)
+{
+       if (comp->funcs && comp->funcs->bgclr_in_on)
+               comp->funcs->bgclr_in_on(comp);
+}
+
+static inline void mtk_ddp_comp_bgclr_in_off(struct mtk_ddp_comp *comp)
+{
+       if (comp->funcs && comp->funcs->bgclr_in_off)
+               comp->funcs->bgclr_in_off(comp);
+}
+
 int mtk_ddp_comp_get_id(struct device_node *node,
                        enum mtk_ddp_comp_type comp_type);
 int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node,