diff mbox series

drm/amdgpu: fix initial connector audio value

Message ID 20220920092453.16022-1-hongao@uniontech.com (mailing list archive)
State New, archived
Headers show
Series drm/amdgpu: fix initial connector audio value | expand

Commit Message

hongao Sept. 20, 2022, 9:24 a.m. UTC
This got lost somewhere along the way, This fixes
audio not working until set_property was called.

Signed-off-by: hongao <hongao@uniontech.com>

Comments

Alex Deucher Sept. 20, 2022, 4:09 p.m. UTC | #1
Applied.  Thanks!

Alex

On Tue, Sep 20, 2022 at 6:34 AM hongao <hongao@uniontech.com> wrote:
>
> This got lost somewhere along the way, This fixes
> audio not working until set_property was called.
>
> Signed-off-by: hongao <hongao@uniontech.com>
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> index e4054e10a2c2..5d2e3328dd83 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
> @@ -1655,10 +1655,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;
> @@ -1763,6 +1765,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,
> @@ -1811,6 +1814,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,
> @@ -1856,6 +1860,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.20.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index e4054e10a2c2..5d2e3328dd83 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -1655,10 +1655,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;
@@ -1763,6 +1765,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,
@@ -1811,6 +1814,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,
@@ -1856,6 +1860,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,