All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
       [not found] ` <mailman.1551.1493369856.21890.amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
@ 2017-04-28 14:12   ` Xie, AlexBin
       [not found]     ` <MWHPR1201MB0045C097101B0EDA13F28BD9F2130-3iK1xFAIwjq45V35fqe+hGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Xie, AlexBin @ 2017-04-28 14:12 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 22728 bytes --]

Am 28.04.2017 um 10:47 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
>
> Some of these paths probably cannot be interrupted by a signal anyway.
> Those that can would fail to clean up things if they actually got
> interrupted.
>
> Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>

Reviewed-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>

Alex X: Just a reminder: amdgpu_unpin_work_func is called by work queue.
Signal is blocked already. un-interruptible waiting might slow thing down very slightly.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c      |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c    |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c   |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c      |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     |  2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_virtual.c    |  2 +-
>   drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c       |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c       | 10 +++++-----
>   drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c       |  8 ++++----
>   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c       |  8 ++++----
>   16 files changed, 36 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> index 771a6aae58d6..af64448a565c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> @@ -123,7 +123,7 @@ static void amdgpu_unpin_work_func(struct work_struct *__work)
>        int r;
>
>        /* unpin of the old buffer */
> -     r = amdgpu_bo_reserve(work->old_abo, false);
> +     r = amdgpu_bo_reserve(work->old_abo, true);
>        if (likely(r == 0)) {
>                r = amdgpu_bo_unpin(work->old_abo);
>                if (unlikely(r != 0)) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index 9dea2f661f1d..e869e60994ce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -113,7 +113,7 @@ static void amdgpufb_destroy_pinned_object(struct drm_gem_object *gobj)
>        struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
>        int ret;
>
> -     ret = amdgpu_bo_reserve(abo, false);
> +     ret = amdgpu_bo_reserve(abo, true);
>        if (likely(ret == 0)) {
>                amdgpu_bo_kunmap(abo);
>                amdgpu_bo_unpin(abo);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index 6d691abe889c..e7406ce7093c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -183,7 +183,7 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
>        if (adev->gart.robj == NULL) {
>                return;
>        }
> -     r = amdgpu_bo_reserve(adev->gart.robj, false);
> +     r = amdgpu_bo_reserve(adev->gart.robj, true);
>        if (likely(r == 0)) {
>                amdgpu_bo_kunmap(adev->gart.robj);
>                amdgpu_bo_unpin(adev->gart.robj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index ec5b1bc0e428..d40b8ac745cd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -819,7 +819,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
>
>        if (amdgpu_sriov_vf(adev)) {
>                /* TODO: how to handle reserve failure */
> -             BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, false));
> +             BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, true));
>                amdgpu_vm_bo_rmv(adev, fpriv->vm.csa_bo_va);
>                fpriv->vm.csa_bo_va = NULL;
>                amdgpu_bo_unreserve(adev->virt.csa_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> index 3826d5aea0a6..6bdc866570ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> @@ -113,7 +113,7 @@ void amdgpu_gem_prime_unpin(struct drm_gem_object *obj)
>        struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
>        int ret = 0;
>
> -     ret = amdgpu_bo_reserve(bo, false);
> +     ret = amdgpu_bo_reserve(bo, true);
>        if (unlikely(ret != 0))
>                return;
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
> index 7b56d9988aba..de4ebcf4ac2c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
> @@ -130,7 +130,7 @@ int amdgpu_sa_bo_manager_suspend(struct amdgpu_device *adev,
>                return -EINVAL;
>        }
>
> -     r = amdgpu_bo_reserve(sa_manager->bo, false);
> +     r = amdgpu_bo_reserve(sa_manager->bo, true);
>        if (!r) {
>                amdgpu_bo_kunmap(sa_manager->bo);
>                amdgpu_bo_unpin(sa_manager->bo);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 58873cf027e8..11c6c4494e0a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1198,7 +1198,7 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
>                return;
>        amdgpu_ttm_debugfs_fini(adev);
>        if (adev->stollen_vga_memory) {
> -             r = amdgpu_bo_reserve(adev->stollen_vga_memory, false);
> +             r = amdgpu_bo_reserve(adev->stollen_vga_memory, true);
>                if (r == 0) {
>                        amdgpu_bo_unpin(adev->stollen_vga_memory);
>                        amdgpu_bo_unreserve(adev->stollen_vga_memory);
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index 7d86ba42efc9..d618f92ae46c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -2231,7 +2231,7 @@ static int dce_v10_0_crtc_do_set_base(struct drm_crtc *crtc,
>        if (!atomic && fb && fb != crtc->primary->fb) {
>                amdgpu_fb = to_amdgpu_framebuffer(fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r != 0))
>                        return r;
>                amdgpu_bo_unpin(abo);
> @@ -2590,7 +2590,7 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>        if (amdgpu_crtc->cursor_bo) {
>                struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -             ret = amdgpu_bo_reserve(aobj, false);
> +             ret = amdgpu_bo_reserve(aobj, true);
>                if (likely(ret == 0)) {
>                        amdgpu_bo_unpin(aobj);
>                        amdgpu_bo_unreserve(aobj);
> @@ -2720,7 +2720,7 @@ static void dce_v10_0_crtc_disable(struct drm_crtc *crtc)
>
>                amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r))
>                        DRM_ERROR("failed to reserve abo before unpin\n");
>                else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 3d82181baffe..ea634158ae7a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -2215,7 +2215,7 @@ static int dce_v11_0_crtc_do_set_base(struct drm_crtc *crtc,
>        if (!atomic && fb && fb != crtc->primary->fb) {
>                amdgpu_fb = to_amdgpu_framebuffer(fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r != 0))
>                        return r;
>                amdgpu_bo_unpin(abo);
> @@ -2610,7 +2610,7 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>        if (amdgpu_crtc->cursor_bo) {
>                struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -             ret = amdgpu_bo_reserve(aobj, false);
> +             ret = amdgpu_bo_reserve(aobj, true);
>                if (likely(ret == 0)) {
>                        amdgpu_bo_unpin(aobj);
>                        amdgpu_bo_unreserve(aobj);
> @@ -2740,7 +2740,7 @@ static void dce_v11_0_crtc_disable(struct drm_crtc *crtc)
>
>                amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r))
>                        DRM_ERROR("failed to reserve abo before unpin\n");
>                else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index 59f6993af0b6..d68c1eabd0ce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -2150,7 +2150,7 @@ static int dce_v6_0_crtc_do_set_base(struct drm_crtc *crtc,
>        if (!atomic && fb && fb != crtc->primary->fb) {
>                amdgpu_fb = to_amdgpu_framebuffer(fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r != 0))
>                        return r;
>                amdgpu_bo_unpin(abo);
> @@ -2467,7 +2467,7 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>        if (amdgpu_crtc->cursor_bo) {
>                struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -             ret = amdgpu_bo_reserve(aobj, false);
> +             ret = amdgpu_bo_reserve(aobj, true);
>                if (likely(ret == 0)) {
>                        amdgpu_bo_unpin(aobj);
>                        amdgpu_bo_unreserve(aobj);
> @@ -2592,7 +2592,7 @@ static void dce_v6_0_crtc_disable(struct drm_crtc *crtc)
>
>                amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r))
>                        DRM_ERROR("failed to reserve abo before unpin\n");
>                else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 1629ff9c3949..1e6c40e32cfd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -2090,7 +2090,7 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc,
>        if (!atomic && fb && fb != crtc->primary->fb) {
>                amdgpu_fb = to_amdgpu_framebuffer(fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r != 0))
>                        return r;
>                amdgpu_bo_unpin(abo);
> @@ -2441,7 +2441,7 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>        if (amdgpu_crtc->cursor_bo) {
>                struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -             ret = amdgpu_bo_reserve(aobj, false);
> +             ret = amdgpu_bo_reserve(aobj, true);
>                if (likely(ret == 0)) {
>                        amdgpu_bo_unpin(aobj);
>                        amdgpu_bo_unreserve(aobj);
> @@ -2571,7 +2571,7 @@ static void dce_v8_0_crtc_disable(struct drm_crtc *crtc)
>
>                amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r))
>                        DRM_ERROR("failed to reserve abo before unpin\n");
>                else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> index 8bb9cfde508d..084518301f4b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> @@ -247,7 +247,7 @@ static void dce_virtual_crtc_disable(struct drm_crtc *crtc)
>
>                amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>                abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -             r = amdgpu_bo_reserve(abo, false);
> +             r = amdgpu_bo_reserve(abo, true);
>                if (unlikely(r))
>                        DRM_ERROR("failed to reserve abo before unpin\n");
>                else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> index 25c3703f838b..03d2a0a2e523 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> @@ -2437,7 +2437,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
>        int r;
>
>        if (adev->gfx.rlc.save_restore_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC sr bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.save_restore_obj);
> @@ -2448,7 +2448,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
>        }
>
>        if (adev->gfx.rlc.clear_state_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC c bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
> @@ -2459,7 +2459,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
>        }
>
>        if (adev->gfx.rlc.cp_table_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index 75cca54fa216..b2df8e814abb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -2792,7 +2792,7 @@ static void gfx_v7_0_cp_compute_fini(struct amdgpu_device *adev)
>                struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
>
>                if (ring->mqd_obj) {
> -                     r = amdgpu_bo_reserve(ring->mqd_obj, false);
> +                     r = amdgpu_bo_reserve(ring->mqd_obj, true);
>                        if (unlikely(r != 0))
>                                dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
>
> @@ -2810,7 +2810,7 @@ static void gfx_v7_0_mec_fini(struct amdgpu_device *adev)
>        int r;
>
>        if (adev->gfx.mec.hpd_eop_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
> @@ -3359,7 +3359,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
>
>        /* save restore block */
>        if (adev->gfx.rlc.save_restore_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC sr bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.save_restore_obj);
> @@ -3371,7 +3371,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
>
>        /* clear state block */
>        if (adev->gfx.rlc.clear_state_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC c bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
> @@ -3383,7 +3383,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
>
>        /* clear state block */
>        if (adev->gfx.rlc.cp_table_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 2a5b20920ea6..ac64e01c6938 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -1244,7 +1244,7 @@ static void gfx_v8_0_rlc_fini(struct amdgpu_device *adev)
>
>        /* clear state block */
>        if (adev->gfx.rlc.clear_state_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC cbs bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
> @@ -1255,7 +1255,7 @@ static void gfx_v8_0_rlc_fini(struct amdgpu_device *adev)
>
>        /* jump table block */
>        if (adev->gfx.rlc.cp_table_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
> @@ -1368,7 +1368,7 @@ static void gfx_v8_0_mec_fini(struct amdgpu_device *adev)
>        int r;
>
>        if (adev->gfx.mec.hpd_eop_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
> @@ -1496,7 +1496,7 @@ static int gfx_v8_0_kiq_init(struct amdgpu_device *adev)
>
>        memset(hpd, 0, MEC_HPD_SIZE);
>
> -     r = amdgpu_bo_reserve(kiq->eop_obj, false);
> +     r = amdgpu_bo_reserve(kiq->eop_obj, true);
>        if (unlikely(r != 0))
>                dev_warn(adev->dev, "(%d) reserve kiq eop bo failed\n", r);
>        amdgpu_bo_kunmap(kiq->eop_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 5249bc7964fb..08daa3fd687b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -453,7 +453,7 @@ static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
>        int r;
>
>        if (adev->gfx.mec.hpd_eop_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
> @@ -463,7 +463,7 @@ static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
>                adev->gfx.mec.hpd_eop_obj = NULL;
>        }
>        if (adev->gfx.mec.mec_fw_obj) {
> -             r = amdgpu_bo_reserve(adev->gfx.mec.mec_fw_obj, false);
> +             r = amdgpu_bo_reserve(adev->gfx.mec.mec_fw_obj, true);
>                if (unlikely(r != 0))
>                        dev_warn(adev->dev, "(%d) reserve mec firmware bo failed\n", r);
>                amdgpu_bo_unpin(adev->gfx.mec.mec_fw_obj);
> @@ -599,7 +599,7 @@ static int gfx_v9_0_kiq_init(struct amdgpu_device *adev)
>
>        memset(hpd, 0, MEC_HPD_SIZE);
>
> -     r = amdgpu_bo_reserve(kiq->eop_obj, false);
> +     r = amdgpu_bo_reserve(kiq->eop_obj, true);
>        if (unlikely(r != 0))
>                dev_warn(adev->dev, "(%d) reserve kiq eop bo failed\n", r);
>        amdgpu_bo_kunmap(kiq->eop_obj);
> @@ -1786,7 +1786,7 @@ static void gfx_v9_0_cp_compute_fini(struct amdgpu_device *adev)
>                struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
>
>                if (ring->mqd_obj) {
> -                     r = amdgpu_bo_reserve(ring->mqd_obj, false);
> +                     r = amdgpu_bo_reserve(ring->mqd_obj, true);
>                        if (unlikely(r != 0))
>                                dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
>




------------------------------

Subject: Digest Footer

_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...




------------------------------

End of amd-gfx Digest, Vol 11, Issue 407
****************************************

[-- Attachment #1.2: Type: text/html, Size: 47394 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
       [not found]     ` <MWHPR1201MB0045C097101B0EDA13F28BD9F2130-3iK1xFAIwjq45V35fqe+hGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2017-04-29  2:36       ` Michel Dänzer
       [not found]         ` <73b82af4-7903-512e-fe61-f05ebf18381f-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2017-04-29  2:36 UTC (permalink / raw)
  To: Xie, AlexBin; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 28/04/17 11:12 PM, Xie, AlexBin wrote:
>> Am 28.04.2017 um 10:47 schrieb Michel Dänzer:
>>> From: Michel Dänzer <michel.daenzer@amd.com>
>>>
>>> Some of these paths probably cannot be interrupted by a signal anyway.
>>> Those that can would fail to clean up things if they actually got
>>> interrupted.
>>>
>>> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
>> 
>> Reviewed-by: Christian König <christian.koenig@amd.com>
> 
> Alex X: Just a reminder: amdgpu_unpin_work_func is called by work queue.
> Signal is blocked already. un-interruptible waiting might slow thing
> down very slightly.

How so?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
       [not found]         ` <73b82af4-7903-512e-fe61-f05ebf18381f-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2017-05-01  0:13           ` Xie, AlexBin
       [not found]             ` <MWHPR1201MB004532EF4E87E5503BEAC217F2140-3iK1xFAIwjq45V35fqe+hGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Xie, AlexBin @ 2017-05-01  0:13 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1090 bytes --]

On 28/04/17 11:12 PM, Xie, AlexBin wrote:

>> Am 28.04.2017 um 10:47 schrieb Michel Dänzer:
>>> From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
>>>
>>> Some of these paths probably cannot be interrupted by a signal anyway.
>>> Those that can would fail to clean up things if they actually got
>>> interrupted.
>>>
>>> Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
>>
>> Reviewed-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>
>
> Alex X: Just a reminder: amdgpu_unpin_work_func is called by work queue.
> Signal is blocked already. un-interruptible waiting might slow thing
> down very slightly.

How so?

Alex X: I said "might". If you think it is not slower, it is fine for me.
My real concern is that the signals are blocked for work queue already. We don't need this change to avoid unnecessary risk.
In theory, I am not against this change.

--
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

[-- Attachment #1.2: Type: text/html, Size: 2280 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
       [not found]             ` <MWHPR1201MB004532EF4E87E5503BEAC217F2140-3iK1xFAIwjq45V35fqe+hGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2017-05-01 14:28               ` Christian König
       [not found]                 ` <064b2ea6-1b57-0c4d-0818-6eb017887e55-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2017-05-01 14:28 UTC (permalink / raw)
  To: Xie, AlexBin, Michel Dänzer; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1642 bytes --]

Am 01.05.2017 um 02:13 schrieb Xie, AlexBin:
>
> On 28/04/17 11:12 PM, Xie, AlexBin wrote:
>
> >> Am 28.04.2017 um 10:47 schrieb Michel Dänzer:
> >>> From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
> >>>
> >>> Some of these paths probably cannot be interrupted by a signal anyway.
> >>> Those that can would fail to clean up things if they actually got
> >>> interrupted.
> >>>
> >>> Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
> >>
> >> Reviewed-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>
> >
> > Alex X: Just a reminder: amdgpu_unpin_work_func is called by work queue.
> > Signal is blocked already. un-interruptible waiting might slow thing
> > down very slightly.
>
> How so?
>
> Alex X: I said "might". If you think it is not slower, it is fine for me.
> My real concern is that the signals are blocked for work queue 
> already. We don't need this change to avoid unnecessary risk.
> In theory, I am not against this change.

I have to agree with that. For waits from work queues it is usually best 
to implicitly use un-interruptible waits for documentation purposes.

In other words even when we are sure that the code can't receive a 
signal we should write it conservatively.

Christian.

>
> -- 
> Earthling Michel Dänzer               | http://www.amd.com 
> <http://www.amd.com>
> Libre software enthusiast             |             Mesa and X developer
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[-- Attachment #1.2: Type: text/html, Size: 4788 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
       [not found]                 ` <064b2ea6-1b57-0c4d-0818-6eb017887e55-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-05-02 14:35                   ` Xie, AlexBin
  0 siblings, 0 replies; 7+ messages in thread
From: Xie, AlexBin @ 2017-05-02 14:35 UTC (permalink / raw)
  To: Christian König, Michel Dänzer
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2293 bytes --]

I just realised that there are some stress test that sends huge amount of signals. I used those tests in the pass 2 years...


-Alex Bin

________________________________
From: Christian König <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
Sent: Monday, May 1, 2017 10:28 AM
To: Xie, AlexBin; Michel Dänzer
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup

Am 01.05.2017 um 02:13 schrieb Xie, AlexBin:

On 28/04/17 11:12 PM, Xie, AlexBin wrote:

>> Am 28.04.2017 um 10:47 schrieb Michel Dänzer:
>>> From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org><mailto:michel.daenzer@amd.com>
>>>
>>> Some of these paths probably cannot be interrupted by a signal anyway.
>>> Those that can would fail to clean up things if they actually got
>>> interrupted.
>>>
>>> Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org><mailto:michel.daenzer-5C7GfCeVMHo@public.gmane.org>
>>
>> Reviewed-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org><mailto:christian.koenig-5C7GfCeVMHo@public.gmane.org>
>
> Alex X: Just a reminder: amdgpu_unpin_work_func is called by work queue.
> Signal is blocked already. un-interruptible waiting might slow thing
> down very slightly.

How so?

Alex X: I said "might". If you think it is not slower, it is fine for me.
My real concern is that the signals are blocked for work queue already. We don't need this change to avoid unnecessary risk.
In theory, I am not against this change.

I have to agree with that. For waits from work queues it is usually best to implicitly use un-interruptible waits for documentation purposes.

In other words even when we are sure that the code can't receive a signal we should write it conservatively.

Christian.


--
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer



_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[-- Attachment #1.2: Type: text/html, Size: 4738 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
       [not found] ` <20170428084733.26362-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2017-04-28  8:57   ` Christian König
  0 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2017-04-28  8:57 UTC (permalink / raw)
  To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 28.04.2017 um 10:47 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Some of these paths probably cannot be interrupted by a signal anyway.
> Those that can would fail to clean up things if they actually got
> interrupted.
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c      |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c    |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c   |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c      |  2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     |  2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/dce_virtual.c    |  2 +-
>   drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c       |  6 +++---
>   drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c       | 10 +++++-----
>   drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c       |  8 ++++----
>   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c       |  8 ++++----
>   16 files changed, 36 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> index 771a6aae58d6..af64448a565c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> @@ -123,7 +123,7 @@ static void amdgpu_unpin_work_func(struct work_struct *__work)
>   	int r;
>   
>   	/* unpin of the old buffer */
> -	r = amdgpu_bo_reserve(work->old_abo, false);
> +	r = amdgpu_bo_reserve(work->old_abo, true);
>   	if (likely(r == 0)) {
>   		r = amdgpu_bo_unpin(work->old_abo);
>   		if (unlikely(r != 0)) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index 9dea2f661f1d..e869e60994ce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -113,7 +113,7 @@ static void amdgpufb_destroy_pinned_object(struct drm_gem_object *gobj)
>   	struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
>   	int ret;
>   
> -	ret = amdgpu_bo_reserve(abo, false);
> +	ret = amdgpu_bo_reserve(abo, true);
>   	if (likely(ret == 0)) {
>   		amdgpu_bo_kunmap(abo);
>   		amdgpu_bo_unpin(abo);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index 6d691abe889c..e7406ce7093c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -183,7 +183,7 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
>   	if (adev->gart.robj == NULL) {
>   		return;
>   	}
> -	r = amdgpu_bo_reserve(adev->gart.robj, false);
> +	r = amdgpu_bo_reserve(adev->gart.robj, true);
>   	if (likely(r == 0)) {
>   		amdgpu_bo_kunmap(adev->gart.robj);
>   		amdgpu_bo_unpin(adev->gart.robj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index ec5b1bc0e428..d40b8ac745cd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -819,7 +819,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
>   
>   	if (amdgpu_sriov_vf(adev)) {
>   		/* TODO: how to handle reserve failure */
> -		BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, false));
> +		BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, true));
>   		amdgpu_vm_bo_rmv(adev, fpriv->vm.csa_bo_va);
>   		fpriv->vm.csa_bo_va = NULL;
>   		amdgpu_bo_unreserve(adev->virt.csa_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> index 3826d5aea0a6..6bdc866570ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
> @@ -113,7 +113,7 @@ void amdgpu_gem_prime_unpin(struct drm_gem_object *obj)
>   	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
>   	int ret = 0;
>   
> -	ret = amdgpu_bo_reserve(bo, false);
> +	ret = amdgpu_bo_reserve(bo, true);
>   	if (unlikely(ret != 0))
>   		return;
>   
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
> index 7b56d9988aba..de4ebcf4ac2c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
> @@ -130,7 +130,7 @@ int amdgpu_sa_bo_manager_suspend(struct amdgpu_device *adev,
>   		return -EINVAL;
>   	}
>   
> -	r = amdgpu_bo_reserve(sa_manager->bo, false);
> +	r = amdgpu_bo_reserve(sa_manager->bo, true);
>   	if (!r) {
>   		amdgpu_bo_kunmap(sa_manager->bo);
>   		amdgpu_bo_unpin(sa_manager->bo);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 58873cf027e8..11c6c4494e0a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -1198,7 +1198,7 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
>   		return;
>   	amdgpu_ttm_debugfs_fini(adev);
>   	if (adev->stollen_vga_memory) {
> -		r = amdgpu_bo_reserve(adev->stollen_vga_memory, false);
> +		r = amdgpu_bo_reserve(adev->stollen_vga_memory, true);
>   		if (r == 0) {
>   			amdgpu_bo_unpin(adev->stollen_vga_memory);
>   			amdgpu_bo_unreserve(adev->stollen_vga_memory);
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index 7d86ba42efc9..d618f92ae46c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -2231,7 +2231,7 @@ static int dce_v10_0_crtc_do_set_base(struct drm_crtc *crtc,
>   	if (!atomic && fb && fb != crtc->primary->fb) {
>   		amdgpu_fb = to_amdgpu_framebuffer(fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r != 0))
>   			return r;
>   		amdgpu_bo_unpin(abo);
> @@ -2590,7 +2590,7 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>   	if (amdgpu_crtc->cursor_bo) {
>   		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -		ret = amdgpu_bo_reserve(aobj, false);
> +		ret = amdgpu_bo_reserve(aobj, true);
>   		if (likely(ret == 0)) {
>   			amdgpu_bo_unpin(aobj);
>   			amdgpu_bo_unreserve(aobj);
> @@ -2720,7 +2720,7 @@ static void dce_v10_0_crtc_disable(struct drm_crtc *crtc)
>   
>   		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r))
>   			DRM_ERROR("failed to reserve abo before unpin\n");
>   		else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 3d82181baffe..ea634158ae7a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -2215,7 +2215,7 @@ static int dce_v11_0_crtc_do_set_base(struct drm_crtc *crtc,
>   	if (!atomic && fb && fb != crtc->primary->fb) {
>   		amdgpu_fb = to_amdgpu_framebuffer(fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r != 0))
>   			return r;
>   		amdgpu_bo_unpin(abo);
> @@ -2610,7 +2610,7 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>   	if (amdgpu_crtc->cursor_bo) {
>   		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -		ret = amdgpu_bo_reserve(aobj, false);
> +		ret = amdgpu_bo_reserve(aobj, true);
>   		if (likely(ret == 0)) {
>   			amdgpu_bo_unpin(aobj);
>   			amdgpu_bo_unreserve(aobj);
> @@ -2740,7 +2740,7 @@ static void dce_v11_0_crtc_disable(struct drm_crtc *crtc)
>   
>   		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r))
>   			DRM_ERROR("failed to reserve abo before unpin\n");
>   		else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index 59f6993af0b6..d68c1eabd0ce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -2150,7 +2150,7 @@ static int dce_v6_0_crtc_do_set_base(struct drm_crtc *crtc,
>   	if (!atomic && fb && fb != crtc->primary->fb) {
>   		amdgpu_fb = to_amdgpu_framebuffer(fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r != 0))
>   			return r;
>   		amdgpu_bo_unpin(abo);
> @@ -2467,7 +2467,7 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>   	if (amdgpu_crtc->cursor_bo) {
>   		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -		ret = amdgpu_bo_reserve(aobj, false);
> +		ret = amdgpu_bo_reserve(aobj, true);
>   		if (likely(ret == 0)) {
>   			amdgpu_bo_unpin(aobj);
>   			amdgpu_bo_unreserve(aobj);
> @@ -2592,7 +2592,7 @@ static void dce_v6_0_crtc_disable(struct drm_crtc *crtc)
>   
>   		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r))
>   			DRM_ERROR("failed to reserve abo before unpin\n");
>   		else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 1629ff9c3949..1e6c40e32cfd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -2090,7 +2090,7 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc,
>   	if (!atomic && fb && fb != crtc->primary->fb) {
>   		amdgpu_fb = to_amdgpu_framebuffer(fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r != 0))
>   			return r;
>   		amdgpu_bo_unpin(abo);
> @@ -2441,7 +2441,7 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
>   unpin:
>   	if (amdgpu_crtc->cursor_bo) {
>   		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
> -		ret = amdgpu_bo_reserve(aobj, false);
> +		ret = amdgpu_bo_reserve(aobj, true);
>   		if (likely(ret == 0)) {
>   			amdgpu_bo_unpin(aobj);
>   			amdgpu_bo_unreserve(aobj);
> @@ -2571,7 +2571,7 @@ static void dce_v8_0_crtc_disable(struct drm_crtc *crtc)
>   
>   		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r))
>   			DRM_ERROR("failed to reserve abo before unpin\n");
>   		else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> index 8bb9cfde508d..084518301f4b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> @@ -247,7 +247,7 @@ static void dce_virtual_crtc_disable(struct drm_crtc *crtc)
>   
>   		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
>   		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
> -		r = amdgpu_bo_reserve(abo, false);
> +		r = amdgpu_bo_reserve(abo, true);
>   		if (unlikely(r))
>   			DRM_ERROR("failed to reserve abo before unpin\n");
>   		else {
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> index 25c3703f838b..03d2a0a2e523 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> @@ -2437,7 +2437,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
>   	int r;
>   
>   	if (adev->gfx.rlc.save_restore_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC sr bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.save_restore_obj);
> @@ -2448,7 +2448,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
>   	}
>   
>   	if (adev->gfx.rlc.clear_state_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC c bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
> @@ -2459,7 +2459,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
>   	}
>   
>   	if (adev->gfx.rlc.cp_table_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index 75cca54fa216..b2df8e814abb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -2792,7 +2792,7 @@ static void gfx_v7_0_cp_compute_fini(struct amdgpu_device *adev)
>   		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
>   
>   		if (ring->mqd_obj) {
> -			r = amdgpu_bo_reserve(ring->mqd_obj, false);
> +			r = amdgpu_bo_reserve(ring->mqd_obj, true);
>   			if (unlikely(r != 0))
>   				dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
>   
> @@ -2810,7 +2810,7 @@ static void gfx_v7_0_mec_fini(struct amdgpu_device *adev)
>   	int r;
>   
>   	if (adev->gfx.mec.hpd_eop_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
> @@ -3359,7 +3359,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
>   
>   	/* save restore block */
>   	if (adev->gfx.rlc.save_restore_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC sr bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.save_restore_obj);
> @@ -3371,7 +3371,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
>   
>   	/* clear state block */
>   	if (adev->gfx.rlc.clear_state_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC c bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
> @@ -3383,7 +3383,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
>   
>   	/* clear state block */
>   	if (adev->gfx.rlc.cp_table_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 2a5b20920ea6..ac64e01c6938 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -1244,7 +1244,7 @@ static void gfx_v8_0_rlc_fini(struct amdgpu_device *adev)
>   
>   	/* clear state block */
>   	if (adev->gfx.rlc.clear_state_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC cbs bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
> @@ -1255,7 +1255,7 @@ static void gfx_v8_0_rlc_fini(struct amdgpu_device *adev)
>   
>   	/* jump table block */
>   	if (adev->gfx.rlc.cp_table_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
> @@ -1368,7 +1368,7 @@ static void gfx_v8_0_mec_fini(struct amdgpu_device *adev)
>   	int r;
>   
>   	if (adev->gfx.mec.hpd_eop_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
> @@ -1496,7 +1496,7 @@ static int gfx_v8_0_kiq_init(struct amdgpu_device *adev)
>   
>   	memset(hpd, 0, MEC_HPD_SIZE);
>   
> -	r = amdgpu_bo_reserve(kiq->eop_obj, false);
> +	r = amdgpu_bo_reserve(kiq->eop_obj, true);
>   	if (unlikely(r != 0))
>   		dev_warn(adev->dev, "(%d) reserve kiq eop bo failed\n", r);
>   	amdgpu_bo_kunmap(kiq->eop_obj);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 5249bc7964fb..08daa3fd687b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -453,7 +453,7 @@ static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
>   	int r;
>   
>   	if (adev->gfx.mec.hpd_eop_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
> @@ -463,7 +463,7 @@ static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
>   		adev->gfx.mec.hpd_eop_obj = NULL;
>   	}
>   	if (adev->gfx.mec.mec_fw_obj) {
> -		r = amdgpu_bo_reserve(adev->gfx.mec.mec_fw_obj, false);
> +		r = amdgpu_bo_reserve(adev->gfx.mec.mec_fw_obj, true);
>   		if (unlikely(r != 0))
>   			dev_warn(adev->dev, "(%d) reserve mec firmware bo failed\n", r);
>   		amdgpu_bo_unpin(adev->gfx.mec.mec_fw_obj);
> @@ -599,7 +599,7 @@ static int gfx_v9_0_kiq_init(struct amdgpu_device *adev)
>   
>   	memset(hpd, 0, MEC_HPD_SIZE);
>   
> -	r = amdgpu_bo_reserve(kiq->eop_obj, false);
> +	r = amdgpu_bo_reserve(kiq->eop_obj, true);
>   	if (unlikely(r != 0))
>   		dev_warn(adev->dev, "(%d) reserve kiq eop bo failed\n", r);
>   	amdgpu_bo_kunmap(kiq->eop_obj);
> @@ -1786,7 +1786,7 @@ static void gfx_v9_0_cp_compute_fini(struct amdgpu_device *adev)
>   		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
>   
>   		if (ring->mqd_obj) {
> -			r = amdgpu_bo_reserve(ring->mqd_obj, false);
> +			r = amdgpu_bo_reserve(ring->mqd_obj, true);
>   			if (unlikely(r != 0))
>   				dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
>   


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup
@ 2017-04-28  8:47 Michel Dänzer
       [not found] ` <20170428084733.26362-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2017-04-28  8:47 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Christian König

From: Michel Dänzer <michel.daenzer@amd.com>

Some of these paths probably cannot be interrupted by a signal anyway.
Those that can would fail to clean up things if they actually got
interrupted.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c    |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     |  2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      |  6 +++---
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      |  6 +++---
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       |  6 +++---
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       |  6 +++---
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c    |  2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c       |  6 +++---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c       | 10 +++++-----
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c       |  8 ++++----
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c       |  8 ++++----
 16 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 771a6aae58d6..af64448a565c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -123,7 +123,7 @@ static void amdgpu_unpin_work_func(struct work_struct *__work)
 	int r;
 
 	/* unpin of the old buffer */
-	r = amdgpu_bo_reserve(work->old_abo, false);
+	r = amdgpu_bo_reserve(work->old_abo, true);
 	if (likely(r == 0)) {
 		r = amdgpu_bo_unpin(work->old_abo);
 		if (unlikely(r != 0)) {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 9dea2f661f1d..e869e60994ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -113,7 +113,7 @@ static void amdgpufb_destroy_pinned_object(struct drm_gem_object *gobj)
 	struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
 	int ret;
 
-	ret = amdgpu_bo_reserve(abo, false);
+	ret = amdgpu_bo_reserve(abo, true);
 	if (likely(ret == 0)) {
 		amdgpu_bo_kunmap(abo);
 		amdgpu_bo_unpin(abo);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index 6d691abe889c..e7406ce7093c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -183,7 +183,7 @@ void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev)
 	if (adev->gart.robj == NULL) {
 		return;
 	}
-	r = amdgpu_bo_reserve(adev->gart.robj, false);
+	r = amdgpu_bo_reserve(adev->gart.robj, true);
 	if (likely(r == 0)) {
 		amdgpu_bo_kunmap(adev->gart.robj);
 		amdgpu_bo_unpin(adev->gart.robj);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index ec5b1bc0e428..d40b8ac745cd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -819,7 +819,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
 
 	if (amdgpu_sriov_vf(adev)) {
 		/* TODO: how to handle reserve failure */
-		BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, false));
+		BUG_ON(amdgpu_bo_reserve(adev->virt.csa_obj, true));
 		amdgpu_vm_bo_rmv(adev, fpriv->vm.csa_bo_va);
 		fpriv->vm.csa_bo_va = NULL;
 		amdgpu_bo_unreserve(adev->virt.csa_obj);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
index 3826d5aea0a6..6bdc866570ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
@@ -113,7 +113,7 @@ void amdgpu_gem_prime_unpin(struct drm_gem_object *obj)
 	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
 	int ret = 0;
 
-	ret = amdgpu_bo_reserve(bo, false);
+	ret = amdgpu_bo_reserve(bo, true);
 	if (unlikely(ret != 0))
 		return;
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
index 7b56d9988aba..de4ebcf4ac2c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
@@ -130,7 +130,7 @@ int amdgpu_sa_bo_manager_suspend(struct amdgpu_device *adev,
 		return -EINVAL;
 	}
 
-	r = amdgpu_bo_reserve(sa_manager->bo, false);
+	r = amdgpu_bo_reserve(sa_manager->bo, true);
 	if (!r) {
 		amdgpu_bo_kunmap(sa_manager->bo);
 		amdgpu_bo_unpin(sa_manager->bo);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 58873cf027e8..11c6c4494e0a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1198,7 +1198,7 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
 		return;
 	amdgpu_ttm_debugfs_fini(adev);
 	if (adev->stollen_vga_memory) {
-		r = amdgpu_bo_reserve(adev->stollen_vga_memory, false);
+		r = amdgpu_bo_reserve(adev->stollen_vga_memory, true);
 		if (r == 0) {
 			amdgpu_bo_unpin(adev->stollen_vga_memory);
 			amdgpu_bo_unreserve(adev->stollen_vga_memory);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index 7d86ba42efc9..d618f92ae46c 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -2231,7 +2231,7 @@ static int dce_v10_0_crtc_do_set_base(struct drm_crtc *crtc,
 	if (!atomic && fb && fb != crtc->primary->fb) {
 		amdgpu_fb = to_amdgpu_framebuffer(fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r != 0))
 			return r;
 		amdgpu_bo_unpin(abo);
@@ -2590,7 +2590,7 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
 unpin:
 	if (amdgpu_crtc->cursor_bo) {
 		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
-		ret = amdgpu_bo_reserve(aobj, false);
+		ret = amdgpu_bo_reserve(aobj, true);
 		if (likely(ret == 0)) {
 			amdgpu_bo_unpin(aobj);
 			amdgpu_bo_unreserve(aobj);
@@ -2720,7 +2720,7 @@ static void dce_v10_0_crtc_disable(struct drm_crtc *crtc)
 
 		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r))
 			DRM_ERROR("failed to reserve abo before unpin\n");
 		else {
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index 3d82181baffe..ea634158ae7a 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -2215,7 +2215,7 @@ static int dce_v11_0_crtc_do_set_base(struct drm_crtc *crtc,
 	if (!atomic && fb && fb != crtc->primary->fb) {
 		amdgpu_fb = to_amdgpu_framebuffer(fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r != 0))
 			return r;
 		amdgpu_bo_unpin(abo);
@@ -2610,7 +2610,7 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
 unpin:
 	if (amdgpu_crtc->cursor_bo) {
 		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
-		ret = amdgpu_bo_reserve(aobj, false);
+		ret = amdgpu_bo_reserve(aobj, true);
 		if (likely(ret == 0)) {
 			amdgpu_bo_unpin(aobj);
 			amdgpu_bo_unreserve(aobj);
@@ -2740,7 +2740,7 @@ static void dce_v11_0_crtc_disable(struct drm_crtc *crtc)
 
 		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r))
 			DRM_ERROR("failed to reserve abo before unpin\n");
 		else {
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index 59f6993af0b6..d68c1eabd0ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -2150,7 +2150,7 @@ static int dce_v6_0_crtc_do_set_base(struct drm_crtc *crtc,
 	if (!atomic && fb && fb != crtc->primary->fb) {
 		amdgpu_fb = to_amdgpu_framebuffer(fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r != 0))
 			return r;
 		amdgpu_bo_unpin(abo);
@@ -2467,7 +2467,7 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,
 unpin:
 	if (amdgpu_crtc->cursor_bo) {
 		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
-		ret = amdgpu_bo_reserve(aobj, false);
+		ret = amdgpu_bo_reserve(aobj, true);
 		if (likely(ret == 0)) {
 			amdgpu_bo_unpin(aobj);
 			amdgpu_bo_unreserve(aobj);
@@ -2592,7 +2592,7 @@ static void dce_v6_0_crtc_disable(struct drm_crtc *crtc)
 
 		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r))
 			DRM_ERROR("failed to reserve abo before unpin\n");
 		else {
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index 1629ff9c3949..1e6c40e32cfd 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -2090,7 +2090,7 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc,
 	if (!atomic && fb && fb != crtc->primary->fb) {
 		amdgpu_fb = to_amdgpu_framebuffer(fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r != 0))
 			return r;
 		amdgpu_bo_unpin(abo);
@@ -2441,7 +2441,7 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
 unpin:
 	if (amdgpu_crtc->cursor_bo) {
 		struct amdgpu_bo *aobj = gem_to_amdgpu_bo(amdgpu_crtc->cursor_bo);
-		ret = amdgpu_bo_reserve(aobj, false);
+		ret = amdgpu_bo_reserve(aobj, true);
 		if (likely(ret == 0)) {
 			amdgpu_bo_unpin(aobj);
 			amdgpu_bo_unreserve(aobj);
@@ -2571,7 +2571,7 @@ static void dce_v8_0_crtc_disable(struct drm_crtc *crtc)
 
 		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r))
 			DRM_ERROR("failed to reserve abo before unpin\n");
 		else {
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index 8bb9cfde508d..084518301f4b 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -247,7 +247,7 @@ static void dce_virtual_crtc_disable(struct drm_crtc *crtc)
 
 		amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
 		abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
-		r = amdgpu_bo_reserve(abo, false);
+		r = amdgpu_bo_reserve(abo, true);
 		if (unlikely(r))
 			DRM_ERROR("failed to reserve abo before unpin\n");
 		else {
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 25c3703f838b..03d2a0a2e523 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -2437,7 +2437,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
 	int r;
 
 	if (adev->gfx.rlc.save_restore_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC sr bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.save_restore_obj);
@@ -2448,7 +2448,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
 	}
 
 	if (adev->gfx.rlc.clear_state_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC c bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
@@ -2459,7 +2459,7 @@ static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
 	}
 
 	if (adev->gfx.rlc.cp_table_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 75cca54fa216..b2df8e814abb 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -2792,7 +2792,7 @@ static void gfx_v7_0_cp_compute_fini(struct amdgpu_device *adev)
 		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
 
 		if (ring->mqd_obj) {
-			r = amdgpu_bo_reserve(ring->mqd_obj, false);
+			r = amdgpu_bo_reserve(ring->mqd_obj, true);
 			if (unlikely(r != 0))
 				dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
 
@@ -2810,7 +2810,7 @@ static void gfx_v7_0_mec_fini(struct amdgpu_device *adev)
 	int r;
 
 	if (adev->gfx.mec.hpd_eop_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
@@ -3359,7 +3359,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
 
 	/* save restore block */
 	if (adev->gfx.rlc.save_restore_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.save_restore_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC sr bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.save_restore_obj);
@@ -3371,7 +3371,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
 
 	/* clear state block */
 	if (adev->gfx.rlc.clear_state_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC c bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
@@ -3383,7 +3383,7 @@ static void gfx_v7_0_rlc_fini(struct amdgpu_device *adev)
 
 	/* clear state block */
 	if (adev->gfx.rlc.cp_table_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 2a5b20920ea6..ac64e01c6938 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -1244,7 +1244,7 @@ static void gfx_v8_0_rlc_fini(struct amdgpu_device *adev)
 
 	/* clear state block */
 	if (adev->gfx.rlc.clear_state_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC cbs bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
@@ -1255,7 +1255,7 @@ static void gfx_v8_0_rlc_fini(struct amdgpu_device *adev)
 
 	/* jump table block */
 	if (adev->gfx.rlc.cp_table_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.rlc.cp_table_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve RLC cp table bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.rlc.cp_table_obj);
@@ -1368,7 +1368,7 @@ static void gfx_v8_0_mec_fini(struct amdgpu_device *adev)
 	int r;
 
 	if (adev->gfx.mec.hpd_eop_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
@@ -1496,7 +1496,7 @@ static int gfx_v8_0_kiq_init(struct amdgpu_device *adev)
 
 	memset(hpd, 0, MEC_HPD_SIZE);
 
-	r = amdgpu_bo_reserve(kiq->eop_obj, false);
+	r = amdgpu_bo_reserve(kiq->eop_obj, true);
 	if (unlikely(r != 0))
 		dev_warn(adev->dev, "(%d) reserve kiq eop bo failed\n", r);
 	amdgpu_bo_kunmap(kiq->eop_obj);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 5249bc7964fb..08daa3fd687b 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -453,7 +453,7 @@ static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
 	int r;
 
 	if (adev->gfx.mec.hpd_eop_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.mec.hpd_eop_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve HPD EOP bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.mec.hpd_eop_obj);
@@ -463,7 +463,7 @@ static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
 		adev->gfx.mec.hpd_eop_obj = NULL;
 	}
 	if (adev->gfx.mec.mec_fw_obj) {
-		r = amdgpu_bo_reserve(adev->gfx.mec.mec_fw_obj, false);
+		r = amdgpu_bo_reserve(adev->gfx.mec.mec_fw_obj, true);
 		if (unlikely(r != 0))
 			dev_warn(adev->dev, "(%d) reserve mec firmware bo failed\n", r);
 		amdgpu_bo_unpin(adev->gfx.mec.mec_fw_obj);
@@ -599,7 +599,7 @@ static int gfx_v9_0_kiq_init(struct amdgpu_device *adev)
 
 	memset(hpd, 0, MEC_HPD_SIZE);
 
-	r = amdgpu_bo_reserve(kiq->eop_obj, false);
+	r = amdgpu_bo_reserve(kiq->eop_obj, true);
 	if (unlikely(r != 0))
 		dev_warn(adev->dev, "(%d) reserve kiq eop bo failed\n", r);
 	amdgpu_bo_kunmap(kiq->eop_obj);
@@ -1786,7 +1786,7 @@ static void gfx_v9_0_cp_compute_fini(struct amdgpu_device *adev)
 		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
 
 		if (ring->mqd_obj) {
-			r = amdgpu_bo_reserve(ring->mqd_obj, false);
+			r = amdgpu_bo_reserve(ring->mqd_obj, true);
 			if (unlikely(r != 0))
 				dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
 
-- 
2.11.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-02 14:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1551.1493369856.21890.amd-gfx@lists.freedesktop.org>
     [not found] ` <mailman.1551.1493369856.21890.amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
2017-04-28 14:12   ` [PATCH] drm/amdgpu: Make amdgpu_bo_reserve use uninterruptible waits for cleanup Xie, AlexBin
     [not found]     ` <MWHPR1201MB0045C097101B0EDA13F28BD9F2130-3iK1xFAIwjq45V35fqe+hGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-04-29  2:36       ` Michel Dänzer
     [not found]         ` <73b82af4-7903-512e-fe61-f05ebf18381f-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-01  0:13           ` Xie, AlexBin
     [not found]             ` <MWHPR1201MB004532EF4E87E5503BEAC217F2140-3iK1xFAIwjq45V35fqe+hGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-05-01 14:28               ` Christian König
     [not found]                 ` <064b2ea6-1b57-0c4d-0818-6eb017887e55-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-05-02 14:35                   ` Xie, AlexBin
2017-04-28  8:47 Michel Dänzer
     [not found] ` <20170428084733.26362-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-28  8:57   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.