Re: [PATCH] drm: fix drm_framebuffer cleanup.

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

 






2012. 11. 10. 오전 2:10 Rob Clark <robdclark@xxxxxxxxx> 작성:

> On Fri, Nov 9, 2012 at 1:39 AM, Inki Dae <inki.dae@xxxxxxxxxxx> wrote:
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>> index 3fa18b7..92889be 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -256,6 +256,7 @@ struct drm_framebuffer {
>>        struct kref refcount;
>>        struct list_head head;
>>        struct drm_mode_object base;
>> +       struct drm_crtc *crtc;
> 
> note that one fb can be attached to multiple crtc's (and/or planes)..
> so this will never work.
> 

I know that. drm_framebuffer'crtc means that crtc'dma is accessing this fb. So when pageflip and setcrtc are called, this crtc will be updated again.

> Anyways, I think the right answer is somehow reference-counting.  You
> should *somewhere* be holding a ref to bo's until there is no more dma
> access, either directly or indirectly by holding a ref to the fb
> (which holds a ref to the bo(s))
> 

Understood. Yes, we could resolve this issue using reference-counting also. I'd just like to make this issue to be solved more generically. In fact, I couldn't understand why my patch has some problem yet. :(

Thanks for comments,
Inki Dae

> BR,
> -R
> 
>>        const struct drm_framebuffer_funcs *funcs;
>>        unsigned int pitches[4];
>>        unsigned int offsets[4];
>> --
>> 1.7.4.1
>> 
>> _______________________________________________
>> 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
_______________________________________________
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