pan/perf: Reject panthor kernel driver
Make sure we reject perfcnt users when the kernel driver is not panfrost. We might decide to abstract perf counters at the kmod level at some point, but we're not there yet. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26358>
This commit is contained in:

committed by
Marge Bot

parent
1519d613c8
commit
89ea39c09d
@@ -72,6 +72,13 @@ panfrost_lookup_counters(const char *name)
|
||||
void
|
||||
panfrost_perf_init(struct panfrost_perf *perf, int fd)
|
||||
{
|
||||
ASSERTED drmVersionPtr version = drmGetVersion(fd);
|
||||
|
||||
/* We only support panfrost at the moment. */
|
||||
assert(version && !strcmp(version->name, "panfrost"));
|
||||
|
||||
drmFreeVersion(version);
|
||||
|
||||
perf->dev = pan_kmod_dev_create(fd, 0, NULL);
|
||||
assert(perf->dev);
|
||||
|
||||
|
Reference in New Issue
Block a user