From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Kernel BUG from tegra_dc_irq()
Date: Fri, 12 Dec 2014 11:01:29 +0100 [thread overview]
Message-ID: <20141212100127.GA18681@ulmo.nvidia.com> (raw)
In-Reply-To: <548AA7B3.7080400-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1125 bytes --]
On Fri, Dec 12, 2014 at 05:30:43PM +0900, Alexandre Courbot wrote:
> Hi Thierry,
>
> I sometimes notice the following oops happening. Generally when I am running
> Weston/glmark2 for long periods of time (at least 4/5 hours). I am trying to
> see if I can reproduce it with simpler workloads. Are you aware of this?
>
> Cheers,
> Alex.
>
> [18468.532205] kernel BUG at ../drivers/gpu/drm/drm_irq.c:1032!
> [18468.537857] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
> [18468.543679] Modules linked in: nouveau_platform(O) nouveau(O) cfbfillrect
> cfbimgblt cfbcopyarea ttm
> [18468.552789] CPU: 0 PID: 210 Comm: weston Tainted: G O
> 3.18.0-00029-g0924e632ef58 #2780
> [18468.561735] task: ed6492c0 ti: ec560000 task.ti: ec560000
> [18468.567131] PC is at drm_vblank_put+0xbc/0xd0
> [18468.571485] LR is at tegra_dc_irq+0x11c/0x130
I don't think I've ever seen this. It looks like there could be a very
subtle regression here, though. Can you try expanding the spin_lock in
tegra_dc_finish_page_flip() to encompass the whole function? Something
like the attached patch?
Thierry
[-- Attachment #1.2: patch --]
[-- Type: text/plain, Size: 1083 bytes --]
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 054a79f143ae..3c1553eb9df6 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -658,8 +658,12 @@ static void tegra_dc_finish_page_flip(struct tegra_dc *dc)
unsigned long flags, base;
struct tegra_bo *bo;
- if (!dc->event)
+ spin_lock_irqsave(&drm->event_lock, flags);
+
+ if (!dc->event) {
+ spin_unlock_irqrestore(&drm->event_lock, flags);
return;
+ }
bo = tegra_fb_get_plane(crtc->primary->fb, 0);
@@ -669,12 +673,12 @@ static void tegra_dc_finish_page_flip(struct tegra_dc *dc)
tegra_dc_writel(dc, 0, DC_CMD_STATE_ACCESS);
if (base == bo->paddr + crtc->primary->fb->offsets[0]) {
- spin_lock_irqsave(&drm->event_lock, flags);
drm_send_vblank_event(drm, dc->pipe, dc->event);
drm_vblank_put(drm, dc->pipe);
dc->event = NULL;
- spin_unlock_irqrestore(&drm->event_lock, flags);
}
+
+ spin_unlock_irqrestore(&drm->event_lock, flags);
}
void tegra_dc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file)
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-12-12 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 8:30 Kernel BUG from tegra_dc_irq() Alexandre Courbot
[not found] ` <548AA7B3.7080400-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-12-12 10:01 ` Thierry Reding [this message]
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=20141212100127.GA18681@ulmo.nvidia.com \
--to=treding-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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