Re: [RFC PATCH hwc] drm_hwcomposer: provide a common gralloc handle definition

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

 



On Thu, Oct 26, 2017 at 6:59 AM, Robert Foss <robert.foss@xxxxxxxxxxxxx> wrote:
> Hey Rob,
>
> On Tue, 2017-10-24 at 18:40 -0500, Rob Herring wrote:
>> EGL, gralloc, and HWC must all have a common definition of fd's and
>> int's
>> in native_handle_t to share the fd and width, height, format, etc.
>> of a dmabuf.
>>
>> Move the definition into HWC so we aren't dependent on a specific
>> gralloc
>> implementation and so we don't have to create an importer just for
>> different native_handle_t layouts. This will allow supporting
>> multiple
>> gralloc implementations that conform to this layout.
>
> I think this makes sense to me, and is an improvement over the current
> situation.
> As far as I can see there is no perfect way of doing this. But this is
> definitely better.

There's also still a mesa to gralloc dependency to get the device FD.
We don't need that if using render nodes, but we still support
android-x86 using the card node and GEM names. Also, I'm not sure what
to do in the s/w rendering case that still uses the card node. Plus
with Treble, things are moving to separate processes, so retrieving an
FD is broken.

>> Perhaps we should allow for multiple levels of subclassing by only
>> defining
>> the fields we care about here and not validating magic and the size.
>
> So the idea with the subclassing would be for each gralloc
> implementations to be able to add their special sauce?

Right. So the owner and data pointer fields would be gone from here.
Not sure if it is worth the churn and breakage that may cause until
everyone is in sync.

Rob
_______________________________________________
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