mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
pan/format: Use HW version to determine siting for YUV 422 formats
On v10, only YUV 420 formats support center_y or center siting. On previous HW versions, YUV 422 formats support center_y siting but not center_x or center siting. Fixes:83c76cceaf("panfrost: advertise YUV formats for valhall") Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104> (cherry picked from commit23aa784c05)
This commit is contained in:
parent
1ea9e1e364
commit
d91b19ac13
2 changed files with 14 additions and 8 deletions
|
|
@ -114,7 +114,7 @@
|
|||
"description": "pan/format: Use HW version to determine siting for YUV 422 formats",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "83c76cceafb4d375cc9cc2cf043bc32e5577f244",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -137,6 +137,12 @@ const struct pan_blendable_format
|
|||
#define YUV_NO_SWAP (0)
|
||||
#define YUV_SWAP (1)
|
||||
|
||||
#if PAN_ARCH <= 9
|
||||
#define MALI_YUV_CR_SITING_CENTER_422 (MALI_YUV_CR_SITING_CENTER_Y)
|
||||
#else
|
||||
#define MALI_YUV_CR_SITING_CENTER_422 (MALI_YUV_CR_SITING_CENTER_X)
|
||||
#endif
|
||||
|
||||
#define FMT_YUV(pipe, mali, swizzle, swap, siting, flags) \
|
||||
[PIPE_FORMAT_##pipe] = { \
|
||||
.hw = (MALI_YUV_SWIZZLE_##swizzle) | ((YUV_##swap) << 3) | \
|
||||
|
|
@ -170,20 +176,20 @@ const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = {
|
|||
|
||||
#if PAN_ARCH >= 7
|
||||
/* Multiplane formats */
|
||||
FMT_YUV(R8G8_R8B8_UNORM, YUYV8, UVYA, NO_SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(G8R8_B8R8_UNORM, VYUY8, UYVA, SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(R8B8_R8G8_UNORM, YUYV8, VYUA, NO_SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(B8R8_G8R8_UNORM, VYUY8, VUYA, SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(R8G8_R8B8_UNORM, YUYV8, UVYA, NO_SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(G8R8_B8R8_UNORM, VYUY8, UYVA, SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(R8B8_R8G8_UNORM, YUYV8, VYUA, NO_SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(B8R8_G8R8_UNORM, VYUY8, VUYA, SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(R8_G8B8_420_UNORM, Y8_UV8_420, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_B8G8_420_UNORM, Y8_UV8_420, YVUA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_G8_B8_420_UNORM, Y8_U8_V8_420, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_B8_G8_420_UNORM, Y8_U8_V8_420, YVUA, NO_SWAP, CENTER, _T__),
|
||||
|
||||
FMT_YUV(R8_G8B8_422_UNORM, Y8_UV8_422, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_B8G8_422_UNORM, Y8_UV8_422, YVUA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_G8B8_422_UNORM, Y8_UV8_422, YUVA, NO_SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(R8_B8G8_422_UNORM, Y8_UV8_422, YVUA, NO_SWAP, CENTER_422, _T__),
|
||||
|
||||
FMT_YUV(R10_G10B10_420_UNORM, Y10_UV10_420, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R10_G10B10_422_UNORM, Y10_UV10_422, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R10_G10B10_422_UNORM, Y10_UV10_422, YUVA, NO_SWAP, CENTER_422, _T__),
|
||||
#endif
|
||||
|
||||
FMTC(ETC1_RGB8, ETC2_RGB8, RGBA8_UNORM, RGB1, L),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue