From: Ben Skeggs Date: Tue, 14 Jan 2020 20:34:21 +0000 (+1000) Subject: drm/nouveau/core: add representation of generic binary objects X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f25709f9aeb3c5183167b57df278cdecce3c9740;p=linux.git drm/nouveau/core: add representation of generic binary objects Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h index 029a416197db3..d7ba3205207fe 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h @@ -21,4 +21,17 @@ iowrite32_native(lower_32_bits(_v), &_p[0]); \ iowrite32_native(upper_32_bits(_v), &_p[1]); \ } while(0) + +struct nvkm_blob { + void *data; + u32 size; +}; + +static inline void +nvkm_blob_dtor(struct nvkm_blob *blob) +{ + kfree(blob->data); + blob->data = NULL; + blob->size = 0; +} #endif