Skip to content

Commit 3c499ea

Browse files
committed
drm/atomic: Use drm_drv_uses_atomic_modeset() for debugfs creation
As pointed out by Daniel Vetter, we should be usinng drm_drv_uses_atomic_modeset() for determining whether or not we want to make the debugfs nodes for atomic instead of checking DRIVER_ATOMIC, as the former isn't an accurate representation of whether or not the driver is actually using atomic modesetting internally (even though it might not be exposing atomic capabilities). Signed-off-by: Lyude Paul <lyude@redhat.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Reviewed-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180917173733.21293-1-lyude@redhat.com
1 parent 6ee67e3 commit 3c499ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/drm_atomic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ static void __drm_state_dump(struct drm_device *dev, struct drm_printer *p,
20672067
struct drm_connector *connector;
20682068
struct drm_connector_list_iter conn_iter;
20692069

2070-
if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
2070+
if (!drm_drv_uses_atomic_modeset(dev))
20712071
return;
20722072

20732073
list_for_each_entry(plane, &config->plane_list, head) {

drivers/gpu/drm/drm_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
151151
return ret;
152152
}
153153

154-
if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
154+
if (drm_drv_uses_atomic_modeset(dev)) {
155155
ret = drm_atomic_debugfs_init(minor);
156156
if (ret) {
157157
DRM_ERROR("Failed to create atomic debugfs files\n");

0 commit comments

Comments
 (0)