From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/debugfs: also take per device driver features into account
Date: Tue, 21 Jan 2020 12:53:31 +0200 [thread overview]
Message-ID: <20200121105331.6825-2-jani.nikula@intel.com> (raw)
In-Reply-To: <20200121105331.6825-1-jani.nikula@intel.com>
Use drm_core_check_feature() to ensure both the driver features and the
per-device driver features are taken into account when registering
debugfs files.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_debugfs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index eab0f2687cd6..af3531bf57d3 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -180,10 +180,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count,
int i;
for (i = 0; i < count; i++) {
- u32 features = files[i].driver_features;
-
- if (features != 0 &&
- (dev->driver->driver_features & features) != features)
+ if (!drm_core_check_feature(dev, files[i].driver_features))
continue;
tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/2] drm/debugfs: also take per device driver features into account
Date: Tue, 21 Jan 2020 12:53:31 +0200 [thread overview]
Message-ID: <20200121105331.6825-2-jani.nikula@intel.com> (raw)
In-Reply-To: <20200121105331.6825-1-jani.nikula@intel.com>
Use drm_core_check_feature() to ensure both the driver features and the
per-device driver features are taken into account when registering
debugfs files.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_debugfs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index eab0f2687cd6..af3531bf57d3 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -180,10 +180,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count,
int i;
for (i = 0; i < count; i++) {
- u32 features = files[i].driver_features;
-
- if (features != 0 &&
- (dev->driver->driver_features & features) != features)
+ if (!drm_core_check_feature(dev, files[i].driver_features))
continue;
tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-01-21 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 10:53 [PATCH 1/2] drm: support feature masks in drm_core_check_feature() Jani Nikula
2020-01-21 10:53 ` [Intel-gfx] " Jani Nikula
2020-01-21 10:53 ` Jani Nikula [this message]
2020-01-21 10:53 ` [Intel-gfx] [PATCH 2/2] drm/debugfs: also take per device driver features into account Jani Nikula
2020-01-21 14:26 ` [PATCH 1/2] drm: support feature masks in drm_core_check_feature() Ville Syrjälä
2020-01-21 14:26 ` [Intel-gfx] " Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200121105331.6825-2-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.