diff options
| author | Jani Nikula <[email protected]> | 2020-01-23 12:48:01 +0000 |
|---|---|---|
| committer | Jani Nikula <[email protected]> | 2020-01-25 13:49:11 +0000 |
| commit | 23d498f6b7fb7b64f3d7fc9c6de2ff374d6b71e7 (patch) | |
| tree | 152413e1e74c773142ff8e990aab67584c075f66 /drivers/gpu/drm/drm_debugfs.c | |
| parent | drm: add drm_core_check_all_features() to check for a mask of features (diff) | |
| download | kernel-23d498f6b7fb7b64f3d7fc9c6de2ff374d6b71e7.tar.gz kernel-23d498f6b7fb7b64f3d7fc9c6de2ff374d6b71e7.zip | |
drm/debugfs: also take per device driver features into account
Use drm_core_check_all_features() to ensure both the driver features and
the per-device driver features are taken into account when registering
debugfs files.
v3:
- files[i].driver_features == 0 actually means "don't care"
v2:
- use drm_core_check_all_features()
Cc: Ville Syrjälä <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_debugfs.c')
| -rw-r--r-- | drivers/gpu/drm/drm_debugfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index eab0f2687cd6..4e673d318503 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -182,8 +182,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count, for (i = 0; i < count; i++) { u32 features = files[i].driver_features; - if (features != 0 && - (dev->driver->driver_features & features) != features) + if (features && !drm_core_check_all_features(dev, features)) continue; tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL); |
