[PATCH 4/7] lib: Add gem_userptr helpers

Chris Wilson chris at chris-wilson.co.uk
Sun Aug 23 05:10:42 PDT 2015


On Wed, Aug 12, 2015 at 08:29:17PM -0300, Tiago Vignatti wrote:
> This patch moves userptr definitions and helpers implementation that were
> locally in gem_userptr_benchmark and gem_userptr_blits to the library, so other
> tests can make use of them as well. There's no functional changes.

We have a pattern in the helpers to use
gem_userptr() as a no-fail (failures are detected and asserted upon
inside the handler) and __gem_userptr() where the errno is passed back
to the caller. Commonly when writing tests it is simpler to just get the
handle back (and have the test fail appropriately otherwise) and doing
negative parameter testing is rarer and so delegated to the
__gem_ variant.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list