From 6af751e128e8833f010cb0886b84f50034623f6c Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Sat, 24 May 2025 05:52:02 +0000 Subject: [PATCH] cros_gralloc: fallback to check ro.board.platform for SS VK For bringup purpose, SS VK might be used to boot the system. To ease the runtime vulkan icd switch, normally we preset TARGET_BOARD_PLATFORM to pastel, so that to leave ro.hardware.vulkan unset post boot. At runtime, we can push a real hw driver and set ro.hardware.vulkan to switch to it, which can be safely reset after reboot. Bug: b/417259528 Test: boot to ui with SS VK chosen by TARGET_BOARD_PLATFORM Change-Id: I37212fadaf007c2c2d054b878f0a4f411f1a6fe8 --- cros_gralloc/cros_gralloc_driver.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cros_gralloc/cros_gralloc_driver.cc b/cros_gralloc/cros_gralloc_driver.cc index cb8b94b..b17c8c7 100644 --- a/cros_gralloc/cros_gralloc_driver.cc +++ b/cros_gralloc/cros_gralloc_driver.cc @@ -161,6 +161,8 @@ static void drv_destroy_and_close(struct driver *drv) static bool is_running_with_software_rendering() { const char *vulkan_driver = drv_get_os_option("ro.hardware.vulkan"); + if (!vulkan_driver) + vulkan_driver = drv_get_os_option("ro.board.platform"); return (vulkan_driver != nullptr && strstr(vulkan_driver, "pastel") != nullptr); }