Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3682788rwb; Tue, 20 Sep 2022 03:14:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Nnb9G+oQCl7+4BACFkMhNGueonT8kl4M/zbijKP02+eBXPUBwr6Oh2aIo3Z2JcQJBT98m X-Received: by 2002:a17:906:58ce:b0:781:b05:772f with SMTP id e14-20020a17090658ce00b007810b05772fmr9488882ejs.581.1663668872034; Tue, 20 Sep 2022 03:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663668872; cv=none; d=google.com; s=arc-20160816; b=CUWsUTzNrIkrJr61BYmnlIOEA3QW//OkpPDg61ztEb3/3H4NmSVr9lRFipbm0Q2owb qWHER3FHighjpqY72GOavJH97bgR1a7MAlr/k8WDjk1KBUTnAMLCKLFLcerf4W9Csvo8 N1yCC4Zn2gihTQoHlUQAZzHrf+owxqNlKNzk5w1OQxDzrPfooVOpoDgOf05Q3P9wY3NB WZBSVBanyaIHJZQ90RD8SzODoKzeRdtmEXuiEucNO0rWj8KbDVwwkNLChnbkTwZA+BmI 6kJNdkvWaIaa1XOp+OQoEYkzK3iR7cACB8ydPlxi4PxxdrcZS84ZGtxoTQSyibDz7/tU +Scw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=GPgFOSNF8IhF9aQbuF7JGPlrhbcFqA/TImwp9Sf3bfk=; b=MKPxgnE6kLrVl0NZdmTjs8q/2zk+T0I3pqkniZuH4ajVDPtcpdthdOswqpsbHzGy+S wY+jV5ZONV8Udu+odeWY7WBciEXDHLxHSaqiovaemUk88C0l/eU/yPYUsfDqccuqpJtp AtX7SnpZweRuVoIpLSnI27o9rj2wV0BFtHL25HimOLbJfpsmctCaLEJWYZIHYTz09gVb +StABlmr7q7vPMfXVTiUZ/h5sC2Zwcs2afgThot35h46oPBOgvuFJ9VhJDV5i3dty2a2 ifpMefloNFkdxspRBmsKdT3vJ6UrfUJWEDgDDU+Ki3JCM//pejFF0VuWpCA6DCFO0tQ4 uQqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2-20020a170906670200b00741a16e8562si715872ejp.826.2022.09.20.03.14.07; Tue, 20 Sep 2022 03:14:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231408AbiITJeW (ORCPT + 99 others); Tue, 20 Sep 2022 05:34:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231355AbiITJeI (ORCPT ); Tue, 20 Sep 2022 05:34:08 -0400 X-Greylist: delayed 129 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 20 Sep 2022 02:34:05 PDT Received: from smtpbgau2.qq.com (smtpbgau2.qq.com [54.206.34.216]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B968193F5 for ; Tue, 20 Sep 2022 02:34:05 -0700 (PDT) X-QQ-mid: bizesmtp72t1663666195t2injh6u Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 20 Sep 2022 17:29:50 +0800 (CST) X-QQ-SSF: 01400000002000D0P000B00A0000000 X-QQ-FEAT: TFgy1zK7+HXcWg/tMvi8mZOhQ99/R/KMioFLBsiCpPXq9JpzOgEisnB2Hjnhn pdSYF8Z6PRvd0tnQrNOHcSCQk3H/3448cfgnmc+az+LgpIEFduvePL4XEZQ+lUhfOQSxGVa mRJJw22VR8rozRScMAzXwb1sbOiASESolGaiySXmDqSU3LDQCtI/Zl0rRmg7cODSK0MTATx Du3PTg77oYsS/wwrqG9IdKIUwxdJsof6WNNqg/8qCsDgaAvTDawmgwiYf8mYGGGmFaWSt1Y y2+hdG2Ab7yUSeSq/+AFXVZNcjH9G92Y7zWHPtRhZy8i7UresUYI3T/U1pze30jGpCC3CBz eV/qgXsIY+pGPebflXytTYzjZTNM+0+lfGmdiEiG2FmbI7Rbqy+2LGHrBPHSE4Mpm0UPrk7 X-QQ-GoodBg: 2 From: hongao To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch Cc: hongao@uniontech.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amdgpu: fix initial connector audio value Date: Tue, 20 Sep 2022 17:24:53 +0800 Message-Id: <20220920092453.16022-1-hongao@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvr:qybglogicsvr6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao 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