Skip to content

Commit

Permalink
drm/debugfs: also take per device driver features into account
Browse files Browse the repository at this point in the history
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: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200123124801.14958-2-jani.nikula@intel.com
  • Loading branch information
Jani Nikula committed Jan 25, 2020
1 parent 12a1d4e commit 23d498f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/drm_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 23d498f

Please sign in to comment.