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) From patchwork Thu Nov 14 15:11:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhavin Sharma X-Patchwork-Id: 13875182 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 AD1D2D68B30 for ; Thu, 14 Nov 2024 15:12:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C06310E7F4; Thu, 14 Nov 2024 15:12:51 +0000 (UTC) Received: from MA0PR01CU009.outbound.protection.outlook.com (mail-southindiaazon11020128.outbound.protection.outlook.com [52.101.227.128]) by gabe.freedesktop.org (Postfix) with ESMTPS id 954D010E7F4; Thu, 14 Nov 2024 15:12:49 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bFAWZmT4owL7OwcpOOcfJ7p8mI6CI3xGHw54zeOCGHqq8EQTK+hxw2+j6Jkl5FwgpBJKHVTp37H5DRhhWfB1UgaRtc4OrcsRvOveJibA6XYuhAm1jlSKsmWCT82WCU3UT/3DotKpp9fcJZc5GQ8w7pOhEGblNym7AyKc1t3Vik/0XKsO9ky0yyNoC0GKDMiAZ/LoFA8EEMgqyzBrUsvAp90vkvTxaBq+qvoc6UettGSjUrybf57NB7VmmKImfyBV+6RvRRX1jB0VptAoR9S+4JXL/TUzL7fwIFaxtXH9ywrb0h+TPN27vg2Z+Fgl6W0k4dYdSmeSk+pwGWsxtOnyIg== 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=Bw0cIZJ64UmjbmmNvP66gFrQvqnsPHnKXxghmuvnpPM=; b=Q03ReuyWR4emWnd5wZp34XLINcGF2cLRhjlKTPYp5YDhyrTXexFV+cqZl6eq0zhnrsUMt5a9YyGNkWypr4SIClh4Sp9O5s+t2yVRpkK07mll/Sdt7wgMptRk9w+bu0AB5SDayaaxjgKf3jiSIK98U70d09p4hIO8y0Ez/PmX0cGDtCSyILFI28+2wMywUHiqOQHwCPvKYbyL6PLHNaPCsp10W/yKGPESijSofuC5+oOVAKFlb5AIjI06ACh8Wccuz7jusf6uY6px/F6d2N1dcOKchRrf5ewtdM1vXobiVdRZb0aMZJw3WtrQ/TXkbPfPDzffdv7N/j6nr8keOGQuBw== 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:46 +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:46 +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 , 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 2/2] drm/amd/pm: remove redundant tools_size check Date: Thu, 14 Nov 2024 20:41:12 +0530 Message-ID: <20241114151150.19576-3-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: 344fe975-d6b9-4676-3c60-08dd04becbe5 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: cMwzViqPSo3Y0qBrKorLlq8RSdpiPOlR/07xmxXGLiXVlj/5Fw7L7SY33IQpCNduHWYM6hUOe8jgMrzQx4oq5PdQa5ernSZW3RHgRrX5nk+yd5K7Ddhd5U2YOJYdF+O1OdbLukGCA9M35E3IFj/i7vQtju2wKNsBpwlcjWi8DEQ0laXryldZrZjQIvX2pU1vQPpjha9hs/++Im2UFYga1xb/XHCxIcnzHY8BAWsgV8BDeKA3sJXjqmTYky1sUPsC6w3cLP7JR6PaEufkHeEXYHEXHv48K6Ew2IBRGB77DxjpWSuqAhMjwUYsfH7qq3ljVvVrZb7isr3KcYF0NPGMJQfuiIbmhNhCBQ4bz2eyt3FnS8SKMQjj17y/YzZ8nm+qfYHWStn51ejsnAUTvL/LFPURktXqnqdViU09+mvWHc975HEsWWafsE56NsxTZpV/0EavpAOy8wfPDWD8c3w+4UzQaEh9rGRIN71TPNWUx+pyRh+nZT32suOaYyMpFYjDVX2AFr0iARbKhfwE7ptvAH0gTeYriUrmUtpoBrwopoVIYty4Rx/eCIGDzkSdVGlh8vVeEBo64VwKyHlPn7c7DCIREcY25cH6UYtX5JMeUNUSGilO9hDT1dAc9KzOqlhFSLzz9kqf4cxPkXRn1ARp70F0atsKkh9D9CG1jFjQZTJqSungd+WHKh08zIYco+um957uNiOce+204B2Tv5hlzhOZ9eyJEcPDRAkqcQ0vcE7jBOMxsovB7YIhNCP32ly4YN/IVsu9OXUVzu5YPM9xqyFMXErhYTMiU9yBOhZKZfW9day2goPj+oZV4s8xRX8moekROvXHKD+pE+kLhB7aSALrj82QSk2M78VbSzv3RokHY4EiuVKsO1OnWOUf+7muHzkZ9tVuBVnFH6o6SBosNJ3XUskny38iKz8t+z06yilt1Qdho846OochSfyNys1YL5sutY+ZCanPMbWVho0hVxlSr3/JnVI7Ba+GuHXXVObeCAuKkKEJ2x76Ca3TSw9IvjnCXcocC37E2B3NQDmd+6cYvKtK7yW6dYsJyo66L4KLXyZUMMJVtIK52QphnCoAb6z28f9p9ON0io5unLyqSFcc068IoLCi9WqSGBuw2O6fN93rl9WdWgTKYsh2vHPC3H0cQRj1fluQmvFAIjFYexKGyassh6cuKYX7mJwQ9YKUloC/wXRRqOWF2Y3URgGi2+yFGn350dHsLLPqAP9H5KtyxZ2LpfNASgGlGFFzFDwOffURog9dYl9Ao/J18zOD5YxCgmfJZhk5HhKRXOoEhgC/ml0XzfuGmZeysufNlQPfSHGWq85nH6f3vICBEYYmsYlL/SMWsIlcyYdDhQhOtJJ/XuGtlVqw1NHsT+gd6/Y= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PN3P287MB1171.INDP287.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230040)(1800799024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ptmPir5uUlHJVVDWUgApts4NA/n+ULhISJdEc1ZQIflMeWnhlpj3xxJv+E1iexIufUpg5k5k1ov3VvM19Mw1jwABIhuzcwiohkmr+3pouqd4g9qq3ku/QclnqRop2wUrIi4TGP+GjuDcw0wjdyXkM18FEXFA6rfiyrJQdX/QJhYKbQKz8Yg2vTZzAbXg6+i8MohbqznpJLSTF0dBaFEUjzKVzKJ4SZwJmxRl/3fT9RtV/rAW8bH43cj3PE6oDKhpM55Gbd6P6yOQtiymKWOcGK183+DfXdu+HGWd2bz/KKE053HLdoYJOSzEPABQznjr1Stu1P8jqRnMhSY67V5JluuJc4rIvaf+titMCLnP4iJOJw4DXPqVmRx5aQ3TKWAepNzLq3PWR7G9JFpBTHWtRiQqf1ZdQ0JCqfmdYyYKaKuVvVc3S+NW9XyM9uxzqVWleyqnvx+uDlf64PsWLVf5orLBY8H2GSLmZdeRRf2idupVHfbjp1H7MjZ6RV8dz2awdTm/jGbh/6uqW9aQOYqnpjcdyEhe/qKvGhQ55bZM9RWJ/1AwHQZulMLg2eVRY3W11nJUjg223uUFGIz4cJpBeVV29oaMwFM4zb6xUrWtohlLNKbiZrzsZ2nMZ4F2TRIRfSIebCrujYQNFmRAP4K/Wfs7rVFVxVIRXG3Vr8k= X-OriginatorOrg: siliconsignals.io X-MS-Exchange-CrossTenant-Network-Message-Id: 344fe975-d6b9-4676-3c60-08dd04becbe5 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:46.8336 (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: oAW90gYzvK5FSXt4wFBYym7HUjjyZi6q16yiqWNrARcf8bxNpg5yvmPDLtDbN2CWj+AlVGkfPnwK35OU1UaAAvS2a3AoQYj3MvwzVSKGoL4= 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" The check for tools_size being non-zero is redundant as tools_size is explicitly set to a non-zero value (0x19000). Removing the if condition simplifies the code without altering functionality. Signed-off-by: Bhavin Sharma --- .../amd/pm/powerplay/smumgr/vega12_smumgr.c | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c index b52ce135d84d..d3ff6a831ed5 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vega12_smumgr.c @@ -257,20 +257,18 @@ static int vega12_smu_init(struct pp_hwmgr *hwmgr) priv->smu_tables.entry[TABLE_WATERMARKS].size = sizeof(Watermarks_t); tools_size = 0x19000; - if (tools_size) { - ret = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev, - tools_size, - PAGE_SIZE, - AMDGPU_GEM_DOMAIN_VRAM, - &priv->smu_tables.entry[TABLE_PMSTATUSLOG].handle, - &priv->smu_tables.entry[TABLE_PMSTATUSLOG].mc_addr, - &priv->smu_tables.entry[TABLE_PMSTATUSLOG].table); - if (ret) - goto err1; + ret = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev, + tools_size, + PAGE_SIZE, + AMDGPU_GEM_DOMAIN_VRAM, + &priv->smu_tables.entry[TABLE_PMSTATUSLOG].handle, + &priv->smu_tables.entry[TABLE_PMSTATUSLOG].mc_addr, + &priv->smu_tables.entry[TABLE_PMSTATUSLOG].table); + if (ret) + goto err1; - priv->smu_tables.entry[TABLE_PMSTATUSLOG].version = 0x01; - priv->smu_tables.entry[TABLE_PMSTATUSLOG].size = tools_size; - } + priv->smu_tables.entry[TABLE_PMSTATUSLOG].version = 0x01; + priv->smu_tables.entry[TABLE_PMSTATUSLOG].size = tools_size; /* allocate space for AVFS Fuse table */ ret = amdgpu_bo_create_kernel((struct amdgpu_device *)hwmgr->adev,