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

Marek Vasut marex at denx.de
Sun Oct 2 17:19:01 UTC 2016


On 09/30/2016 11:53 AM, Daniel Vetter wrote:
> On Thu, Sep 29, 2016 at 11:44 PM, Marek Vasut <marex at denx.de> wrote:
>> I have the following right now, I think that's more descriptive as this
>> function is not preparing the FB in any way.
>>
>> /**
>>  * 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.

> And it is a bit inconsistent with all the other
> helpers that can be put into hooks directly. Also,
> extract_and_attach_fence _is_ officially part of what a driver should
> do in their ->prepare_fb hook. Hence I'm still leaning towards that
> (and it's shorter!). And with cma there's nothing else to do (dma
> memory is always pinned, which is the other thing prepare_fb should
> do), so really it's not even a lie: Your function fully prapares a cma
> fb for display as expected by th atomic helpers.

OK, I have no good argument not to go for this one. Unless someone has,
I will redo it.

> -Daniel
> 


-- 
Best regards,
Marek Vasut


More information about the dri-devel mailing list