Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

psb-2.6.38.dpatch

By: a guest on Apr 16th, 2011  |  syntax: Diff  |  size: 2.77 KB  |  views: 255  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /bin/sh /usr/share/dpatch/dpatch-run
  2. ## 2.6.38.dpatch by  <luca@tower>
  3. ##
  4. ## All lines beginning with `## DP:' are a description of the patch.
  5. ## DP: No description.
  6.  
  7. @DPATCH@
  8. diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~/drm_agpsupport.c psb-kernel-source/drm_agpsupport.c
  9. --- psb-kernel-source~/drm_agpsupport.c 2011-02-24 09:11:42.892073202 +0100
  10. +++ psb-kernel-source/drm_agpsupport.c  2011-02-24 09:14:45.656073202 +0100
  11. @@ -641,7 +641,7 @@
  12.  }
  13.  EXPORT_SYMBOL(psb_drm_agp_init_ttm);
  14.  
  15. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
  16. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
  17.  void psb_drm_agp_flush_chipset(struct drm_device *dev)
  18.  {
  19.         agp_flush_chipset(dev->agp->bridge);
  20. diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' psb-kernel-source~/psb_fb.c psb-kernel-source/psb_fb.c
  21. --- psb-kernel-source~/psb_fb.c 2011-02-24 09:11:42.940073202 +0100
  22. +++ psb-kernel-source/psb_fb.c  2011-02-24 09:19:34.500073202 +0100
  23. @@ -58,6 +58,22 @@
  24.         int dpms_state;
  25.  };
  26.  
  27. +static void psb_console_lock() {
  28. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
  29. +        console_lock();
  30. +#else
  31. +        acquire_console_sem();
  32. +#endif
  33. +}
  34. +
  35. +static void psb_console_unlock() {
  36. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)
  37. +        console_unlock();
  38. +#else
  39. +        release_console_sem();
  40. +#endif
  41. +}
  42. +
  43.  static void psbfb_vm_info_deref(struct psbfb_vm_info **vi)
  44.  {
  45.         struct psbfb_vm_info *tmp = *vi;
  46. @@ -874,9 +890,9 @@
  47.  {
  48.         int ret;
  49.  
  50. -       acquire_console_sem();
  51. +       psb_console_lock();
  52.         ret = psbfb_kms_off(dev, 0);
  53. -       release_console_sem();
  54. +       psb_console_unlock();
  55.  
  56.         return ret;
  57.  }
  58. @@ -953,9 +969,9 @@
  59.  {
  60.         int ret;
  61.  
  62. -       acquire_console_sem();
  63. +       psb_console_lock();
  64.         ret = psbfb_kms_on(dev, 0);
  65. -       release_console_sem();
  66. +       psb_console_unlock();
  67.  #ifdef SII_1392_WA
  68.         if((SII_1392 != 1) || (drm_psb_no_fb==0))
  69.                 psb_drm_disable_unused_functions(dev);
  70. @@ -967,16 +983,16 @@
  71.  
  72.  void psbfb_suspend(struct drm_device *dev)
  73.  {
  74. -       acquire_console_sem();
  75. +       psb_console_lock();
  76.         psbfb_kms_off(dev, 1);
  77. -       release_console_sem();
  78. +       psb_console_unlock();
  79.  }
  80.  
  81.  void psbfb_resume(struct drm_device *dev)
  82.  {
  83. -       acquire_console_sem();
  84. +       psb_console_lock();
  85.         psbfb_kms_on(dev, 1);
  86. -       release_console_sem();
  87. +       psb_console_unlock();
  88.  #ifdef SII_1392_WA
  89.         if((SII_1392 != 1) || (drm_psb_no_fb==0))
  90.                 psb_drm_disable_unused_functions(dev);