diff options
| author | Emily Deng <[email protected]> | 2018-12-26 10:09:33 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-01-14 20:04:22 +0000 |
| commit | 094e640dcfab39fd795b6cd90fa3cafae4cf2db7 (patch) | |
| tree | bdeb2ec5b256cd2181d5e2105f2025b5c6237593 /drivers/gpu/drm/amd/amdgpu/dce_virtual.c | |
| parent | Merge tag 'tilcdc-4.22' of https://github.com/jsarha/linux into drm-next (diff) | |
| download | kernel-094e640dcfab39fd795b6cd90fa3cafae4cf2db7.tar.gz kernel-094e640dcfab39fd795b6cd90fa3cafae4cf2db7.zip | |
drm/amdgpu/virtual_dce: No need to pin the fb's bo
For virtual display, no need to pin the fb's bo.
Signed-off-by: Emily Deng <[email protected]>
Reviewed-by: Huang Rui <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_virtual.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index fdace004544d..e4cc1d48eaab 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c @@ -167,19 +167,6 @@ static void dce_virtual_crtc_disable(struct drm_crtc *crtc) struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); dce_virtual_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); - if (crtc->primary->fb) { - int r; - struct amdgpu_bo *abo; - - abo = gem_to_amdgpu_bo(crtc->primary->fb->obj[0]); - r = amdgpu_bo_reserve(abo, true); - if (unlikely(r)) - DRM_ERROR("failed to reserve abo before unpin\n"); - else { - amdgpu_bo_unpin(abo); - amdgpu_bo_unreserve(abo); - } - } amdgpu_crtc->pll_id = ATOM_PPLL_INVALID; amdgpu_crtc->encoder = NULL; @@ -692,7 +679,9 @@ static int dce_virtual_pageflip(struct amdgpu_device *adev, spin_unlock_irqrestore(&adev->ddev->event_lock, flags); drm_crtc_vblank_put(&amdgpu_crtc->base); - schedule_work(&works->unpin_work); + amdgpu_bo_unref(&works->old_abo); + kfree(works->shared); + kfree(works); return 0; } |
