[Glamor] [PATCH 15/15] glamor: check driver support GEM or not
chris at chris-wilson.co.uk
Fri Jan 20 04:36:35 PST 2012
On Fri, 20 Jan 2012 16:52:13 +0800, zhigang.gong at linux.intel.com wrote:
> From: Li Peng <peng.li at intel.com>
> glamor calls DRM_IOCTL_GEM_FLINK to get a name for a buffer object.
> It only works for driver that support GEM, such as intel i915 driver.
> But for pvr driver who doesn't has GEM, we can't do it this way.
> Here we check driver name to decide driver support GEM or not, if
> it is pvr driver, mark it as False, otherwise it will be True.
Rather than use the driver string, just try to flink handle 0. If that
fails with ENODEV or ENOTTY instead of ENOENT (or EINVAL on older
kernels), set has_gem=0.
Chris Wilson, Intel Open Source Technology Centre
More information about the Glamor