We already have anx7625_audio_update_connector_status() to notify the
audio framework when HDMI is (dis)connected, but up until now this
function was only called during the callback setup. Add a call for it
to the HPD change handling logic.
A couple functions needed to be hoisted as part of this.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 48 ++++++++++++-----------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index b0ff1ecb80a5..da54d6a61e07 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1588,6 +1588,29 @@ static int anx7625_hpd_change_detect(struct anx7625_data *ctx)
return 0;
}
+
static void anx7625_work_func(struct work_struct *work)
{
int event;
@@ -1603,6 +1626,8 @@ static void anx7625_work_func(struct work_struct *work)
if (event < 0)
goto unlock;
+ anx7625_audio_update_connector_status(ctx, anx7625_sink_detect(ctx));