Commit ea9c2605 authored by Lucas Stach's avatar Lucas Stach Committed by Philipp Zabel

gpu: ipu-v3: add driver for Prefetch Resolve Gasket

This adds support for the i.MX6 QUadPlus PRG unit. It glues together the
IPU and the PRE units.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
---
v4: add missing ipu_soc->prg_priv
parent 63863d43
...@@ -2,4 +2,4 @@ obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o ...@@ -2,4 +2,4 @@ obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o
imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \ imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \
ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-image-convert.o \ ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-image-convert.o \
ipu-pre.o ipu-smfc.o ipu-vdi.o ipu-pre.o ipu-prg.o ipu-smfc.o ipu-vdi.o
...@@ -1530,6 +1530,7 @@ static struct platform_driver imx_ipu_driver = { ...@@ -1530,6 +1530,7 @@ static struct platform_driver imx_ipu_driver = {
static struct platform_driver * const drivers[] = { static struct platform_driver * const drivers[] = {
&ipu_pre_drv, &ipu_pre_drv,
&ipu_prg_drv,
&imx_ipu_driver, &imx_ipu_driver,
}; };
......
This diff is collapsed.
...@@ -174,6 +174,7 @@ struct ipu_vdi; ...@@ -174,6 +174,7 @@ struct ipu_vdi;
struct ipu_image_convert_priv; struct ipu_image_convert_priv;
struct ipu_smfc_priv; struct ipu_smfc_priv;
struct ipu_pre; struct ipu_pre;
struct ipu_prg;
struct ipu_devtype; struct ipu_devtype;
...@@ -208,6 +209,7 @@ struct ipu_soc { ...@@ -208,6 +209,7 @@ struct ipu_soc {
struct ipu_vdi *vdi_priv; struct ipu_vdi *vdi_priv;
struct ipu_image_convert_priv *image_convert_priv; struct ipu_image_convert_priv *image_convert_priv;
struct ipu_smfc_priv *smfc_priv; struct ipu_smfc_priv *smfc_priv;
struct ipu_prg *prg_priv;
}; };
static inline u32 ipu_idmac_read(struct ipu_soc *ipu, unsigned offset) static inline u32 ipu_idmac_read(struct ipu_soc *ipu, unsigned offset)
...@@ -276,6 +278,10 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width, ...@@ -276,6 +278,10 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,
unsigned int stride, u32 format, unsigned int bufaddr); unsigned int stride, u32 format, unsigned int bufaddr);
void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr); void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr);
struct ipu_prg *ipu_prg_lookup_by_phandle(struct device *dev, const char *name,
int ipu_id);
extern struct platform_driver ipu_pre_drv; extern struct platform_driver ipu_pre_drv;
extern struct platform_driver ipu_prg_drv;
#endif /* __IPU_PRV_H__ */ #endif /* __IPU_PRV_H__ */
...@@ -330,6 +330,21 @@ int ipu_dp_set_window_pos(struct ipu_dp *, u16 x_pos, u16 y_pos); ...@@ -330,6 +330,21 @@ int ipu_dp_set_window_pos(struct ipu_dp *, u16 x_pos, u16 y_pos);
int ipu_dp_set_global_alpha(struct ipu_dp *dp, bool enable, u8 alpha, int ipu_dp_set_global_alpha(struct ipu_dp *dp, bool enable, u8 alpha,
bool bg_chan); bool bg_chan);
/*
* IPU Prefetch Resolve Gasket (prg) functions
*/
int ipu_prg_max_active_channels(void);
bool ipu_prg_present(struct ipu_soc *ipu);
bool ipu_prg_format_supported(struct ipu_soc *ipu, uint32_t format,
uint64_t modifier);
int ipu_prg_enable(struct ipu_soc *ipu);
void ipu_prg_disable(struct ipu_soc *ipu);
void ipu_prg_channel_disable(struct ipuv3_channel *ipu_chan);
int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
unsigned int axi_id, unsigned int width,
unsigned int height, unsigned int stride,
u32 format, unsigned long *eba);
/* /*
* IPU CMOS Sensor Interface (csi) functions * IPU CMOS Sensor Interface (csi) functions
*/ */
......
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