All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH 1/6] drm/amdgpu/si: stop dma engines on hw fini and suspend
Date: Sat, 21 May 2016 12:39:47 +0200	[thread overview]
Message-ID: <57403AF3.8040406@vodafone.de> (raw)
In-Reply-To: <1463781039-722-1-git-send-email-alexander.deucher@amd.com>

Am 20.05.2016 um 23:50 schrieb Alex Deucher:
> Fixes failure on suspend due to rings not being marked
> as not ready.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

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

Regards,
Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/si_dma.c | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> index 873dd49..2aa6517 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> @@ -134,6 +134,23 @@ static void si_dma_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
>   	amdgpu_ring_write(ring, DMA_PACKET(DMA_PACKET_TRAP, 0, 0, 0, 0));
>   }
>   
> +static void si_dma_stop(struct amdgpu_device *adev)
> +{
> +	struct amdgpu_ring *ring;
> +	u32 rb_cntl;
> +	unsigned i;
> +
> +	for (i = 0; i < 2; i++) {
> +		ring = &adev->sdma.instance[i].ring;
> +		/* dma0 */
> +		rb_cntl = RREG32(DMA_RB_CNTL + sdma_offsets[i]);
> +		rb_cntl &= ~DMA_RB_ENABLE;
> +		WREG32(DMA_RB_CNTL + sdma_offsets[i], rb_cntl);
> +
> +		ring->ready = false;
> +	}
> +}
> +
>   static int si_dma_gfx_resume(struct amdgpu_device *adev)
>   {
>   	struct amdgpu_ring *ring;
> @@ -612,6 +629,10 @@ static int si_dma_hw_init(void *handle)
>   
>   static int si_dma_hw_fini(void *handle)
>   {
> +	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> +
> +	si_dma_stop(adev);
> +
>   	return 0;
>   }
>   

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2016-05-21 10:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 21:50 [PATCH 1/6] drm/amdgpu/si: stop dma engines on hw fini and suspend Alex Deucher
2016-05-20 21:50 ` [PATCH 2/6] drm/amdgpu/si: simplify si_dma_start Alex Deucher
2016-05-20 21:50 ` [PATCH 3/6] drm/amdgpu/si: replace some hardcoded 2s with dma num_instances Alex Deucher
2016-05-20 21:50 ` [PATCH 4/6] drm/amdgpu/si: use dma instance offset array directly Alex Deucher
2016-05-20 21:50 ` [PATCH 5/6] drm/amdgpu/si: reduce dma ring size Alex Deucher
2016-05-20 21:50 ` [PATCH 6/6] drm/amdgpu/si: reduce gfx " Alex Deucher
2016-05-21 10:39 ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57403AF3.8040406@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.