* [PATCH] drm/radeon/uvd: use lower clocks on old UVD to boot v2
@ 2014-04-28 8:17 Christian König
2014-04-28 14:41 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2014-04-28 8:17 UTC (permalink / raw)
To: dri-devel
From: Christian König <christian.koenig@amd.com>
Some RV7xx generation hardware crashes after you
raise the UVD clocks for the first time. Try to
avoid this by using the lower clocks to boot these.
Workaround for: https://bugzilla.kernel.org/show_bug.cgi?id=71891
v2: lower clocks on IB test as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/uvd_v1_0.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
index 0a243f0..be42c81 100644
--- a/drivers/gpu/drm/radeon/uvd_v1_0.c
+++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
@@ -83,7 +83,10 @@ int uvd_v1_0_init(struct radeon_device *rdev)
int r;
/* raise clocks while booting up the VCPU */
- radeon_set_uvd_clocks(rdev, 53300, 40000);
+ if (rdev->family < CHIP_RV740)
+ radeon_set_uvd_clocks(rdev, 10000, 10000);
+ else
+ radeon_set_uvd_clocks(rdev, 53300, 40000);
r = uvd_v1_0_start(rdev);
if (r)
@@ -407,7 +410,10 @@ int uvd_v1_0_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
struct radeon_fence *fence = NULL;
int r;
- r = radeon_set_uvd_clocks(rdev, 53300, 40000);
+ if (rdev->family < CHIP_RV740)
+ r = radeon_set_uvd_clocks(rdev, 10000, 10000);
+ else
+ r = radeon_set_uvd_clocks(rdev, 53300, 40000);
if (r) {
DRM_ERROR("radeon: failed to raise UVD clocks (%d).\n", r);
return r;
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/radeon/uvd: use lower clocks on old UVD to boot v2
2014-04-28 8:17 [PATCH] drm/radeon/uvd: use lower clocks on old UVD to boot v2 Christian König
@ 2014-04-28 14:41 ` Alex Deucher
2014-04-29 10:35 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2014-04-28 14:41 UTC (permalink / raw)
To: Christian König; +Cc: Maling list - DRI developers
On Mon, Apr 28, 2014 at 4:17 AM, Christian König
<deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Some RV7xx generation hardware crashes after you
> raise the UVD clocks for the first time. Try to
> avoid this by using the lower clocks to boot these.
>
> Workaround for: https://bugzilla.kernel.org/show_bug.cgi?id=71891
>
> v2: lower clocks on IB test as well
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Cc: stable@vger.kernel.org
Any reason not to just always use lower clocks for the tests for all
asics? Either way:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/radeon/uvd_v1_0.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
> index 0a243f0..be42c81 100644
> --- a/drivers/gpu/drm/radeon/uvd_v1_0.c
> +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
> @@ -83,7 +83,10 @@ int uvd_v1_0_init(struct radeon_device *rdev)
> int r;
>
> /* raise clocks while booting up the VCPU */
> - radeon_set_uvd_clocks(rdev, 53300, 40000);
> + if (rdev->family < CHIP_RV740)
> + radeon_set_uvd_clocks(rdev, 10000, 10000);
> + else
> + radeon_set_uvd_clocks(rdev, 53300, 40000);
>
> r = uvd_v1_0_start(rdev);
> if (r)
> @@ -407,7 +410,10 @@ int uvd_v1_0_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
> struct radeon_fence *fence = NULL;
> int r;
>
> - r = radeon_set_uvd_clocks(rdev, 53300, 40000);
> + if (rdev->family < CHIP_RV740)
> + r = radeon_set_uvd_clocks(rdev, 10000, 10000);
> + else
> + r = radeon_set_uvd_clocks(rdev, 53300, 40000);
> if (r) {
> DRM_ERROR("radeon: failed to raise UVD clocks (%d).\n", r);
> return r;
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/radeon/uvd: use lower clocks on old UVD to boot v2
2014-04-28 14:41 ` Alex Deucher
@ 2014-04-29 10:35 ` Christian König
0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2014-04-29 10:35 UTC (permalink / raw)
To: Alex Deucher; +Cc: Maling list - DRI developers
Am 28.04.2014 16:41, schrieb Alex Deucher:
> On Mon, Apr 28, 2014 at 4:17 AM, Christian König
> <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> Some RV7xx generation hardware crashes after you
>> raise the UVD clocks for the first time. Try to
>> avoid this by using the lower clocks to boot these.
>>
>> Workaround for: https://bugzilla.kernel.org/show_bug.cgi?id=71891
>>
>> v2: lower clocks on IB test as well
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Cc: stable@vger.kernel.org
> Any reason not to just always use lower clocks for the tests for all
> asics?
Yeah, evergreen and BTC don't want to boot UVD with the lower clocks, no
idea why.
But essentially it's just a workaround, we should really try to figure
out why this RV730 crashes so badly as soon as you raise the UVD clocks.
> Either way:
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Thanks,
Christian.
>
>> ---
>> drivers/gpu/drm/radeon/uvd_v1_0.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
>> index 0a243f0..be42c81 100644
>> --- a/drivers/gpu/drm/radeon/uvd_v1_0.c
>> +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
>> @@ -83,7 +83,10 @@ int uvd_v1_0_init(struct radeon_device *rdev)
>> int r;
>>
>> /* raise clocks while booting up the VCPU */
>> - radeon_set_uvd_clocks(rdev, 53300, 40000);
>> + if (rdev->family < CHIP_RV740)
>> + radeon_set_uvd_clocks(rdev, 10000, 10000);
>> + else
>> + radeon_set_uvd_clocks(rdev, 53300, 40000);
>>
>> r = uvd_v1_0_start(rdev);
>> if (r)
>> @@ -407,7 +410,10 @@ int uvd_v1_0_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
>> struct radeon_fence *fence = NULL;
>> int r;
>>
>> - r = radeon_set_uvd_clocks(rdev, 53300, 40000);
>> + if (rdev->family < CHIP_RV740)
>> + r = radeon_set_uvd_clocks(rdev, 10000, 10000);
>> + else
>> + r = radeon_set_uvd_clocks(rdev, 53300, 40000);
>> if (r) {
>> DRM_ERROR("radeon: failed to raise UVD clocks (%d).\n", r);
>> return r;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-29 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 8:17 [PATCH] drm/radeon/uvd: use lower clocks on old UVD to boot v2 Christian König
2014-04-28 14:41 ` Alex Deucher
2014-04-29 10:35 ` 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.