drm: Remove DRIVER_GEM_GPUVA feature flag
Subsystems (8)
PATCH 1/1 drm: Remove DRIVER_GEM_GPUVA feature flag
The DRIVER_GEM_GPUVA feature flag is currently only used to control two behaviors within the DRM core:
- calling drm_gem_gpuva_init() during
GEM object initialization
- creating the "gpuvas" debugfs entry
drm_gem_gpuva_init() is a plain INIT_LIST_HEAD() and therefore is cheap to run for every GEM object. The DRM_DEBUGFS_GPUVA_INFO macro is only referenced by GPU-VA capable drivers, so clearing the feature bit does not cause any unrelated drivers to get the "gpuvas" debugfs node. The flag doesn't have any relevant purpose (e.g. gating ioctl handlers or MM logic) and doesn't provide any practical benefit.
Remove the flag definition and drop it from all drivers that use it, call drm_gem_gpuva_init() unconditionally and clear the driver features bit in DRM_DEBUGFS_GPUVA_INFO.
--- drivers/gpu/drm/drm_gem.c | 3 +-- drivers/gpu/drm/imagination/pvr_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 2 -- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/xe/xe_device.c | 2 +- include/drm/drm_debugfs.h | 2 +- include/drm/drm_drv.h | 6 ------ include/drm/drm_gem.h | 3 --- 9 files changed, 5 insertions(+), 18 deletions(-)
drivers/gpu/drm/drm_gem.c +1 -2
@@ -232,8 +232,7 @@ void drm_gem_private_object_init(struct drm_device *dev,if (!obj->resv) obj->resv = &obj->_resv; -if (drm_core_check_feature (dev,DRIVER_GEM_GPUVA )) -drm_gem_gpuva_init (obj); +drm_gem_gpuva_init (obj);drm_vma_node_reset (&obj->vma_node);INIT_LIST_HEAD (&obj->lru_node);
drivers/gpu/drm/imagination/pvr_drv.c +1 -1
@@ -1375,7 +1375,7 @@ pvr_drm_driver_postclose(__always_unused struct drm_device *drm_dev,DEFINE_DRM_GEM_FOPS (pvr_drm_driver_fops);static struct drm_driver pvr_drm_driver = { - .driver_features =DRIVER_GEM |DRIVER_GEM_GPUVA |DRIVER_RENDER | + .driver_features =DRIVER_GEM |DRIVER_RENDER |DRIVER_SYNCOBJ |DRIVER_SYNCOBJ_TIMELINE , .open = pvr_drm_driver_open, .postclose = pvr_drm_driver_postclose,
drivers/gpu/drm/msm/msm_drv.c +0 -2
@@ -825,7 +825,6 @@ static const struct file_operations fops = {#define DRIVER_FEATURES_GPU ( \ DRIVER_GEM | \ - DRIVER_GEM_GPUVA | \ DRIVER_RENDER | \ DRIVER_SYNCOBJ | \ DRIVER_SYNCOBJ_TIMELINE | \
@@ -833,7 +832,6 @@ static const struct file_operations fops = {#define DRIVER_FEATURES_KMS ( \ DRIVER_GEM | \ - DRIVER_GEM_GPUVA | \ DRIVER_ATOMIC | \ DRIVER_MODESET | \ 0 )
drivers/gpu/drm/nouveau/nouveau_drm.c +0 -1
@@ -1364,7 +1364,6 @@ static struct drm_driver driver_stub = { .driver_features =DRIVER_GEM |DRIVER_SYNCOBJ |DRIVER_SYNCOBJ_TIMELINE | -DRIVER_GEM_GPUVA |DRIVER_MODESET | DRIVER_RENDER, .open = nouveau_drm_open,
drivers/gpu/drm/panthor/panthor_drv.c +1 -1
@@ -1805,7 +1805,7 @@ static void panthor_debugfs_init(struct drm_minor *minor)*/ static const struct drm_driver panthor_drm_driver = { .driver_features =DRIVER_RENDER |DRIVER_GEM |DRIVER_SYNCOBJ | -DRIVER_SYNCOBJ_TIMELINE |DRIVER_GEM_GPUVA , +DRIVER_SYNCOBJ_TIMELINE , .open = panthor_open, .postclose = panthor_postclose, .show_fdinfo = panthor_show_fdinfo,
drivers/gpu/drm/xe/xe_device.c +1 -1
@@ -393,7 +393,7 @@ static struct drm_driver driver = { .driver_features =DRIVER_GEM |DRIVER_RENDER |DRIVER_SYNCOBJ | - DRIVER_SYNCOBJ_TIMELINE | DRIVER_GEM_GPUVA, + DRIVER_SYNCOBJ_TIMELINE, .open = xe_file_open, .postclose = xe_file_close,
include/drm/drm_debugfs.h +1 -1
@@ -48,7 +48,7 @@* For each DRM GPU VA space drivers should call drm_debugfs_gpuva_info() from * their @show callback. */ -#define DRM_DEBUGFS_GPUVA_INFO (show, data) {"gpuvas", show, DRIVER_GEM_GPUVA, data} +#define DRM_DEBUGFS_GPUVA_INFO (show, data) {"gpuvas", show, 0, data}/** * struct drm_info_list - debugfs info list entry
include/drm/drm_drv.h +0 -6
@@ -107,12 +107,6 @@ enum drm_driver_feature {* acceleration should be handled by two drivers that are connected using auxiliary bus. */ DRIVER_COMPUTE_ACCEL = BIT(7), -/** -* @DRIVER_GEM_GPUVA: -* -* Driver supports user defined GPU VA bindings for GEM objects. -*/ - DRIVER_GEM_GPUVA = BIT(8),/** * @DRIVER_CURSOR_HOTSPOT: *
include/drm/drm_gem.h +0 -3
@@ -663,9 +663,6 @@ static inline bool drm_gem_is_imported(const struct drm_gem_object *obj)* * This initializes the &drm_gem_object's &drm_gpuvm_bo list. * -* Calling this function is only necessary for drivers intending to support the -* &drm_driver_feature DRIVER_GEM_GPUVA. -* * See also drm_gem_gpuva_set_lock(). */ static inline void drm_gem_gpuva_init (struct drm_gem_object *obj)
Signature · 1 line
2.39.5
Quoted 17 lines · Laura Nao
The
DRIVER_GEM_GPUVAfeature flag is currently only used to control two
behaviors within the DRM core:
- callingdrm_gem_gpuva_init()during
GEM object initialization
- creating the "gpuvas" debugfs entry
drm_gem_gpuva_init()is a plainINIT_LIST_HEAD()and therefore is cheap
to run for every GEM object. TheDRM_DEBUGFS_GPUVA_INFOmacro is only referenced by GPU-VA capable drivers, so clearing the feature bit does
not cause any unrelated drivers to get the "gpuvas" debugfs node. The flag doesn't have any relevant purpose (e.g. gating ioctl handlers or MM
logic) and doesn't provide any practical benefit.
Quoted 6 lines
Remove the flag definition and drop it from all drivers that use it, call
drm_gem_gpuva_init()unconditionally and clear the driver features
bit inDRM_DEBUGFS_GPUVA_INFO.Signed-off-by Laura Nao <[email protected]>
For the xe changes:
Quoted 159 lines
---
drivers/gpu/drm/drm_gem.c | 3 +--
drivers/gpu/drm/imagination/pvr_drv.c | 2 +-
drivers/gpu/drm/msm/msm_drv.c | 2 --
drivers/gpu/drm/nouveau/nouveau_drm.c | 1 -
drivers/gpu/drm/panthor/panthor_drv.c | 2 +-
drivers/gpu/drm/xe/xe_device.c | 2 +-
include/drm/drm_debugfs.h | 2 +-
include/drm/drm_drv.h | 6 ------
include/drm/drm_gem.h | 3 ---9 files changed, 5 insertions(+), 18 deletions(-)drivers/gpu/drm/drm_gem.c +0
-0@@ -232,8 +232,7 @@ void drm_gem_private_object_init(struct drm_device *dev, if (!obj->resv) obj->resv = &obj->_resv;drivers/gpu/drm/drm_gem.c +1
-2-if (drm_core_check_feature (dev,DRIVER_GEM_GPUVA )) -drm_gem_gpuva_init (obj); +drm_gem_gpuva_init (obj);
drm_vma_node_reset(&obj->vma_node);
INIT_LIST_HEAD(&obj->lru_node);drivers/gpu/drm/imagination/pvr_drv.c +0
-0@@ -1375,7 +1375,7 @@ pvr_drm_driver_postclose(__always_unused structdrm_device *drm_dev, DEFINE_DRM_GEM_FOPS(pvr_drm_driver_fops);
static structdrm_driverpvr_drm_driver= {drivers/gpu/drm/imagination/pvr_drv.c +0
-1- .driver_features = DRIVER_GEM | DRIVER_GEM_GPUVA |
DRIVER_RENDER|drivers/gpu/drm/imagination/pvr_drv.c +1
-0+ .driver_features = DRIVER_GEM | DRIVER_RENDER |
DRIVER_SYNCOBJ|DRIVER_SYNCOBJ_TIMELINE, .open =pvr_drm_driver_open,
.postclose =pvr_drm_driver_postclose,drivers/gpu/drm/msm/msm_drv.c +0
-0@@ -825,7 +825,6 @@ static const struct file_operations fops = {
#defineDRIVER_FEATURES_GPU( \
DRIVER_GEM| \drivers/gpu/drm/msm/msm_drv.c +0
-1- DRIVER_GEM_GPUVA | \
DRIVER_RENDER| \
DRIVER_SYNCOBJ| \
DRIVER_SYNCOBJ_TIMELINE| \drivers/gpu/drm/msm/msm_drv.c +0
-0@@ -833,7 +832,6 @@ static const struct file_operations fops = {
#defineDRIVER_FEATURES_KMS( \
DRIVER_GEM| \drivers/gpu/drm/msm/msm_drv.c +0
-1- DRIVER_GEM_GPUVA | \
DRIVER_ATOMIC| \
DRIVER_MODESET| \
0 )drivers/gpu/drm/nouveau/nouveau_drm.c +0
-0@@ -1364,7 +1364,6 @@ static struct drm_driver driver_stub = {.driver_features =
DRIVER_GEM|
DRIVER_SYNCOBJ|DRIVER_SYNCOBJ_TIMELINE|drivers/gpu/drm/nouveau/nouveau_drm.c +0
-1- DRIVER_GEM_GPUVA |
DRIVER_MODESET|
DRIVER_RENDER,
.open =nouveau_drm_open,drivers/gpu/drm/panthor/panthor_drv.c +0
-0@@ -1805,7 +1805,7 @@ static void panthor_debugfs_init(structdrm_minor *minor) */ static const struct drm_driver panthor_drm_driver = {.driver_features =
DRIVER_RENDER|DRIVER_GEM|DRIVER_SYNCOBJ|drivers/gpu/drm/panthor/panthor_drv.c +0
-1- DRIVER_SYNCOBJ_TIMELINE |
DRIVER_GEM_GPUVA,drivers/gpu/drm/panthor/panthor_drv.c +1
-0+ DRIVER_SYNCOBJ_TIMELINE,.open =
panthor_open,
.postclose =panthor_postclose,
.show_fdinfo =panthor_show_fdinfo,drivers/gpu/drm/xe/xe_device.c +0
-0@@ -393,7 +393,7 @@ static struct drm_driver driver = {.driver_features =
DRIVER_GEM|
DRIVER_RENDER|DRIVER_SYNCOBJ|drivers/gpu/drm/xe/xe_device.c +1
-1- DRIVER_SYNCOBJ_TIMELINE | DRIVER_GEM_GPUVA, + DRIVER_SYNCOBJ_TIMELINE,.open =
xe_file_open,
.postclose =xe_file_close,include/drm/drm_debugfs.h +0
-0@@ -48,7 +48,7 @@ * For each DRM GPU VA space drivers should call
drm_debugfs_gpuva_info()from
* their @show callback.
*/
-#defineDRM_DEBUGFS_GPUVA_INFO(show, data){"gpuvas", show,DRIVER_GEM_GPUVA, data}
+#defineDRM_DEBUGFS_GPUVA_INFO(show, data){"gpuvas", show, 0, data}
/**
* structdrm_info_list- debugfs info list entryinclude/drm/drm_drv.h +0
-0@@ -107,12 +107,6 @@ enum drm_driver_feature { * acceleration should be handled by two drivers that areconnected using auxiliary bus.
*/
DRIVER_COMPUTE_ACCEL = BIT(7),include/drm/drm_drv.h +0
-4-/** -* @DRIVER_GEM_GPUVA: -* -* Driver supports user defined GPU VA bindings for GEM objects.
include/drm/drm_drv.h +0
-2-*/ - DRIVER_GEM_GPUVA = BIT(8),/**
* @DRIVER_CURSOR_HOTSPOT:
*include/drm/drm_gem.h +0
-1@@ -663,9 +663,6 @@ static inline bool drm_gem_is_imported(const struct drm_gem_object *obj) * * This initializes the &drm_gem_object's &drm_gpuvm_bo list. * - * Calling this function is only necessary for drivers intending tosupport the
- *&drm_driver_featureDRIVER_GEM_GPUVA.
- *
* See alsodrm_gem_gpuva_set_lock().
*/
static inline voiddrm_gem_gpuva_init(struct drm_gem_object *obj)
Quoted 17 lines · Laura Nao
The
DRIVER_GEM_GPUVAfeature flag is currently only used to control two behaviors within the DRM core:
- callingdrm_gem_gpuva_init()during
GEM object initialization
- creating the "gpuvas" debugfs entry
drm_gem_gpuva_init()is a plainINIT_LIST_HEAD()and therefore is cheap to run for every GEM object. TheDRM_DEBUGFS_GPUVA_INFOmacro is only referenced by GPU-VA capable drivers, so clearing the feature bit does not cause any unrelated drivers to get the "gpuvas" debugfs node. The flag doesn't have any relevant purpose (e.g. gating ioctl handlers or MM logic) and doesn't provide any practical benefit.Remove the flag definition and drop it from all drivers that use it, call
drm_gem_gpuva_init()unconditionally and clear the driver features bit inDRM_DEBUGFS_GPUVA_INFO.
Quoted 7 lines
Signed-off-by Laura Nao <[email protected]>--- drivers/gpu/drm/drm_gem.c | 3 +-- drivers/gpu/drm/imagination/pvr_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 2 -- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/panthor/panthor_drv.c | 2 +-
For panthor changes:
Best regards,
Liviu
Quoted 138 lines
drivers/gpu/drm/xe/xe_device.c | 2 +- include/drm/drm_debugfs.h | 2 +- include/drm/drm_drv.h | 6 ------ include/drm/drm_gem.h | 3 --- 9 files changed, 5 insertions(+), 18 deletions(-)drivers/gpu/drm/drm_gem.c +1
-2@@ -232,8 +232,7 @@ void drm_gem_private_object_init(struct drm_device *dev,if (!obj->resv) obj->resv = &obj->_resv; -if (drm_core_check_feature (dev,DRIVER_GEM_GPUVA )) -drm_gem_gpuva_init (obj); +drm_gem_gpuva_init (obj);drm_vma_node_reset (&obj->vma_node);INIT_LIST_HEAD (&obj->lru_node);drivers/gpu/drm/imagination/pvr_drv.c +1
-1@@ -1375,7 +1375,7 @@ pvr_drm_driver_postclose(__always_unused struct drm_device *drm_dev,DEFINE_DRM_GEM_FOPS (pvr_drm_driver_fops);static struct drm_driver pvr_drm_driver = { - .driver_features =DRIVER_GEM |DRIVER_GEM_GPUVA |DRIVER_RENDER | + .driver_features =DRIVER_GEM |DRIVER_RENDER |DRIVER_SYNCOBJ |DRIVER_SYNCOBJ_TIMELINE , .open = pvr_drm_driver_open, .postclose = pvr_drm_driver_postclose,drivers/gpu/drm/msm/msm_drv.c +0
-2@@ -825,7 +825,6 @@ static const struct file_operations fops = {#define DRIVER_FEATURES_GPU ( \ DRIVER_GEM | \ - DRIVER_GEM_GPUVA | \ DRIVER_RENDER | \ DRIVER_SYNCOBJ | \ DRIVER_SYNCOBJ_TIMELINE | \@@ -833,7 +832,6 @@ static const struct file_operations fops = {#define DRIVER_FEATURES_KMS ( \ DRIVER_GEM | \ - DRIVER_GEM_GPUVA | \ DRIVER_ATOMIC | \ DRIVER_MODESET | \ 0 )drivers/gpu/drm/nouveau/nouveau_drm.c +0
-1@@ -1364,7 +1364,6 @@ static struct drm_driver driver_stub = { .driver_features =DRIVER_GEM |DRIVER_SYNCOBJ |DRIVER_SYNCOBJ_TIMELINE | -DRIVER_GEM_GPUVA |DRIVER_MODESET | DRIVER_RENDER, .open = nouveau_drm_open,drivers/gpu/drm/panthor/panthor_drv.c +1
-1@@ -1805,7 +1805,7 @@ static void panthor_debugfs_init(struct drm_minor *minor)*/ static const struct drm_driver panthor_drm_driver = { .driver_features =DRIVER_RENDER |DRIVER_GEM |DRIVER_SYNCOBJ | -DRIVER_SYNCOBJ_TIMELINE |DRIVER_GEM_GPUVA , +DRIVER_SYNCOBJ_TIMELINE , .open = panthor_open, .postclose = panthor_postclose, .show_fdinfo = panthor_show_fdinfo,drivers/gpu/drm/xe/xe_device.c +1
-1@@ -393,7 +393,7 @@ static struct drm_driver driver = { .driver_features =DRIVER_GEM |DRIVER_RENDER |DRIVER_SYNCOBJ | - DRIVER_SYNCOBJ_TIMELINE | DRIVER_GEM_GPUVA, + DRIVER_SYNCOBJ_TIMELINE, .open = xe_file_open, .postclose = xe_file_close,include/drm/drm_debugfs.h +1
-1@@ -48,7 +48,7 @@* For each DRM GPU VA space drivers should call drm_debugfs_gpuva_info() from * their @show callback. */ -#define DRM_DEBUGFS_GPUVA_INFO (show, data) {"gpuvas", show, DRIVER_GEM_GPUVA, data} +#define DRM_DEBUGFS_GPUVA_INFO (show, data) {"gpuvas", show, 0, data}/** * struct drm_info_list - debugfs info list entry include/drm/drm_drv.h +0
-6@@ -107,12 +107,6 @@ enum drm_driver_feature {* acceleration should be handled by two drivers that are connected using auxiliary bus. */ DRIVER_COMPUTE_ACCEL = BIT(7), -/** -* @DRIVER_GEM_GPUVA: -* -* Driver supports user defined GPU VA bindings for GEM objects. -*/ - DRIVER_GEM_GPUVA = BIT(8),/** * @DRIVER_CURSOR_HOTSPOT: * include/drm/drm_gem.h +0
-3@@ -663,9 +663,6 @@ static inline bool drm_gem_is_imported(const struct drm_gem_object *obj)* * This initializes the &drm_gem_object's &drm_gpuvm_bo list. * -* Calling this function is only necessary for drivers intending to support the -* &drm_driver_feature DRIVER_GEM_GPUVA. -* * See also drm_gem_gpuva_set_lock(). */ static inline void drm_gem_gpuva_init (struct drm_gem_object *obj)Signature · 1 line
2.39.5
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Quoted 14 lines · Laura Nao
The
DRIVER_GEM_GPUVAfeature flag is currently only used to control two behaviors within the DRM core:
- callingdrm_gem_gpuva_init()during
GEM object initialization
- creating the "gpuvas" debugfs entry
drm_gem_gpuva_init()is a plainINIT_LIST_HEAD()and therefore is cheap to run for every GEM object. TheDRM_DEBUGFS_GPUVA_INFOmacro is only referenced by GPU-VA capable drivers, so clearing the feature bit does not cause any unrelated drivers to get the "gpuvas" debugfs node. The flag doesn't have any relevant purpose (e.g. gating ioctl handlers or MM logic) and doesn't provide any practical benefit.
Quoted 5 lines
Remove the flag definition and drop it from all drivers that use it, call
drm_gem_gpuva_init()unconditionally and clear the driver features bit inDRM_DEBUGFS_GPUVA_INFO.Signed-off-by Laura Nao <[email protected]>
Quoted 144 lines
--- drivers/gpu/drm/drm_gem.c | 3 +-- drivers/gpu/drm/imagination/pvr_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 2 -- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/xe/xe_device.c | 2 +- include/drm/drm_debugfs.h | 2 +- include/drm/drm_drv.h | 6 ------ include/drm/drm_gem.h | 3 --- 9 files changed, 5 insertions(+), 18 deletions(-)drivers/gpu/drm/drm_gem.c +1
-2@@ -232,8 +232,7 @@ void drm_gem_private_object_init(struct drm_device *dev,if (!obj->resv) obj->resv = &obj->_resv; -if (drm_core_check_feature (dev,DRIVER_GEM_GPUVA )) -drm_gem_gpuva_init (obj); +drm_gem_gpuva_init (obj);drm_vma_node_reset (&obj->vma_node);INIT_LIST_HEAD (&obj->lru_node);drivers/gpu/drm/imagination/pvr_drv.c +1
-1@@ -1375,7 +1375,7 @@ pvr_drm_driver_postclose(__always_unused struct drm_device *drm_dev,DEFINE_DRM_GEM_FOPS (pvr_drm_driver_fops);static struct drm_driver pvr_drm_driver = { - .driver_features =DRIVER_GEM |DRIVER_GEM_GPUVA |DRIVER_RENDER | + .driver_features =DRIVER_GEM |DRIVER_RENDER |DRIVER_SYNCOBJ |DRIVER_SYNCOBJ_TIMELINE , .open = pvr_drm_driver_open, .postclose = pvr_drm_driver_postclose,drivers/gpu/drm/msm/msm_drv.c +0
-2@@ -825,7 +825,6 @@ static const struct file_operations fops = {#define DRIVER_FEATURES_GPU ( \ DRIVER_GEM | \ - DRIVER_GEM_GPUVA | \ DRIVER_RENDER | \ DRIVER_SYNCOBJ | \ DRIVER_SYNCOBJ_TIMELINE | \@@ -833,7 +832,6 @@ static const struct file_operations fops = {#define DRIVER_FEATURES_KMS ( \ DRIVER_GEM | \ - DRIVER_GEM_GPUVA | \ DRIVER_ATOMIC | \ DRIVER_MODESET | \ 0 )drivers/gpu/drm/nouveau/nouveau_drm.c +0
-1@@ -1364,7 +1364,6 @@ static struct drm_driver driver_stub = { .driver_features =DRIVER_GEM |DRIVER_SYNCOBJ |DRIVER_SYNCOBJ_TIMELINE | -DRIVER_GEM_GPUVA |DRIVER_MODESET | DRIVER_RENDER, .open = nouveau_drm_open,drivers/gpu/drm/panthor/panthor_drv.c +1
-1@@ -1805,7 +1805,7 @@ static void panthor_debugfs_init(struct drm_minor *minor)*/ static const struct drm_driver panthor_drm_driver = { .driver_features =DRIVER_RENDER |DRIVER_GEM |DRIVER_SYNCOBJ | -DRIVER_SYNCOBJ_TIMELINE |DRIVER_GEM_GPUVA , +DRIVER_SYNCOBJ_TIMELINE , .open = panthor_open, .postclose = panthor_postclose, .show_fdinfo = panthor_show_fdinfo,drivers/gpu/drm/xe/xe_device.c +1
-1@@ -393,7 +393,7 @@ static struct drm_driver driver = { .driver_features =DRIVER_GEM |DRIVER_RENDER |DRIVER_SYNCOBJ | - DRIVER_SYNCOBJ_TIMELINE | DRIVER_GEM_GPUVA, + DRIVER_SYNCOBJ_TIMELINE, .open = xe_file_open, .postclose = xe_file_close,include/drm/drm_debugfs.h +1
-1@@ -48,7 +48,7 @@* For each DRM GPU VA space drivers should call drm_debugfs_gpuva_info() from * their @show callback. */ -#define DRM_DEBUGFS_GPUVA_INFO (show, data) {"gpuvas", show, DRIVER_GEM_GPUVA, data} +#define DRM_DEBUGFS_GPUVA_INFO (show, data) {"gpuvas", show, 0, data}/** * struct drm_info_list - debugfs info list entry include/drm/drm_drv.h +0
-6@@ -107,12 +107,6 @@ enum drm_driver_feature {* acceleration should be handled by two drivers that are connected using auxiliary bus. */ DRIVER_COMPUTE_ACCEL = BIT(7), -/** -* @DRIVER_GEM_GPUVA: -* -* Driver supports user defined GPU VA bindings for GEM objects. -*/ - DRIVER_GEM_GPUVA = BIT(8),/** * @DRIVER_CURSOR_HOTSPOT: * include/drm/drm_gem.h +0
-4@@ -663,9 +663,6 @@ static inline bool drm_gem_is_imported(const struct drm_gem_object *obj)* * This initializes the &drm_gem_object's &drm_gpuvm_bo list. * -* Calling this function is only necessary for drivers intending to support the -* &drm_driver_feature DRIVER_GEM_GPUVA. -* * See also drm_gem_gpuva_set_lock(). */ static inline void drm_gem_gpuva_init (struct drm_gem_object *obj) --2.39.5
Patchwork
CI✗ CI.KUnit: failure for drm: Remove DRIVER_GEM_GPUVA feature flag
In reply to Laura Nao== Series Details ==
== Series Details ==
Series: drm: Remove DRIVER_GEM_GPUVA feature flag
URL : https://patchwork.freedesktop.org/series/165298/
State : failure
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig ERROR:root:../drivers/gpu/drm/xe/xe_device.c:428:42: error: ‘DRIVER_GEM_GPUVA’ undeclared here (not in a function); did you mean ‘DRIVER_GEM’?
428 | DRIVER_GEM | DRIVER_RENDER | DRIVER_GEM_GPUVA,
| ^~~~~~~~~~~~~~~~
| DRIVER_GEMmake[7]: *** [../scripts/Makefile.build:289: drivers/gpu/drm/xe/xe_device.o] Error 1 make[7]: *** Waiting for unfinished jobs....
make[6]: *** [../scripts/Makefile.build:549: drivers/gpu/drm/xe] Error 2 make[6]: *** Waiting for unfinished jobs....
make[5]: *** [../scripts/Makefile.build:549: drivers/gpu/drm] Error 2 make[4]: *** [../scripts/Makefile.build:549: drivers/gpu] Error 2 make[4]: *** Waiting for unfinished jobs....
make[3]: *** [../scripts/Makefile.build:549: drivers] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/kernel/Makefile:2105: .] Error 2
make[1]: *** [/kernel/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2
[13:10:08] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:10:12] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 + cleanup ++ stat -c %u:%g /kernel + chown -R 1003:1003 /kernel
Boris Brezillon
maintainerHi,
Quoted 18 lines · On Tue, 21 Apr 2026 10:47:01 +0200 Laura Nao <[email protected]> wrote:
The
DRIVER_GEM_GPUVAfeature flag is currently only used to control two behaviors within the DRM core:
- callingdrm_gem_gpuva_init()during
GEM object initialization
- creating the "gpuvas" debugfs entry
drm_gem_gpuva_init()is a plainINIT_LIST_HEAD()and therefore is cheap to run for every GEM object. TheDRM_DEBUGFS_GPUVA_INFOmacro is only referenced by GPU-VA capable drivers, so clearing the feature bit does not cause any unrelated drivers to get the "gpuvas" debugfs node. The flag doesn't have any relevant purpose (e.g. gating ioctl handlers or MM logic) and doesn't provide any practical benefit.Remove the flag definition and drop it from all drivers that use it, call
drm_gem_gpuva_init()unconditionally and clear the driver features bit inDRM_DEBUGFS_GPUVA_INFO.Signed-off-by Laura Nao <[email protected]>
Quoted 11 lines
--- drivers/gpu/drm/drm_gem.c | 3 +-- drivers/gpu/drm/imagination/pvr_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 2 -- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/xe/xe_device.c | 2 +- include/drm/drm_debugfs.h | 2 +- include/drm/drm_drv.h | 6 ------ include/drm/drm_gem.h | 3 --- 9 files changed, 5 insertions(+), 18 deletions(-)
I took the liberty to queue this one to drm-misc-next even though it was lacking R-b/A-b from Nouveau/Pvr maintainers because
- it's pretty trivial
- it's been posted more than a month ago
- we need it to make progress on the Tyr side
- if it's broken (I honestly doubt it), we still have a full release cycle to revert
Regards,
Boris
Danilo Krummrich
maintainerQuoted 8 lines · Boris Brezillon
I took the liberty to queue this one to drm-misc-next even though it was lacking R-b/A-b from Nouveau/Pvr maintainers because
- it's pretty trivial
- it's been posted more than a month ago
- we need it to make progress on the Tyr side
- if it's broken (I honestly doubt it), we still have a full release cycle to revert
All good, thanks for queuing it up; I saw you message this morning and had it on my list to reply.
- Danilo