minigbm: update drv_get_os_option() to try getenv() first
drv_get_os_option() helper routine only use property_get() check to add runtime hooks on Android. But Android supports reading runtime environment variables via getenv() as well. So this patch updates drv_get_os_option() to try getenv() first before falling back to using Android system/vendor properties. This fix helps in using predefined MINIGBM_DEBUG env variable (=nocomporession) on Android, to workaround broken UBWC on certain msm usecases. Change-Id: I4f78afb30a0381bc053e59ec508026584f617258 Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4567971 Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Dominik Behr <dbehr@chromium.org>
This commit is contained in:
parent
21f9c36f0f
commit
aca3b7cda7
1 changed files with 6 additions and 4 deletions
|
|
@ -618,12 +618,14 @@ void drv_resolve_format_and_use_flags_helper(struct driver *drv, uint32_t format
|
|||
|
||||
const char *drv_get_os_option(const char *name)
|
||||
{
|
||||
const char *ret = getenv(name);
|
||||
#ifdef __ANDROID__
|
||||
static char prop[PROPERTY_VALUE_MAX];
|
||||
return property_get(name, prop, NULL) > 1 ? prop : NULL;
|
||||
#else
|
||||
return getenv(name);
|
||||
if (!ret) {
|
||||
static char prop[PROPERTY_VALUE_MAX];
|
||||
return property_get(name, prop, NULL) > 1 ? prop : NULL;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void lru_remove_entry(struct lru_entry *entry)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue