aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/gr2d.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2013-10-07 09:55:57 +0200
committerThierry Reding <treding@nvidia.com>2013-10-31 09:55:44 +0100
commit497c56a5817f1610ca189e1dc546934c7ce8eb7d (patch)
treec9a6e76e2d466c9dd77722333b217cb4fa5fab94 /drivers/gpu/drm/tegra/gr2d.c
parentdrm/tegra: Start connectors with correct DPMS mode (diff)
downloadlinux-dev-497c56a5817f1610ca189e1dc546934c7ce8eb7d.tar.xz
linux-dev-497c56a5817f1610ca189e1dc546934c7ce8eb7d.zip
drm/tegra: Use symbolic names for gr2d registers
Instead of using magic numbers for the registers which contain memory addresses in the firewall table, using symbolic names. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/gr2d.c')
-rw-r--r--drivers/gpu/drm/tegra/gr2d.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c
index 4e407e30da1c..bbeedc24d004 100644
--- a/drivers/gpu/drm/tegra/gr2d.c
+++ b/drivers/gpu/drm/tegra/gr2d.c
@@ -18,8 +18,7 @@
#include "drm.h"
#include "gem.h"
-
-#define GR2D_NUM_REGS 0x4d
+#include "gr2d.h"
struct gr2d {
struct tegra_drm_client client;
@@ -259,8 +258,19 @@ static const struct of_device_id gr2d_match[] = {
};
static const u32 gr2d_addr_regs[] = {
- 0x1a, 0x1b, 0x26, 0x2b, 0x2c, 0x2d, 0x31, 0x32,
- 0x48, 0x49, 0x4a, 0x4b, 0x4c
+ GR2D_UA_BASE_ADDR,
+ GR2D_VA_BASE_ADDR,
+ GR2D_PAT_BASE_ADDR,
+ GR2D_DSTA_BASE_ADDR,
+ GR2D_DSTB_BASE_ADDR,
+ GR2D_DSTC_BASE_ADDR,
+ GR2D_SRCA_BASE_ADDR,
+ GR2D_SRCB_BASE_ADDR,
+ GR2D_SRC_BASE_ADDR_SB,
+ GR2D_DSTA_BASE_ADDR_SB,
+ GR2D_DSTB_BASE_ADDR_SB,
+ GR2D_UA_BASE_ADDR_SB,
+ GR2D_VA_BASE_ADDR_SB,
};
static int gr2d_probe(struct platform_device *pdev)