]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/panfrost: Do the exception -> string translation using a table
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 30 Jun 2021 06:27:41 +0000 (08:27 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Thu, 1 Jul 2021 06:53:29 +0000 (08:53 +0200)
commit7319965fa19edb177ae3d240f5678fe0519cba97
treeb0ca37ff43c57e57e8aa3730a419735d39f3b4ee
parent6ef2f37f4016a482fd31d21bb295494d26794a7a
drm/panfrost: Do the exception -> string translation using a table

Do the exception -> string translation using a table. This way we get
rid of those magic numbers and can easily add new fields if we need
to attach extra information to exception types.

v4:
* Don't expose exception type to userspace
* Merge the enum definition and the enum -> string table declaration
  in the same patch

v3:
* Drop the error field

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210630062751.2832545-7-boris.brezillon@collabora.com
drivers/gpu/drm/panfrost/panfrost_device.c
drivers/gpu/drm/panfrost/panfrost_device.h