On 22 March 2018 at 08:21, Tomasz Figa <tf...@chromium.org> wrote:
> Hi Rob,
>
> On Thu, Mar 22, 2018 at 12:16 AM, Robert Foss <robert.f...@collabora.com> 
> wrote:

>> Sharing the device between components
>> -------------------------------------
>>
>> Currently the device is used by drm_hwc, gbm_gralloc and mesa.
>>
>> drm_hwc opens the *primary* node in DrmResources::Init() and creates an
>> internal model of what properties/components the device has.
>>
>> gbm_gralloc uses the *render* node during in gbm_dev_create().
>>
>> Mesa uses uses the *render* node during dri_screen creation in
>> dri2_create_screen() and for loading the driver in
>> dri2_initialize_android().
>>
>> However, problematically, drm_hwc uses OpenGL composition as a fallback
>> method, and when doing so mesa has to be able to import buffers, which means
>> mesa has to use a *primary* node.
>
> Hmm, I don't see why Mesa in drm_hwc process couldn't open a render
> node. IMHO drm_hwc already uses DMA-buf, so there shouldn't be any
> problem with imports on either side.
>
Indeed, opening a render node should be fine. Opening the 'right'
render node might be a problem though.
Having some detection heuristics, with a fallback to the first
available node - like mentioned before might be a good idea.

Although we can worry about that, when it becomes a problem ;-)

HTH
Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to