All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nils Holland <nholland-iI9p2NPcQ/rYtjvyW6yDsg@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: Bug (and probably, fix): UVD initialization / clock gating issue on kabini
Date: Mon, 23 Jan 2017 01:47:39 +0100	[thread overview]
Message-ID: <20170123004738.GA2893@tisys.org> (raw)
In-Reply-To: <20170122192610.GB3125-iI9p2NPcQ/rYtjvyW6yDsg@public.gmane.org>

On Sun, Jan 22, 2017 at 08:26:10PM +0100, Nils Holland wrote:
> Hi folks,
> 
> while playing around with the amdgpu drm driver, I stumbled upon an
> issue. In fact, I have tracked it down to commit
> aa4747c00a2dd034c5fdf70ca73b1674ca15beb3 ("drm/amdgpu: refine uvd_4.2
> clock gate sequence.").
> 
> When I run the latest mainline git kernel, which contains this commit,
> on my system, I get the following in dmesg (notice the lines about UVD
> not responding at the end):
> [    4.870999] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [    5.891351] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [    6.911713] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [    7.932062] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [    8.952409] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [    9.974050] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [   10.995701] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [   12.017354] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [   13.039024] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [   14.060692] [drm:uvd_v4_2_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
> [   14.082168] [drm:uvd_v4_2_start] *ERROR* UVD not responding, giving up!!!

Replying to myself here, as I believe I may have found a fix:

Leaving commit aa4747c00a2dd034c5fdf70ca73b1674ca15beb3 applied, and
then applying the following patch, which re-adds a little line that
the original patch removed, fixes the problem for me:


diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index 96444e4d862a..350e7dab9b6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -273,6 +273,8 @@ static int uvd_v4_2_start(struct amdgpu_device *adev)
 
 	uvd_v4_2_mc_resume(adev);
 
+	WREG32(mmUVD_CGC_GATE, 0);
+
 	/* disable interupt */
 	WREG32_P(mmUVD_MASTINT_EN, 0, ~(1 << 1));

Hmm ... what does this do? Completely disable clock gating? And if so,
is this a sane thing to do at this point during UVD initialization?
The fact that it was done like that before aa4747c00a2dd034c5fdf70ca73b1674ca15beb3
might suggest that to be the case.

If the experts think I'm on the right track here I'll also re-submit
this change as a proper patch. I could probably have done so in the
right away and then ask for comments / review as part of the patch
submission instead of asking here in this message ... good question
if that would have been the better approach - I guess I'm still
learning all these things. ;-)

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

  parent reply	other threads:[~2017-01-23  0:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22 19:26 Bug: UVD initialization / clock gating issue on kabini Nils Holland
     [not found] ` <20170122192610.GB3125-iI9p2NPcQ/rYtjvyW6yDsg@public.gmane.org>
2017-01-23  0:47   ` Nils Holland [this message]
     [not found]     ` <20170123004738.GA2893-iI9p2NPcQ/rYtjvyW6yDsg@public.gmane.org>
2017-01-23 10:55       ` Bug (and probably, fix): " Zhu, Rex
     [not found]         ` <CY4PR12MB1687C4749E80E440DE9C89C5FB720-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-23 11:44           ` Nils Holland

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=20170123004738.GA2893@tisys.org \
    --to=nholland-ii9p2npcq/rytjvyw6ydsg@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.