From patchwork Thu Nov 14 15:11:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhavin Sharma X-Patchwork-Id: 13875181 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 EE122D68B31 for ; Thu, 14 Nov 2024 15:12:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79E1F10E7F3; Thu, 14 Nov 2024 15:12:42 +0000 (UTC) Received: from MA0PR01CU009.outbound.protection.outlook.com (mail-southindiaazon11020132.outbound.protection.outlook.com [52.101.227.132]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34D7B10E7F3; Thu, 14 Nov 2024 15:12:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SRHM493IX+agAr90lTBFfUIvdstVXwp1Ta8yl25M3chiLb0RorGnX8zk/JxbRTij0ZMNYOYdtjLOTBrOI1JHplBhBtfBQtYSkc4X+qV4m1wUmcVo00NsgmYerZ+b5fSvqxQ4+dTfaRqM/cKmkDfluD8iCdfd09JTN0YdhAhjdOFiJ3bCUv0myzqOxORtB+Zck69fUz8umMZXxJe29lp18nTttMfa4FS9D+mVSX24Opv7MHWWuCS0Mven796ZXOrD2tPTZWMhmidBFR5pcrfDxrBRH0bB/PObkkq/Ixbqp+Fp2ujp8vMtcW0Nk9PymNJstvCjntFkITwlEfSKptgrBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=0uUvdOuhqBe7Pbl87fnfvKIwEnho5Dss421hPJnKNxQ=; b=ZZE3PNC0XZZ3HwpCm00Zru24SLn3gyb6i1GizQOOupd29eWsF1X1cedht2wL+QQRMUt16noo45sBHQdFTnBsojqvm0ggxNRwq1jL6fsm4ZXFsaEcvXvPiquOrL3mYSop3SEGW9HhnihDZH4Vz0oJwp4EqkK4JBLZrWXV1ViQYUAmHPk6PlSQtwLiZDzjOabDRIobKKH14cO2PJi7kYP50A/qMMV5trzMzV6midQzL1eKu0fnCrZzKf2Owr1orJzt4IRMq94DNWv9VLcM2PMxLuclZO/7ChsEOauSCwKf1m+Qsx79CR3oBwYQzI0FTLsB2IJBtIgeghg/S3HGIuVNUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siliconsignals.io; dmarc=pass action=none header.from=siliconsignals.io; dkim=pass header.d=siliconsignals.io; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siliconsignals.io; Received: from PN3P287MB1171.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:1a1::5) by PN3P287MB1340.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:1a0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Thu, 14 Nov 2024 15:12:37 +0000 Received: from PN3P287MB1171.INDP287.PROD.OUTLOOK.COM ([fe80::c75a:632:1645:5db]) by PN3P287MB1171.INDP287.PROD.OUTLOOK.COM ([fe80::c75a:632:1645:5db%4]) with mapi id 15.20.8158.017; Thu, 14 Nov 2024 15:12:37 +0000 From: Bhavin Sharma To: alexander.deucher@amd.com, alex.hung@amd.com Cc: Bhavin Sharma , Harry Wentland , Leo Li , Rodrigo Siqueira , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , David Airlie , Simona Vetter , Kenneth Feng , Wenjing Liu , Chris Park , Roman Li , Leo Ma , Ryan Seto , Jose Fernandez , Ilya Bakoulin , Aurabindo Pillai , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] drm/amd/display: remove redundant is_dsc_possible check Date: Thu, 14 Nov 2024 20:41:11 +0530 Message-ID: <20241114151150.19576-2-bhavin.sharma@siliconsignals.io> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241114151150.19576-1-bhavin.sharma@siliconsignals.io> References: <20241114151150.19576-1-bhavin.sharma@siliconsignals.io> X-ClientProxiedBy: PN3PR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:9b::10) To PN3P287MB1171.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:1a1::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PN3P287MB1171:EE_|PN3P287MB1340:EE_ X-MS-Office365-Filtering-Correlation-Id: c3b72bba-51eb-4bae-0903-08dd04bec625 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|366016|7416014|38350700014; X-Microsoft-Antispam-Message-Info: oxKunaSt08X+790CX4Dy9U7RZ1E6/46p1mIgZJBn9ANkYT22C2Pq04ESU1VBziTLHSqV5tKSEnnZM6sDw6sFzpL9LEOXRMvfe2AI2ugzaPe1NFtJ1v1yZKRGsC5XNn3Ucy32yw5JkKBzpE+0qw8ZajnBpc9XQ5vYsPGIwOskykNq+pbql8ZpoEyt+1Fmqe4V7eWveUUQ2j7YZBHSP8bCaQ4s0SAhIrYmNEuoG3Qwb9XfL75PZ7jH5Rjk+ZHTHZzACOz8DYgDCq/Nj+Y6hk6fVbio1+6gOyBns9Tnn3/ScQL7Hp5wNPXfnJEQtKYAZDgkHld6N4NAfyVdwWKoH5x1823uTy1hcqhjMh8rl+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PV:NLI; SFV:NSPM; H:PN3P287MB1171.INDP287.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(366016)(7416014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /LzR39LnB8BMJ5Xz++wz4wAEynkMkSGSAcNEDnLY572GeTtl4p92hJra2AWKMqoAIczyNRme9nP+dUPUnL+e94MQaqRtxtyklbo8zyhac4nJ1m6w+W2+4wIkZspH3Am77I/PoQ+kW4blMoNyf0P6noi/6WeG5qym/UndT8pMwywEJ7k3SbKWYoWElq0krf38/xazqfKvIas0ix3WjMa/CyGVrh2ccKWKYdqeZKqyMIYdy0CXAVEtA6OaiS4c58jGF/qPV1Ro4kePrRQiuv7hLwbkKB7xbYyVLYwXH3GvvDfYcViZIGUxXte/WaY8QSRdZ9uAAgLdJB3rvUVZe3jj6xIQoRExmdoec5sl8V3EUEozVWCa/mWuSPk8R9VwK2xjufNRzzVIORiIayVTHo3PYJLKKPIgcyaWQEzi2EEKkxoacXbiVVSRlQSsqzKPA8bzNMsxLyD0B9leR62lgsBymu+p/dfuBH6YWeQJ+Xyh78yopZQqwNs/ghK1ehT5i54bvkYSd50yMw6KE8ie/Bdf3ju4UdVe0O1KrKzGK5tgGzzuKWUtrIWucX6HJdmmSaopxJ3sLIsG64EvEk5aTDgIA4FmAsNCsaXNVnJUDAhQ/UQiFvMXksKL2AF1O8wPZ6Rss/0/8zu3I6doXi3YHN1ucw43C8R8j4MQllCOh3YG+H78G05ttOQLTym6HxpTa+Z5LtabB333okdJs6qpjngI4Nl9B4HIkGOmfc7qEHQXeDJJ1DDea30YQDFynzj8yo0574TQ/hRcMuX86Z6crt9Sc3ODtzWy28W826j1nCwVnrpARsxmL5PzyhIDZr5mRnuYa5nTTvq6W6fM/8Z7CCxS1bfkLFnLxsUWv6M9wxUr6K667bPMLQlgfcPIvLlFtQQZjoRqhN8cP98EK3l1VqXd79YeJiCSU5rDqN4rxGa0/12s+rf1rVQA8ZJzrjQHWhCE9lGuAT8zhTFf0jCvoPc1dwc3S/vQfdVftk3zKdCJZEso/IyrkpyEmGGUp015TCoSyHfgdpcHGWJXSG2DUorDhB2PltouaVYrhWFFspdqx3uAI5Ow0sCbGE/1GStp1AVGb/JBeMp2pjeGgmn3mfx2s8s+Pa2QNhc6ZDJLRYNO2OtrHbPTSoMgjN8hC5JcG8EXtdmwILanvgqYc9qKFkLfncrwBNvGgcFh6UHJRr/3Und5LgryCQAMNMpkzHPXG50f/kBfL1rxWtNH507kRfQxhvWC1yNiIZ9jF2nEQA/v750H6Z631MXXCH9cm5V1qOsSWaP7GZPZTkW4Is6ONg1TX/cEYOGcP01zF6bRBXa3ugOReUzNigSlTT+FNHuxqWVSVBXjxJFkJoZQa1W+9lNBeGkQfzxnhZyVUhKCfxZti8hMvYq0R5PH/DKodt/IZfT8MzPXCABlAIWtUEHJIwzHJmgnYKXnVTYlMJncOLonIQWPOVuRlr4gUwj3YysAdGyu5Z0BOjcOd81Oe9qvomsfzpjEtIrxxAw4YwQWoOqim77eoF3UfuTakq1JNxbZ77auPDjqOACNJf0pb63EymLkc4LwaaSm9PUc2d85/eUGuAnV2kcycdCKC3o7beuUYC9rbpzKEeh9FaRc44DHYBOACOxcih3RbqYetoRI1KCUOR8= X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-Network-Message-Id: c3b72bba-51eb-4bae-0903-08dd04bec625 X-MS-Exchange-CrossTenant-AuthSource: PN3P287MB1171.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2024 15:12:37.1987 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 7ec5089e-a433-4bd1-a638-82ee62e21d37 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 49+0rgPXYVJ2f34TJ3O/tFdAnEGjdtEH4N1w4EDeD4BByC2SPpT0Qn5b2qKSFKdIQi8TnmlXDQe2vLExurmjT7xCNRZN+FYbl0aHKNcy9ek= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN3P287MB1340 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since is_dsc_possible is already checked just above, there's no need to check it again before filling out the DSC settings. Signed-off-by: Bhavin Sharma --- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c index ebd5df1a36e8..85f6f8e43947 100644 --- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c @@ -1093,14 +1093,11 @@ static bool setup_dsc_config( if (!is_dsc_possible) goto done; - // Final decission: can we do DSC or not? - if (is_dsc_possible) { - // Fill out the rest of DSC settings - dsc_cfg->block_pred_enable = dsc_common_caps.is_block_pred_supported; - dsc_cfg->linebuf_depth = dsc_common_caps.lb_bit_depth; - dsc_cfg->version_minor = (dsc_common_caps.dsc_version & 0xf0) >> 4; - dsc_cfg->is_dp = dsc_sink_caps->is_dp; - } + // Fill out the rest of DSC settings + dsc_cfg->block_pred_enable = dsc_common_caps.is_block_pred_supported; + dsc_cfg->linebuf_depth = dsc_common_caps.lb_bit_depth; + dsc_cfg->version_minor = (dsc_common_caps.dsc_version & 0xf0) >> 4; + dsc_cfg->is_dp = dsc_sink_caps->is_dp; done: if (!is_dsc_possible)