Mesa (main): panfrost: Collapse 0 parameters in drm-shim
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Nov 22 13:23:11 UTC 2021
Module: Mesa
Branch: main
Commit: a777e38cf99b57810a08002705e64d3149aad188
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a777e38cf99b57810a08002705e64d3149aad188
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Sat Nov 20 14:12:02 2021 -0500
panfrost: Collapse 0 parameters in drm-shim
Makes the code a bit more readable, since this is a sensible default for
many parameters.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13894>
---
src/panfrost/drm-shim/panfrost_noop.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/panfrost/drm-shim/panfrost_noop.c b/src/panfrost/drm-shim/panfrost_noop.c
index 633e541edce..78c4fb5f7fd 100644
--- a/src/panfrost/drm-shim/panfrost_noop.c
+++ b/src/panfrost/drm-shim/panfrost_noop.c
@@ -48,22 +48,18 @@ pan_ioctl_get_param(int fd, unsigned long request, void *arg)
/* Other GPUs can be set using PAN_GPU_ID */
gp->value = 0x860;
return 0;
- case DRM_PANFROST_PARAM_GPU_REVISION:
- gp->value = 0;
- return 0;
case DRM_PANFROST_PARAM_SHADER_PRESENT:
/* Assume an MP4 GPU */
gp->value = 0xF;
return 0;
- case DRM_PANFROST_PARAM_TEXTURE_FEATURES0:
- gp->value = 0;
+ case DRM_PANFROST_PARAM_TILER_FEATURES:
+ gp->value = 0x809;
return 0;
+ case DRM_PANFROST_PARAM_GPU_REVISION:
+ case DRM_PANFROST_PARAM_TEXTURE_FEATURES0:
case DRM_PANFROST_PARAM_THREAD_TLS_ALLOC:
gp->value = 0;
return 0;
- case DRM_PANFROST_PARAM_TILER_FEATURES:
- gp->value = 0x809;
- return 0;
default:
fprintf(stderr, "Unknown DRM_IOCTL_PANFROST_GET_PARAM %d\n", gp->param);
return -1;
More information about the mesa-commit
mailing list