summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJerry Zuo <Jerry.Zuo@amd.com>2017-09-28 16:20:30 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-21 16:46:45 -0400
commit4bd29c34988be0c24759d5d58df424f861a8bf24 (patch)
tree6335251ff1229b88d55187c77db6452dd8739f57 /drivers/gpu/drm
parentc018b04b7c17e0814bc75b09d782204d73c64b1b (diff)
drm/amd/display: Do not access fbdev helper members
Original code is no longer needed and tested without loop. Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 610375b2a04b..382f499cb60d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -397,21 +397,10 @@ static void dm_dp_mst_register_connector(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct amdgpu_device *adev = dev->dev_private;
- int i;
drm_modeset_lock_all(dev);
- if (adev->mode_info.rfbdev) {
- /*Do not add if already registered in past*/
- for (i = 0; i < adev->mode_info.rfbdev->helper.connector_count; i++) {
- if (adev->mode_info.rfbdev->helper.connector_info[i]->connector
- == connector) {
- drm_modeset_unlock_all(dev);
- return;
- }
- }
-
+ if (adev->mode_info.rfbdev)
drm_fb_helper_add_one_connector(&adev->mode_info.rfbdev->helper, connector);
- }
else
DRM_ERROR("adev->mode_info.rfbdev is NULL\n");