]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/v3d: Expose Super Pages capability
authorMaíra Canal <mcanal@igalia.com>
Mon, 23 Sep 2024 13:55:15 +0000 (10:55 -0300)
committerMaíra Canal <mcanal@igalia.com>
Wed, 25 Sep 2024 11:40:26 +0000 (08:40 -0300)
Add a new V3D parameter to expose the support of Super Pages to
userspace. The userspace might want to know this information to
apply optimizations that are specific to kernels with Super Pages
enabled.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240923141348.2422499-12-mcanal@igalia.com
drivers/gpu/drm/v3d/v3d_drv.c
include/uapi/drm/v3d_drm.h

index 8be8c6dd9b359086de3a0e5cebb3be9a63f5463a..fb35c5c3f1a7a8728b653c63aff3270043357a05 100644 (file)
@@ -104,6 +104,9 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
        case DRM_V3D_PARAM_MAX_PERF_COUNTERS:
                args->value = v3d->perfmon_info.max_counters;
                return 0;
+       case DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES:
+               args->value = !!v3d->gemfs;
+               return 0;
        default:
                DRM_DEBUG("Unknown parameter %d\n", args->param);
                return -EINVAL;
index 87fc5bb0a61e218944ddc56dfc75535e19a01ad8..2376c73abca1ef966a1939a505f94ad57a3eac14 100644 (file)
@@ -290,6 +290,7 @@ enum drm_v3d_param {
        DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT,
        DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
        DRM_V3D_PARAM_MAX_PERF_COUNTERS,
+       DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES,
 };
 
 struct drm_v3d_get_param {