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
This commit is contained in:
Yiwei Zhang 2025-05-24 05:52:02 +00:00
parent a4f32f9172
commit 6af751e128

View file

@ -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);
}