]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: move dpcd debugfs members setup
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Feb 2020 22:07:39 +0000 (17:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Feb 2020 19:21:13 +0000 (14:21 -0500)
Into the function that creates the debugfs files rather
than setting them explicitly in the callers.

Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

index 200733d503adf1f3c20d6ce2f6057c179be04208..ecbf3810dc4404e02e5eeaea6d0a10630d273478 100644 (file)
@@ -5969,8 +5969,6 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
 
 #if defined(CONFIG_DEBUG_FS)
        connector_debugfs_init(aconnector);
-       aconnector->debugfs_dpcd_address = 0;
-       aconnector->debugfs_dpcd_size = 0;
 #endif
 
        if (connector_type == DRM_MODE_CONNECTOR_DisplayPort
index 8ec3b4335c69405c0d0f5b57d49f1b6b8676c872..0461fecd68db336d0e16f1f5ab55bac24f4caf8d 100644 (file)
@@ -1090,6 +1090,9 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
        debugfs_create_file_unsafe("force_yuv420_output", 0644, dir, connector,
                                   &force_yuv420_output_fops);
 
+       connector->debugfs_dpcd_address = 0;
+       connector->debugfs_dpcd_size = 0;
+
 }
 
 /*
index 5672f776591965f7f082ed389f4032b2262725cb..3959c942c88b35a34c980646ff890b4485a90fa7 100644 (file)
@@ -158,8 +158,6 @@ amdgpu_dm_mst_connector_late_register(struct drm_connector *connector)
 
 #if defined(CONFIG_DEBUG_FS)
        connector_debugfs_init(amdgpu_dm_connector);
-       amdgpu_dm_connector->debugfs_dpcd_address = 0;
-       amdgpu_dm_connector->debugfs_dpcd_size = 0;
 #endif
 
        return drm_dp_mst_connector_late_register(connector, port);