drm/mgag200: Test memory requirements in drm_mode_config_funcs.mode_valid
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 16 May 2022 13:43:42 +0000 (15:43 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 17 May 2022 18:24:10 +0000 (20:24 +0200)
commit69340e529a064da4807622395e967aa2b5eba1c5
treef662519f97b907c2cc9e2b6a85a0d3d935e2f9b8
parent8219f11fdaf56593a719e1d72fa582673560315a
drm/mgag200: Test memory requirements in drm_mode_config_funcs.mode_valid

Test for a mode's memory requirements in the device-wide mode_valid
helper. For simplicify, always assume a 32-bit color format. While
some rejected modes would work with less colors, implementing this
is probably not worth the effort.

Also remove the memory-related test from the connector's mode_valid
helper. The test uses the bpp value that users can specify on the
kernel's command line. This value is unrelated and the test would
belong into atomic_check.

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/20220516134343.6085-7-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_mode.c