On Thu, 2013-11-21 at 14:12 +0100, Thomas Hellstrom wrote: > On 11/21/2013 05:11 AM, christopher.halse.rog...@canonical.com wrote: > > From: Christopher James Halse Rogers <r...@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. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev