Thomas Zimmermann 279cc2e954 drm: Define DRM_FORMAT_MAX_PLANES
DRM uses a magic number of 4 for the maximum number of planes per color
format. Declare this constant via DRM_FORMAT_MAX_PLANES and update the
related code. Some code depends on the length of arrays that are now
declared with DRM_FORMAT_MAX_PLANES. Convert it from '4' to ARRAY_SIZE.

v2:
	* mention usage of ARRAY_SIZE() in the commit message (Maxime)
	* also fix error handling in drm_gem_fb_init_with_funcs()
	  (kernel test robot)
	* include <drm/drm_fourcc.h> for DRM_FORMAT_MAX_PLANES

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730183511.20080-2-tzimmermann@suse.de
2021-08-02 16:41:20 +02:00
..
2021-07-29 09:12:01 +02:00
2021-06-11 12:30:39 -07:00
2021-07-21 11:58:28 +10:00
2021-03-26 11:46:33 +01:00
2021-08-02 16:41:20 +02:00
2020-09-17 13:39:44 +02:00
2020-07-16 18:16:31 -04:00
2021-03-16 13:12:46 +01:00
2019-12-18 16:09:12 -05:00