-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mesa: experimentally added the ability to change the path to pdev
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- src/src/freedreno/decode/replay.c 2024-02-01 04:00:16.000000000 +0300 | ||
+++ src/src/freedreno/decode/replay.c.patch 2024-02-04 19:57:14.079269850 +0300 | ||
@@ -617,7 +617,9 @@ | ||
{ | ||
struct device *dev = calloc(sizeof(struct device), 1); | ||
|
||
- static const char path[] = "/dev/kgsl-3d0"; | ||
+ const char *path = getenv("MESA_TERMUX_PATH_PDEV"); | ||
+ if (! path) | ||
+ path = "/dev/kgsl-3d0"; | ||
|
||
dev->fd = open(path, O_RDWR | O_CLOEXEC); | ||
if (dev->fd < 0) { | ||
--- src/src/freedreno/vulkan/tu_knl.cc 2024-02-01 04:00:16.000000000 +0300 | ||
+++ src/src/freedreno/vulkan/tu_knl.cc.patch 2024-02-04 19:59:39.429269795 +0300 | ||
@@ -135,7 +135,10 @@ | ||
struct tu_instance *instance = | ||
container_of(vk_instance, struct tu_instance, vk); | ||
|
||
- static const char path[] = "/dev/kgsl-3d0"; | ||
+ const char *path = getenv("MESA_TERMUX_PATH_PDEV"); | ||
+ if (! path) | ||
+ path = "/dev/kgsl-3d0"; | ||
+ | ||
int fd; | ||
|
||
fd = open(path, O_RDWR | O_CLOEXEC); |