Re: Kernel BUG from tegra_dc_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
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: pgp8CZnzqtkrQ.pgp
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux