0002-Force-Mesa-to-use-the-PVR-driver-for-platform-device.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. From 15a2b80c0cd5cff126661d48fe7236c903d281c9 Mon Sep 17 00:00:00 2001
  2. From: Frank Binns <frank.binns@imgtec.com>
  3. Date: Wed, 17 Jun 2015 15:37:18 +0100
  4. Subject: [PATCH] Force Mesa to use the PVR driver for platform devices
  5. For platform devices, Mesa uses the DRM driver name to determine which DRI
  6. driver to load. This doesn't work in the multi-DRM driver model where there
  7. are separate DRM drivers for the display and GPU. This is because we normally
  8. want Mesa to deal with the display driver and the name of this won't match
  9. that of the DRI driver. For the time being, take the easy approach and just
  10. force it to use the PVR DRI driver.
  11. ---
  12. src/loader/loader.c | 4 ++++
  13. 1 file changed, 4 insertions(+)
  14. diff --git a/src/loader/loader.c b/src/loader/loader.c
  15. index 08eeb61..c7e561e 100644
  16. --- a/src/loader/loader.c
  17. +++ b/src/loader/loader.c
  18. @@ -436,7 +436,11 @@ loader_get_pci_driver(int fd)
  19. char *driver = NULL;
  20. if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id))
  21. +#if 1
  22. + return strdup("pvr");
  23. +#else
  24. return NULL;
  25. +#endif
  26. for (i = 0; i < ARRAY_SIZE(driver_map); i++) {
  27. if (vendor_id != driver_map[i].vendor_id)