Skip to content

Commit ee82e5a

Browse files
author
Rob Clark
committed
drm/msm: Clean up split driver features
Avoid the possibility of missing features between the split and unified drm driver cases by defining DRIVER_FEATURES_GPU / KMS and using those in the drm_driver initializations. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/662595/
1 parent 217ed15 commit ee82e5a

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

drivers/gpu/drm/msm/msm_drv.c

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -816,14 +816,22 @@ static const struct file_operations fops = {
816816
.show_fdinfo = drm_show_fdinfo,
817817
};
818818

819+
#define DRIVER_FEATURES_GPU ( \
820+
DRIVER_GEM | \
821+
DRIVER_GEM_GPUVA | \
822+
DRIVER_RENDER | \
823+
DRIVER_SYNCOBJ | \
824+
DRIVER_SYNCOBJ_TIMELINE | \
825+
0 )
826+
827+
#define DRIVER_FEATURES_KMS ( \
828+
DRIVER_GEM | \
829+
DRIVER_ATOMIC | \
830+
DRIVER_MODESET | \
831+
0 )
832+
819833
static const struct drm_driver msm_driver = {
820-
.driver_features = DRIVER_GEM |
821-
DRIVER_GEM_GPUVA |
822-
DRIVER_RENDER |
823-
DRIVER_ATOMIC |
824-
DRIVER_MODESET |
825-
DRIVER_SYNCOBJ_TIMELINE |
826-
DRIVER_SYNCOBJ,
834+
.driver_features = DRIVER_FEATURES_GPU | DRIVER_FEATURES_KMS,
827835
.open = msm_open,
828836
.postclose = msm_postclose,
829837
.dumb_create = msm_gem_dumb_create,
@@ -846,9 +854,7 @@ static const struct drm_driver msm_driver = {
846854
};
847855

848856
static const struct drm_driver msm_kms_driver = {
849-
.driver_features = DRIVER_GEM |
850-
DRIVER_ATOMIC |
851-
DRIVER_MODESET,
857+
.driver_features = DRIVER_FEATURES_KMS,
852858
.open = msm_open,
853859
.postclose = msm_postclose,
854860
.dumb_create = msm_gem_dumb_create,
@@ -870,11 +876,7 @@ static const struct drm_driver msm_kms_driver = {
870876
};
871877

872878
static const struct drm_driver msm_gpu_driver = {
873-
.driver_features = DRIVER_GEM |
874-
DRIVER_GEM_GPUVA |
875-
DRIVER_RENDER |
876-
DRIVER_SYNCOBJ_TIMELINE |
877-
DRIVER_SYNCOBJ,
879+
.driver_features = DRIVER_FEATURES_GPU,
878880
.open = msm_open,
879881
.postclose = msm_postclose,
880882
.gem_prime_import_sg_table = msm_gem_prime_import_sg_table,

0 commit comments

Comments
 (0)