Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4150264rwb; Tue, 20 Sep 2022 09:29:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6/XETcaGbYkYluc5UvgCweTAqqYUnXSehCGccWjFAs3koF9JJILiw7UEyO5yP7V4q9Ilee X-Received: by 2002:a05:6402:847:b0:453:944a:ba8e with SMTP id b7-20020a056402084700b00453944aba8emr15658057edz.326.1663691340000; Tue, 20 Sep 2022 09:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663691339; cv=none; d=google.com; s=arc-20160816; b=Mi95cWakBEu4ZS23S2N27MQyMgyzf0YGG2wkppufT4DFMWL9Dtf9kJhCzpBp4QOc7L 58a5A1O9HTyKuokz1B7IJtEUrz6ay6TNIpJGK0XrH5yiY67gRvYRRwNNcFJUSzSWaENF vXZW31EcKiHS0cHAs1mz3YPWucB2gQeDZrHkqOvkoKX5T51LfsdaH0TpmA55q7eZDCoS oEkf+atHfTtbvSjxXoOnDAOCnH2v5gbpJHrvTHqNjGH1PkuWDkIjsQY5uahjxl3nqo2W Ghnl49vte4r+/eFdXm2NwZOBjhcpq2ApCe76h1+xr/O8i6d2Mj45fOZEz6MS/SBHfkcc stHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ak/BTYCEqn8/gk40fTo/S/aYr9+8Izr7lnhdGq7bmAY=; b=R6100E5uPMsZob/aP9P8i1SZQROpojORdI+L0/CtmVnMvoL87ClPSe6NrIc51OF9KT tgvx8FHyaHc4UUwAf3FbyNtc/0X0lpJTXe0/92R7Fr/3ikJnf5s3a/bVvcaE/xLpojoX 1zVU45Oux3xU/9/QZm9LG4eusFY+eA30rRnupR5bcVP+QyfJObxh4FCKCEcKlut1/yWz sMuRBjz4y4l8jsA9jA6thglC8ZEw48xcdMwPwbYhJcfuzO0Tj1RTbirQgRXffBZfQcYm Jj0DYVkV1ngKlQle/jqF4ymfpddL5T4HM2EhPpnVw+f421VCTyVSrPDPPrDCe62qQdmY 8EMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IRONn0fw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m17-20020a509991000000b004534427aee6si183273edb.229.2022.09.20.09.28.35; Tue, 20 Sep 2022 09:28:59 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IRONn0fw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbiITQJh (ORCPT + 99 others); Tue, 20 Sep 2022 12:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbiITQJe (ORCPT ); Tue, 20 Sep 2022 12:09:34 -0400 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AED06C748 for ; Tue, 20 Sep 2022 09:09:26 -0700 (PDT) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-127ba06d03fso4925572fac.3 for ; Tue, 20 Sep 2022 09:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=Ak/BTYCEqn8/gk40fTo/S/aYr9+8Izr7lnhdGq7bmAY=; b=IRONn0fwCOKADd82WVLuW6to0tPKkHo5ICanCh6D+wwaYH6qRMoyszQeiyJAVvshXh xEE8pvuxnrDGZcJ8Ro6nDqSFB3SIgwlGSynjk5H5GNVcouMRDySniX1TqMwIZgtx4geq 4U9wt0wbMAJU50/DfRGw4TEoi3CftW2rgvSLcbO+IYIxfN8gpbLCJlZvp9aL+pSD7rhM AaJpEhI2rV6TTcqZAV7I6P0nqP8pkbhs8m08AsK2Q2bAxfQSROjS+XYi5zv6ruu9N8sv M5pr/aw6PuI0B4hcpjn0NrjM1/WgouV0HFLvDtPWH4CCPmetbEVntmRh8D83m6MlVBzP sygg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Ak/BTYCEqn8/gk40fTo/S/aYr9+8Izr7lnhdGq7bmAY=; b=xT+oXrHNO+/+kIEDjeDCyWeaJl7VqqeKxl0AjDhxdf7LnqqpTCjmW4VQjU28XHVtyK orGfSBMM6S2Ni9DNcoIvDDwf+Mrj9qDl5cJIxTRNpCLxbXygXX3t58FjxYH/TrNE+UDC 5L9PWIRsgMYUSa3fjdHETZfUB7xDNcnFiWODvhyvy9TVGbeg+xRua1TRLQ32AVM7IZB8 vShU1DO1e+0SZyDesoVhzrm5QFvSF2iEesNfcgyQacpC4CNvlQIPSKP7fR4w1G7WltqN AfAoz9k4GFsbWPFGopMDuIz4cqw5lhojTImYio94/u893UqOk/evLNdNKxRapE9TdVYn lotA== X-Gm-Message-State: ACrzQf0MQI9yGIqyxnjkC1dfPEKOtJzEKCTzQQoEQVmOO7rnVlM/fwn1 QseyP7QvFIS++pk3neIohh6LJNAJULYiTrU9EvM= X-Received: by 2002:a05:6870:738d:b0:125:1b5:420f with SMTP id z13-20020a056870738d00b0012501b5420fmr2548247oam.96.1663690165330; Tue, 20 Sep 2022 09:09:25 -0700 (PDT) MIME-Version: 1.0 References: <20220920092453.16022-1-hongao@uniontech.com> In-Reply-To: <20220920092453.16022-1-hongao@uniontech.com> From: Alex Deucher Date: Tue, 20 Sep 2022 12:09:14 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: fix initial connector audio value To: hongao Cc: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 Applied. Thanks! Alex On Tue, Sep 20, 2022 at 6:34 AM hongao wrote: > > 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 >