drm/nouveau/gpuobj: type-safe accessor macros
authorBen Skeggs <bskeggs@redhat.com>
Thu, 20 Aug 2015 04:54:14 +0000 (14:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:27 +0000 (12:40 +1000)
commit384af9aceaf8ee1e2d3791cc89a32c161d67bb57
tree3d0133a598f561bf8e16f5c8b26b904942ce0cc6
parent9ccdc76006e3b6ca46c8dbc446bc2e3f6d8d95cb
drm/nouveau/gpuobj: type-safe accessor macros

These require an explicit struct nvkm_gpuobj pointer, unlike the previous
macros which take a void *, and work with any nvkm_object.

New semantics require acquiring/releasing a gpuobj before accessing them,
which will be made use of in later patches to greatly reduce the overhead
of accesses, particularly when a direct mmio mapping of the object is not
available (suspend/resume, out of ioremap() space, and on GK20A).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h