summarylogtreecommitdiffstats
path: root/0002-Force-Mesa-to-use-the-PVR-driver-for-platform-device.patch
blob: 8dbc5503c6b2a42fba4e72da9249f3acf0d6d893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 0a34a591e2bb68b4e2e0fa60d598843a1f4d1e42 Mon Sep 17 00:00:00 2001
From: Frank Binns <frank.binns@imgtec.com>
Date: Wed, 17 Jun 2015 15:37:18 +0100
Subject: [PATCH] Force Mesa to use the PVR driver for platform devices

For platform devices, Mesa uses the DRM driver name to determine which DRI
driver to load. This doesn't work in the multi-DRM driver model where there
are separate DRM drivers for the display and GPU. This is because we normally
want Mesa to deal with the display driver and the name of this won't match
that of the DRI driver. For the time being, take the easy approach and just
force it to use the PVR DRI driver.

---
 src/loader/loader.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/loader/loader.c b/src/loader/loader.c
index c9a499c..d01a8af 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -505,7 +505,11 @@ loader_get_pci_driver(int fd)
    char *driver = NULL;
 
    if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id))
+#if 1
+      return strdup("pvr");
+#else
       return NULL;
+#endif
 
    for (i = 0; i < ARRAY_SIZE(driver_map); i++) {
       if (vendor_id != driver_map[i].vendor_id)