diff options
| author | Dave Stevenson <dave.stevenson@raspberrypi.org> | 2017-11-16 09:22:31 -0500 |
|---|---|---|
| committer | Eric Anholt <eric@anholt.net> | 2017-11-20 18:19:56 -0500 |
| commit | cb20dd170d6a7d41e0f347998771b0e0db183438 (patch) | |
| tree | 569ee3e1a0eccf9858bd726d65a916c2dca39e11 /drivers | |
| parent | 090cb0c690183be849e2bfa0427220f1e435fa30 (diff) | |
drm/vc4: Add support for NV21 and NV61.
NV12 (YUV420 2 plane) and NV16 (YUV422 2 plane) were
supported, but NV21 and NV61 (same but with Cb and Cr
swapped) weren't. Add them.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1f50799525e3401551dff2b0b2828b9ab892f75f.1510841336.git.dave.stevenson@raspberrypi.org
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/vc4/vc4_plane.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 6373fd5686ad..515f97997624 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c | |||
| @@ -153,10 +153,20 @@ static const struct hvs_format { | |||
| 153 | .pixel_order = HVS_PIXEL_ORDER_XYCBCR, | 153 | .pixel_order = HVS_PIXEL_ORDER_XYCBCR, |
| 154 | }, | 154 | }, |
| 155 | { | 155 | { |
| 156 | .drm = DRM_FORMAT_NV21, | ||
| 157 | .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_2PLANE, | ||
| 158 | .pixel_order = HVS_PIXEL_ORDER_XYCRCB, | ||
| 159 | }, | ||
| 160 | { | ||
| 156 | .drm = DRM_FORMAT_NV16, | 161 | .drm = DRM_FORMAT_NV16, |
| 157 | .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE, | 162 | .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE, |
| 158 | .pixel_order = HVS_PIXEL_ORDER_XYCBCR, | 163 | .pixel_order = HVS_PIXEL_ORDER_XYCBCR, |
| 159 | }, | 164 | }, |
| 165 | { | ||
| 166 | .drm = DRM_FORMAT_NV61, | ||
| 167 | .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE, | ||
| 168 | .pixel_order = HVS_PIXEL_ORDER_XYCRCB, | ||
| 169 | }, | ||
| 160 | }; | 170 | }; |
| 161 | 171 | ||
| 162 | static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) | 172 | static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) |
