Skip to content

Commit 453c336

Browse files
Nancy.LinChun-Kuang Hu
authored andcommitted
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: Nancy.Lin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: Bo-Chen Chen <[email protected]> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent d886c00 commit 453c336

File tree

4 files changed

+561
-0
lines changed

4 files changed

+561
-0
lines changed

drivers/gpu/drm/mediatek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mediatek-drm-y := mtk_disp_aal.o \
66
mtk_disp_gamma.o \
77
mtk_disp_merge.o \
88
mtk_disp_ovl.o \
9+
mtk_disp_ovl_adaptor.o \
910
mtk_disp_rdma.o \
1011
mtk_drm_crtc.o \
1112
mtk_drm_ddp_comp.o \

drivers/gpu/drm/mediatek/mtk_disp_drv.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#define _MTK_DISP_DRV_H_
88

99
#include <linux/soc/mediatek/mtk-cmdq.h>
10+
#include <linux/soc/mediatek/mtk-mmsys.h>
11+
#include <linux/soc/mediatek/mtk-mutex.h>
1012
#include "mtk_drm_plane.h"
1113
#include "mtk_mdp_rdma.h"
1214

@@ -99,6 +101,30 @@ void mtk_ovl_disable_vblank(struct device *dev);
99101
const u32 *mtk_ovl_get_formats(struct device *dev);
100102
size_t mtk_ovl_get_num_formats(struct device *dev);
101103

104+
void mtk_ovl_adaptor_add_comp(struct device *dev, struct mtk_mutex *mutex);
105+
void mtk_ovl_adaptor_remove_comp(struct device *dev, struct mtk_mutex *mutex);
106+
void mtk_ovl_adaptor_connect(struct device *dev, struct device *mmsys_dev,
107+
unsigned int next);
108+
void mtk_ovl_adaptor_disconnect(struct device *dev, struct device *mmsys_dev,
109+
unsigned int next);
110+
int mtk_ovl_adaptor_clk_enable(struct device *dev);
111+
void mtk_ovl_adaptor_clk_disable(struct device *dev);
112+
void mtk_ovl_adaptor_config(struct device *dev, unsigned int w,
113+
unsigned int h, unsigned int vrefresh,
114+
unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
115+
void mtk_ovl_adaptor_layer_config(struct device *dev, unsigned int idx,
116+
struct mtk_plane_state *state,
117+
struct cmdq_pkt *cmdq_pkt);
118+
void mtk_ovl_adaptor_register_vblank_cb(struct device *dev, void (*vblank_cb)(void *),
119+
void *vblank_cb_data);
120+
void mtk_ovl_adaptor_unregister_vblank_cb(struct device *dev);
121+
void mtk_ovl_adaptor_enable_vblank(struct device *dev);
122+
void mtk_ovl_adaptor_disable_vblank(struct device *dev);
123+
void mtk_ovl_adaptor_start(struct device *dev);
124+
void mtk_ovl_adaptor_stop(struct device *dev);
125+
unsigned int mtk_ovl_adaptor_layer_nr(struct device *dev);
126+
struct device *mtk_ovl_adaptor_dma_dev_get(struct device *dev);
127+
102128
void mtk_rdma_bypass_shadow(struct device *dev);
103129
int mtk_rdma_clk_enable(struct device *dev);
104130
void mtk_rdma_clk_disable(struct device *dev);

0 commit comments

Comments
 (0)