fix(linuxfs): treat the bridge session's stand-in render node as KGSL in the DRM preload

SessionService already exports BL_DRM_STANDIN for Mali bridge sessions; the
preload now honours it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ahmad Sayed Alsayed EbrahimandClaude Opus 5.5 committed 2026-10-10 14:28:13 +03:00
1 parent c4ac049007
commit 308b200350
1 file changed
+3 -1
+3 -1
View File
@@ -42,7 +42,9 @@ static int is_kgsl(int fd) {
struct stat st;
pthread_mutex_lock(&lock);
if (kgsl_state == 0) {
kgsl_state = stat("/dev/kgsl-3d0", &st) == 0 ? 1 : -1;
/* KGSL, or the device the Mali bridge's session names as its render node (BL_DRM_STANDIN). */
const char *standin = getenv("BL_DRM_STANDIN");
kgsl_state = stat("/dev/kgsl-3d0", &st) == 0 || (standin && *standin && stat(standin, &st) == 0) ? 1 : -1;
kgsl_dev = st.st_rdev;
}
pthread_mutex_unlock(&lock);