From: hongao <hon...@uniontech.com>

[ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ]

This got lost somewhere along the way, This fixes
audio not working until set_property was called.

Signed-off-by: hongao <hon...@uniontech.com>
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
Signed-off-by: Sasha Levin <sas...@kernel.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index 3e4305c3c983..86ceefb8b8fb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -1638,10 +1638,12 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                                                   
adev->mode_info.dither_property,
                                                   AMDGPU_FMT_DITHER_DISABLE);
 
-                       if (amdgpu_audio != 0)
+                       if (amdgpu_audio != 0) {
                                
drm_object_attach_property(&amdgpu_connector->base.base,
                                                           
adev->mode_info.audio_property,
                                                           AMDGPU_AUDIO_AUTO);
+                               amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
+                       }
 
                        subpixel_order = SubPixelHorizontalRGB;
                        connector->interlace_allowed = true;
@@ -1746,6 +1748,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                                
drm_object_attach_property(&amdgpu_connector->base.base,
                                                           
adev->mode_info.audio_property,
                                                           AMDGPU_AUDIO_AUTO);
+                               amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
                        }
                        drm_object_attach_property(&amdgpu_connector->base.base,
                                                   
adev->mode_info.dither_property,
@@ -1794,6 +1797,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                                
drm_object_attach_property(&amdgpu_connector->base.base,
                                                           
adev->mode_info.audio_property,
                                                           AMDGPU_AUDIO_AUTO);
+                               amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
                        }
                        drm_object_attach_property(&amdgpu_connector->base.base,
                                                   
adev->mode_info.dither_property,
@@ -1839,6 +1843,7 @@ amdgpu_connector_add(struct amdgpu_device *adev,
                                
drm_object_attach_property(&amdgpu_connector->base.base,
                                                           
adev->mode_info.audio_property,
                                                           AMDGPU_AUDIO_AUTO);
+                               amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
                        }
                        drm_object_attach_property(&amdgpu_connector->base.base,
                                                   
adev->mode_info.dither_property,
-- 
2.35.1

Reply via email to