[PATCH 2/2] drm: Add new driver for MXSFB controller

Daniel Vetter daniel at ffwll.ch
Mon Sep 26 12:11:19 UTC 2016


On Mon, Sep 26, 2016 at 12:36 PM, Marek Vasut <marex at denx.de> wrote:
>>>>> +
>>>>> +static int mxsfb_atomic_commit(struct drm_device *dev,
>>>>> +                           struct drm_atomic_state *state, bool nonblock)
>>>>> +{
>>>>> +    return drm_atomic_helper_commit(dev, state, false);
>>>>
>>>> Atomic helpers support async commit nowadays, no need any more for this
>>>> hack.
>>>
>>> I had to add the same fence check as imx drm driver, so this function
>>> grew in V2.
>>
>> Please check out my reply to Lucas patch. tldr: The fence check should
>> be done in prepare_fb plane hook, and we should have one
>> implementation in the cma fb helper library for all drivers. Would be
>> great if you could create that helper (and switch imx over to it).
>
> Done, although what I did might be wrong. I will submit the patches once
> I am a bit more confident about that. I have a question -- should the
> drm simple kms helper code be augmented with a new parameter to add
> this prepare_fb helper into the plane helper functions or should the
> drm simple kms helper always call the prepare_fb with the fence part ?

Great question, not sure what the answer should be tbh. Maybe we need
to wire up prepare_fb/cleanup_fb for simple drm? I think forcing a
default hook of using cma isn't a good idea, since e.g. udl would be a
perfect candidate for simple drm helpers, but that wants plain shmem
gem buffers, not cma gem buffers. Means a notch more boilerplate for
drivers (1 line in the vtable), but I think that's ok.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list