Re: [PATCH 2/2] drm/amd/display: Add drm_audio_component support to amdgpu_dm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/10/19 9:48 AM, Takashi Iwai wrote:
> On Tue, 09 Jul 2019 18:30:19 +0200,
> Nicholas Kazlauskas wrote:
>>
>> [Why]
>> The drm_audio_component can be used to give pin ELD notifications
>> directly to the sound driver. This fixes audio endpoints disappearing
>> due to missing unsolicited notifications.
>>
>> [How]
>> Send the notification via the audio component whenever we enable or
>> disable audio state on a stream. This matches what i915 does with
>> their drm_audio_component and what Takashi Iwai's proposed hack for
>> radeon/amdpgu did.
>>
>> This is a bit delayed in when the notification actually occurs, however.
>> We wait until after all the programming is complete rather than sending
>> the notification mid sequence.
>>
>> Particular care is needed for the get ELD callback since it can happen
>> outside the locking and fencing DRM does for atomic commits.
>>
>> Cc: Takashi Iwai <tiwai@xxxxxxx>
>> Cc: Leo Li <sunpeng.li@xxxxxxx>
>> Cc: Harry Wentland <harry.wentland@xxxxxxx>
>> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx>
> 
> Thanks for the patch, this has been a long-standing TODO for me, too!
> 
> Do you have the patch for HD-audio part as well?  Or you tested with
> my old patch?  Then I'll resurrect my patch set as well.

I've tested this series with and without that patch. The notifications 
work and the driver will query back with get_eld as expected.

Without the patch it should just retain the existing behavior.

> 
> This patch itself looks almost good.  One caveat is that you might
> want the reverse select of CONFIG_SND_HDA_COMPONENT, something like:

I can try adding this select based on DC for now (since it's the only 
part that actually uses it at the moment).

> 
> ================================================================
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -223,6 +223,7 @@ config DRM_AMDGPU
>   	select BACKLIGHT_CLASS_DEVICE
>   	select INTERVAL_TREE
>   	select CHASH
> +	select SND_HDA_COMPONENT if SND_HDA_CORE
>   	help
>   	  Choose this option if you have a recent AMD Radeon graphics card.
>   
> ================================================================
> 
> Other than that, feel free to take my r-b tag:
>    Reviewed-by: Takashi Iwai <tiwai@xxxxxxx>

Thanks for the review!

Just to note, audio is currently broken after hotplug at the moment for 
AMDGPU with DC enabled, but this is unrelated to this particular series. 
I have a patch that resolves that issue that should show up sometime 
soon on amdgfx.

Nicholas Kazlauskas

> 
> 
> thanks,
> 
> Takashi
> 

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux