[Bug 93711] BUG in i915_gem.c freezed the console

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Fri Mar 6 06:55:41 PST 2015


https://bugzilla.kernel.org/show_bug.cgi?id=93711

--- Comment #10 from Ruoyao Xi <xry111 at outlook.com> ---
After some debug I found out the problem:

In drivers/gpu/drm/i915/intel_display.c: 9733 intel_crtc_page_flip, the route
do following things:
1) Add a kernel work to workqueue of drm devices. This work will unpin old
framebuffer object (crtc->primary->fb).
2) Try to lock the mutex of drm device.
3) Assign crtc->primary->fb to another framebuffer object (the argument fb).
4) Pin newly assigned crtc->primary->fb.
5) Unlock the mutex of drm device.

Unfortunately, in step 2, if the mutex has been locked, the route will sleep.
Then the kernel may run the work created in step 1. This may make pin_count of
old framebuffer object zero. However, since step 3 is not processed,
crtc->primary->fb is still assigned to the old framebuffer. If we are unlucky,
the routes switching X to console will run in such a "intermediate" situation.
It will tries to unpin the old framebuffer, again. Then a kernel bug occurs.

I am trying to move step 2 before step 1 to solve the problem. However I am
afraid of deadlock so I will analysis the kernel code more.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the intel-gfx-bugs mailing list