[Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended
Paulo Zanoni
przanoni at gmail.com
Thu Jul 24 01:38:19 CEST 2014
2014-07-23 19:41 GMT-03:00 Daniel Vetter <daniel at 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 at 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 at vger.kernel.org
>> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni at 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
More information about the Intel-gfx
mailing list