Re: [PATCH v2] drm/exynos: release fb pended by page flip

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

 





2012/12/5 Daniel Vetter <daniel@xxxxxxxx>
On Tue, Dec 4, 2012 at 1:14 PM, Inki Dae <inki.dae@xxxxxxxxxxx> wrote:
> Changelog v2:
> fix page fault issue.
> - defer to unreference old fb to avoid page fault issue.
> So with this fixup, new fb would be updated to hardware
> prior to old fb unreferencing. And it removes unnecessary
> patch, "drm/exynos: Unreference fb in exynos_disable_plane()"
>
> Changelog v1:
> This patch releases the fb pended by page flip after fbdev is
> restored propely. And fixes invalid memory access when drm is
> released while doing pageflip.
>
> This patch makes fb's refcount to be increased when setcrtc and
> pageflip are requested. In other words, it increases fb's refcount
> only if dma is going to access memory region to fb and decreases
> old fb's because the old fb isn't accessed by dma anymore.
>
> This could guarantee releasing gem buffer to the fb after dma
> access to the gem buffer has been completed.
>
> Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

Just an fyi, I'm looking into revamping the locking/refcounting in
this area in the drm core right now. No patches yet for public
consumption, but I hope that I can send out and rfc at the end of this
week. Might fix your problem, too, and certainly addresses the issue
Prathyush noticed, since the refcounting is done in the drm core and
should be able to catch all the cases where we need to
reference/unreference an fb.
 
Right, referencing/unreferencing an fb should be done in drm core and I think this is generic way. 
 
Thanks for your effort,
Inki Dae
 
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux