]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: layer: support just backend formats when frontend is unavailable
authorChen-Yu Tsai <wens@csie.org>
Fri, 25 Jan 2019 03:23:08 +0000 (11:23 +0800)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 25 Jan 2019 09:41:58 +0000 (10:41 +0100)
commitab6c600c00b85af4900d94c3258427a12f20dfba
tree43abf398cd21d7852877de856d5d81b49e272fb5
parentfd41a73eeaa68889940c18b0c9fc8a9f417edf34
drm/sun4i: layer: support just backend formats when frontend is unavailable

In some cases, such as running a new kernel with an old device tree that
has the frontend disabled, the backend's matching frontend might be
unavailable.

When this happens, the layers should only declare support for formats
that the backend support. This partially reverts commit 306ad9047531
("drm/sun4i: Rename sun4i_backend_layer_formats to sun4i_layer_formats")
by bringing back sun4i_backend_layer_formats, and passing it to
drm_universal_plane_init, while also dropping the modifiers list,
in the event no frontend is available.

Fixes: def3e2173daf ("drm/sun4i: frontend: Add support for the BGRX8888 input format")
Fixes: 5105361ad1c4 ("drm/sun4i: frontend: Add support for semi-planar YUV input formats")
Fixes: 992d878c4229 ("drm/sun4i: frontend: Add support for planar YUV input formats")
Fixes: 9d8b6444c18c ("drm/sun4i: layer: Add tiled modifier support and helper")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190125032314.20915-6-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_layer.c