* drm/i915 stable backports
@ 2014-05-21 9:07 Daniel Vetter
2014-05-21 9:07 ` [PATCH 1/4] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Daniel Vetter @ 2014-05-21 9:07 UTC (permalink / raw)
To: stable; +Cc: Intel Graphics Development
Hi Greg,
This is a set of drm/i915 patches which didn't apply cleanly on for 3.14. All
absed on 3.14.4. I've left out the bdw patches for now and will sign up someone
else for that task.
Cheers, Daniel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] drm/i915: Disable self-refresh for untiled fbs on i915gm
2014-05-21 9:07 drm/i915 stable backports Daniel Vetter
@ 2014-05-21 9:07 ` Daniel Vetter
2014-06-04 6:16 ` Patch "drm/i915: Disable self-refresh for untiled fbs on i915gm" has been added to the 3.14-stable tree gregkh
2014-05-21 9:07 ` [PATCH 2/4] drm/i915: move power domain init earlier during system resume Daniel Vetter
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2014-05-21 9:07 UTC (permalink / raw)
To: stable
Cc: Intel Graphics Development, Daniel Vetter,
Ville Syrjälä, Chris Wilson, Krzysztof Mazur,
Jani Nikula
This is commit 2ab1bc9df01dbc19b55b2271100db7 upstream.
Apparently it doesn't work. X-tiled self-refresh works flawlessly
otoh. Apparently X still works correctly with linear framebuffers, so
might just be an issue with the initial modeset. It's unclear whether
this just borked wm setup from our side or a hw restriction, but just
disabling gets things going.
Note that this regression was only brought to light with
commit 3f2dc5ac05714711fc14f2bf0ee5e42d5c08c581
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Fri Jan 10 14:06:47 2014 +0200
drm/i915: Fix 915GM self-refresh enable/disable
before that self-refresh for i915GM didn't work at all.
Kudos to Ville for spotting a little bug in the original patch I've
attached to the bug.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76103
Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: stable@vger.kernel.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[Jani: rebase on top of drm-next with primary plane support.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index e1fc35a72656..bd1b00344dac 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1539,6 +1539,16 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
DRM_DEBUG_KMS("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm);
+ if (IS_I915GM(dev) && enabled) {
+ struct intel_framebuffer *fb;
+
+ fb = to_intel_framebuffer(enabled->fb);
+
+ /* self-refresh seems busted with untiled */
+ if (fb->obj->tiling_mode == I915_TILING_NONE)
+ enabled = NULL;
+ }
+
/*
* Overlay gets an aggressive default since video jitter is bad.
*/
--
1.9.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] drm/i915: move power domain init earlier during system resume
2014-05-21 9:07 drm/i915 stable backports Daniel Vetter
2014-05-21 9:07 ` [PATCH 1/4] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
@ 2014-05-21 9:07 ` Daniel Vetter
2014-06-04 6:16 ` Patch "drm/i915: move power domain init earlier during system resume" has been added to the 3.14-stable tree gregkh
2014-05-21 9:07 ` [PATCH 3/4] drm/i915: Fix unsafe loop iteration over vma whilst unbinding them Daniel Vetter
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2014-05-21 9:07 UTC (permalink / raw)
To: stable; +Cc: Daniel Vetter, Intel Graphics Development
From: Imre Deak <imre.deak@intel.com>
This is commit 76c4b250080fff6e4befaa36199424 upstream.
During resume the intel hda audio driver depends on the i915 driver
reinitializing the audio power domain. Since the order of calling the
i915 resume handler wrt. that of the audio driver is not guaranteed,
move the power domain reinitialization step to the resume_early
handler. This is guaranteed to run before the resume handler of any
other driver.
The power domain initialization in turn requires us to enable the i915
pci device first, so move that part earlier too.
Accordingly disabling of the i915 pci device should happen after the
audio suspend handler ran. So move the disabling later from the i915
resume handler to the resume_late handler.
v2:
- move intel_uncore_sanitize/early_sanitize earlier too, so they don't
get reordered wrt. intel_power_domains_init_hw()
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76152
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@vger.kernel.org
[danvet: Add cc: stable and loud comments that this is just a hack.]
[danvet: Fix "Should it be static?" sparse warning reported by Wu
Fengguang's kbuilder.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_drv.c | 90 ++++++++++++++++++++++++++++++++++-------
1 file changed, 75 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ec7bb0fc71bc..9debd6e74439 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -614,15 +614,20 @@ static void intel_resume_hotplug(struct drm_device *dev)
drm_helper_hpd_irq_event(dev);
}
+static int i915_drm_thaw_early(struct drm_device *dev)
+{
+ intel_uncore_early_sanitize(dev);
+ intel_uncore_sanitize(dev);
+ intel_power_domains_init_hw(dev);
+
+ return 0;
+}
+
static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
{
struct drm_i915_private *dev_priv = dev->dev_private;
int error = 0;
- intel_uncore_early_sanitize(dev);
-
- intel_uncore_sanitize(dev);
-
if (drm_core_check_feature(dev, DRIVER_MODESET) &&
restore_gtt_mappings) {
mutex_lock(&dev->struct_mutex);
@@ -630,8 +635,6 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
mutex_unlock(&dev->struct_mutex);
}
- intel_power_domains_init_hw(dev);
-
i915_restore_state(dev);
intel_opregion_setup(dev);
@@ -700,19 +703,33 @@ static int i915_drm_thaw(struct drm_device *dev)
return __i915_drm_thaw(dev, true);
}
-int i915_resume(struct drm_device *dev)
+static int i915_resume_early(struct drm_device *dev)
{
- struct drm_i915_private *dev_priv = dev->dev_private;
- int ret;
-
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
+ /*
+ * We have a resume ordering issue with the snd-hda driver also
+ * requiring our device to be power up. Due to the lack of a
+ * parent/child relationship we currently solve this with an early
+ * resume hook.
+ *
+ * FIXME: This should be solved with a special hdmi sink device or
+ * similar so that power domains can be employed.
+ */
if (pci_enable_device(dev->pdev))
return -EIO;
pci_set_master(dev->pdev);
+ return i915_drm_thaw_early(dev);
+}
+
+int i915_resume(struct drm_device *dev)
+{
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ int ret;
+
/*
* Platforms with opregion should have sane BIOS, older ones (gen3 and
* earlier) need to restore the GTT mappings since the BIOS might clear
@@ -726,6 +743,14 @@ int i915_resume(struct drm_device *dev)
return 0;
}
+static int i915_resume_legacy(struct drm_device *dev)
+{
+ i915_resume_early(dev);
+ i915_resume(dev);
+
+ return 0;
+}
+
/**
* i915_reset - reset chip after a hang
* @dev: drm device to reset
@@ -846,7 +871,6 @@ static int i915_pm_suspend(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
- int error;
if (!drm_dev || !drm_dev->dev_private) {
dev_err(dev, "DRM not initialized, aborting suspend.\n");
@@ -856,9 +880,25 @@ static int i915_pm_suspend(struct device *dev)
if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
- error = i915_drm_freeze(drm_dev);
- if (error)
- return error;
+ return i915_drm_freeze(drm_dev);
+}
+
+static int i915_pm_suspend_late(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+ /*
+ * We have a suspedn ordering issue with the snd-hda driver also
+ * requiring our device to be power up. Due to the lack of a
+ * parent/child relationship we currently solve this with an late
+ * suspend hook.
+ *
+ * FIXME: This should be solved with a special hdmi sink device or
+ * similar so that power domains can be employed.
+ */
+ if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+ return 0;
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
@@ -866,6 +906,14 @@ static int i915_pm_suspend(struct device *dev)
return 0;
}
+static int i915_pm_resume_early(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+ return i915_resume_early(drm_dev);
+}
+
static int i915_pm_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -887,6 +935,14 @@ static int i915_pm_freeze(struct device *dev)
return i915_drm_freeze(drm_dev);
}
+static int i915_pm_thaw_early(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+ return i915_drm_thaw_early(drm_dev);
+}
+
static int i915_pm_thaw(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -948,10 +1004,14 @@ static int i915_runtime_resume(struct device *device)
static const struct dev_pm_ops i915_pm_ops = {
.suspend = i915_pm_suspend,
+ .suspend_late = i915_pm_suspend_late,
+ .resume_early = i915_pm_resume_early,
.resume = i915_pm_resume,
.freeze = i915_pm_freeze,
+ .thaw_early = i915_pm_thaw_early,
.thaw = i915_pm_thaw,
.poweroff = i915_pm_poweroff,
+ .restore_early = i915_pm_resume_early,
.restore = i915_pm_resume,
.runtime_suspend = i915_runtime_suspend,
.runtime_resume = i915_runtime_resume,
@@ -994,7 +1054,7 @@ static struct drm_driver driver = {
/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
.suspend = i915_suspend,
- .resume = i915_resume,
+ .resume = i915_resume_legacy,
.device_is_agp = i915_driver_device_is_agp,
.master_create = i915_master_create,
--
1.9.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] drm/i915: Fix unsafe loop iteration over vma whilst unbinding them
2014-05-21 9:07 drm/i915 stable backports Daniel Vetter
2014-05-21 9:07 ` [PATCH 1/4] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
2014-05-21 9:07 ` [PATCH 2/4] drm/i915: move power domain init earlier during system resume Daniel Vetter
@ 2014-05-21 9:07 ` Daniel Vetter
2014-06-04 6:16 ` Patch "drm/i915: Fix unsafe loop iteration over vma whilst unbinding them" has been added to the 3.14-stable tree gregkh
2014-05-21 9:07 ` [PATCH 4/4] drm/i915: quirk invert brightness for Acer Aspire 5336 Daniel Vetter
2014-06-04 6:16 ` drm/i915 stable backports Greg KH
4 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2014-05-21 9:07 UTC (permalink / raw)
To: stable; +Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky
From: Chris Wilson <chris@chris-wilson.co.uk>
This is commit df6f783a4ef6790780a67c491897ac upstream.
On non-LLC platforms, when changing the cache level of an object, we may
need to unbind it so that prefetching across page boundaries does not
cross into a different memory domain. This requires us to unbind
conflicting vma, but we did so iterating over the objects vma in an
unsafe manner (as the list was being modified as we iterated).
The regression was introduced in
commit 3089c6f239d7d2c4cb2dd5c353e8984cf79af1d7
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Wed Jul 31 17:00:03 2013 -0700
drm/i915: make caching operate on all address spaces
apparently as far back as v3.12-rc1, but it has only just begun to
trigger real world bug reports.
Reported-and-tested-by: Nikolay Martynov <mar.kolya@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76384
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 00c836154725..3ecb332e7cfa 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3529,7 +3529,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
{
struct drm_device *dev = obj->base.dev;
drm_i915_private_t *dev_priv = dev->dev_private;
- struct i915_vma *vma;
+ struct i915_vma *vma, *next;
int ret;
if (obj->cache_level == cache_level)
@@ -3540,7 +3540,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
return -EBUSY;
}
- list_for_each_entry(vma, &obj->vma_list, vma_link) {
+ list_for_each_entry_safe(vma, next, &obj->vma_list, vma_link) {
if (!i915_gem_valid_gtt_space(dev, &vma->node, cache_level)) {
ret = i915_vma_unbind(vma);
if (ret)
--
1.9.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] drm/i915: quirk invert brightness for Acer Aspire 5336
2014-05-21 9:07 drm/i915 stable backports Daniel Vetter
` (2 preceding siblings ...)
2014-05-21 9:07 ` [PATCH 3/4] drm/i915: Fix unsafe loop iteration over vma whilst unbinding them Daniel Vetter
@ 2014-05-21 9:07 ` Daniel Vetter
2014-06-04 6:17 ` Patch "drm/i915: quirk invert brightness for Acer Aspire 5336" has been added to the 3.14-stable tree gregkh
2014-06-04 6:16 ` drm/i915 stable backports Greg KH
4 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2014-05-21 9:07 UTC (permalink / raw)
To: stable; +Cc: Intel Graphics Development, Jani Nikula, Daniel Vetter
From: Jani Nikula <jani.nikula@intel.com>
This is commit 0f540c3a7cfb91c9d7a19eb0c95c24 upstream.
Since
commit ee1452d7458451a7508e0663553ce88d63958157
Author: Jani Nikula <jani.nikula@intel.com>
Date: Fri Sep 20 15:05:30 2013 +0300
drm/i915: assume all GM45 Acer laptops use inverted backlight PWM
failed and was later reverted in
commit be505f643925e257087247b996cd8ece787c12af
Author: Alexander van Heukelum <heukelum@fastmail.fm>
Date: Sat Dec 28 21:00:39 2013 +0100
Revert "drm/i915: assume all GM45 Acer laptops use inverted backlight PWM"
fix the individual broken machine instead.
Note to backporters:
http://patchwork.freedesktop.org/patch/17837/
is the patch you want for 3.13 and older.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54171
Reference: http://mid.gmane.org/DUB115-W7628C7C710EA51AA110CD4A5000@phx.gbl
CC: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Patch mangling for 3.14 plus adding the link to the original
for 3.13.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_display.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9b8a7c7ea7fc..9847988949ad 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10839,6 +10839,9 @@ static struct intel_quirk intel_quirks[] = {
/* Acer Aspire 4736Z */
{ 0x2a42, 0x1025, 0x0260, quirk_invert_brightness },
+
+ /* Acer Aspire 5336 */
+ { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness },
};
static void intel_init_quirks(struct drm_device *dev)
--
1.9.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: drm/i915 stable backports
2014-05-21 9:07 drm/i915 stable backports Daniel Vetter
` (3 preceding siblings ...)
2014-05-21 9:07 ` [PATCH 4/4] drm/i915: quirk invert brightness for Acer Aspire 5336 Daniel Vetter
@ 2014-06-04 6:16 ` Greg KH
4 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2014-06-04 6:16 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development, stable
On Wed, May 21, 2014 at 11:07:21AM +0200, Daniel Vetter wrote:
> Hi Greg,
>
> This is a set of drm/i915 patches which didn't apply cleanly on for 3.14. All
> absed on 3.14.4. I've left out the bdw patches for now and will sign up someone
> else for that task.
Thanks for the patches, all now applied.
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Patch "drm/i915: Disable self-refresh for untiled fbs on i915gm" has been added to the 3.14-stable tree
2014-05-21 9:07 ` [PATCH 1/4] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
@ 2014-06-04 6:16 ` gregkh
0 siblings, 0 replies; 10+ messages in thread
From: gregkh @ 2014-06-04 6:16 UTC (permalink / raw)
To: daniel.vetter, chris, gregkh, intel-gfx, jani.nikula, krzysiek,
ville.syrjala
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/i915: Disable self-refresh for untiled fbs on i915gm
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-disable-self-refresh-for-untiled-fbs-on-i915gm.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From daniel.vetter@ffwll.ch Tue Jun 3 23:12:52 2014
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed, 21 May 2014 11:07:22 +0200
Subject: drm/i915: Disable self-refresh for untiled fbs on i915gm
To: stable@vger.kernel.org
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>, Daniel Vetter <daniel.vetter@ffwll.ch>, Ville Syrjälä <ville.syrjala@linux.intel.com>, Chris Wilson <chris@chris-wilson.co.uk>, Krzysztof Mazur <krzysiek@podlesie.net>, Jani Nikula <jani.nikula@intel.com>
Message-ID: <1400663245-15601-2-git-send-email-daniel.vetter@ffwll.ch>
From: Daniel Vetter <daniel.vetter@ffwll.ch>
This is commit 2ab1bc9df01dbc19b55b2271100db7 upstream.
Apparently it doesn't work. X-tiled self-refresh works flawlessly
otoh. Apparently X still works correctly with linear framebuffers, so
might just be an issue with the initial modeset. It's unclear whether
this just borked wm setup from our side or a hw restriction, but just
disabling gets things going.
Note that this regression was only brought to light with
commit 3f2dc5ac05714711fc14f2bf0ee5e42d5c08c581
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date: Fri Jan 10 14:06:47 2014 +0200
drm/i915: Fix 915GM self-refresh enable/disable
before that self-refresh for i915GM didn't work at all.
Kudos to Ville for spotting a little bug in the original patch I've
attached to the bug.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76103
Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: Krzysztof Mazur <krzysiek@podlesie.net>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[Jani: rebase on top of drm-next with primary plane support.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_pm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1539,6 +1539,16 @@ static void i9xx_update_wm(struct drm_cr
DRM_DEBUG_KMS("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm);
+ if (IS_I915GM(dev) && enabled) {
+ struct intel_framebuffer *fb;
+
+ fb = to_intel_framebuffer(enabled->fb);
+
+ /* self-refresh seems busted with untiled */
+ if (fb->obj->tiling_mode == I915_TILING_NONE)
+ enabled = NULL;
+ }
+
/*
* Overlay gets an aggressive default since video jitter is bad.
*/
Patches currently in stable-queue which might be from daniel.vetter@ffwll.ch are
queue-3.14/drm-i915-don-t-warn-nor-handle-unexpected-hpd-interrupts-on-gmch-platforms.patch
queue-3.14/drm-i915-fix-unsafe-loop-iteration-over-vma-whilst-unbinding-them.patch
queue-3.14/drm-i915-disable-self-refresh-for-untiled-fbs-on-i915gm.patch
queue-3.14/drm-i915-don-t-check-gmch-state-on-inherited-configs.patch
queue-3.14/drm-i915-break-encoder-crtc-link-separately-in-intel_sanitize_crtc.patch
queue-3.14/drm-i915-quirk-invert-brightness-for-acer-aspire-5336.patch
queue-3.14/drm-i915-move-power-domain-init-earlier-during-system-resume.patch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Patch "drm/i915: Fix unsafe loop iteration over vma whilst unbinding them" has been added to the 3.14-stable tree
2014-05-21 9:07 ` [PATCH 3/4] drm/i915: Fix unsafe loop iteration over vma whilst unbinding them Daniel Vetter
@ 2014-06-04 6:16 ` gregkh
0 siblings, 0 replies; 10+ messages in thread
From: gregkh @ 2014-06-04 6:16 UTC (permalink / raw)
To: daniel.vetter, ben, chris, gregkh, intel-gfx, mar.kolya
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/i915: Fix unsafe loop iteration over vma whilst unbinding them
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-fix-unsafe-loop-iteration-over-vma-whilst-unbinding-them.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From daniel.vetter@ffwll.ch Tue Jun 3 23:13:34 2014
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed, 21 May 2014 11:07:24 +0200
Subject: drm/i915: Fix unsafe loop iteration over vma whilst unbinding them
To: stable@vger.kernel.org
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>, Chris Wilson <chris@chris-wilson.co.uk>, Ben Widawsky <ben@bwidawsk.net>, Daniel Vetter <daniel.vetter@ffwll.ch>
Message-ID: <1400663245-15601-4-git-send-email-daniel.vetter@ffwll.ch>
From: Chris Wilson <chris@chris-wilson.co.uk>
This is commit df6f783a4ef6790780a67c491897ac upstream.
On non-LLC platforms, when changing the cache level of an object, we may
need to unbind it so that prefetching across page boundaries does not
cross into a different memory domain. This requires us to unbind
conflicting vma, but we did so iterating over the objects vma in an
unsafe manner (as the list was being modified as we iterated).
The regression was introduced in
commit 3089c6f239d7d2c4cb2dd5c353e8984cf79af1d7
Author: Ben Widawsky <ben@bwidawsk.net>
Date: Wed Jul 31 17:00:03 2013 -0700
drm/i915: make caching operate on all address spaces
apparently as far back as v3.12-rc1, but it has only just begun to
trigger real world bug reports.
Reported-and-tested-by: Nikolay Martynov <mar.kolya@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76384
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3529,7 +3529,7 @@ int i915_gem_object_set_cache_level(stru
{
struct drm_device *dev = obj->base.dev;
drm_i915_private_t *dev_priv = dev->dev_private;
- struct i915_vma *vma;
+ struct i915_vma *vma, *next;
int ret;
if (obj->cache_level == cache_level)
@@ -3540,7 +3540,7 @@ int i915_gem_object_set_cache_level(stru
return -EBUSY;
}
- list_for_each_entry(vma, &obj->vma_list, vma_link) {
+ list_for_each_entry_safe(vma, next, &obj->vma_list, vma_link) {
if (!i915_gem_valid_gtt_space(dev, &vma->node, cache_level)) {
ret = i915_vma_unbind(vma);
if (ret)
Patches currently in stable-queue which might be from daniel.vetter@ffwll.ch are
queue-3.14/drm-i915-don-t-warn-nor-handle-unexpected-hpd-interrupts-on-gmch-platforms.patch
queue-3.14/drm-i915-fix-unsafe-loop-iteration-over-vma-whilst-unbinding-them.patch
queue-3.14/drm-i915-disable-self-refresh-for-untiled-fbs-on-i915gm.patch
queue-3.14/drm-i915-don-t-check-gmch-state-on-inherited-configs.patch
queue-3.14/drm-i915-break-encoder-crtc-link-separately-in-intel_sanitize_crtc.patch
queue-3.14/drm-i915-quirk-invert-brightness-for-acer-aspire-5336.patch
queue-3.14/drm-i915-move-power-domain-init-earlier-during-system-resume.patch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Patch "drm/i915: move power domain init earlier during system resume" has been added to the 3.14-stable tree
2014-05-21 9:07 ` [PATCH 2/4] drm/i915: move power domain init earlier during system resume Daniel Vetter
@ 2014-06-04 6:16 ` gregkh
0 siblings, 0 replies; 10+ messages in thread
From: gregkh @ 2014-06-04 6:16 UTC (permalink / raw)
To: daniel.vetter, gregkh, imre.deak, intel-gfx, tiwai; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/i915: move power domain init earlier during system resume
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-move-power-domain-init-earlier-during-system-resume.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From daniel.vetter@ffwll.ch Tue Jun 3 23:13:18 2014
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed, 21 May 2014 11:07:23 +0200
Subject: drm/i915: move power domain init earlier during system resume
To: stable@vger.kernel.org
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>, Imre Deak <imre.deak@intel.com>, Daniel Vetter <daniel.vetter@ffwll.ch>
Message-ID: <1400663245-15601-3-git-send-email-daniel.vetter@ffwll.ch>
From: Imre Deak <imre.deak@intel.com>
This is commit 76c4b250080fff6e4befaa36199424 upstream.
During resume the intel hda audio driver depends on the i915 driver
reinitializing the audio power domain. Since the order of calling the
i915 resume handler wrt. that of the audio driver is not guaranteed,
move the power domain reinitialization step to the resume_early
handler. This is guaranteed to run before the resume handler of any
other driver.
The power domain initialization in turn requires us to enable the i915
pci device first, so move that part earlier too.
Accordingly disabling of the i915 pci device should happen after the
audio suspend handler ran. So move the disabling later from the i915
resume handler to the resume_late handler.
v2:
- move intel_uncore_sanitize/early_sanitize earlier too, so they don't
get reordered wrt. intel_power_domains_init_hw()
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76152
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
[danvet: Add cc: stable and loud comments that this is just a hack.]
[danvet: Fix "Should it be static?" sparse warning reported by Wu
Fengguang's kbuilder.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/i915_drv.c | 90 +++++++++++++++++++++++++++++++++-------
1 file changed, 75 insertions(+), 15 deletions(-)
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -614,15 +614,20 @@ static void intel_resume_hotplug(struct
drm_helper_hpd_irq_event(dev);
}
+static int i915_drm_thaw_early(struct drm_device *dev)
+{
+ intel_uncore_early_sanitize(dev);
+ intel_uncore_sanitize(dev);
+ intel_power_domains_init_hw(dev);
+
+ return 0;
+}
+
static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
{
struct drm_i915_private *dev_priv = dev->dev_private;
int error = 0;
- intel_uncore_early_sanitize(dev);
-
- intel_uncore_sanitize(dev);
-
if (drm_core_check_feature(dev, DRIVER_MODESET) &&
restore_gtt_mappings) {
mutex_lock(&dev->struct_mutex);
@@ -630,8 +635,6 @@ static int __i915_drm_thaw(struct drm_de
mutex_unlock(&dev->struct_mutex);
}
- intel_power_domains_init_hw(dev);
-
i915_restore_state(dev);
intel_opregion_setup(dev);
@@ -700,19 +703,33 @@ static int i915_drm_thaw(struct drm_devi
return __i915_drm_thaw(dev, true);
}
-int i915_resume(struct drm_device *dev)
+static int i915_resume_early(struct drm_device *dev)
{
- struct drm_i915_private *dev_priv = dev->dev_private;
- int ret;
-
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
+ /*
+ * We have a resume ordering issue with the snd-hda driver also
+ * requiring our device to be power up. Due to the lack of a
+ * parent/child relationship we currently solve this with an early
+ * resume hook.
+ *
+ * FIXME: This should be solved with a special hdmi sink device or
+ * similar so that power domains can be employed.
+ */
if (pci_enable_device(dev->pdev))
return -EIO;
pci_set_master(dev->pdev);
+ return i915_drm_thaw_early(dev);
+}
+
+int i915_resume(struct drm_device *dev)
+{
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ int ret;
+
/*
* Platforms with opregion should have sane BIOS, older ones (gen3 and
* earlier) need to restore the GTT mappings since the BIOS might clear
@@ -726,6 +743,14 @@ int i915_resume(struct drm_device *dev)
return 0;
}
+static int i915_resume_legacy(struct drm_device *dev)
+{
+ i915_resume_early(dev);
+ i915_resume(dev);
+
+ return 0;
+}
+
/**
* i915_reset - reset chip after a hang
* @dev: drm device to reset
@@ -846,7 +871,6 @@ static int i915_pm_suspend(struct device
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
- int error;
if (!drm_dev || !drm_dev->dev_private) {
dev_err(dev, "DRM not initialized, aborting suspend.\n");
@@ -856,9 +880,25 @@ static int i915_pm_suspend(struct device
if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
- error = i915_drm_freeze(drm_dev);
- if (error)
- return error;
+ return i915_drm_freeze(drm_dev);
+}
+
+static int i915_pm_suspend_late(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+ /*
+ * We have a suspedn ordering issue with the snd-hda driver also
+ * requiring our device to be power up. Due to the lack of a
+ * parent/child relationship we currently solve this with an late
+ * suspend hook.
+ *
+ * FIXME: This should be solved with a special hdmi sink device or
+ * similar so that power domains can be employed.
+ */
+ if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+ return 0;
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
@@ -866,6 +906,14 @@ static int i915_pm_suspend(struct device
return 0;
}
+static int i915_pm_resume_early(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+ return i915_resume_early(drm_dev);
+}
+
static int i915_pm_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -887,6 +935,14 @@ static int i915_pm_freeze(struct device
return i915_drm_freeze(drm_dev);
}
+static int i915_pm_thaw_early(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+ return i915_drm_thaw_early(drm_dev);
+}
+
static int i915_pm_thaw(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -948,10 +1004,14 @@ static int i915_runtime_resume(struct de
static const struct dev_pm_ops i915_pm_ops = {
.suspend = i915_pm_suspend,
+ .suspend_late = i915_pm_suspend_late,
+ .resume_early = i915_pm_resume_early,
.resume = i915_pm_resume,
.freeze = i915_pm_freeze,
+ .thaw_early = i915_pm_thaw_early,
.thaw = i915_pm_thaw,
.poweroff = i915_pm_poweroff,
+ .restore_early = i915_pm_resume_early,
.restore = i915_pm_resume,
.runtime_suspend = i915_runtime_suspend,
.runtime_resume = i915_runtime_resume,
@@ -994,7 +1054,7 @@ static struct drm_driver driver = {
/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
.suspend = i915_suspend,
- .resume = i915_resume,
+ .resume = i915_resume_legacy,
.device_is_agp = i915_driver_device_is_agp,
.master_create = i915_master_create,
Patches currently in stable-queue which might be from daniel.vetter@ffwll.ch are
queue-3.14/drm-i915-don-t-warn-nor-handle-unexpected-hpd-interrupts-on-gmch-platforms.patch
queue-3.14/drm-i915-fix-unsafe-loop-iteration-over-vma-whilst-unbinding-them.patch
queue-3.14/drm-i915-disable-self-refresh-for-untiled-fbs-on-i915gm.patch
queue-3.14/drm-i915-don-t-check-gmch-state-on-inherited-configs.patch
queue-3.14/drm-i915-break-encoder-crtc-link-separately-in-intel_sanitize_crtc.patch
queue-3.14/drm-i915-quirk-invert-brightness-for-acer-aspire-5336.patch
queue-3.14/drm-i915-move-power-domain-init-earlier-during-system-resume.patch
^ permalink raw reply [flat|nested] 10+ messages in thread
* Patch "drm/i915: quirk invert brightness for Acer Aspire 5336" has been added to the 3.14-stable tree
2014-05-21 9:07 ` [PATCH 4/4] drm/i915: quirk invert brightness for Acer Aspire 5336 Daniel Vetter
@ 2014-06-04 6:17 ` gregkh
0 siblings, 0 replies; 10+ messages in thread
From: gregkh @ 2014-06-04 6:17 UTC (permalink / raw)
To: daniel.vetter, heukelum, intel-gfx, jani.nikula, ville.syrjala
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/i915: quirk invert brightness for Acer Aspire 5336
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-quirk-invert-brightness-for-acer-aspire-5336.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From daniel.vetter@ffwll.ch Tue Jun 3 23:14:20 2014
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed, 21 May 2014 11:07:25 +0200
Subject: drm/i915: quirk invert brightness for Acer Aspire 5336
To: stable@vger.kernel.org
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>, Jani Nikula <jani.nikula@intel.com>, Daniel Vetter <daniel.vetter@ffwll.ch>
Message-ID: <1400663245-15601-5-git-send-email-daniel.vetter@ffwll.ch>
From: Jani Nikula <jani.nikula@intel.com>
This is commit 0f540c3a7cfb91c9d7a19eb0c95c24 upstream.
Since
commit ee1452d7458451a7508e0663553ce88d63958157
Author: Jani Nikula <jani.nikula@intel.com>
Date: Fri Sep 20 15:05:30 2013 +0300
drm/i915: assume all GM45 Acer laptops use inverted backlight PWM
failed and was later reverted in
commit be505f643925e257087247b996cd8ece787c12af
Author: Alexander van Heukelum <heukelum@fastmail.fm>
Date: Sat Dec 28 21:00:39 2013 +0100
Revert "drm/i915: assume all GM45 Acer laptops use inverted backlight PWM"
fix the individual broken machine instead.
Note to backporters:
http://patchwork.freedesktop.org/patch/17837/
is the patch you want for 3.13 and older.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=54171
Reference: http://mid.gmane.org/DUB115-W7628C7C710EA51AA110CD4A5000@phx.gbl
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Patch mangling for 3.14 plus adding the link to the original
for 3.13.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_display.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10862,6 +10862,9 @@ static struct intel_quirk intel_quirks[]
/* Acer Aspire 4736Z */
{ 0x2a42, 0x1025, 0x0260, quirk_invert_brightness },
+ /* Acer Aspire 5336 */
+ { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness },
+
/* Dell XPS13 HD Sandy Bridge */
{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
/* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
Patches currently in stable-queue which might be from daniel.vetter@ffwll.ch are
queue-3.14/drm-i915-don-t-warn-nor-handle-unexpected-hpd-interrupts-on-gmch-platforms.patch
queue-3.14/drm-i915-fix-unsafe-loop-iteration-over-vma-whilst-unbinding-them.patch
queue-3.14/drm-i915-disable-self-refresh-for-untiled-fbs-on-i915gm.patch
queue-3.14/drm-i915-don-t-check-gmch-state-on-inherited-configs.patch
queue-3.14/drm-i915-break-encoder-crtc-link-separately-in-intel_sanitize_crtc.patch
queue-3.14/drm-i915-quirk-invert-brightness-for-acer-aspire-5336.patch
queue-3.14/drm-i915-move-power-domain-init-earlier-during-system-resume.patch
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-04 6:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 9:07 drm/i915 stable backports Daniel Vetter
2014-05-21 9:07 ` [PATCH 1/4] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
2014-06-04 6:16 ` Patch "drm/i915: Disable self-refresh for untiled fbs on i915gm" has been added to the 3.14-stable tree gregkh
2014-05-21 9:07 ` [PATCH 2/4] drm/i915: move power domain init earlier during system resume Daniel Vetter
2014-06-04 6:16 ` Patch "drm/i915: move power domain init earlier during system resume" has been added to the 3.14-stable tree gregkh
2014-05-21 9:07 ` [PATCH 3/4] drm/i915: Fix unsafe loop iteration over vma whilst unbinding them Daniel Vetter
2014-06-04 6:16 ` Patch "drm/i915: Fix unsafe loop iteration over vma whilst unbinding them" has been added to the 3.14-stable tree gregkh
2014-05-21 9:07 ` [PATCH 4/4] drm/i915: quirk invert brightness for Acer Aspire 5336 Daniel Vetter
2014-06-04 6:17 ` Patch "drm/i915: quirk invert brightness for Acer Aspire 5336" has been added to the 3.14-stable tree gregkh
2014-06-04 6:16 ` drm/i915 stable backports Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox