Advertisement
Eschwartz

linux-ck.patch

Nov 22nd, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.73 KB | None | 0 0
  1. From 40e1d3cbe9a19a8c65451c3e4569e241ad753509 Mon Sep 17 00:00:00 2001
  2. From: Eli Schwartz <[email protected]>
  3. Date: Thu, 17 Dec 2015 16:43:37 -0500
  4. Subject: [PATCH] Apply patch to fix some busted intel displays
  5.  
  6. ---
  7.  
  8. Now updated to apply cleanly against the latest linux-ck.
  9.  
  10.  ...-a-better-job-at-disabling-primary-plane-.patch | 56 ++++++++++++++++++++++
  11.  PKGBUILD                                           |  5 ++
  12.  2 files changed, 61 insertions(+)
  13.  create mode 100644 0001-drm-i915-Do-a-better-job-at-disabling-primary-plane-.patch
  14.  
  15. diff --git a/0001-drm-i915-Do-a-better-job-at-disabling-primary-plane-.patch b/0001-drm-i915-Do-a-better-job-at-disabling-primary-plane-.patch
  16. new file mode 100644
  17. index 0000000..241b101
  18. --- /dev/null
  19. +++ b/0001-drm-i915-Do-a-better-job-at-disabling-primary-plane-.patch
  20. @@ -0,0 +1,56 @@
  21. +From 634b3a4a476e96816d5d6cd5bb9f8900a53f56ba Mon Sep 17 00:00:00 2001
  22. +From: Maarten Lankhorst <[email protected]>
  23. +Date: Mon, 23 Nov 2015 10:25:28 +0100
  24. +Subject: drm/i915: Do a better job at disabling primary plane in the noatomic
  25. + case.
  26. +
  27. +When disable_noatomic is called plane_mask is not correct yet, and
  28. +plane_state->visible = true is left as true after disabling the primary
  29. +plane.
  30. +
  31. +Other planes are already disabled as part of crtc sanitization, only the
  32. +primary is left active. But the plane_mask is not updated here. It gets
  33. +updated during fb takeover in modeset_gem_init, or set to the new value
  34. +on resume.
  35. +
  36. +This means that to disable the primary plane 1 << drm_plane_index(primary)
  37. +needs to be used.
  38. +
  39. +Afterwards because the crtc is no longer active it's forbidden to keep
  40. +plane_state->visible set, or a WARN_ON in
  41. +intel_plane_atomic_calc_changes triggers. There are other code points
  42. +that rely on accurate plane_state->visible too, so make sure the bool is
  43. +cleared.
  44. +
  45. +The other planes are already disabled in intel_sanitize_crtc, so they
  46. +don't have to be handled here.
  47. +
  48. +Cc: [email protected] #v4.3, v4.2?
  49. +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92655
  50. +Tested-by: Tomas Mezzadra <[email protected]>
  51. +Signed-off-by: Maarten Lankhorst <[email protected]>
  52. +Reviewed-by: Daniel Vetter <[email protected]>
  53. +Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
  54. +(cherry picked from commit 54a4196188eab82e6f0a5f05716626e9f18b8fb6)
  55. +Signed-off-by: Jani Nikula <[email protected]>
  56. +
  57. +diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
  58. +index 22e86d2..62211ab 100644
  59. +--- a/drivers/gpu/drm/i915/intel_display.c
  60. ++++ b/drivers/gpu/drm/i915/intel_display.c
  61. +@@ -6309,9 +6309,11 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
  62. +   if (to_intel_plane_state(crtc->primary->state)->visible) {
  63. +       intel_crtc_wait_for_pending_flips(crtc);
  64. +       intel_pre_disable_primary(crtc);
  65. ++
  66. ++      intel_crtc_disable_planes(crtc, 1 << drm_plane_index(crtc->primary));
  67. ++      to_intel_plane_state(crtc->primary->state)->visible = false;
  68. +   }
  69. +
  70. +-  intel_crtc_disable_planes(crtc, crtc->state->plane_mask);
  71. +   dev_priv->display.crtc_disable(crtc);
  72. +   intel_crtc->active = false;
  73. +   intel_update_watermarks(crtc);
  74. +--
  75. +cgit v0.10.2
  76. +
  77. diff --git a/PKGBUILD b/PKGBUILD
  78. index df3f31e..fba075c 100644
  79. --- a/PKGBUILD
  80. +++ b/PKGBUILD
  81. @@ -70,6 +70,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
  82.  'config.x86_64' 'config'
  83.  'linux-ck.preset'
  84.  'change-default-console-loglevel.patch'
  85. +'0001-drm-i915-Do-a-better-job-at-disabling-primary-plane-.patch'
  86.  # ck3
  87.  "http://ck.kolivas.org/patches/4.0/4.3/4.3-ck${_ckpatchversion}/${_ckpatchname}.xz"
  88.  # gcc
  89. @@ -86,6 +87,7 @@ sha256sums=('4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae'
  90.              '8e83d9306376750632e87bed77d4caf3475a4390a8f6673d58ee959b3722f12c'
  91.              '2b3ebf5446aa3cac279842ca00bc1f2d6b7ff1766915282c201d763dbf6ca07e'
  92.              '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
  93. +            'abdd04bd6beecb7c961130a68d71e6332bd260462eeaa2f4f8e634de813dcc4d'
  94.              '483c12e130285cbcb49648012416323a5cb8dd8a477fa064d96c2f53019f1b31'
  95.              'cf0f984ebfbb8ca8ffee1a12fd791437064b9ebe0712d6f813fd5681d4840791'
  96.              'ebeb62206999b2749ac43bb287a6a2a5db4f6b1b688a90cefa1ceb5db94aa490'
  97. @@ -102,6 +104,9 @@ prepare() {
  98.     # add upstream patch
  99.     patch -p1 -i "${srcdir}/patch-${pkgver}"
  100.  
  101. +   # Fix old intel chipsets
  102. +   patch -p1 < ../0001-drm-i915-Do-a-better-job-at-disabling-primary-plane-.patch
  103. +
  104.     # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
  105.     # remove this when a Kconfig knob is made available by upstream
  106.     # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
  107. --
  108. 2.6.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement