Advertisement
jameh

nouveau patch to screen 9400m

Aug 23rd, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.42 KB | None | 0 0
  1. From 838f3cfa86de5ada3557dc78dd3c61424c1fb6fa Mon Sep 17 00:00:00 2001
  2. From: jameh <jamie.alban@gmail.com>
  3. Date: Thu, 22 Aug 2013 13:40:25 -0400
  4. Subject: [PATCH] Add print messages for pci.
  5.  
  6. ---
  7. drivers/gpu/drm/nouveau/nouveau_drm.c | 32 ++++++++++++++++++++++++++++++++
  8.  1 file changed, 32 insertions(+)
  9.  
  10. diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
  11. index 383f4e6..9bba5a3 100644
  12. --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
  13. +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
  14. @@ -240,6 +240,25 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
  15.     struct apertures_struct *aper;
  16.     bool boot = false;
  17.     int ret;
  18. +   pr_info("jamie:\n");
  19. +   pr_info("pci_device_id->vendor: %d\n", pent->vendor);
  20. +   pr_info("pci_device_id->device: %d\n", pent->device);
  21. +   pr_info("pci_device_id->subvendor: %d\n", pent->subvendor);
  22. +   pr_info("pci_device_id->subdevice: %d\n", pent->subdevice);
  23. +   pr_info("pci_device_id->class: %d\n", pent->class);
  24. +   pr_info("pci_device_id->class_mask: %d\n", pent->class_mask);
  25. +   pr_info("pci_dev->bus->number: %d\n", pdev->bus->number);
  26. +   pr_info("nouveau_name(pci_dev): %d\n", nouveau_name(pdev));
  27. +   pr_info("pci_dev->vendor: %d\n", pdev->vendor);
  28. +   pr_info("pci_dev->device: %d\n", pdev->device);
  29. +   pr_info("pci_dev->subsystem_vendor: %d\n", pdev->subsystem_vendor);
  30. +   pr_info("pci_dev->subsystem_device: %d\n", pdev->subsystem_device);
  31. +
  32. +   if ((pdev->bus->number == 3) &&
  33. +       (pdev->device == 2147)) {
  34. +           pr_info("Detected 9400m on bus 3, ignoring.");
  35. +           return 0; // you can also try return -E*
  36. +   }
  37.  
  38.     /* remove conflicting drivers (vesafb, efifb etc) */
  39.     aper = alloc_apertures(3);
  40. @@ -422,6 +441,19 @@ nouveau_drm_unload(struct drm_device *dev)
  41.  static void
  42.  nouveau_drm_remove(struct pci_dev *pdev)
  43.  {
  44. +   pr_info("jamie:\n");
  45. +   pr_info("nouveau_name(pci_dev): %d\n", nouveau_name(pdev));
  46. +   pr_info("pci_dev->vendor: %d\n", pdev->vendor);
  47. +   pr_info("pci_dev->device: %d\n", pdev->device);
  48. +   pr_info("pci_dev->subsystem_vendor: %d\n", pdev->subsystem_vendor);
  49. +   pr_info("pci_dev->subsystem_device: %d\n", pdev->subsystem_device);
  50. +
  51. +   if ((pdev->bus->number == 3) &&
  52. +       (pdev->device == 2147)) {
  53. +           pr_info("Detected 9400m on bus 3, ignoring.");
  54. +           return 0; // you can also try return -E*
  55. +   }
  56. +
  57.     struct drm_device *dev = pci_get_drvdata(pdev);
  58.     struct nouveau_drm *drm = nouveau_drm(dev);
  59.     struct nouveau_object *device;
  60. --
  61. 1.8.3.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement