mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
Discover and propagate the actual PowerVR render node
This commit is contained in:
1 parent
5588fedf1d
commit
3ee7c4afbb
5 files changed
+148
-11
No files matched your search
@@ -73,8 +73,10 @@ struct bl_drm_version {
|
||||
static int is_powervr(int fd) {
|
||||
const char *enabled = getenv("BL_POWERVR_DRM_HANDLES");
|
||||
if (!enabled || strcmp(enabled, "1")) return 0;
|
||||
const char *path = getenv("BL_POWERVR_RENDER_NODE");
|
||||
if (!path || !*path) return 0;
|
||||
struct stat node, candidate;
|
||||
if (stat("/dev/dri/renderD128", &node) || fstat(fd, &candidate) ||
|
||||
if (stat(path, &node) || fstat(fd, &candidate) ||
|
||||
!S_ISCHR(candidate.st_mode) || !S_ISCHR(node.st_mode) ||
|
||||
candidate.st_rdev != node.st_rdev) return 0;
|
||||
char name[16] = {0};
|
||||
|
||||
Reference in new issue
Block a user