aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/dev.h
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2022-06-27 17:20:00 +0300
committerThierry Reding <treding@nvidia.com>2022-07-08 16:27:52 +0200
commit97dea367d8dab90b520cda589f83c60514013110 (patch)
tree5017686f7b88b9b7b64d2ff93f586493cda203cb /drivers/gpu/host1x/dev.h
parentgpu: host1x: Deduplicate hardware headers (diff)
downloadlinux-97dea367d8dab90b520cda589f83c60514013110.tar.gz
linux-97dea367d8dab90b520cda589f83c60514013110.zip
gpu: host1x: Simplify register mapping and add common aperture
Refactor 'regs' property loading using devm_platform_ioremap_* and add loading of the 'common' region found on Tegra234. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/dev.h')
-rw-r--r--drivers/gpu/host1x/dev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h
index 7552a4554534..85edcc6e0fc7 100644
--- a/drivers/gpu/host1x/dev.h
+++ b/drivers/gpu/host1x/dev.h
@@ -100,6 +100,7 @@ struct host1x_info {
u64 dma_mask; /* mask of addressable memory */
bool has_wide_gather; /* supports GATHER_W opcode */
bool has_hypervisor; /* has hypervisor registers */
+ bool has_common; /* has common registers separate from hypervisor */
unsigned int num_sid_entries;
const struct host1x_sid_entry *sid_table;
/*
@@ -115,6 +116,7 @@ struct host1x {
void __iomem *regs;
void __iomem *hv_regs; /* hypervisor region */
+ void __iomem *common_regs;
struct host1x_syncpt *syncpt;
struct host1x_syncpt_base *bases;
struct device *dev;
@@ -156,6 +158,7 @@ struct host1x {
struct host1x_bo_cache cache;
};
+void host1x_common_writel(struct host1x *host1x, u32 v, u32 r);
void host1x_hypervisor_writel(struct host1x *host1x, u32 r, u32 v);
u32 host1x_hypervisor_readl(struct host1x *host1x, u32 r);
void host1x_sync_writel(struct host1x *host1x, u32 r, u32 v);