linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kumlien <ian.kumlien@gmail.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [BUG?] 3.16-rc6 ... at drivers/gpu/drm/i915/intel_pm.c:5997 intel_display_power_put+0x12d/0x160()
Date: Wed, 23 Jul 2014 00:17:44 +0200	[thread overview]
Message-ID: <1406067464.29265.6.camel@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3208 bytes --]

Try three... 

---

Hi again,


Playing some more with the new kernel release i noticed this:
[ 9064.008821] WARNING: CPU: 3 PID: 22929 at drivers/gpu/drm/i915/intel_pm.c:5997 intel_display_power_put+0x12d/0x160()
[ 9064.008822] Modules linked in: uas bnep b43 mac80211 cfg80211 snd_hda_codec_hdmi btusb bluetooth 6lowpan_iphc rfkill snd_hda_codec_cirrus uvcvideo snd_hda_codec_generic videobuf2_vmalloc videobuf2_memops videobuf2_core snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_timer sdhci_pci snd sdhci soundcore mmc_core bcma
[ 9064.008839] CPU: 3 PID: 22929 Comm: kworker/3:2 Tainted: G        W     3.16.0-rc6 #23
[ 9064.008840] Hardware name: Apple Inc. MacBookPro10,2/Mac-AFD8A9D944EA4843, BIOS MBP102.88Z.0106.B03.1211161133 11/16/2012
[ 9064.008843] Workqueue: events edp_panel_vdd_work
[ 9064.008844]  0000000000000009 ffff88015ba77d28 ffffffff8198ea2d 0000000000000000
[ 9064.008846]  ffff88015ba77d60 ffffffff810cbac8 ffff8802610b002c 00000000000c7204
[ 9064.008848]  0000000000000001 ffff8802610b80f0 ffff8802610b0000 ffff88015ba77d70
[ 9064.008850] Call Trace:
[ 9064.008854]  [<ffffffff8198ea2d>] dump_stack+0x4e/0x7a
[ 9064.008857]  [<ffffffff810cbac8>] warn_slowpath_common+0x78/0xa0
[ 9064.008858]  [<ffffffff810cbba5>] warn_slowpath_null+0x15/0x20
[ 9064.008860]  [<ffffffff815bdb3d>] intel_display_power_put+0x12d/0x160
[ 9064.008862]  [<ffffffff8161e084>] edp_panel_vdd_off_sync+0xf4/0x1c0
[ 9064.008863]  [<ffffffff8161e17f>] edp_panel_vdd_work+0x2f/0x40
[ 9064.008866]  [<ffffffff810e63be>] process_one_work+0x16e/0x480
[ 9064.008868]  [<ffffffff810e6cbb>] worker_thread+0x11b/0x520
[ 9064.008870]  [<ffffffff810e6ba0>] ? create_and_start_worker+0x50/0x50
[ 9064.008872]  [<ffffffff810ecb24>] kthread+0xc4/0xe0
[ 9064.008874]  [<ffffffff810eca60>] ? kthread_create_on_node+0x170/0x170
[ 9064.008877]  [<ffffffff81997e6c>] ret_from_fork+0x7c/0xb0
[ 9064.008878]  [<ffffffff810eca60>] ? kthread_create_on_node+0x170/0x170
[ 9064.008880] ---[ end trace 17f9738f20aec288 ]---
----


I had multiples of them in my dmesg, however, this seems to fix it:
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8a1a4fb..4c3249d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1252,6 +1252,7 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
                        intel_dp->last_power_cycle = jiffies;
 
                power_domain = intel_display_port_power_domain(intel_encoder);
+               intel_display_power_get(dev_priv, power_domain);
                intel_display_power_put(dev_priv, power_domain);
        }
 }
@@ -1371,6 +1372,7 @@ void intel_edp_panel_off(struct intel_dp *intel_dp)
 
        /* We got a reference when we enabled the VDD. */
        power_domain = intel_display_port_power_domain(intel_encoder);
+       intel_display_power_get(dev_priv, power_domain);
        intel_display_power_put(dev_priv, power_domain);
 }
---


The question however is: Is this the correct approach? Should it be done
differently?
(This handles the "close and open lid" usecase, i don't know if there
are others, a grep indicated that there might be two more missing...)




[-- Attachment #2: intel_pm.patch --]
[-- Type: text/x-patch, Size: 3397 bytes --]

commit 423d01e192504764d5cb59effe5da68b035a0d41
Author: Ian Kumlien <ian.kumlien@gmail.com>
Date:   Tue Jul 22 21:10:50 2014 +0200

    Add intel_display_power_get before _put
    
    When closing the lid when using 3.16-rc6 on my laptop i got
    three "WARN_ON" back traces.
    
    Example:
    [ 9064.008821] WARNING: CPU: 3 PID: 22929 at
    drivers/gpu/drm/i915/intel_pm.c:5997
    intel_display_power_put+0x12d/0x160()
    [ 9064.008822] Modules linked in: uas bnep b43 mac80211 cfg80211
    snd_hda_codec_hdmi btusb bluetooth 6lowpan_iphc rfkill
    snd_hda_codec_cirrus uvcvideo snd_hda_codec_generic videobuf2_vmalloc
    videobuf2_memops videobuf2_core snd_hda_intel snd_hda_controller
    snd_hda_codec snd_hwdep snd_pcm snd_timer sdhci_pci snd sdhci soundcore
    mmc_core bcma
    [ 9064.008839] CPU: 3 PID: 22929 Comm: kworker/3:2 Tainted: G        W
    3.16.0-rc6 #23
    [ 9064.008840] Hardware name: Apple Inc.
    MacBookPro10,2/Mac-AFD8A9D944EA4843, BIOS MBP102.88Z.0106.B03.1211161133
    11/16/2012
    [ 9064.008843] Workqueue: events edp_panel_vdd_work
    [ 9064.008844]  0000000000000009 ffff88015ba77d28 ffffffff8198ea2d
    0000000000000000
    [ 9064.008846]  ffff88015ba77d60 ffffffff810cbac8 ffff8802610b002c
    00000000000c7204
    [ 9064.008848]  0000000000000001 ffff8802610b80f0 ffff8802610b0000
    ffff88015ba77d70
    [ 9064.008850] Call Trace:
    [ 9064.008854]  [<ffffffff8198ea2d>] dump_stack+0x4e/0x7a
    [ 9064.008857]  [<ffffffff810cbac8>] warn_slowpath_common+0x78/0xa0
    [ 9064.008858]  [<ffffffff810cbba5>] warn_slowpath_null+0x15/0x20
    [ 9064.008860]  [<ffffffff815bdb3d>] intel_display_power_put+0x12d/0x160
    [ 9064.008862]  [<ffffffff8161e084>] edp_panel_vdd_off_sync+0xf4/0x1c0
    [ 9064.008863]  [<ffffffff8161e17f>] edp_panel_vdd_work+0x2f/0x40
    [ 9064.008866]  [<ffffffff810e63be>] process_one_work+0x16e/0x480
    [ 9064.008868]  [<ffffffff810e6cbb>] worker_thread+0x11b/0x520
    [ 9064.008870]  [<ffffffff810e6ba0>] ? create_and_start_worker+0x50/0x50
    [ 9064.008872]  [<ffffffff810ecb24>] kthread+0xc4/0xe0
    [ 9064.008874]  [<ffffffff810eca60>] ?
    kthread_create_on_node+0x170/0x170
    [ 9064.008877]  [<ffffffff81997e6c>] ret_from_fork+0x7c/0xb0
    [ 9064.008878]  [<ffffffff810eca60>] ?
    kthread_create_on_node+0x170/0x170
    [ 9064.008880] ---[ end trace 17f9738f20aec288 ]---
    
    This fixes the cases I found for my usecase: closing and opening the
    lid.
    
    Signed-off-by: Ian Kumlien <ian.kumlien@gmail.com>

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8a1a4fb..4c3249d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1252,6 +1252,7 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
                        intel_dp->last_power_cycle = jiffies;
 
                power_domain = intel_display_port_power_domain(intel_encoder);
+               intel_display_power_get(dev_priv, power_domain);
                intel_display_power_put(dev_priv, power_domain);
        }
 }
@@ -1371,6 +1372,7 @@ void intel_edp_panel_off(struct intel_dp *intel_dp)
 
        /* We got a reference when we enabled the VDD. */
        power_domain = intel_display_port_power_domain(intel_encoder);
+       intel_display_power_get(dev_priv, power_domain);
        intel_display_power_put(dev_priv, power_domain);
 }


             reply	other threads:[~2014-07-22 22:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 22:17 Ian Kumlien [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-23 23:33 [BUG?] 3.16-rc6 ... at drivers/gpu/drm/i915/intel_pm.c:5997 intel_display_power_put+0x12d/0x160() Ian Kumlien
2014-07-22 19:44 Ian Kumlien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406067464.29265.6.camel@gmail.com \
    --to=ian.kumlien@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).