anv: use os_get_option instead of getenv

so that the queue count override logic can catch Android system
properties.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29492>
This commit is contained in:
Yiwei Zhang
2024-05-30 15:34:31 -07:00
committed by Marge Bot
parent ce43d7eb7f
commit 1e0b838c7b
2 changed files with 6 additions and 6 deletions

View File

@@ -2125,12 +2125,12 @@ anv_override_engine_counts(int *gc_count, int *g_count, int *c_count, int *v_cou
int g_override = -1;
int c_override = -1;
int v_override = -1;
char *env = getenv("ANV_QUEUE_OVERRIDE");
const char *env_ = os_get_option("ANV_QUEUE_OVERRIDE");
if (env == NULL)
if (env_ == NULL)
return;
env = strdup(env);
char *env = strdup(env_);
char *save = NULL;
char *next = strtok_r(env, ",", &save);
while (next != NULL) {

View File

@@ -1451,12 +1451,12 @@ anv_override_engine_counts(int *gc_count, int *g_count, int *c_count)
int gc_override = -1;
int g_override = -1;
int c_override = -1;
char *env = getenv("ANV_QUEUE_OVERRIDE");
const char *env_ = os_get_option("ANV_QUEUE_OVERRIDE");
if (env == NULL)
if (env_ == NULL)
return;
env = strdup(env);
char *env = strdup(env_);
char *save = NULL;
char *next = strtok_r(env, ",", &save);
while (next != NULL) {