diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-06-01 13:25:20 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-06-07 09:40:04 +0200 |
commit | 98da4b99a0525c222dab7cd8e73153eaea062dc3 (patch) | |
tree | 704282cb63f0d9d544f6507ad6111286d1242427 /drivers/gpu/drm/mgag200/mgag200_drv.h | |
parent | 21e74bf99596d91411b6b51340c05ff92a7a4a01 (diff) |
drm/mgag200: Store maximum resolution and memory bandwidth in device info
The maximum resolution and memory bandwidth are model-specific limits.
Both are used during display-mode validation. Store the values in struct
mgag200_device_info and simplify the validation code.
v2:
* 'bandwith' -> 'bandwidth' in commit message
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-9-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_drv.h')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_drv.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h index b05becb3d4b7..f0fb13238f4f 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -191,6 +191,15 @@ enum mga_type { #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B) struct mgag200_device_info { + u16 max_hdisplay; + u16 max_vdisplay; + + /* + * Maximum memory bandwidth (MiB/sec). Setting this to zero disables + * the rsp test during mode validation. + */ + unsigned long max_mem_bandwidth; + /* * HW does not handle 'startadd' register correctly. Always set * it's value to 0. @@ -198,8 +207,12 @@ struct mgag200_device_info { bool bug_no_startadd:1; }; -#define MGAG200_DEVICE_INFO_INIT(_bug_no_startadd) \ +#define MGAG200_DEVICE_INFO_INIT(_max_hdisplay, _max_vdisplay, _max_mem_bandwidth, \ + _bug_no_startadd) \ { \ + .max_hdisplay = (_max_hdisplay), \ + .max_vdisplay = (_max_vdisplay), \ + .max_mem_bandwidth = (_max_mem_bandwidth), \ .bug_no_startadd = (_bug_no_startadd), \ } |