pan/kmod: Add BO-labeling kernel module operation
Both Panfrost and Panthor are expected to implement these in a device-specific way. Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
This commit is contained in:
committed by
Marge Bot
parent
bc973d687c
commit
0c9841ec7d
@@ -435,6 +435,9 @@ struct pan_kmod_ops {
|
||||
|
||||
/* Query the current GPU timestamp */
|
||||
uint64_t (*query_timestamp)(const struct pan_kmod_dev *dev);
|
||||
|
||||
/* Label the BO */
|
||||
void (*bo_set_label)(struct pan_kmod_dev *dev, struct pan_kmod_bo *bo, const char *label);
|
||||
};
|
||||
|
||||
/* KMD information. */
|
||||
@@ -634,6 +637,13 @@ pan_kmod_bo_mmap(struct pan_kmod_bo *bo, off_t bo_offset, size_t size, int prot,
|
||||
return host_addr;
|
||||
}
|
||||
|
||||
static inline void
|
||||
pan_kmod_set_bo_label(struct pan_kmod_dev *dev, struct pan_kmod_bo *bo, const char *label)
|
||||
{
|
||||
if (dev->ops->bo_set_label)
|
||||
dev->ops->bo_set_label(dev, bo, label);
|
||||
}
|
||||
|
||||
static inline size_t
|
||||
pan_kmod_bo_size(struct pan_kmod_bo *bo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user