Re: [PATCH 1/2] drm/fb_cma_helper: Add drm_fb_cma_setup_fence() helper

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

 



On 10/03/2016 03:54 PM, Daniel Vetter wrote:
> On Sun, Oct 2, 2016 at 7:19 PM, Marek Vasut <marex@xxxxxxx> wrote:
>>>> /**
>>>>  * drm_fb_cma_extract_and_attach_fence() - Extract fence from plane and
>>>> attach to planestate
>>>>  * @plane: Which plane
>>>>  * @state: Plane state attach fence to
>>>>  *
>>>>  * If the plane fb has an dma-buf attached, fish out the exclusive
>>>>  * fence and attach it to plane state for the atomic helper to wait
>>>>  * on.
>>>>  */
>>>
>>> That choice of color is ok with me too, but then you need to have a
>>> pile of text to explain where it should be used (i.e. directly as the
>>> prepare_fb hook).
>>
>> There can be more stuff in the prepare_fb hook though.
> 
> There's 3 things prepare/cleanup_fb should do:
> - pin/upin the backing storage. CMA memory is always pinned, so nothing to do.
> - setup/tear down iommu mappings: Already done when allocating CMA
> memory, again nothing to do.
> - grab fences in prepare.
> 
> So for plain cma drivers this hook is indeed the complete
> implementation they need for prepare_fb. I guess you could mention in
> the kernel-doc that cma based drivers don't need a cleanup_fb, hence
> why there is none.

OK, understood. I'll roll V3 shortly.

-- 
Best regards,
Marek Vasut
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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