[PATCH] drm/amdgpu: fix initial connector audio value
Alex Deucher
alexdeucher at gmail.com
Tue Sep 20 16:09:14 UTC 2022
Applied. Thanks!
Alex
On Tue, Sep 20, 2022 at 6:34 AM hongao <hongao at 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 at 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
>
More information about the amd-gfx
mailing list