Skip to content

Commit 89e5d6e

Browse files
mairacanalpopcornmix
authored andcommitted
drm/v3d: Expose Super Pages capability
Commit 9f8e1c9 upstream 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
1 parent 562bb1c commit 89e5d6e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/v3d/v3d_drv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
108108
case DRM_V3D_PARAM_MAX_PERF_COUNTERS:
109109
args->value = v3d->perfmon_info.max_counters;
110110
return 0;
111+
case DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES:
112+
args->value = !!v3d->gemfs;
113+
return 0;
111114
default:
112115
DRM_DEBUG("Unknown parameter %d\n", args->param);
113116
return -EINVAL;

include/uapi/drm/v3d_drm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ enum drm_v3d_param {
290290
DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT,
291291
DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
292292
DRM_V3D_PARAM_MAX_PERF_COUNTERS,
293+
DRM_V3D_PARAM_SUPPORTS_SUPER_PAGES,
293294
};
294295

295296
struct drm_v3d_get_param {

0 commit comments

Comments
 (0)