diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2018-12-14 15:12:18 +0100 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2019-01-11 16:53:08 +0100 |
commit | 0ea3305d7c593c17adf3c572d4e2bfbf4d6c27c5 (patch) | |
tree | a92f96f0c79c228c2568d1b4f19e7040abfc04eb /drivers | |
parent | 23d19ba06b9c5614d6457f5fed349ec8f6d4dac9 (diff) | |
download | linux-0ea3305d7c593c17adf3c572d4e2bfbf4d6c27c5.tar.bz2 |
drm/vc4: Limit SAND tiling support to semiplanar YUV420 formats
Despite what the HVS documentation indicates, the VC4 does not actually
support SAND tiling modes for any RGB format and only semiplanar YUV420
formats (NV12/NV21) can be used in these tiling modes.
The driver currently claims to support RGB formats for the associated
modifiers, so remove them from the supported list in the
format_mod_supported helper for RGB formats.
Remove further checks that are no longer necessary along the way, since
semi-planar YUV420 formats support every SAND tiling mode.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181214141218.12671-1-paul.kocialkowski@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_plane.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 2901ed0c5223..d098337c10e9 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -675,20 +675,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, uint32_t param = fourcc_mod_broadcom_param(fb->modifier); u32 tile_w, tile, x_off, pix_per_tile; - /* Column-based NV12 or RGBA. - */ - if (fb->format->num_planes > 1) { - if (hvs_format != HVS_PIXEL_FORMAT_YCBCR_YUV420_2PLANE) { - DRM_DEBUG_KMS("SAND format only valid for NV12/21"); - return -EINVAL; - } - hvs_format = HVS_PIXEL_FORMAT_H264; - } else { - if (base_format_mod == DRM_FORMAT_MOD_BROADCOM_SAND256) { - DRM_DEBUG_KMS("SAND256 format only valid for H.264"); - return -EINVAL; - } - } + hvs_format = HVS_PIXEL_FORMAT_H264; switch (base_format_mod) { case DRM_FORMAT_MOD_BROADCOM_SAND64: @@ -1151,8 +1138,6 @@ static bool vc4_format_mod_supported(struct drm_plane *plane, switch (fourcc_mod_broadcom_mod(modifier)) { case DRM_FORMAT_MOD_LINEAR: case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED: - case DRM_FORMAT_MOD_BROADCOM_SAND64: - case DRM_FORMAT_MOD_BROADCOM_SAND128: return true; default: return false; |