]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/radeon: Add HD-audio component notifier support (v2)
authorTakashi Iwai <tiwai@suse.de>
Mon, 22 Jul 2019 14:38:14 +0000 (16:38 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Sep 2021 20:55:12 +0000 (16:55 -0400)
commitc26ef7440fff9ae704051dc72238377401024693
tree78d917ee639f830f11fd66f65b2acba1cd4485c8
parent52c791e86ba2e72b2d8c03671b6a4889dbedbf91
drm/radeon: Add HD-audio component notifier support (v2)

This patch adds the support for the notification of HD-audio hotplug
via the already existing drm_audio_component framework to radeon
driver.  This allows us more reliable hotplug notification and ELD
transfer without accessing HD-audio bus; it's more efficient, and more
importantly, it works without waking up the runtime PM.

The implementation is rather simplistic: radeon driver provides the
get_eld ops for HD-audio, and it notifies the audio hotplug via
pin_eld_notify callback upon each radeon_audio_enable() call.
The pin->id is referred as the port number passed to the notifier
callback, and the corresponding connector is looked through the
encoder list in the get_eld callback in turn.

The bind and unbind callbacks handle the device-link so that it
assures the PM call order.

v2: fix the logic in radeon_audio_component_get_eld to walk the
connector list since that is where the EDID lives and we can
derive the encoder from the connector because the encoder has
not been assigned at this point (i.e., during monitor probe).

Acked-by: Jim Qu <Jim.Qu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/Kconfig
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_audio.c