diff options
author | Maxime Ripard <maxime@cerno.tech> | 2021-04-26 14:03:09 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-04-26 14:03:09 +0200 |
commit | 355b60296143a090039211c5f0e1463f84aab65a (patch) | |
tree | b74d4ef2aea66252ea9cf77c847de6c6e72a02b7 /drivers/gpu/drm/radeon/radeon_dp_mst.c | |
parent | 91185d55b32e7e377f15fb46a62b216f8d3038d4 (diff) | |
parent | a1a1ca70deb3ec600eeabb21de7f3f48aaae5695 (diff) |
Merge drm/drm-next into drm-misc-next
Christian needs some patches from drm/next
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_dp_mst.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_dp_mst.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c index 2c32186c4acd..59cf1d288465 100644 --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: MIT -#include <drm/drm_debugfs.h> #include <drm/drm_dp_mst_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_file.h> @@ -242,6 +241,9 @@ radeon_dp_mst_detect(struct drm_connector *connector, to_radeon_connector(connector); struct radeon_connector *master = radeon_connector->mst_port; + if (drm_connector_is_unregistered(connector)) + return connector_status_disconnected; + return drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr, radeon_connector->port); } @@ -723,10 +725,10 @@ go_again: #if defined(CONFIG_DEBUG_FS) -static int radeon_debugfs_mst_info(struct seq_file *m, void *data) +static int radeon_debugfs_mst_info_show(struct seq_file *m, void *unused) { - struct drm_info_node *node = (struct drm_info_node *)m->private; - struct drm_device *dev = node->minor->dev; + struct radeon_device *rdev = (struct radeon_device *)m->private; + struct drm_device *dev = rdev->ddev; struct drm_connector *connector; struct radeon_connector *radeon_connector; struct radeon_connector_atom_dig *dig_connector; @@ -754,15 +756,16 @@ static int radeon_debugfs_mst_info(struct seq_file *m, void *data) return 0; } -static struct drm_info_list radeon_debugfs_mst_list[] = { - {"radeon_mst_info", &radeon_debugfs_mst_info, 0, NULL}, -}; +DEFINE_SHOW_ATTRIBUTE(radeon_debugfs_mst_info); #endif -int radeon_mst_debugfs_init(struct radeon_device *rdev) +void radeon_mst_debugfs_init(struct radeon_device *rdev) { #if defined(CONFIG_DEBUG_FS) - return radeon_debugfs_add_files(rdev, radeon_debugfs_mst_list, 1); + struct dentry *root = rdev->ddev->primary->debugfs_root; + + debugfs_create_file("radeon_mst_info", 0444, root, rdev, + &radeon_debugfs_mst_info_fops); + #endif - return 0; } |