]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/ast: Handle known struct ast_dramstruct with helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Sun, 6 Jul 2025 16:26:42 +0000 (18:26 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 9 Jul 2025 12:36:21 +0000 (14:36 +0200)
commiteb104c69db707ce0208f753a897dadd39f51342f
tree62ccac24b63aa647958d376fe1f9fb2f90d680e4
parentf28f15e6d009c029a28eebc10944362346e34554
drm/ast: Handle known struct ast_dramstruct with helpers

Most of struct ast_dramstruct stores hardware state. Some index
values have known or special meaning. The known values are

- 0xffff - Terminal entry in the array
- 0xff00 - Delays the programming for usecs
- 0x0004 - Sets the type of DRAM

Add constants and helper macros for these cases. Also add a helper
macro for testing. Update Gen1 and Gen2+ accordingly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250706162816.211552-8-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_2000.c
drivers/gpu/drm/ast/ast_2100.c
drivers/gpu/drm/ast/ast_post.h