[Mesa-dev] [PATCH 3/9] gallium/dri2: Set winsys_handle type to KMS for stride query.

Christopher James Halse Rogers christopher.halse.rogers at canonical.com
Thu Nov 21 15:49:14 PST 2013


On Thu, 2013-11-21 at 14:12 +0100, Thomas Hellstrom wrote:
> On 11/21/2013 05:11 AM, christopher.halse.rogers at canonical.com wrote:
> > From: Christopher James Halse Rogers <raof at ubuntu.com>
> >
> > Otherwise the default is TYPE_SHARED, which will flink the bo. This seems
> > rather unnecessary for a simple stride query.
> 
> Is there no way we can cache this stuff in a __DRIimage? Changing the 
> calling conventions to adapt to poor implementations seems like
> the wrong way to go. What if other drivers use a slow approach to get 
> the KMS handle?
> 

It's not really an issue of poor driver implementation - the semantics
of requesting a DRM_API_HANDLE_TYPE_SHARED require that the target be
flinked.

Only the driver actually knows the stride, and AFAIK resource_get_handle
is the only API to get that out of the driver at the moment. So we could
cache it in __DRIimage, but we'd still need to call resource_get_handle
at least once, so the problem remains.

I'm not sure if this is on any critical paths, either, so I'm unsure
whether this being slow matters. Unless asking for a KMS handle causes
the driver to reallocate or something similarly awkward.




More information about the mesa-dev mailing list