mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-14 02:04:43 +00:00
drm/amd/display: Drop atomic_obj_lock for private obj
[Why] New DRM versions manage locking for private objects for us, so this is no longer needed. This also prevents a WARN_ON from occurring when the private object is duplicated during the forced atomic commit that occurs from the HPD handler. The HPD handler calls drm_modeset_lock_all before the forced commit and if the private object is duplicated then the DEBUG_LOCKS_WARN_ON(ww_ctx->done_acquire) warning will be triggered since we're trying to lock something when everything should have already been locked. [How] Drop the lock and let DRM manage this. Cc: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
054d282d17
commit
c33f533417
2 changed files with 0 additions and 9 deletions
|
|
@ -1568,15 +1568,10 @@ static int dm_atomic_get_state(struct drm_atomic_state *state,
|
||||||
struct amdgpu_device *adev = dev->dev_private;
|
struct amdgpu_device *adev = dev->dev_private;
|
||||||
struct amdgpu_display_manager *dm = &adev->dm;
|
struct amdgpu_display_manager *dm = &adev->dm;
|
||||||
struct drm_private_state *priv_state;
|
struct drm_private_state *priv_state;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (*dm_state)
|
if (*dm_state)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = drm_modeset_lock(&dm->atomic_obj_lock, state->acquire_ctx);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
priv_state = drm_atomic_get_private_obj_state(state, &dm->atomic_obj);
|
priv_state = drm_atomic_get_private_obj_state(state, &dm->atomic_obj);
|
||||||
if (IS_ERR(priv_state))
|
if (IS_ERR(priv_state))
|
||||||
return PTR_ERR(priv_state);
|
return PTR_ERR(priv_state);
|
||||||
|
|
@ -1683,8 +1678,6 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
|
||||||
|
|
||||||
adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
|
adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
|
||||||
|
|
||||||
drm_modeset_lock_init(&adev->dm.atomic_obj_lock);
|
|
||||||
|
|
||||||
state = kzalloc(sizeof(*state), GFP_KERNEL);
|
state = kzalloc(sizeof(*state), GFP_KERNEL);
|
||||||
if (!state)
|
if (!state)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,6 @@ struct amdgpu_display_manager {
|
||||||
*/
|
*/
|
||||||
struct drm_private_obj atomic_obj;
|
struct drm_private_obj atomic_obj;
|
||||||
|
|
||||||
struct drm_modeset_lock atomic_obj_lock;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dc_lock:
|
* @dc_lock:
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue