]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mgag200: Split up connector's mode_valid helper
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 16 May 2022 13:43:43 +0000 (15:43 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 17 May 2022 18:24:44 +0000 (20:24 +0200)
commit626924e826e81cbcef3531b4f2e6497d70d63c2e
tree984559124c46fdeb30732f19895a0cb3f497f9d9
parent35abaa4d2e8fc2c110db9fb8c5060b8aca6ab014
drm/mgag200: Split up connector's mode_valid helper

Split up the connector's mode_valid helper into a simple-pipe and a
mode-config helper. The simple-pipe helper tests for display-size
limits while the mode-config helper tests for memory-bandwidth limits.

Also add the mgag200_ prefix to mga_vga_calculate_mode_bandwidth() and
comment on the function's purpose.

The memory-bandwidth tests assume that the display uses 4 bytes per
pixel. The first models of G200SE-A only had 1.75 MiB of VRAM, which
limits these devices to 640x480-32.

v2:
* note the memory constraints on early G200SE-A

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