diff mbox

drm/radeon/dce6: set correct number of audio pins

Message ID 1386868572-9146-1-git-send-email-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher Dec. 12, 2013, 5:16 p.m. UTC
DCE6.0, 8.x has 6
DCE6.1 has 4

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/dce6_afmt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Rafał Miłecki Dec. 12, 2013, 6:10 p.m. UTC | #1
2013/12/12 Alex Deucher <alexdeucher@gmail.com>:
> DCE6.0, 8.x has 6
> DCE6.1 has 4
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/radeon/dce6_afmt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c
> index de86493..ab59fd7 100644
> --- a/drivers/gpu/drm/radeon/dce6_afmt.c
> +++ b/drivers/gpu/drm/radeon/dce6_afmt.c
> @@ -308,7 +308,9 @@ int dce6_audio_init(struct radeon_device *rdev)
>         rdev->audio.enabled = true;
>
>         if (ASIC_IS_DCE8(rdev))
> -               rdev->audio.num_pins = 7;
> +               rdev->audio.num_pins = 6;
> +       else if (ASIC_IS_DCE61(rdev))
> +               rdev->audio.num_pins = 4;
>         else
>                 rdev->audio.num_pins = 6;

You don't check for DCE64, so OLAND will be treated as DCE6.0 (since
there isn't IGP Oland, so it won't be treated as 6.1).

Does 6.4 also have 6 pins?
Alex Deucher Dec. 12, 2013, 6:13 p.m. UTC | #2
> -----Original Message-----

> From: Rafa? Mi?ecki [mailto:zajec5@gmail.com]

> Sent: Thursday, December 12, 2013 1:10 PM

> To: Alex Deucher

> Cc: dri-devel; Deucher, Alexander

> Subject: Re: [PATCH] drm/radeon/dce6: set correct number of audio pins

> 

> 2013/12/12 Alex Deucher <alexdeucher@gmail.com>:

> > DCE6.0, 8.x has 6

> > DCE6.1 has 4

> >

> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

> > ---

> >  drivers/gpu/drm/radeon/dce6_afmt.c | 4 +++-

> >  1 file changed, 3 insertions(+), 1 deletion(-)

> >

> > diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c

> b/drivers/gpu/drm/radeon/dce6_afmt.c

> > index de86493..ab59fd7 100644

> > --- a/drivers/gpu/drm/radeon/dce6_afmt.c

> > +++ b/drivers/gpu/drm/radeon/dce6_afmt.c

> > @@ -308,7 +308,9 @@ int dce6_audio_init(struct radeon_device *rdev)

> >         rdev->audio.enabled = true;

> >

> >         if (ASIC_IS_DCE8(rdev))

> > -               rdev->audio.num_pins = 7;

> > +               rdev->audio.num_pins = 6;

> > +       else if (ASIC_IS_DCE61(rdev))

> > +               rdev->audio.num_pins = 4;

> >         else

> >                 rdev->audio.num_pins = 6;

> 

> You don't check for DCE64, so OLAND will be treated as DCE6.0 (since

> there isn't IGP Oland, so it won't be treated as 6.1).

> 

> Does 6.4 also have 6 pins?


Yes.  Oland has the same audio chip as the other SI parts.

Alex
Rafał Miłecki Dec. 12, 2013, 6:14 p.m. UTC | #3
2013/12/12 Deucher, Alexander <Alexander.Deucher@amd.com>:
>> -----Original Message-----
>> From: Rafa? Mi?ecki [mailto:zajec5@gmail.com]
>> Sent: Thursday, December 12, 2013 1:10 PM
>> To: Alex Deucher
>> Cc: dri-devel; Deucher, Alexander
>> Subject: Re: [PATCH] drm/radeon/dce6: set correct number of audio pins
>>
>> 2013/12/12 Alex Deucher <alexdeucher@gmail.com>:
>> > DCE6.0, 8.x has 6
>> > DCE6.1 has 4
>> >
>> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> > ---
>> >  drivers/gpu/drm/radeon/dce6_afmt.c | 4 +++-
>> >  1 file changed, 3 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c
>> b/drivers/gpu/drm/radeon/dce6_afmt.c
>> > index de86493..ab59fd7 100644
>> > --- a/drivers/gpu/drm/radeon/dce6_afmt.c
>> > +++ b/drivers/gpu/drm/radeon/dce6_afmt.c
>> > @@ -308,7 +308,9 @@ int dce6_audio_init(struct radeon_device *rdev)
>> >         rdev->audio.enabled = true;
>> >
>> >         if (ASIC_IS_DCE8(rdev))
>> > -               rdev->audio.num_pins = 7;
>> > +               rdev->audio.num_pins = 6;
>> > +       else if (ASIC_IS_DCE61(rdev))
>> > +               rdev->audio.num_pins = 4;
>> >         else
>> >                 rdev->audio.num_pins = 6;
>>
>> You don't check for DCE64, so OLAND will be treated as DCE6.0 (since
>> there isn't IGP Oland, so it won't be treated as 6.1).
>>
>> Does 6.4 also have 6 pins?
>
> Yes.  Oland has the same audio chip as the other SI parts.

Great. Thanks for the patch!
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c
index de86493..ab59fd7 100644
--- a/drivers/gpu/drm/radeon/dce6_afmt.c
+++ b/drivers/gpu/drm/radeon/dce6_afmt.c
@@ -308,7 +308,9 @@  int dce6_audio_init(struct radeon_device *rdev)
 	rdev->audio.enabled = true;
 
 	if (ASIC_IS_DCE8(rdev))
-		rdev->audio.num_pins = 7;
+		rdev->audio.num_pins = 6;
+	else if (ASIC_IS_DCE61(rdev))
+		rdev->audio.num_pins = 4;
 	else
 		rdev->audio.num_pins = 6;