mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
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:
parent
1519d613c8
commit
89ea39c09d
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue