drm/nouveau: Add HD-audio component notifier support
Subsystems (3)
PATCH RESEND 1/1 drm/nouveau: Add HD-audio component notifier support
This patch adds the support for the notification of HD-audio hotplug via the already existing drm_audio_component framework. 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: nouveau driver provides the get_eld ops for HD-audio, and it notifies the audio hotplug via pin_eld_notify callback upon each nv50_audio_enable() and _disable() call. As the HD-audio pin assignment seems corresponding to the CRTC, the crtc->index number is passed directly as the zero-based port number.
The bind and unbind callbacks handle the device-link so that it assures the PM call order.
---
This is a re-submission of the same patch in the last year, applied on top of the current linux-next.
Without this audio component support, the HD-audio HDMI codec won't recognize the display hotplug at all due to the recent runtime PM change. So, please review and merge if it's OK. Thanks.
drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/nouveau/dispnv50/disp.c | 111 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drv.h | 7 ++ 3 files changed, 119 insertions(+)
drivers/gpu/drm/nouveau/Kconfig +1 -0
@@ -16,6 +16,7 @@ config DRM_NOUVEAU select INPUT if ACPI && X86 select THERMAL if ACPI && X86 select ACPI_VIDEO if ACPI && X86 + select SND_HDA_COMPONENT if SND_HDA_CORE help Choose this option for open-source NVIDIA support.
drivers/gpu/drm/nouveau/dispnv50/disp.c +111 -0
158 lines not on this page · raw message
drivers/gpu/drm/nouveau/nouveau_drv.h +7 -0
@@ -58,6 +58,8 @@#include <drm/ttm/ttm_module.h> #include <drm/ttm/ttm_page_alloc.h> +#include <drm/drm_audio_component.h> +#include "uapi/drm/nouveau_drm.h" struct nouveau_channel ;
@@ -211,6 +213,11 @@ struct nouveau_drm {struct nouveau_svm *svm;struct nouveau_dmem *dmem; + +struct { +struct drm_audio_component *component; +bool component_registered; + } audio; }; static inline struct nouveau_drm *
Signature · 1 line
2.16.4