summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch
blob: 8ee7ef14429cb463120fe7ced50b6f61b5a90534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 18c32247cbc0e9fabff7a847add099496af9e53f Mon Sep 17 00:00:00 2001
From: "Soon, Thean Siew" <thean.siew.soon@intel.com>
Date: Mon, 8 Jan 2024 18:12:30 +0000
Subject: [PATCH 09/12] Skip cache bucket realloc for default mode 0

Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754]

Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com>
---
 .../linux/common/os/mos_context_specific_next.cpp          | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp
index 87059f538..9dbd5da79 100644
--- a/media_softlet/linux/common/os/mos_context_specific_next.cpp
+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp
@@ -146,7 +146,12 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
             {
                 mode = (value & 0x000000ff);
             }
-            mos_bufmgr_realloc_cache(m_bufmgr, mode);
+
+            // Realloc cache only if it's not mode 0
+            if (mode)
+            {
+                mos_bufmgr_realloc_cache(m_bufmgr, mode);
+            }
         }
 
         ReadUserSetting(
-- 
2.40.1