summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/aspeed/aspeed_gfx.h
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2021-02-09 15:37:34 +0300
committerJoel Stanley <joel@jms.id.au>2021-02-10 03:26:16 +0300
commitbce724fa58e67d24fe9eddb40ebb665fbe4bd7e8 (patch)
treea30fd17e9e83b1b33ddc09532b9b64d1de259a49 /drivers/gpu/drm/aspeed/aspeed_gfx.h
parent92614ad540171382d856e178cd2073377f2d1a7c (diff)
downloadlinux-bce724fa58e67d24fe9eddb40ebb665fbe4bd7e8.tar.xz
drm/aspeed: Use dt matching for default register values
There are minor differences in the values for the threshold value and the scan line size between families of ASPEED SoC. Additionally the SCU registers for the output control and scratch registers differ between families. This adds device tree matching to parameterise these values, allowing us to add support for the AST2400 now, and in the future the AST2600. Reviewed-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Link: https://patchwork.freedesktop.org/patch/msgid/20210209123734.130483-3-joel@jms.id.au
Diffstat (limited to 'drivers/gpu/drm/aspeed/aspeed_gfx.h')
-rw-r--r--drivers/gpu/drm/aspeed/aspeed_gfx.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
index f1e7e56abc02..96501152bafa 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
@@ -11,6 +11,11 @@ struct aspeed_gfx {
struct reset_control *rst;
struct regmap *scu;
+ u32 dac_reg;
+ u32 vga_scratch_reg;
+ u32 throd_val;
+ u32 scan_line_max;
+
struct drm_simple_display_pipe pipe;
struct drm_connector connector;
};
@@ -100,6 +105,3 @@ int aspeed_gfx_create_output(struct drm_device *drm);
/* CRT_THROD */
#define CRT_THROD_LOW(x) (x)
#define CRT_THROD_HIGH(x) ((x) << 8)
-
-/* Default Threshold Seting */
-#define G5_CRT_THROD_VAL (CRT_THROD_LOW(0x24) | CRT_THROD_HIGH(0x3C))