drm/radeon/kms: drop taking lock around crtc lookup.

We only add/remove crtcs at driver load, you cannot remove when
the GPU is running a CS packet since the fd is open, when
GPU hotplugging on radeons actually is needed all this locking
needs a review and I've started re-working kms core locking to deal
with this better. But for now avoid long delays in CS processing when
hotplug detect is happening in a different thread.

this fixes a regression introduced with hotplug detection.

Signed-off-by: Dave Airlie <airlied@redhat.com>

+1 -6
-2
drivers/gpu/drm/radeon/evergreen_cs.c
··· 333 333 header = radeon_get_ib_value(p, h_idx); 334 334 crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); 335 335 reg = CP_PACKET0_GET_REG(header); 336 - mutex_lock(&p->rdev->ddev->mode_config.mutex); 337 336 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 338 337 if (!obj) { 339 338 DRM_ERROR("cannot find crtc %d\n", crtc_id); ··· 367 368 } 368 369 } 369 370 out: 370 - mutex_unlock(&p->rdev->ddev->mode_config.mutex); 371 371 return r; 372 372 } 373 373
-2
drivers/gpu/drm/radeon/r100.c
··· 1230 1230 header = radeon_get_ib_value(p, h_idx); 1231 1231 crtc_id = radeon_get_ib_value(p, h_idx + 5); 1232 1232 reg = CP_PACKET0_GET_REG(header); 1233 - mutex_lock(&p->rdev->ddev->mode_config.mutex); 1234 1233 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 1235 1234 if (!obj) { 1236 1235 DRM_ERROR("cannot find crtc %d\n", crtc_id); ··· 1263 1264 ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; 1264 1265 } 1265 1266 out: 1266 - mutex_unlock(&p->rdev->ddev->mode_config.mutex); 1267 1267 return r; 1268 1268 } 1269 1269
+1 -2
drivers/gpu/drm/radeon/r600_cs.c
··· 585 585 header = radeon_get_ib_value(p, h_idx); 586 586 crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); 587 587 reg = CP_PACKET0_GET_REG(header); 588 - mutex_lock(&p->rdev->ddev->mode_config.mutex); 588 + 589 589 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 590 590 if (!obj) { 591 591 DRM_ERROR("cannot find crtc %d\n", crtc_id); ··· 620 620 ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2; 621 621 } 622 622 out: 623 - mutex_unlock(&p->rdev->ddev->mode_config.mutex); 624 623 return r; 625 624 } 626 625