diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-01-15 06:34:21 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-01-15 10:50:26 +1000 |
commit | f25709f9aeb3c5183167b57df278cdecce3c9740 (patch) | |
tree | 08985105b9d4447c4678a4de5382eeca46f47bc1 | |
parent | 47c8f8e1a225b227805045c997ffdda8c78e57b6 (diff) |
drm/nouveau/core: add representation of generic binary objects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/os.h b/drivers/gpu/drm/nouveau/include/nvkm/core/os.h index 029a416197db..d7ba3205207f 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 |