public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix cursor handling when runtime suspended
@ 2014-07-23 21:30 Paulo Zanoni
  2014-07-23 21:31 ` [PATCH] tests/pm_rpm: add cursor subtests Paulo Zanoni
  2014-07-23 22:35 ` [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Paulo Zanoni @ 2014-07-23 21:30 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni, stable

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

If we're runtime suspended and try to use the cursor interfaces, we
will get a lot of WARNs saying we did the wrong thing.

For intel_crtc_update_cursor(), all we need to do is return if the
CRTC is not active, since writing the registers won't really have any
effect if the screen is not visible, and we will write the registers
later when enabling the screen.

For intel_crtc_cursor_set_obj(), we just get the proper power domain
reference, since this function does a lot of stuff.

Testcase: igt/pm_rpm/cursor
Testcase: igt/pm_rpm/cursor-dpms
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d1e9570..c8f36b0 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8151,6 +8151,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
 	if (base == 0 && intel_crtc->cursor_base == 0)
 		return;
 
+	if (!intel_crtc->active)
+		return;
+
 	I915_WRITE(CURPOS(pipe), pos);
 
 	if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev) || IS_BROADWELL(dev))
@@ -8181,6 +8184,8 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
 	uint32_t addr;
 	int ret;
 
+	intel_display_power_get(dev_priv, POWER_DOMAIN_PIPE(pipe));
+
 	/* if we want to turn off the cursor ignore width and height */
 	if (!obj) {
 		DRM_DEBUG_KMS("cursor off\n");
@@ -8195,13 +8200,14 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
 			(width == 128 && height == 128 && !IS_GEN2(dev)) ||
 			(width == 256 && height == 256 && !IS_GEN2(dev)))) {
 		DRM_DEBUG("Cursor dimension not supported\n");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto fail;
 	}
 
 	if (obj->base.size < width * height * 4) {
 		DRM_DEBUG_KMS("buffer is too small\n");
 		ret = -ENOMEM;
-		goto fail;
+		goto fail_unref;
 	}
 
 	/* we only need to pin inside GTT if cursor is non-phy */
@@ -8275,13 +8281,16 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
 
 	intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
 
+	intel_display_power_put(dev_priv, POWER_DOMAIN_PIPE(pipe));
 	return 0;
 fail_unpin:
 	i915_gem_object_unpin_from_display_plane(obj);
 fail_locked:
 	mutex_unlock(&dev->struct_mutex);
-fail:
+fail_unref:
 	drm_gem_object_unreference_unlocked(&obj->base);
+fail:
+	intel_display_power_put(dev_priv, POWER_DOMAIN_PIPE(pipe));
 	return ret;
 }
 
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] tests/pm_rpm: add cursor subtests
  2014-07-23 21:30 [PATCH] drm/i915: fix cursor handling when runtime suspended Paulo Zanoni
@ 2014-07-23 21:31 ` Paulo Zanoni
  2014-07-23 22:35 ` [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended Daniel Vetter
  1 sibling, 0 replies; 6+ messages in thread
From: Paulo Zanoni @ 2014-07-23 21:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

These tests currently trigger WARNs on our Kernel. Let's make sure we
fix the bugs and they never come back.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 tests/pm_rpm.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 101 insertions(+), 10 deletions(-)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 869e6f3..10ac6cc 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -277,13 +277,15 @@ static uint32_t get_fb(struct mode_set_data *data, int width, int height)
 	igt_assert(false);
 }
 
-static bool enable_one_screen_with_type(struct mode_set_data *data,
-					enum screen_type type)
+static bool find_connector_for_modeset(struct mode_set_data *data,
+				       enum screen_type type,
+				       uint32_t *connector_id,
+				       drmModeModeInfoPtr *mode)
 {
-	uint32_t crtc_id = 0, buffer_id = 0, connector_id = 0;
-	drmModeModeInfoPtr mode = NULL;
-	int i, rc;
+	int i;
 
+	*connector_id = 0;
+	*mode = NULL;
 	for (i = 0; i < data->res->count_connectors; i++) {
 		drmModeConnectorPtr c = data->connectors[i];
 
@@ -296,13 +298,23 @@ static bool enable_one_screen_with_type(struct mode_set_data *data,
 			continue;
 
 		if (c->connection == DRM_MODE_CONNECTED && c->count_modes) {
-			connector_id = c->connector_id;
-			mode = &c->modes[0];
+			*connector_id = c->connector_id;
+			*mode = &c->modes[0];
 			break;
 		}
 	}
 
-	if (connector_id == 0)
+	return (*connector_id != 0);
+}
+
+static bool enable_one_screen_with_type(struct mode_set_data *data,
+					enum screen_type type)
+{
+	uint32_t crtc_id = 0, buffer_id = 0, connector_id;
+	drmModeModeInfoPtr mode;
+	int rc;
+
+	if (!find_connector_for_modeset(data, type, &connector_id, &mode))
 		return false;
 
 	crtc_id = data->res->crtcs[0];
@@ -310,8 +322,6 @@ static bool enable_one_screen_with_type(struct mode_set_data *data,
 
 	igt_assert(crtc_id);
 	igt_assert(buffer_id);
-	igt_assert(connector_id);
-	igt_assert(mode);
 
 	rc = drmModeSetCrtc(drm_fd, crtc_id, buffer_id, 0, 0, &connector_id,
 			    1, mode);
@@ -1407,6 +1417,81 @@ static void dpms_mode_unset_subtest(enum screen_type type)
 	igt_assert(wait_for_suspended());
 }
 
+static void fill_igt_fb(struct igt_fb *fb, uint32_t color)
+{
+	int i;
+	uint32_t *ptr;
+
+	ptr = gem_mmap__cpu(drm_fd, fb->gem_handle, fb->size, 0);
+	for (i = 0; i < fb->size/sizeof(uint32_t); i++)
+		ptr[i] = color;
+	igt_assert(munmap(ptr, fb->size) == 0);
+}
+
+/* At some point, this test triggered WARNs in the Kernel. */
+static void cursor_subtest(bool dpms)
+{
+	uint32_t crtc_id = 0, connector_id;
+	drmModeModeInfoPtr mode;
+	int rc;
+	struct igt_fb scanout_fb, cursor_fb1, cursor_fb2;
+
+	disable_all_screens(&ms_data);
+	igt_assert(wait_for_suspended());
+
+	igt_require(find_connector_for_modeset(&ms_data, SCREEN_TYPE_ANY,
+					       &connector_id, &mode));
+
+	crtc_id = ms_data.res->crtcs[0];
+	igt_assert(crtc_id);
+
+	igt_create_fb(drm_fd, mode->hdisplay, mode->vdisplay,
+		      DRM_FORMAT_XRGB8888, false, &scanout_fb);
+	igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, false, &cursor_fb1);
+	igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, false, &cursor_fb2);
+
+	fill_igt_fb(&scanout_fb, 0xFF);
+	fill_igt_fb(&cursor_fb1, 0xFF00FFFF);
+	fill_igt_fb(&cursor_fb2, 0xFF00FF00);
+
+	rc = drmModeSetCrtc(drm_fd, crtc_id, scanout_fb.fb_id, 0, 0,
+			    &connector_id, 1, mode);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_active());
+
+	rc = drmModeSetCursor(drm_fd, crtc_id, cursor_fb1.gem_handle, 64, 64);
+	igt_assert(rc == 0);
+	rc = drmModeMoveCursor(drm_fd, crtc_id, 0, 0);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_active());
+
+	if (dpms)
+		disable_all_screens_dpms(&ms_data);
+	else
+		disable_all_screens(&ms_data);
+	igt_assert(wait_for_suspended());
+
+	rc = drmModeMoveCursor(drm_fd, crtc_id, 1, 1);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_suspended());
+
+	rc = drmModeSetCursor(drm_fd, crtc_id, 0, 0, 0);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_suspended());
+
+	rc = drmModeSetCursor(drm_fd, crtc_id, cursor_fb2.gem_handle, 64, 64);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_suspended());
+
+	rc = drmModeMoveCursor(drm_fd, crtc_id, 2, 2);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_suspended());
+
+	rc = drmModeSetCursor(drm_fd, crtc_id, 0, 0, 0);
+	igt_assert(rc == 0);
+	igt_assert(wait_for_suspended());
+}
+
 int rounds = 50;
 bool stay = false;
 
@@ -1480,6 +1565,12 @@ int main(int argc, char *argv[])
 	igt_subtest("gem-idle")
 		gem_idle_subtest();
 
+	/* Planes and cursors */
+	igt_subtest("cursor")
+		cursor_subtest(false);
+	igt_subtest("cursor-dpms")
+		cursor_subtest(true);
+
 	/* Misc */
 	igt_subtest("reg-read-ioctl")
 		reg_read_ioctl_subtest();
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended
  2014-07-23 21:30 [PATCH] drm/i915: fix cursor handling when runtime suspended Paulo Zanoni
  2014-07-23 21:31 ` [PATCH] tests/pm_rpm: add cursor subtests Paulo Zanoni
@ 2014-07-23 22:35 ` Daniel Vetter
  2014-07-23 22:41   ` Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-07-23 22:35 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni, stable

On Wed, Jul 23, 2014 at 06:30:59PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> If we're runtime suspended and try to use the cursor interfaces, we
> will get a lot of WARNs saying we did the wrong thing.
> 
> For intel_crtc_update_cursor(), all we need to do is return if the
> CRTC is not active, since writing the registers won't really have any
> effect if the screen is not visible, and we will write the registers
> later when enabling the screen.
> 
> For intel_crtc_cursor_set_obj(), we just get the proper power domain
> reference, since this function does a lot of stuff.
> 
> Testcase: igt/pm_rpm/cursor
> Testcase: igt/pm_rpm/cursor-dpms
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645
> Cc: stable@vger.kernel.org
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index d1e9570..c8f36b0 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8151,6 +8151,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
>  	if (base == 0 && intel_crtc->cursor_base == 0)
>  		return;
>  
> +	if (!intel_crtc->active)
> +		return;

Don't we need the same trick in intel_crtc_cursor_set_obj? This gets
called if the cursor object changes (instead of just moving it around).
> +
>  	I915_WRITE(CURPOS(pipe), pos);
>  
>  	if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev) || IS_BROADWELL(dev))
> @@ -8181,6 +8184,8 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
>  	uint32_t addr;
>  	int ret;
>  
> +	intel_display_power_get(dev_priv, POWER_DOMAIN_PIPE(pipe));

This shouldn't be needed - if intel_crtc->active is set, we do hold a
reference to the pipe power domain already. There's no way the pipe would
be able to run otherwise ;-)
-Daniel

> +
>  	/* if we want to turn off the cursor ignore width and height */
>  	if (!obj) {
>  		DRM_DEBUG_KMS("cursor off\n");
> @@ -8195,13 +8200,14 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
>  			(width == 128 && height == 128 && !IS_GEN2(dev)) ||
>  			(width == 256 && height == 256 && !IS_GEN2(dev)))) {
>  		DRM_DEBUG("Cursor dimension not supported\n");
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto fail;
>  	}
>  
>  	if (obj->base.size < width * height * 4) {
>  		DRM_DEBUG_KMS("buffer is too small\n");
>  		ret = -ENOMEM;
> -		goto fail;
> +		goto fail_unref;
>  	}
>  
>  	/* we only need to pin inside GTT if cursor is non-phy */
> @@ -8275,13 +8281,16 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
>  
>  	intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe));
>  
> +	intel_display_power_put(dev_priv, POWER_DOMAIN_PIPE(pipe));
>  	return 0;
>  fail_unpin:
>  	i915_gem_object_unpin_from_display_plane(obj);
>  fail_locked:
>  	mutex_unlock(&dev->struct_mutex);
> -fail:
> +fail_unref:
>  	drm_gem_object_unreference_unlocked(&obj->base);
> +fail:
> +	intel_display_power_put(dev_priv, POWER_DOMAIN_PIPE(pipe));
>  	return ret;
>  }
>  
> -- 
> 2.0.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended
  2014-07-23 22:35 ` [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended Daniel Vetter
@ 2014-07-23 22:41   ` Daniel Vetter
  2014-07-23 23:38     ` Paulo Zanoni
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-07-23 22:41 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni, stable

On Thu, Jul 24, 2014 at 12:35:25AM +0200, Daniel Vetter wrote:
> On Wed, Jul 23, 2014 at 06:30:59PM -0300, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > 
> > If we're runtime suspended and try to use the cursor interfaces, we
> > will get a lot of WARNs saying we did the wrong thing.
> > 
> > For intel_crtc_update_cursor(), all we need to do is return if the
> > CRTC is not active, since writing the registers won't really have any
> > effect if the screen is not visible, and we will write the registers
> > later when enabling the screen.
> > 
> > For intel_crtc_cursor_set_obj(), we just get the proper power domain
> > reference, since this function does a lot of stuff.
> > 
> > Testcase: igt/pm_rpm/cursor
> > Testcase: igt/pm_rpm/cursor-dpms
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++---
> >  1 file changed, 12 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index d1e9570..c8f36b0 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -8151,6 +8151,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
> >  	if (base == 0 && intel_crtc->cursor_base == 0)
> >  		return;
> >  
> > +	if (!intel_crtc->active)
> > +		return;
> 
> Don't we need the same trick in intel_crtc_cursor_set_obj? This gets
> called if the cursor object changes (instead of just moving it around).

Rechecked and realized the only I915_WRITE in there is for gen2. I guess
we don't care ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended
  2014-07-23 22:41   ` Daniel Vetter
@ 2014-07-23 23:38     ` Paulo Zanoni
  2014-07-24  7:35       ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Paulo Zanoni @ 2014-07-23 23:38 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development, Paulo Zanoni, stable

2014-07-23 19:41 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
> On Thu, Jul 24, 2014 at 12:35:25AM +0200, Daniel Vetter wrote:
>> On Wed, Jul 23, 2014 at 06:30:59PM -0300, Paulo Zanoni wrote:
>> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> >
>> > If we're runtime suspended and try to use the cursor interfaces, we
>> > will get a lot of WARNs saying we did the wrong thing.
>> >
>> > For intel_crtc_update_cursor(), all we need to do is return if the
>> > CRTC is not active, since writing the registers won't really have any
>> > effect if the screen is not visible, and we will write the registers
>> > later when enabling the screen.
>> >
>> > For intel_crtc_cursor_set_obj(), we just get the proper power domain
>> > reference, since this function does a lot of stuff.
>> >
>> > Testcase: igt/pm_rpm/cursor
>> > Testcase: igt/pm_rpm/cursor-dpms
>> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645
>> > Cc: stable@vger.kernel.org
>> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> > ---
>> >  drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++---
>> >  1 file changed, 12 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> > index d1e9570..c8f36b0 100644
>> > --- a/drivers/gpu/drm/i915/intel_display.c
>> > +++ b/drivers/gpu/drm/i915/intel_display.c
>> > @@ -8151,6 +8151,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
>> >     if (base == 0 && intel_crtc->cursor_base == 0)
>> >             return;
>> >
>> > +   if (!intel_crtc->active)
>> > +           return;
>>
>> Don't we need the same trick in intel_crtc_cursor_set_obj? This gets
>> called if the cursor object changes (instead of just moving it around).
>
> Rechecked and realized the only I915_WRITE in there is for gen2. I guess
> we don't care ;-)

Nope. You need to look at the subfunctions and their subsubfunctions
and their subsubsubfunctions and so on. This is what happens when I
remove just the display_power_get/put calls:

[   35.762635] [drm:intel_crtc_cursor_set_obj] cursor off
[   35.762665] [drm:add_framebuffer_internal] [FB:63]
[   35.762685] ------------[ cut here ]------------
[   35.762714] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/i915_gem_gtt.c:1480
gen6_ggtt_insert_entries+0x116/0x120 [i915]()
[   35.762716] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.762748] CPU: 0 PID: 3169 Comm: pm_rpm Not tainted
3.16.0-rc6.1407232028+ #695
[   35.762751] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.762754]  0000000000000009 ffff88009ce139c8 ffffffff816b6a61
0000000000000000
[   35.762760]  ffff88009ce13a00 ffffffff81075d88 0000000092946000
00000000ffffffff
[   35.762765]  ffffc90010d04d74 ffff88009d938bb8 ffffc90010d04d68
ffff88009ce13a10
[   35.762770] Call Trace:
[   35.762782]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.762789]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.762793]  [<ffffffff81075e65>] warn_slowpath_null+0x15/0x20
[   35.762814]  [<ffffffffa0169716>] gen6_ggtt_insert_entries+0x116/0x120 [i915]
[   35.762831]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.762850]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.762869]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.762894]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.762916]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.762937]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.762952]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.762968]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.762978]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.762983]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.762988]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.762994]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.762998]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.763004]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.763008]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.763013]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.763015] ---[ end trace 189706dc7c79e8d7 ]---
[   35.763018] ------------[ cut here ]------------
[   35.763039] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/intel_uncore.c:47
assert_device_not_suspended.isra.8+0x43/0x50 [i915]()
[   35.763041] Device suspended
[   35.763043] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.763070] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
3.16.0-rc6.1407232028+ #695
[   35.763073] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.763075]  0000000000000009 ffff88009ce13920 ffffffff816b6a61
ffff88009ce13968
[   35.763080]  ffff88009ce13958 ffffffff81075d88 ffff88009d930000
0000000000101008
[   35.763085]  ffff88009d930068 ffff88009d938bb8 ffffc90010d04d68
ffff88009ce139b8
[   35.763089] Call Trace:
[   35.763095]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.763099]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.763103]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
[   35.763123]  [<ffffffffa018c443>]
assert_device_not_suspended.isra.8+0x43/0x50 [i915]
[   35.763142]  [<ffffffffa018f2a2>] hsw_write32+0x32/0x140 [i915]
[   35.763158]  [<ffffffffa01696be>] gen6_ggtt_insert_entries+0xbe/0x120 [i915]
[   35.763173]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.763190]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.763207]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.763229]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.763249]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.763266]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.763281]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.763297]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.763307]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.763312]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.763315]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.763320]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.763325]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.763329]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.763334]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.763338]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.763341] ---[ end trace 189706dc7c79e8d8 ]---
[   35.763345] ------------[ cut here ]------------
[   35.763366] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/intel_uncore.c:528
hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
[   35.763369] Unclaimed register detected before writing to register 0x101008
[   35.763370] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.763393] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
3.16.0-rc6.1407232028+ #695
[   35.763395] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.763397]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
ffff88009ce13960
[   35.763401]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
0000000000101008
[   35.763405]  ffff88009d930068 0000000000000000 ffffc90010d04d68
ffff88009ce139b0
[   35.763410] Call Trace:
[   35.763415]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.763419]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.763422]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
[   35.763441]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
[   35.763459]  [<ffffffffa018f2d9>] hsw_write32+0x69/0x140 [i915]
[   35.763475]  [<ffffffffa01696be>] gen6_ggtt_insert_entries+0xbe/0x120 [i915]
[   35.763489]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.763506]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.763522]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.763543]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.763563]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.763579]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.763593]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.763610]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.763619]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.763623]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.763627]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.763632]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.763636]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.763640]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.763644]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.763648]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.763650] ---[ end trace 189706dc7c79e8d9 ]---
[   35.763654] ------------[ cut here ]------------
[   35.763673] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/intel_uncore.c:528
hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
[   35.763675] Unclaimed register detected after writing to register 0x101008
[   35.763677] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.763699] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
3.16.0-rc6.1407232028+ #695
[   35.763701] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.763703]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
ffff88009ce13960
[   35.763707]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
0000000000101008
[   35.763711]  ffff88009d930068 0000000000000000 ffff88009d930060
ffff88009ce139b0
[   35.763715] Call Trace:
[   35.763720]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.763724]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.763728]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
[   35.763746]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
[   35.763763]  [<ffffffffa018f301>] hsw_write32+0x91/0x140 [i915]
[   35.763779]  [<ffffffffa01696be>] gen6_ggtt_insert_entries+0xbe/0x120 [i915]
[   35.763796]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.763816]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.763836]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.763860]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.763885]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.763901]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.763918]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.763935]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.763945]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.763949]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.763953]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.763958]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.763963]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.763967]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.763972]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.763976]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.763979] ---[ end trace 189706dc7c79e8da ]---
[   35.764026] ------------[ cut here ]------------
[   35.764050] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/intel_uncore.c:47
assert_device_not_suspended.isra.8+0x43/0x50 [i915]()
[   35.764056] Device suspended
[   35.764060] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.764158] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
3.16.0-rc6.1407232028+ #695
[   35.764161] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.764164]  0000000000000009 ffff88009ce13920 ffffffff816b6a61
ffff88009ce13968
[   35.764173]  ffff88009ce13958 ffffffff81075d88 ffff88009d930068
0000000000101008
[   35.764182]  ffffc90010d04d74 0000000000101008 ffff88009d930000
ffff88009ce139b8
[   35.764189] Call Trace:
[   35.764195]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.764200]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.764204]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
[   35.764208]  [<ffffffff816c0193>] ? _raw_spin_unlock_irqrestore+0x33/0x50
[   35.764223]  [<ffffffffa018c443>]
assert_device_not_suspended.isra.8+0x43/0x50 [i915]
[   35.764235]  [<ffffffffa018f150>] gen6_read32+0x30/0x150 [i915]
[   35.764244]  [<ffffffffa01696d1>] gen6_ggtt_insert_entries+0xd1/0x120 [i915]
[   35.764252]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.764262]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.764271]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.764284]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.764296]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.764305]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.764314]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.764324]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.764332]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.764336]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.764339]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.764343]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.764348]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.764357]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.764366]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.764374]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.764379] ---[ end trace 189706dc7c79e8db ]---
[   35.764386] ------------[ cut here ]------------
[   35.764399] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/intel_uncore.c:528
hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
[   35.764403] Unclaimed register detected before reading register 0x101008
[   35.764405] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.764448] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
3.16.0-rc6.1407232028+ #695
[   35.764450] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.764452]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
ffff88009ce13960
[   35.764455]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
0000000000101008
[   35.764458]  ffffc90010d04d74 0000000000101008 ffff88009d930000
ffff88009ce139b0
[   35.764460] Call Trace:
[   35.764463]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.764465]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.764467]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
[   35.764481]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
[   35.764492]  [<ffffffffa018f171>] gen6_read32+0x51/0x150 [i915]
[   35.764502]  [<ffffffffa01696d1>] gen6_ggtt_insert_entries+0xd1/0x120 [i915]
[   35.764511]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.764521]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.764531]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.764545]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.764558]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.764568]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.764578]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.764588]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.764595]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.764600]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.764603]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.764607]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.764612]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.764617]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.764621]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.764626]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.764629] ---[ end trace 189706dc7c79e8dc ]---
[   35.764632] ------------[ cut here ]------------
[   35.764643] WARNING: CPU: 0 PID: 3169 at
drivers/gpu/drm/i915/intel_uncore.c:528
hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
[   35.764646] Unclaimed register detected after reading register 0x101008
[   35.764648] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
[   35.764672] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
3.16.0-rc6.1407232028+ #695
[   35.764673] Hardware name: Intel Corporation Shark Bay Client
platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
03/03/2014
[   35.764674]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
ffff88009ce13960
[   35.764677]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
0000000000101008
[   35.764679]  00000000ffffffff 0000000000101008 ffff88009d930000
ffff88009ce139b0
[   35.764682] Call Trace:
[   35.764684]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
[   35.764686]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
[   35.764688]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
[   35.764698]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
[   35.764708]  [<ffffffffa018f1ae>] gen6_read32+0x8e/0x150 [i915]
[   35.764716]  [<ffffffffa01696d1>] gen6_ggtt_insert_entries+0xd1/0x120 [i915]
[   35.764724]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
[   35.764733]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
[   35.764742]  [<ffffffffa0173cd7>]
i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
[   35.764753]  [<ffffffffa01a891c>]
intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
[   35.764763]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
[   35.764772]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
[   35.764780]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
[   35.764789]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[   35.764797]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
[   35.764801]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
[   35.764806]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
[   35.764810]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
[   35.764813]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
[   35.764818]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
[   35.764825]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
[   35.764829]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
[   35.764833] ---[ end trace 189706dc7c79e8dd ]---
[   35.764864] [drm:intel_crtc_cursor_set_obj] cursor off


Since there is a lot of action going on, and we decided that we wanted
to get/put runtime PM in the highest possible level, I think it is a
good idea to just get/put the power domain around the whole function
(except for those early return checks).

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch



-- 
Paulo Zanoni

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: fix cursor handling when runtime suspended
  2014-07-23 23:38     ` Paulo Zanoni
@ 2014-07-24  7:35       ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2014-07-24  7:35 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: stable, Intel Graphics Development, Paulo Zanoni

On Wed, Jul 23, 2014 at 08:38:19PM -0300, Paulo Zanoni wrote:
> 2014-07-23 19:41 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
> > On Thu, Jul 24, 2014 at 12:35:25AM +0200, Daniel Vetter wrote:
> >> On Wed, Jul 23, 2014 at 06:30:59PM -0300, Paulo Zanoni wrote:
> >> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> >
> >> > If we're runtime suspended and try to use the cursor interfaces, we
> >> > will get a lot of WARNs saying we did the wrong thing.
> >> >
> >> > For intel_crtc_update_cursor(), all we need to do is return if the
> >> > CRTC is not active, since writing the registers won't really have any
> >> > effect if the screen is not visible, and we will write the registers
> >> > later when enabling the screen.
> >> >
> >> > For intel_crtc_cursor_set_obj(), we just get the proper power domain
> >> > reference, since this function does a lot of stuff.
> >> >
> >> > Testcase: igt/pm_rpm/cursor
> >> > Testcase: igt/pm_rpm/cursor-dpms
> >> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645
> >> > Cc: stable@vger.kernel.org
> >> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> > ---
> >> >  drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++---
> >> >  1 file changed, 12 insertions(+), 3 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >> > index d1e9570..c8f36b0 100644
> >> > --- a/drivers/gpu/drm/i915/intel_display.c
> >> > +++ b/drivers/gpu/drm/i915/intel_display.c
> >> > @@ -8151,6 +8151,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
> >> >     if (base == 0 && intel_crtc->cursor_base == 0)
> >> >             return;
> >> >
> >> > +   if (!intel_crtc->active)
> >> > +           return;
> >>
> >> Don't we need the same trick in intel_crtc_cursor_set_obj? This gets
> >> called if the cursor object changes (instead of just moving it around).
> >
> > Rechecked and realized the only I915_WRITE in there is for gen2. I guess
> > we don't care ;-)
> 
> Nope. You need to look at the subfunctions and their subsubfunctions
> and their subsubsubfunctions and so on. This is what happens when I
> remove just the display_power_get/put calls:
> 
> [   35.762635] [drm:intel_crtc_cursor_set_obj] cursor off
> [   35.762665] [drm:add_framebuffer_internal] [FB:63]
> [   35.762685] ------------[ cut here ]------------
> [   35.762714] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/i915_gem_gtt.c:1480
> gen6_ggtt_insert_entries+0x116/0x120 [i915]()
> [   35.762716] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.762748] CPU: 0 PID: 3169 Comm: pm_rpm Not tainted
> 3.16.0-rc6.1407232028+ #695
> [   35.762751] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.762754]  0000000000000009 ffff88009ce139c8 ffffffff816b6a61
> 0000000000000000
> [   35.762760]  ffff88009ce13a00 ffffffff81075d88 0000000092946000
> 00000000ffffffff
> [   35.762765]  ffffc90010d04d74 ffff88009d938bb8 ffffc90010d04d68
> ffff88009ce13a10
> [   35.762770] Call Trace:
> [   35.762782]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.762789]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.762793]  [<ffffffff81075e65>] warn_slowpath_null+0x15/0x20
> [   35.762814]  [<ffffffffa0169716>] gen6_ggtt_insert_entries+0x116/0x120 [i915]
> [   35.762831]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.762850]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.762869]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.762894]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.762916]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.762937]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.762952]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.762968]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.762978]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.762983]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.762988]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.762994]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.762998]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.763004]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.763008]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.763013]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.763015] ---[ end trace 189706dc7c79e8d7 ]---
> [   35.763018] ------------[ cut here ]------------
> [   35.763039] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/intel_uncore.c:47
> assert_device_not_suspended.isra.8+0x43/0x50 [i915]()
> [   35.763041] Device suspended
> [   35.763043] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.763070] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
> 3.16.0-rc6.1407232028+ #695
> [   35.763073] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.763075]  0000000000000009 ffff88009ce13920 ffffffff816b6a61
> ffff88009ce13968
> [   35.763080]  ffff88009ce13958 ffffffff81075d88 ffff88009d930000
> 0000000000101008
> [   35.763085]  ffff88009d930068 ffff88009d938bb8 ffffc90010d04d68
> ffff88009ce139b8
> [   35.763089] Call Trace:
> [   35.763095]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.763099]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.763103]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
> [   35.763123]  [<ffffffffa018c443>]
> assert_device_not_suspended.isra.8+0x43/0x50 [i915]
> [   35.763142]  [<ffffffffa018f2a2>] hsw_write32+0x32/0x140 [i915]
> [   35.763158]  [<ffffffffa01696be>] gen6_ggtt_insert_entries+0xbe/0x120 [i915]
> [   35.763173]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.763190]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.763207]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.763229]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.763249]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.763266]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.763281]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.763297]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.763307]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.763312]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.763315]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.763320]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.763325]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.763329]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.763334]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.763338]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.763341] ---[ end trace 189706dc7c79e8d8 ]---
> [   35.763345] ------------[ cut here ]------------
> [   35.763366] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/intel_uncore.c:528
> hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
> [   35.763369] Unclaimed register detected before writing to register 0x101008
> [   35.763370] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.763393] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
> 3.16.0-rc6.1407232028+ #695
> [   35.763395] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.763397]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
> ffff88009ce13960
> [   35.763401]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
> 0000000000101008
> [   35.763405]  ffff88009d930068 0000000000000000 ffffc90010d04d68
> ffff88009ce139b0
> [   35.763410] Call Trace:
> [   35.763415]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.763419]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.763422]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
> [   35.763441]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
> [   35.763459]  [<ffffffffa018f2d9>] hsw_write32+0x69/0x140 [i915]
> [   35.763475]  [<ffffffffa01696be>] gen6_ggtt_insert_entries+0xbe/0x120 [i915]
> [   35.763489]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.763506]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.763522]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.763543]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.763563]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.763579]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.763593]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.763610]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.763619]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.763623]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.763627]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.763632]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.763636]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.763640]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.763644]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.763648]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.763650] ---[ end trace 189706dc7c79e8d9 ]---
> [   35.763654] ------------[ cut here ]------------
> [   35.763673] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/intel_uncore.c:528
> hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
> [   35.763675] Unclaimed register detected after writing to register 0x101008
> [   35.763677] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.763699] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
> 3.16.0-rc6.1407232028+ #695
> [   35.763701] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.763703]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
> ffff88009ce13960
> [   35.763707]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
> 0000000000101008
> [   35.763711]  ffff88009d930068 0000000000000000 ffff88009d930060
> ffff88009ce139b0
> [   35.763715] Call Trace:
> [   35.763720]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.763724]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.763728]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
> [   35.763746]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
> [   35.763763]  [<ffffffffa018f301>] hsw_write32+0x91/0x140 [i915]
> [   35.763779]  [<ffffffffa01696be>] gen6_ggtt_insert_entries+0xbe/0x120 [i915]
> [   35.763796]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.763816]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.763836]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.763860]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.763885]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.763901]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.763918]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.763935]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.763945]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.763949]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.763953]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.763958]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.763963]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.763967]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.763972]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.763976]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.763979] ---[ end trace 189706dc7c79e8da ]---
> [   35.764026] ------------[ cut here ]------------
> [   35.764050] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/intel_uncore.c:47
> assert_device_not_suspended.isra.8+0x43/0x50 [i915]()
> [   35.764056] Device suspended
> [   35.764060] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.764158] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
> 3.16.0-rc6.1407232028+ #695
> [   35.764161] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.764164]  0000000000000009 ffff88009ce13920 ffffffff816b6a61
> ffff88009ce13968
> [   35.764173]  ffff88009ce13958 ffffffff81075d88 ffff88009d930068
> 0000000000101008
> [   35.764182]  ffffc90010d04d74 0000000000101008 ffff88009d930000
> ffff88009ce139b8
> [   35.764189] Call Trace:
> [   35.764195]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.764200]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.764204]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
> [   35.764208]  [<ffffffff816c0193>] ? _raw_spin_unlock_irqrestore+0x33/0x50
> [   35.764223]  [<ffffffffa018c443>]
> assert_device_not_suspended.isra.8+0x43/0x50 [i915]
> [   35.764235]  [<ffffffffa018f150>] gen6_read32+0x30/0x150 [i915]
> [   35.764244]  [<ffffffffa01696d1>] gen6_ggtt_insert_entries+0xd1/0x120 [i915]
> [   35.764252]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.764262]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.764271]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.764284]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.764296]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.764305]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.764314]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.764324]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.764332]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.764336]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.764339]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.764343]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.764348]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.764357]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.764366]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.764374]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.764379] ---[ end trace 189706dc7c79e8db ]---
> [   35.764386] ------------[ cut here ]------------
> [   35.764399] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/intel_uncore.c:528
> hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
> [   35.764403] Unclaimed register detected before reading register 0x101008
> [   35.764405] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.764448] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
> 3.16.0-rc6.1407232028+ #695
> [   35.764450] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.764452]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
> ffff88009ce13960
> [   35.764455]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
> 0000000000101008
> [   35.764458]  ffffc90010d04d74 0000000000101008 ffff88009d930000
> ffff88009ce139b0
> [   35.764460] Call Trace:
> [   35.764463]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.764465]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.764467]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
> [   35.764481]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
> [   35.764492]  [<ffffffffa018f171>] gen6_read32+0x51/0x150 [i915]
> [   35.764502]  [<ffffffffa01696d1>] gen6_ggtt_insert_entries+0xd1/0x120 [i915]
> [   35.764511]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.764521]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.764531]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.764545]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.764558]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.764568]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.764578]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.764588]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.764595]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.764600]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.764603]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.764607]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.764612]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.764617]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.764621]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.764626]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.764629] ---[ end trace 189706dc7c79e8dc ]---
> [   35.764632] ------------[ cut here ]------------
> [   35.764643] WARNING: CPU: 0 PID: 3169 at
> drivers/gpu/drm/i915/intel_uncore.c:528
> hsw_unclaimed_reg_debug+0x6d/0x80 [i915]()
> [   35.764646] Unclaimed register detected after reading register 0x101008
> [   35.764648] Modules linked in: fuse intel_rapl x86_pkg_temp_thermal
> intel_powerclamp serio_raw i915 i2c_algo_bit drm_kms_helper drm
> i2c_i801 mei_me mei i2c_designware_platform i2c_designware_core sg
> sd_mod ehci_pci ehci_hcd ahci libahci e1000e xhci_hcd sdhci_acpi sdhci
> [   35.764672] CPU: 0 PID: 3169 Comm: pm_rpm Tainted: G        W
> 3.16.0-rc6.1407232028+ #695
> [   35.764673] Hardware name: Intel Corporation Shark Bay Client
> platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0137.R00.1403031632
> 03/03/2014
> [   35.764674]  0000000000000009 ffff88009ce13918 ffffffff816b6a61
> ffff88009ce13960
> [   35.764677]  ffff88009ce13950 ffffffff81075d88 ffff88009d930000
> 0000000000101008
> [   35.764679]  00000000ffffffff 0000000000101008 ffff88009d930000
> ffff88009ce139b0
> [   35.764682] Call Trace:
> [   35.764684]  [<ffffffff816b6a61>] dump_stack+0x4d/0x66
> [   35.764686]  [<ffffffff81075d88>] warn_slowpath_common+0x78/0xa0
> [   35.764688]  [<ffffffff81075df7>] warn_slowpath_fmt+0x47/0x50
> [   35.764698]  [<ffffffffa018c30d>] hsw_unclaimed_reg_debug+0x6d/0x80 [i915]
> [   35.764708]  [<ffffffffa018f1ae>] gen6_read32+0x8e/0x150 [i915]
> [   35.764716]  [<ffffffffa01696d1>] gen6_ggtt_insert_entries+0xd1/0x120 [i915]
> [   35.764724]  [<ffffffffa0168ce9>] ggtt_bind_vma+0xd9/0x100 [i915]
> [   35.764733]  [<ffffffffa0172583>] i915_gem_object_pin+0x683/0x750 [i915]
> [   35.764742]  [<ffffffffa0173cd7>]
> i915_gem_object_pin_to_display_plane+0x97/0x1d0 [i915]
> [   35.764753]  [<ffffffffa01a891c>]
> intel_crtc_cursor_set_obj+0x16c/0x520 [i915]
> [   35.764763]  [<ffffffffa01a8df5>] intel_cursor_plane_update+0xe5/0x120 [i915]
> [   35.764772]  [<ffffffffa00d83a4>] setplane_internal+0x264/0x2b0 [drm]
> [   35.764780]  [<ffffffffa00d850e>] drm_mode_cursor_common+0x11e/0x320 [drm]
> [   35.764789]  [<ffffffffa00dbb0c>] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
> [   35.764797]  [<ffffffffa00cb87f>] drm_ioctl+0x1df/0x6a0 [drm]
> [   35.764801]  [<ffffffff816be9b9>] ? mutex_unlock+0x9/0x10
> [   35.764806]  [<ffffffff811eaae6>] ? seq_read+0xb6/0x3e0
> [   35.764810]  [<ffffffff811d97e0>] do_vfs_ioctl+0x2e0/0x4e0
> [   35.764813]  [<ffffffff816c0bf7>] ? sysret_check+0x1b/0x56
> [   35.764818]  [<ffffffff810c47fd>] ? trace_hardirqs_on_caller+0x15d/0x200
> [   35.764825]  [<ffffffff811d9a61>] SyS_ioctl+0x81/0xa0
> [   35.764829]  [<ffffffff816c0bd2>] system_call_fastpath+0x16/0x1b
> [   35.764833] ---[ end trace 189706dc7c79e8dd ]---
> [   35.764864] [drm:intel_crtc_cursor_set_obj] cursor off
> 
> 
> Since there is a lot of action going on, and we decided that we wanted
> to get/put runtime PM in the highest possible level, I think it is a
> good idea to just get/put the power domain around the whole function
> (except for those early return checks).

Indeed. But you've grabbed the wrong power domain then. Enabling the pipe
domain makes no sense since once we drop it again at the end of the
function all the pipe registers we've written will go poof again.

What's left here is the pinning of the gem object into global gtt, which
does mmio writes to the global gtt pte range. For that we just need a
runtime_pm_get/put, and preferrably just around the actual pin/unpin
calls.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-24  7:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23 21:30 [PATCH] drm/i915: fix cursor handling when runtime suspended Paulo Zanoni
2014-07-23 21:31 ` [PATCH] tests/pm_rpm: add cursor subtests Paulo Zanoni
2014-07-23 22:35 ` [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended Daniel Vetter
2014-07-23 22:41   ` Daniel Vetter
2014-07-23 23:38     ` Paulo Zanoni
2014-07-24  7:35       ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox