diff options
Diffstat (limited to 'recipes-multimedia')
5 files changed, 268 insertions, 0 deletions
diff --git a/recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch b/recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch new file mode 100644 index 00000000..a6f5dbb3 --- /dev/null +++ b/recipes-multimedia/libva/files/0001-Force-to-render-path-according-to-app-setting.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From bfc77f3476a406600e05e3bfa5e289a94bf58aef Mon Sep 17 00:00:00 2001 | ||
2 | From: JayYang <jay.yang@intel.com> | ||
3 | Date: Fri, 4 Aug 2023 12:03:51 +0800 | ||
4 | Subject: [PATCH 1/4] Force to render path according to app setting | ||
5 | |||
6 | If apps set VA flag VA_PROC_PIPELINE_FAST, force workload to render. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/00d560ba561f57b8be85c41a791e6db05e1743e9] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../linux/common/vp/ddi/ddi_vp_functions.cpp | 22 +++++++++---------- | ||
12 | 1 file changed, 10 insertions(+), 12 deletions(-) | ||
13 | |||
14 | diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
15 | index 89da5239f..fa02bf147 100644 | ||
16 | --- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
17 | +++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
18 | @@ -3991,23 +3991,21 @@ VAStatus DdiVpFunctions::DdiSetProcPipelineParams( | ||
19 | } | ||
20 | #endif //(_DEBUG || _RELEASE_INTERNAL) | ||
21 | |||
22 | - // Set stream type using pipeline_flags VA_PROC_PIPELINE_FAST flag | ||
23 | // Currently we only support 1 primary surface in VP | ||
24 | - if (pipelineParam->pipeline_flags & VA_PROC_PIPELINE_FAST) | ||
25 | + if (vpCtx->iPriSurfs < VP_MAX_PRIMARY_SURFS) | ||
26 | { | ||
27 | - vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM; | ||
28 | + vpHalSrcSurf->SurfType = SURF_IN_PRIMARY; | ||
29 | + vpCtx->iPriSurfs++; | ||
30 | } | ||
31 | else | ||
32 | { | ||
33 | - if (vpCtx->iPriSurfs < VP_MAX_PRIMARY_SURFS) | ||
34 | - { | ||
35 | - vpHalSrcSurf->SurfType = SURF_IN_PRIMARY; | ||
36 | - vpCtx->iPriSurfs++; | ||
37 | - } | ||
38 | - else | ||
39 | - { | ||
40 | - vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM; | ||
41 | - } | ||
42 | + vpHalSrcSurf->SurfType = SURF_IN_SUBSTREAM; | ||
43 | + } | ||
44 | + | ||
45 | + // Set workload path using pipeline_flags VA_PROC_PIPELINE_FAST flag | ||
46 | + if (pipelineParam->pipeline_flags & VA_PROC_PIPELINE_FAST) | ||
47 | + { | ||
48 | + vpHalRenderParams->bForceToRender = true; | ||
49 | } | ||
50 | |||
51 | // Set src rect | ||
52 | -- | ||
53 | 2.40.1 | ||
54 | |||
diff --git a/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch b/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch new file mode 100644 index 00000000..423614ac --- /dev/null +++ b/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From ea6cd2db43bab97744884001e0d98ba2ff5d3903 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Langdale <philipl@overt.org> | ||
3 | Date: Sat, 5 Aug 2023 11:46:26 +0800 | ||
4 | Subject: [PATCH 2/4] Add DRM format mappings for JPEG decoder output | ||
5 | |||
6 | The output formats from the JPEG decoder are currently not included | ||
7 | in the DRM format mapping functions. This means that any attempt to | ||
8 | call vaExportSurface on JPEG images will fail. | ||
9 | |||
10 | However, there is no functional gap beyond the missing mappings, so if | ||
11 | we add them in, exporting will then work correctly. | ||
12 | |||
13 | The four formats in question are IMC3, 422H, 422V, and 444P. | ||
14 | |||
15 | * 422H and 444P have trivial 1:1 mappings. | ||
16 | * IMC3 can be treated the same as I420, because the only difference is | ||
17 | the chroma pitch, and that's explicitly set in the descriptor | ||
18 | * 422V (aka 440P) has the same memory layout as 422H - it's just a | ||
19 | difference in how the consumer handle the chroma | ||
20 | |||
21 | I also added the missing XYUV composite object mapping - it was already | ||
22 | present for separate planes. | ||
23 | |||
24 | Tested with ffmpeg+mpv. | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/c7cd5a68315674d44ac97ec7cc78856fa90b8036] | ||
27 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
28 | --- | ||
29 | media_driver/linux/common/ddi/media_libva.cpp | 21 ++++++++++++++++++- | ||
30 | 1 file changed, 20 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp | ||
33 | index af35be841..1706138a1 100755 | ||
34 | --- a/media_driver/linux/common/ddi/media_libva.cpp | ||
35 | +++ b/media_driver/linux/common/ddi/media_libva.cpp | ||
36 | @@ -6981,8 +6981,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
37 | { | ||
38 | case VA_FOURCC_NV12: | ||
39 | case VA_FOURCC_I420: | ||
40 | + case VA_FOURCC_IMC3: | ||
41 | case VA_FOURCC_YV12: | ||
42 | case VA_FOURCC_YV16: | ||
43 | + case VA_FOURCC_422H: | ||
44 | + case VA_FOURCC_422V: | ||
45 | + case VA_FOURCC_444P: | ||
46 | case VA_FOURCC_Y800: | ||
47 | case VA_FOURCC_RGBP: | ||
48 | case VA_FOURCC_BGRP: | ||
49 | @@ -7055,8 +7059,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
50 | case VA_FOURCC_NV12: | ||
51 | return DRM_FORMAT_GR88; | ||
52 | case VA_FOURCC_I420: | ||
53 | + case VA_FOURCC_IMC3: | ||
54 | case VA_FOURCC_YV12: | ||
55 | case VA_FOURCC_YV16: | ||
56 | + case VA_FOURCC_422H: | ||
57 | + case VA_FOURCC_422V: | ||
58 | + case VA_FOURCC_444P: | ||
59 | case VA_FOURCC_RGBP: | ||
60 | case VA_FOURCC_BGRP: | ||
61 | return DRM_FORMAT_R8; | ||
62 | @@ -7070,7 +7078,6 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
63 | } | ||
64 | return 0; | ||
65 | } | ||
66 | - | ||
67 | static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
68 | { | ||
69 | switch (fourcc) | ||
70 | @@ -7079,10 +7086,18 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
71 | return DRM_FORMAT_NV12; | ||
72 | case VA_FOURCC_I420: | ||
73 | return DRM_FORMAT_YUV420; | ||
74 | + case VA_FOURCC_IMC3: | ||
75 | + return DRM_FORMAT_YUV420; | ||
76 | case VA_FOURCC_YV12: | ||
77 | return DRM_FORMAT_YVU420; | ||
78 | case VA_FOURCC_YV16: | ||
79 | return DRM_FORMAT_YVU422; | ||
80 | + case VA_FOURCC_422H: | ||
81 | + return DRM_FORMAT_YUV422; | ||
82 | + case VA_FOURCC_422V: | ||
83 | + return DRM_FORMAT_YUV422; | ||
84 | + case VA_FOURCC_444P: | ||
85 | + return DRM_FORMAT_YUV444; | ||
86 | case VA_FOURCC_YUY2: | ||
87 | return DRM_FORMAT_YUYV; | ||
88 | case VA_FOURCC_YVYU: | ||
89 | @@ -7093,6 +7108,10 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
90 | return DRM_FORMAT_UYVY; | ||
91 | case VA_FOURCC_AYUV: | ||
92 | return DRM_FORMAT_AYUV; | ||
93 | +#if VA_CHECK_VERSION(1, 13, 0) | ||
94 | + case VA_FOURCC_XYUV: | ||
95 | + return DRM_FORMAT_XYUV8888; | ||
96 | +#endif | ||
97 | case VA_FOURCC_Y210: | ||
98 | return DRM_FORMAT_Y210; | ||
99 | #if VA_CHECK_VERSION(1, 9, 0) | ||
100 | -- | ||
101 | 2.40.1 | ||
102 | |||
diff --git a/recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch b/recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch new file mode 100644 index 00000000..26bd9931 --- /dev/null +++ b/recipes-multimedia/libva/files/0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 8839e41fd18f7ed695e912ac0720c824df3905d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Langdale <philipl@overt.org> | ||
3 | Date: Wed, 30 Aug 2023 09:34:58 -0700 | ||
4 | Subject: [PATCH 3/4] Add DRM format mappings for JPEG output to softlet | ||
5 | |||
6 | This is the softlet equivalent of my previous change to add DRM format | ||
7 | mappings for the JPEG decoder output formats to the legacy code path. | ||
8 | |||
9 | Tested compilation, but don't have the hardware to test at runtime. | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/ce81beded8b791d24473a173e53ae399f6a6a059] | ||
12 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
13 | --- | ||
14 | .../common/ddi/media_libva_interface_next.cpp | 22 +++++++++++++++++++ | ||
15 | 1 file changed, 22 insertions(+) | ||
16 | |||
17 | diff --git a/media_softlet/linux/common/ddi/media_libva_interface_next.cpp b/media_softlet/linux/common/ddi/media_libva_interface_next.cpp | ||
18 | index b3851e9b5..231268cb7 100644 | ||
19 | --- a/media_softlet/linux/common/ddi/media_libva_interface_next.cpp | ||
20 | +++ b/media_softlet/linux/common/ddi/media_libva_interface_next.cpp | ||
21 | @@ -4672,8 +4672,12 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfSeparatePlane(uint32_t fourcc, i | ||
22 | { | ||
23 | case VA_FOURCC_NV12: | ||
24 | case VA_FOURCC_I420: | ||
25 | + case VA_FOURCC_IMC3: | ||
26 | case VA_FOURCC_YV12: | ||
27 | case VA_FOURCC_YV16: | ||
28 | + case VA_FOURCC_422H: | ||
29 | + case VA_FOURCC_422V: | ||
30 | + case VA_FOURCC_444P: | ||
31 | case VA_FOURCC_Y800: | ||
32 | case VA_FOURCC_RGBP: | ||
33 | case VA_FOURCC_BGRP: | ||
34 | @@ -4746,8 +4750,12 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfSeparatePlane(uint32_t fourcc, i | ||
35 | case VA_FOURCC_NV12: | ||
36 | return DRM_FORMAT_GR88; | ||
37 | case VA_FOURCC_I420: | ||
38 | + case VA_FOURCC_IMC3: | ||
39 | case VA_FOURCC_YV12: | ||
40 | case VA_FOURCC_YV16: | ||
41 | + case VA_FOURCC_422H: | ||
42 | + case VA_FOURCC_422V: | ||
43 | + case VA_FOURCC_444P: | ||
44 | case VA_FOURCC_RGBP: | ||
45 | case VA_FOURCC_BGRP: | ||
46 | return DRM_FORMAT_R8; | ||
47 | @@ -4770,10 +4778,18 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
48 | return DRM_FORMAT_NV12; | ||
49 | case VA_FOURCC_I420: | ||
50 | return DRM_FORMAT_YUV420; | ||
51 | + case VA_FOURCC_IMC3: | ||
52 | + return DRM_FORMAT_YUV420; | ||
53 | case VA_FOURCC_YV12: | ||
54 | return DRM_FORMAT_YVU420; | ||
55 | case VA_FOURCC_YV16: | ||
56 | return DRM_FORMAT_YVU422; | ||
57 | + case VA_FOURCC_422H: | ||
58 | + return DRM_FORMAT_YUV422; | ||
59 | + case VA_FOURCC_422V: | ||
60 | + return DRM_FORMAT_YUV422; | ||
61 | + case VA_FOURCC_444P: | ||
62 | + return DRM_FORMAT_YUV444; | ||
63 | case VA_FOURCC_YUY2: | ||
64 | return DRM_FORMAT_YUYV; | ||
65 | case VA_FOURCC_YVYU: | ||
66 | @@ -4782,6 +4798,12 @@ uint32_t MediaLibvaInterfaceNext::GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
67 | return DRM_FORMAT_VYUY; | ||
68 | case VA_FOURCC_UYVY: | ||
69 | return DRM_FORMAT_UYVY; | ||
70 | + case VA_FOURCC_AYUV: | ||
71 | + return DRM_FORMAT_AYUV; | ||
72 | +#if VA_CHECK_VERSION(1, 13, 0) | ||
73 | + case VA_FOURCC_XYUV: | ||
74 | + return DRM_FORMAT_XYUV8888; | ||
75 | +#endif | ||
76 | case VA_FOURCC_Y210: | ||
77 | return DRM_FORMAT_Y210; | ||
78 | #if VA_CHECK_VERSION(1, 9, 0) | ||
79 | -- | ||
80 | 2.40.1 | ||
81 | |||
diff --git a/recipes-multimedia/libva/files/0004-Disable-vp9-padding-on-mtl.patch b/recipes-multimedia/libva/files/0004-Disable-vp9-padding-on-mtl.patch new file mode 100644 index 00000000..075f2350 --- /dev/null +++ b/recipes-multimedia/libva/files/0004-Disable-vp9-padding-on-mtl.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From ea2ae0cd656a17eee9897aa1bf4e61b0d05ec347 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Tue, 5 Sep 2023 16:13:42 +0800 | ||
4 | Subject: [PATCH 4/4] Disable vp9 padding on mtl. | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1720] | ||
7 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
8 | --- | ||
9 | media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | ||
13 | index 679ca45f6..0e6837034 100644 | ||
14 | --- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | ||
15 | +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | ||
16 | @@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo, | ||
17 | |||
18 | MEDIA_WR_WA(waTable, WaDisableSetObjectCapture, 1); | ||
19 | |||
20 | - MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1); | ||
21 | + MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0); | ||
22 | |||
23 | return true; | ||
24 | } | ||
25 | -- | ||
26 | 2.40.1 | ||
27 | |||
diff --git a/recipes-multimedia/libva/intel-media-driver_23.2.4.bb b/recipes-multimedia/libva/intel-media-driver_23.2.4.bb index ccc59f27..1b94a6f6 100644 --- a/recipes-multimedia/libva/intel-media-driver_23.2.4.bb +++ b/recipes-multimedia/libva/intel-media-driver_23.2.4.bb | |||
@@ -23,6 +23,10 @@ SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ | |||
23 | file://0002-Add-mocs-index-in-patch-list.patch \ | 23 | file://0002-Add-mocs-index-in-patch-list.patch \ |
24 | file://0003-fix-vdsfc-csc-issue.patch \ | 24 | file://0003-fix-vdsfc-csc-issue.patch \ |
25 | file://0004-XRGB-force-to-tile4.patch \ | 25 | file://0004-XRGB-force-to-tile4.patch \ |
26 | file://0001-Force-to-render-path-according-to-app-setting.patch \ | ||
27 | file://0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch \ | ||
28 | file://0003-Add-DRM-format-mappings-for-JPEG-output-to-softlet.patch \ | ||
29 | file://0004-Disable-vp9-padding-on-mtl.patch \ | ||
26 | " | 30 | " |
27 | 31 | ||
28 | SRCREV = "cf942344b9e439d19873f1d47c0c890d7c63b6ad" | 32 | SRCREV = "cf942344b9e439d19873f1d47c0c890d7c63b6ad" |