cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

mtk_disp_drv.h (4329B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/*
      3 * Copyright (c) 2020 MediaTek Inc.
      4 */
      5
      6#ifndef _MTK_DISP_DRV_H_
      7#define _MTK_DISP_DRV_H_
      8
      9#include <linux/soc/mediatek/mtk-cmdq.h>
     10#include "mtk_drm_plane.h"
     11
     12int mtk_aal_clk_enable(struct device *dev);
     13void mtk_aal_clk_disable(struct device *dev);
     14void mtk_aal_config(struct device *dev, unsigned int w,
     15		    unsigned int h, unsigned int vrefresh,
     16		    unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
     17void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state);
     18void mtk_aal_start(struct device *dev);
     19void mtk_aal_stop(struct device *dev);
     20
     21void mtk_ccorr_ctm_set(struct device *dev, struct drm_crtc_state *state);
     22int mtk_ccorr_clk_enable(struct device *dev);
     23void mtk_ccorr_clk_disable(struct device *dev);
     24void mtk_ccorr_config(struct device *dev, unsigned int w,
     25		      unsigned int h, unsigned int vrefresh,
     26		      unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
     27void mtk_ccorr_start(struct device *dev);
     28void mtk_ccorr_stop(struct device *dev);
     29
     30void mtk_color_bypass_shadow(struct device *dev);
     31int mtk_color_clk_enable(struct device *dev);
     32void mtk_color_clk_disable(struct device *dev);
     33void mtk_color_config(struct device *dev, unsigned int w,
     34		      unsigned int h, unsigned int vrefresh,
     35		      unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
     36void mtk_color_start(struct device *dev);
     37
     38void mtk_dither_set_common(void __iomem *regs, struct cmdq_client_reg *cmdq_reg,
     39			   unsigned int bpc, unsigned int cfg,
     40			   unsigned int dither_en, struct cmdq_pkt *cmdq_pkt);
     41
     42void mtk_dpi_start(struct device *dev);
     43void mtk_dpi_stop(struct device *dev);
     44
     45void mtk_dsi_ddp_start(struct device *dev);
     46void mtk_dsi_ddp_stop(struct device *dev);
     47
     48int mtk_gamma_clk_enable(struct device *dev);
     49void mtk_gamma_clk_disable(struct device *dev);
     50void mtk_gamma_config(struct device *dev, unsigned int w,
     51		      unsigned int h, unsigned int vrefresh,
     52		      unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
     53void mtk_gamma_set(struct device *dev, struct drm_crtc_state *state);
     54void mtk_gamma_set_common(void __iomem *regs, struct drm_crtc_state *state, bool lut_diff);
     55void mtk_gamma_start(struct device *dev);
     56void mtk_gamma_stop(struct device *dev);
     57
     58void mtk_ovl_bgclr_in_on(struct device *dev);
     59void mtk_ovl_bgclr_in_off(struct device *dev);
     60void mtk_ovl_bypass_shadow(struct device *dev);
     61int mtk_ovl_clk_enable(struct device *dev);
     62void mtk_ovl_clk_disable(struct device *dev);
     63void mtk_ovl_config(struct device *dev, unsigned int w,
     64		    unsigned int h, unsigned int vrefresh,
     65		    unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
     66int mtk_ovl_layer_check(struct device *dev, unsigned int idx,
     67			struct mtk_plane_state *mtk_state);
     68void mtk_ovl_layer_config(struct device *dev, unsigned int idx,
     69			  struct mtk_plane_state *state,
     70			  struct cmdq_pkt *cmdq_pkt);
     71unsigned int mtk_ovl_layer_nr(struct device *dev);
     72void mtk_ovl_layer_on(struct device *dev, unsigned int idx,
     73		      struct cmdq_pkt *cmdq_pkt);
     74void mtk_ovl_layer_off(struct device *dev, unsigned int idx,
     75		       struct cmdq_pkt *cmdq_pkt);
     76void mtk_ovl_start(struct device *dev);
     77void mtk_ovl_stop(struct device *dev);
     78unsigned int mtk_ovl_supported_rotations(struct device *dev);
     79void mtk_ovl_register_vblank_cb(struct device *dev,
     80				void (*vblank_cb)(void *),
     81				void *vblank_cb_data);
     82void mtk_ovl_unregister_vblank_cb(struct device *dev);
     83void mtk_ovl_enable_vblank(struct device *dev);
     84void mtk_ovl_disable_vblank(struct device *dev);
     85
     86void mtk_rdma_bypass_shadow(struct device *dev);
     87int mtk_rdma_clk_enable(struct device *dev);
     88void mtk_rdma_clk_disable(struct device *dev);
     89void mtk_rdma_config(struct device *dev, unsigned int width,
     90		     unsigned int height, unsigned int vrefresh,
     91		     unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
     92unsigned int mtk_rdma_layer_nr(struct device *dev);
     93void mtk_rdma_layer_config(struct device *dev, unsigned int idx,
     94			   struct mtk_plane_state *state,
     95			   struct cmdq_pkt *cmdq_pkt);
     96void mtk_rdma_start(struct device *dev);
     97void mtk_rdma_stop(struct device *dev);
     98void mtk_rdma_register_vblank_cb(struct device *dev,
     99				 void (*vblank_cb)(void *),
    100				 void *vblank_cb_data);
    101void mtk_rdma_unregister_vblank_cb(struct device *dev);
    102void mtk_rdma_enable_vblank(struct device *dev);
    103void mtk_rdma_disable_vblank(struct device *dev);
    104
    105#endif