From: Italo Nicola Date: Thu, 20 Jul 2023 17:20:58 +0000 (+0000) Subject: pan/bi: add support for I420 and YV12 sampling X-Git-Tag: upstream/23.3.3~3487 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4eb0a98e5a45572a6c30f16f7b7e21cf22d158c2;p=platform%2Fupstream%2Fmesa.git pan/bi: add support for I420 and YV12 sampling These formats can be directly sampled, and they have a lower stride alignment requirement. Signed-off-by: Italo Nicola Part-of: --- diff --git a/src/panfrost/lib/pan_format.c b/src/panfrost/lib/pan_format.c index ee47c36..00dc8a7 100644 --- a/src/panfrost/lib/pan_format.c +++ b/src/panfrost/lib/pan_format.c @@ -194,6 +194,8 @@ const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = { FMT_YUV(B8R8_G8R8_UNORM, VYUY8, VUYA, SWAP, CO_SITED, _T__), FMT_YUV(R8_G8B8_420_UNORM, Y8_UV8_420, YUVA, NO_SWAP, CO_SITED, _T__), FMT_YUV(G8_B8R8_420_UNORM, Y8_UV8_420, YVUA, NO_SWAP, CO_SITED, _T__), + FMT_YUV(R8_G8_B8_420_UNORM, Y8_U8_V8_420, YUVA, NO_SWAP, CO_SITED, _T__), + FMT_YUV(R8_B8_G8_420_UNORM, Y8_U8_V8_420, YVUA, NO_SWAP, CO_SITED, _T__), #endif #if PAN_ARCH <= 7 diff --git a/src/panfrost/lib/pan_layout.c b/src/panfrost/lib/pan_layout.c index abe654e..e0dfb1f 100644 --- a/src/panfrost/lib/pan_layout.c +++ b/src/panfrost/lib/pan_layout.c @@ -195,9 +195,11 @@ format_minimum_alignment(const struct panfrost_device *dev, return 63; switch (format) { - /* For v7+, NV12 and NV21 have a looser alignment requirement of 16 bytes */ + /* For v7+, NV12/NV21/I420 have a looser alignment requirement of 16 bytes */ case PIPE_FORMAT_R8_G8B8_420_UNORM: case PIPE_FORMAT_G8_B8R8_420_UNORM: + case PIPE_FORMAT_R8_G8_B8_420_UNORM: + case PIPE_FORMAT_R8_B8_G8_420_UNORM: return 16; default: return 64;