Commit 453c3364 authored by Nancy.Lin's avatar Nancy.Lin Committed by Chun-Kuang Hu

drm/mediatek: Add ovl_adaptor support for MT8195

Add ovl_adaptor driver for MT8195.
Ovl_adaptor is an encapsulated module and designed for simplified
DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and
an ETHDR. Two RDMAs merge into one layer, so this module support 4
layers.
Signed-off-by: default avatarNancy.Lin <nancy.lin@mediatek.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: default avatarBo-Chen Chen <rex-bc.chen@mediatek.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-4-nancy.lin@mediatek.com/Signed-off-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
parent d886c000
...@@ -6,6 +6,7 @@ mediatek-drm-y := mtk_disp_aal.o \ ...@@ -6,6 +6,7 @@ mediatek-drm-y := mtk_disp_aal.o \
mtk_disp_gamma.o \ mtk_disp_gamma.o \
mtk_disp_merge.o \ mtk_disp_merge.o \
mtk_disp_ovl.o \ mtk_disp_ovl.o \
mtk_disp_ovl_adaptor.o \
mtk_disp_rdma.o \ mtk_disp_rdma.o \
mtk_drm_crtc.o \ mtk_drm_crtc.o \
mtk_drm_ddp_comp.o \ mtk_drm_ddp_comp.o \
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#define _MTK_DISP_DRV_H_ #define _MTK_DISP_DRV_H_
#include <linux/soc/mediatek/mtk-cmdq.h> #include <linux/soc/mediatek/mtk-cmdq.h>
#include <linux/soc/mediatek/mtk-mmsys.h>
#include <linux/soc/mediatek/mtk-mutex.h>
#include "mtk_drm_plane.h" #include "mtk_drm_plane.h"
#include "mtk_mdp_rdma.h" #include "mtk_mdp_rdma.h"
...@@ -99,6 +101,30 @@ void mtk_ovl_disable_vblank(struct device *dev); ...@@ -99,6 +101,30 @@ void mtk_ovl_disable_vblank(struct device *dev);
const u32 *mtk_ovl_get_formats(struct device *dev); const u32 *mtk_ovl_get_formats(struct device *dev);
size_t mtk_ovl_get_num_formats(struct device *dev); size_t mtk_ovl_get_num_formats(struct device *dev);
void mtk_ovl_adaptor_add_comp(struct device *dev, struct mtk_mutex *mutex);
void mtk_ovl_adaptor_remove_comp(struct device *dev, struct mtk_mutex *mutex);
void mtk_ovl_adaptor_connect(struct device *dev, struct device *mmsys_dev,
unsigned int next);
void mtk_ovl_adaptor_disconnect(struct device *dev, struct device *mmsys_dev,
unsigned int next);
int mtk_ovl_adaptor_clk_enable(struct device *dev);
void mtk_ovl_adaptor_clk_disable(struct device *dev);
void mtk_ovl_adaptor_config(struct device *dev, unsigned int w,
unsigned int h, unsigned int vrefresh,
unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
void mtk_ovl_adaptor_layer_config(struct device *dev, unsigned int idx,
struct mtk_plane_state *state,
struct cmdq_pkt *cmdq_pkt);
void mtk_ovl_adaptor_register_vblank_cb(struct device *dev, void (*vblank_cb)(void *),
void *vblank_cb_data);
void mtk_ovl_adaptor_unregister_vblank_cb(struct device *dev);
void mtk_ovl_adaptor_enable_vblank(struct device *dev);
void mtk_ovl_adaptor_disable_vblank(struct device *dev);
void mtk_ovl_adaptor_start(struct device *dev);
void mtk_ovl_adaptor_stop(struct device *dev);
unsigned int mtk_ovl_adaptor_layer_nr(struct device *dev);
struct device *mtk_ovl_adaptor_dma_dev_get(struct device *dev);
void mtk_rdma_bypass_shadow(struct device *dev); void mtk_rdma_bypass_shadow(struct device *dev);
int mtk_rdma_clk_enable(struct device *dev); int mtk_rdma_clk_enable(struct device *dev);
void mtk_rdma_clk_disable(struct device *dev); void mtk_rdma_clk_disable(struct device *dev);
......
This diff is collapsed.
...@@ -51,6 +51,7 @@ extern struct platform_driver mtk_disp_ccorr_driver; ...@@ -51,6 +51,7 @@ extern struct platform_driver mtk_disp_ccorr_driver;
extern struct platform_driver mtk_disp_color_driver; extern struct platform_driver mtk_disp_color_driver;
extern struct platform_driver mtk_disp_gamma_driver; extern struct platform_driver mtk_disp_gamma_driver;
extern struct platform_driver mtk_disp_merge_driver; extern struct platform_driver mtk_disp_merge_driver;
extern struct platform_driver mtk_disp_ovl_adaptor_driver;
extern struct platform_driver mtk_disp_ovl_driver; extern struct platform_driver mtk_disp_ovl_driver;
extern struct platform_driver mtk_disp_rdma_driver; extern struct platform_driver mtk_disp_rdma_driver;
extern struct platform_driver mtk_dpi_driver; extern struct platform_driver mtk_dpi_driver;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment