Skip to content

Commit

Permalink
drm/amd/display: move dpcd debugfs members setup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher committed Feb 26, 2020
1 parent d090e7d commit 7b99330
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

/*
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7b99330

Please sign in to comment.