mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 10:05:00 +08:00
63aa581c30
The LCDIF in the i.MX6SX and i.MX7 have a second plane called the alpha plane. Support it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Stefan Agner <stefan@agner.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-23-laurent.pinchart@ideasonboard.com
58 lines
1.2 KiB
C
58 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2016 Marek Vasut <marex@denx.de>
|
|
*
|
|
* i.MX23/i.MX28/i.MX6SX MXSFB LCD controller driver.
|
|
*/
|
|
|
|
#ifndef __MXSFB_DRV_H__
|
|
#define __MXSFB_DRV_H__
|
|
|
|
#include <drm/drm_crtc.h>
|
|
#include <drm/drm_device.h>
|
|
#include <drm/drm_encoder.h>
|
|
#include <drm/drm_plane.h>
|
|
|
|
struct clk;
|
|
|
|
struct mxsfb_devdata {
|
|
unsigned int transfer_count;
|
|
unsigned int cur_buf;
|
|
unsigned int next_buf;
|
|
unsigned int hs_wdth_mask;
|
|
unsigned int hs_wdth_shift;
|
|
bool has_overlay;
|
|
};
|
|
|
|
struct mxsfb_drm_private {
|
|
const struct mxsfb_devdata *devdata;
|
|
|
|
void __iomem *base; /* registers */
|
|
struct clk *clk;
|
|
struct clk *clk_axi;
|
|
struct clk *clk_disp_axi;
|
|
|
|
struct drm_device *drm;
|
|
struct {
|
|
struct drm_plane primary;
|
|
struct drm_plane overlay;
|
|
} planes;
|
|
struct drm_crtc crtc;
|
|
struct drm_encoder encoder;
|
|
struct drm_connector *connector;
|
|
struct drm_bridge *bridge;
|
|
};
|
|
|
|
static inline struct mxsfb_drm_private *
|
|
to_mxsfb_drm_private(struct drm_device *drm)
|
|
{
|
|
return drm->dev_private;
|
|
}
|
|
|
|
void mxsfb_enable_axi_clk(struct mxsfb_drm_private *mxsfb);
|
|
void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb);
|
|
|
|
int mxsfb_kms_init(struct mxsfb_drm_private *mxsfb);
|
|
|
|
#endif /* __MXSFB_DRV_H__ */
|