gpu: ipu-v3: Add ipu-cpmem unit
Move channel parameter memory setup functions and macros into a new submodule ipu-cpmem. In the process, cleanup arguments to the functions to take a channel pointer instead of a pointer into cpmem for that channel. That allows the structure of the parameter memory to be private to ipu-cpmem.c. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tento commit je obsažen v:

odevzdal
Philipp Zabel

rodič
7d1311b93e
revize
7d2691da90
@@ -148,6 +148,7 @@ struct ipuv3_channel {
|
||||
struct ipu_soc *ipu;
|
||||
};
|
||||
|
||||
struct ipu_cpmem;
|
||||
struct ipu_dc_priv;
|
||||
struct ipu_dmfc_priv;
|
||||
struct ipu_di;
|
||||
@@ -164,7 +165,6 @@ struct ipu_soc {
|
||||
|
||||
void __iomem *cm_reg;
|
||||
void __iomem *idmac_reg;
|
||||
struct ipu_ch_param __iomem *cpmem_base;
|
||||
|
||||
int usecount;
|
||||
|
||||
@@ -176,6 +176,7 @@ struct ipu_soc {
|
||||
int irq_err;
|
||||
struct irq_domain *domain;
|
||||
|
||||
struct ipu_cpmem *cpmem_priv;
|
||||
struct ipu_dc_priv *dc_priv;
|
||||
struct ipu_dp_priv *dp_priv;
|
||||
struct ipu_dmfc_priv *dmfc_priv;
|
||||
@@ -183,6 +184,17 @@ struct ipu_soc {
|
||||
struct ipu_smfc_priv *smfc_priv;
|
||||
};
|
||||
|
||||
static inline u32 ipu_idmac_read(struct ipu_soc *ipu, unsigned offset)
|
||||
{
|
||||
return readl(ipu->idmac_reg + offset);
|
||||
}
|
||||
|
||||
static inline void ipu_idmac_write(struct ipu_soc *ipu, u32 value,
|
||||
unsigned offset)
|
||||
{
|
||||
writel(value, ipu->idmac_reg + offset);
|
||||
}
|
||||
|
||||
void ipu_srm_dp_sync_update(struct ipu_soc *ipu);
|
||||
|
||||
int ipu_module_enable(struct ipu_soc *ipu, u32 mask);
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele