From nobody Fri Dec 19 15:51:54 2025 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAF18301037 for ; Fri, 5 Dec 2025 07:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764920655; cv=none; b=LnlDXIzDnQysvzFXXFj4xU22f30VtCSi5xOEq5DWQI5xpWqE6oB86tVdGI+lpzUjUmwsqnGMTDDLyM6A2gUNNPFI2IT8BJzXj9LcnHRkOP2hDurxpePTKQdl08Fb33b1VOSHd5jlEnpNk99FfsSHeGuAWJDZ9CTRyrbJ/nzTMcc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764920655; c=relaxed/simple; bh=rLP68hBHDs+g38XppufkPkGcCa8JJ3oaI9MbKiPiD7M=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GrHisJeiFWoF+1rR5yCcObY+HJozu33hEonJRTJEU6sbcEmBp8jli3kWI16RjAMG8Ai6dNisDnjycyUbsFcapm5vR5LCjV/kp7+n/Lu3cWwIir5kGSeC8EvqZkWzqwtfnTOvRrWroo+jtOBH82bX0X1ScbF8M7ce+2ZIh1/5g6s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 256de65ad1ae11f0a38c85956e01ac42-20251205 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.6,REQID:8cb02a88-180c-46a6-b516-e5810342069f,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:a9d874c,CLOUDID:6c3e486b0e851e5d01d4d7b137f0f4db,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|123|850|898,TC:nil,Content:0|15|50,E DM:-3,IP:nil,URL:1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA :0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_ULS,TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 256de65ad1ae11f0a38c85956e01ac42-20251205 X-User: yaolu@kylinos.cn Received: from localhost.localdomain [(10.44.16.150)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 265998802; Fri, 05 Dec 2025 15:43:53 +0800 From: yaolu@kylinos.cn To: harry.wentland@amd.com, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Lu Yao Subject: [RESEND] drm/amd/display: fix audio playing speed up on POLARIS12 Date: Fri, 5 Dec 2025 15:43:44 +0800 Message-Id: <20251205074344.143063-1-yaolu@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Lu Yao Playing audio/video will speed up when color space is NV12. For POLARIS12, audio request clock has to be same as 'stream->timing.pix_clk_100hz', so double clock now for it has been halved in the 'get_pixel_clock_parameters' function. Signed-off-by: Lu Yao --- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) --- Test environment: Card: RX550 device id: 0X699F Display mode: 4K@60 clock:59400 A similar issue was reported in the community a long time ago, but it was not dealt with, link as follow: https://gitlab.freedesktop.org/drm/amd/-/issues/556 Discovered through logs audio_output requested&calculated is half of stream->timing.pix_clk_100hz before, so I double it. I'm not sure if this patch modification has correctly solved the root cause and whether all DCE_VERSION_11_2 have problem or POLARIS12 only, but it's working properly on my machine now. --- diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/dr= ivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c index 24184b4eb352..a93313248db3 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c @@ -1440,13 +1440,21 @@ void build_audio_output( =20 /*for HDMI, audio ACR is with deep color ratio factor*/ if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal) && - audio_output->crtc_info.requested_pixel_clock_100Hz =3D=3D - (stream->timing.pix_clk_100hz)) { - if (pipe_ctx->stream_res.pix_clk_params.pixel_encoding =3D=3D PIXEL_ENCO= DING_YCBCR420) { + pipe_ctx->stream_res.pix_clk_params.pixel_encoding =3D=3D PIXEL_ENCODING= _YCBCR420) { + struct hw_asic_id asic_id =3D stream->link->ctx->asic_id; + + if (asic_id.chip_family =3D=3D FAMILY_VI && + ASIC_REV_IS_POLARIS12_V(asic_id.hw_internal_rev)) { + audio_output->crtc_info.requested_pixel_clock_100Hz =3D + audio_output->crtc_info.requested_pixel_clock_100Hz*2; + audio_output->crtc_info.calculated_pixel_clock_100Hz =3D + pipe_ctx->stream_res.pix_clk_params.requested_pix_clk_100hz*2; + } else if (audio_output->crtc_info.requested_pixel_clock_100Hz =3D=3D + (stream->timing.pix_clk_100hz)) { audio_output->crtc_info.requested_pixel_clock_100Hz =3D - audio_output->crtc_info.requested_pixel_clock_100Hz/2; + audio_output->crtc_info.requested_pixel_clock_100Hz/2; audio_output->crtc_info.calculated_pixel_clock_100Hz =3D - pipe_ctx->stream_res.pix_clk_params.requested_pix_clk_100hz/2; + pipe_ctx->stream_res.pix_clk_params.requested_pix_clk_100hz/2; =20 } } --=20 2.25.1