Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 679D9C4332F for ; Wed, 13 Dec 2023 06:15:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 379DD10E6FD; Wed, 13 Dec 2023 06:15:17 +0000 (UTC) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2065.outbound.protection.outlook.com [40.107.94.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 983BB10E6FD for ; Wed, 13 Dec 2023 06:15:14 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EzRCVbDR+FhQ/uHqOYBVfKV0VeB1O0DY118sm2Wcg86ywIV5SVRnTdEz71/9wYTYYdC938G9nvC6qk4ML3jndd/bz7n6lmSvs38YuM3tjxFq/vJXsG6QrKlxZCO+9qt8r3kSf76znM12T7+ZakLQCqnHznWdbYD6WbSwU9gu2LPbkQNceR+4af1VKSfMu6skTjuVIabSQRdMH2UPW1tsVBUdZggSngutbiIXKHajIFHXVJjvzeuwM+LFsseGs4TaBK9hJMH9/Tg+v3O6fs868w8gXC+maqJR8kP6eSEZKbcizlvsqkJRv7pK3S+dia7cl9T85m0yzHHE2fhqtJCS/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K4Imb9NVzdJMvNtiieNAfLg53r0YYglgt//uGcTg5qg=; b=QVYbrXjyOJ+AO+RYzCtZMHozL7RAUqih2x4maBS6ATY/hWgQBVM0/LQgU85P2Zhz9ZMsN3AhiTwUh331jjV01WImneDslGNOaz0a5Hmzh93KEEqZs1qzujcC3VhZHqGnFy357KXpkhbNivHhC75bmyiLzECddU/EC/kYf1KVIexrOOfUg/1Ab/rHamyGFc6Sa/z9ADCM5+giR/bqm69QcU3IkFi7g+g5vsxhJwnMo750mZLmsnQ3JWd8HlqEWo3tLKaP+Dzy89kM2x26IdgHvEIlLjSBExioE9iKwUQX7wm5g9i9fTAh8uBHuHy9mWcdrFiYUqVgb5/si69AsWtI/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K4Imb9NVzdJMvNtiieNAfLg53r0YYglgt//uGcTg5qg=; b=oZ9WtNOvNCx9MD8m6XhSZrpODRJFSSEvVt4tCW2qimHJJcBSMcb7TvVhHjVwQXI896nsBcPVV9i7IUkCT1aufaJ+aMG+iI0V85VBkh6/TFpVFppfHVOHiwrUE6bZ0kfaKuZip1ONScydA13LuyiaMfM4DXZMFTi7f4LmwC+FGzs= Received: from MW2PR16CA0030.namprd16.prod.outlook.com (2603:10b6:907::43) by DS0PR12MB7873.namprd12.prod.outlook.com (2603:10b6:8:142::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Wed, 13 Dec 2023 06:15:12 +0000 Received: from CO1PEPF000044FC.namprd21.prod.outlook.com (2603:10b6:907:0:cafe::aa) by MW2PR16CA0030.outlook.office365.com (2603:10b6:907::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 06:15:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000044FC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.7 via Frontend Transport; Wed, 13 Dec 2023 06:15:11 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 13 Dec 2023 00:15:03 -0600 Received: from wayne-dev-lnx.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Wed, 13 Dec 2023 00:14:59 -0600 From: Wayne Lin To: Subject: [PATCH 21/25] drm/amd/display: Only clear symclk otg flag for HDMI Date: Wed, 13 Dec 2023 14:12:23 +0800 Message-ID: <20231213061227.1750663-22-Wayne.Lin@amd.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20231213061227.1750663-1-Wayne.Lin@amd.com> References: <20231213061227.1750663-1-Wayne.Lin@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FC:EE_|DS0PR12MB7873:EE_ X-MS-Office365-Filtering-Correlation-Id: 559b787a-c375-4e21-87a0-08dbfba2dd64 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: StkpF0QrazS6WFXV+LEbOPMxwNqJe7CyWqxzTSu7cWFoGkzcNZjwRcNONk/DhNBYNOG1Pce1SFiuS9m8cBYwhoD9i205q7JuaHXdCGd2oRFxT26iOQ4/Hz2zWBSMByVXuY/VWsiq9tIsiF0tAgYGAwy9uG/mJMb+JzqbU3CmgOTvooXveUkgi/ncC9HJ1q/OIniqnQxhavEPXsdZoXH/tNH9hwfmVMks3BcYTyHkGGhSr9FGbS5jEc7GXPtapzOwKXhb5S4ZAWzL583VseiEhjmGKnGr/K4ThvvvXQQoQSGnspeDUjzfIoFgGf2XZlHtuINjONMGQ8/qS9Hqx6N+qj2aWO449ybgMcifIJ4o/xY842uaqajwOCHFvPrxlzX4Us9OeZUya3srJWVvgR7dnIKPabtLgAKJCK6cZbCCb1Mebc8+xCQSbb6UdrlaYUJlwjT5LxDL4G1fOvbQIJtz0CddQrSOg0+J6ddcOkjSMONew1OZYawQT6nNwO6NgD7R0mwdidZN2KkNAXoUof+czGwRmfJzAg1ans/1vtTK2mwqoXRUI1as0iLk4xBO6/y0j9zuyfy2gu4bWkVp0o7a5UiyMiu+gGv4Ln5YeGgjs8ZYxVXzHsdE1qkNB1hBaL0E1vzjwaf6W4gTtibQ74bhMcc7/e+VcjLbkFUr5fKcDbidwWQP09wlArwwjzfCENDWi6gfaijLNUHuCdHzPzs3h/lyqrMFGX+WkjUzKsXXASoc26aLuCC6zpBZPkP+rc5sNqWh7smKI2z5Po1n86Hjsg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(39860400002)(376002)(396003)(346002)(230922051799003)(451199024)(82310400011)(186009)(1800799012)(64100799003)(40470700004)(36840700001)(46966006)(41300700001)(5660300002)(2906002)(66899024)(2616005)(1076003)(36756003)(7696005)(478600001)(6666004)(36860700001)(81166007)(82740400003)(356005)(47076005)(83380400001)(336012)(40480700001)(426003)(26005)(8936002)(86362001)(4326008)(40460700003)(54906003)(70586007)(70206006)(8676002)(6916009)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2023 06:15:11.8652 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 559b787a-c375-4e21-87a0-08dbfba2dd64 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FC.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7873 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stylon.wang@amd.com, chiahsuan.chung@amd.com, Sunpeng.Li@amd.com, Rodrigo.Siqueira@amd.com, roman.li@amd.com, Samson Tam , jerry.zuo@amd.com, Aurabindo.Pillai@amd.com, hersenxs.wu@amd.com, Alvin Lee , wayne.lin@amd.com, Harry.Wentland@amd.com, agustin.gutierrez@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Alvin Lee [Description] There is a corner case where the symclk otg flag is cleared when disabling the phantom pipe for subvp (because the phantom and main pipe share the same link). This is undesired because we need the maintain the correct symclk otg flag state for the main pipe. For now only clear the flag only for HDMI signal type, since it's only set for HDMI signal type (phantom is virtual). The ideal solution is to not clear it if the stream is phantom but currently there's a bug that doesn't allow us to do this. Once this issue is fixed the proper fix can be implemented. Reviewed-by: Samson Tam Acked-by: Wayne Lin Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 ++- drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 3 ++- drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 3 ++- drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c index 05d0e218bfb2..b943d47583e5 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 @@ -2124,7 +2124,8 @@ static void dce110_reset_hw_ctx_wrap( BREAK_TO_DEBUGGER(); } pipe_ctx_old->stream_res.tg->funcs->disable_crtc(pipe_ctx_old->stream_res.tg); - pipe_ctx_old->stream->link->phy_state.symclk_ref_cnts.otg = 0; + if (dc_is_hdmi_tmds_signal(pipe_ctx_old->stream->signal)) + pipe_ctx_old->stream->link->phy_state.symclk_ref_cnts.otg = 0; pipe_ctx_old->plane_res.mi->funcs->free_mem_input( pipe_ctx_old->plane_res.mi, dc->current_state->stream_count); diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c index 632aa091b6b6..1c5e3bb6f0ee 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c @@ -1058,7 +1058,8 @@ static void dcn10_reset_back_end_for_pipe( if (pipe_ctx->stream_res.tg->funcs->set_drr) pipe_ctx->stream_res.tg->funcs->set_drr( pipe_ctx->stream_res.tg, NULL); - pipe_ctx->stream->link->phy_state.symclk_ref_cnts.otg = 0; + if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal)) + pipe_ctx->stream->link->phy_state.symclk_ref_cnts.otg = 0; } for (i = 0; i < dc->res_pool->pipe_count; i++) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c index 88fe102f8288..0dfcb3cdcd20 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c @@ -2624,7 +2624,8 @@ static void dcn20_reset_back_end_for_pipe( * the case where the same symclk is shared across multiple otg * instances */ - link->phy_state.symclk_ref_cnts.otg = 0; + if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal)) + link->phy_state.symclk_ref_cnts.otg = 0; if (link->phy_state.symclk_state == SYMCLK_ON_TX_OFF) { link_hwss->disable_link_output(link, &pipe_ctx->link_res, pipe_ctx->stream->signal); diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c index 994250b6f2ef..260860c259f3 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c @@ -524,7 +524,8 @@ static void dcn31_reset_back_end_for_pipe( if (pipe_ctx->stream_res.tg->funcs->set_odm_bypass) pipe_ctx->stream_res.tg->funcs->set_odm_bypass( pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing); - pipe_ctx->stream->link->phy_state.symclk_ref_cnts.otg = 0; + if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal)) + pipe_ctx->stream->link->phy_state.symclk_ref_cnts.otg = 0; if (pipe_ctx->stream_res.tg->funcs->set_drr) pipe_ctx->stream_res.tg->funcs->set_drr( -- 2.37.3