summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ast/ast_reg.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-11-16 12:59:21 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2023-11-28 18:12:29 +0300
commit0ccaa3dde97bd30ae615c66fc20080e920ec9b4e (patch)
treecbd7ffc19a6149b07b7b8a796f6d85387e855c2a /drivers/gpu/drm/ast/ast_reg.h
parentc350a08ac7ec933f1dc8a143ebab60164ed4d90b (diff)
downloadlinux-0ccaa3dde97bd30ae615c66fc20080e920ec9b4e.tar.xz
drm/ast: Rework I/O register setup
There are three different ways of retrieving the I/O-memory ranges for AST devices: either from PCI BAR 1, from PCI BAR 2 or from PCI BAR 1 by 'guessing'. Make the respective code more readable by making each case self- contained. Also add error checking against the length of the PCI BARs. v2: * fix I/O range length to 128 bytes * fix length test for PCI BAR 2 Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_reg.h')
-rw-r--r--drivers/gpu/drm/ast/ast_reg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ast/ast_reg.h b/drivers/gpu/drm/ast/ast_reg.h
index 555286ecf520..05bab94a9a90 100644
--- a/drivers/gpu/drm/ast/ast_reg.h
+++ b/drivers/gpu/drm/ast/ast_reg.h
@@ -10,6 +10,7 @@
*/
#define AST_IO_MM_OFFSET (0x380)
+#define AST_IO_MM_LENGTH (128)
#define AST_IO_VGAARI_W (0x40)
#define AST_IO_VGAMR_W (0x42)