Commit 23d498f6 authored by Jani Nikula's avatar Jani Nikula

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ä <ville.syrjala@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200123124801.14958-2-jani.nikula@intel.com
parent 12a1d4e0
...@@ -182,8 +182,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count, ...@@ -182,8 +182,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count,
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
u32 features = files[i].driver_features; u32 features = files[i].driver_features;
if (features != 0 && if (features && !drm_core_check_all_features(dev, features))
(dev->driver->driver_features & features) != features)
continue; continue;
tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL); tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment