[1/2] drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting

Submitted by Liu, Leo on Nov. 1, 2017, 1:10 p.m.

Details

Message ID 20171101131057.5308-1-leo.liu@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Liu, Leo Nov. 1, 2017, 1:10 p.m.
Signed-off-by: Leo Liu <leo.liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index 7e4de3e6950f..0c01825a8b9e 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -371,6 +371,10 @@  static int uvd_v6_0_early_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	if (!(adev->flags & AMD_IS_APU) &&
+	    (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
+		return -ENOENT;
+
 	uvd_v6_0_set_ring_funcs(adev);
 
 	if (uvd_v6_0_enc_support(adev)) {

Comments

On Wed, Nov 1, 2017 at 9:10 AM, Leo Liu <leo.liu@amd.com> wrote:
> Signed-off-by: Leo Liu <leo.liu@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> index 7e4de3e6950f..0c01825a8b9e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> @@ -371,6 +371,10 @@ static int uvd_v6_0_early_init(void *handle)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> +       if (!(adev->flags & AMD_IS_APU) &&
> +           (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
> +               return -ENOENT;

Is this fuse relevant on fiji as well?  If so,
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Alex

> +
>         uvd_v6_0_set_ring_funcs(adev);
>
>         if (uvd_v6_0_enc_support(adev)) {
> --
> 2.14.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
On 11/01/2017 10:04 AM, Alex Deucher wrote:
> On Wed, Nov 1, 2017 at 9:10 AM, Leo Liu <leo.liu@amd.com> wrote:
>> Signed-off-by: Leo Liu <leo.liu@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> index 7e4de3e6950f..0c01825a8b9e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
>> @@ -371,6 +371,10 @@ static int uvd_v6_0_early_init(void *handle)
>>   {
>>          struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>>
>> +       if (!(adev->flags & AMD_IS_APU) &&
>> +           (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
>> +               return -ENOENT;
> Is this fuse relevant on fiji as well?  If so,
It applies to FIJI as well accordingly. Just haven't heard any FIJI 
harvesting part yet.
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Thanks for the reviews.

Leo

>
> Alex
>
>> +
>>          uvd_v6_0_set_ring_funcs(adev);
>>
>>          if (uvd_v6_0_enc_support(adev)) {
>> --
>> 2.14.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx