Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10379684rwr; Fri, 12 May 2023 07:27:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6347DAbA8iD4zsdOarULLbZQVXeQ/N35qgnk6CZbVKJAkOxNq16XYHruge9i8yQ65/Hurr X-Received: by 2002:a17:90a:feb:b0:24e:463c:c4a7 with SMTP id 98-20020a17090a0feb00b0024e463cc4a7mr35505989pjz.15.1683901635503; Fri, 12 May 2023 07:27:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683901635; cv=pass; d=google.com; s=arc-20160816; b=NUiylSMcSB0gc5yMCoBncYVwwcJFYpiQgteg9deaO1WG+bMBwwQk+N92aK640apRlU 92KSU5qvO8S7k4SGlDqoFwPXwljOGc1+gVPQ68PQN9qPmy5QIfsXszP0wDgMuL4jt027 jAnpHZxZKoBigyVQCS3ODDlfwS+cp02YnmJ7w/ahCQqNUcy8+lWwEa7vss5vYyNFNwqy tTDYkUwtIHjVpP9+4Le7UeTDCac8NpMxVmQ62FI7Wuabv4wqB/vFcrQh5LfG5DzYGjYz 0DNkkVU4U58VLPd7cD2dbeN7Hu4Nbqb8vNKfcAs/CipG9agAEOCetJUffFPrM5GrhRca gG0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=iU431ZtbxpDZfJrChTWCnC/JfKirkpMX9gAnnMiElpg=; b=EO1OPXoEy0mHp3czJf9LEj8xDG4nPdoPBOOOhEScEtMJzc/tHaOU+H7lEgeZ0/iROx zvJsHyr/Ex2deJctm2kHBYJAJwaY8oDMQps7F91U5NqEXtnzqDfepFmINrVKLsPQ1YRl 8xudnK8DO188TJZAF0nrmujajnv+vDRqIUviyCYxqx4Ht9wBD1CuOBOytUO2+bFBcsu1 RLvT8jG3dwh/2XBzcna4fuwD1zIlE4LCEPZtItIRunQrzL8iplOl8k2ZuQkK5HmoOM0B NS3tCPwu6IqYdwAss520iRfG6xNKI4kYOxn1i1lazIXP60YE2caj9FAmMOfvRWTIr4M8 LiTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=plxgzaZe; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a17090a030d00b002507cbb0090si12640299pje.184.2023.05.12.07.27.01; Fri, 12 May 2023 07:27:15 -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=@amd.com header.s=selector1 header.b=plxgzaZe; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241437AbjELOFG (ORCPT + 99 others); Fri, 12 May 2023 10:05:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241404AbjELOFF (ORCPT ); Fri, 12 May 2023 10:05:05 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D52197 for ; Fri, 12 May 2023 07:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xwrm0XcPUwN3WaXifgR3riA9V7/+9iVG6Wb+aKJHTqeHPA4DdCLhm7b8kqg5ITEzHhyP/F6d7zBS1hdHD0jFYRfdPqSyx8IJluO/pxVmmKyUd/JmeNX/QqqEkUdCMJtfvG/vkqrML3MRH19pUmNbxZK8xJdwQ/TxU+H0qkcfABL6XXNectza3APrKN/JTq+Mu2yyJJzE9UjTQAM5Fwh2zdgOB8w5pgtQwksgawV2cUZbyUg+Dj82OdQVcHolG3V3XZKMrkoIbwpNy2pgqaek4mZY8jjhuSsVETDU0YVkpePOARDFBj7o3BdVGf7suwimHmKr9CB19wi+9WCbw8RK6g== 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=iU431ZtbxpDZfJrChTWCnC/JfKirkpMX9gAnnMiElpg=; b=V5CC0WcfKGTEb5EKJL84VYLxZSqqLPMy4yrjXWdoBrmhuQYw/PgdLU/v7QCeEjqeBM5ZLcVETiyac2pKBm4PaSndp3vpi9TeQeEeOsVttxbCWa57paGOEB/v/+XMp//5TZvAmroxyoTS49xLgKpElTssuVKffaQCJMez0Ss7pZgc/xrlHiJKSUQKgVeY8x1ccwK7Z+bCuFURp2WZAzXYmB+9eXO/Ht3f358vlYH6qYdkTjXegk2RkGMgxYjAuWm3sFZtI3PFYc38jhttoE0SnLAeONp3w0HZ7p11M+J39CfoUCHpaChh7vyCkmxZRVXE2bTNJy/kW7qlT8SnNg4qUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=iU431ZtbxpDZfJrChTWCnC/JfKirkpMX9gAnnMiElpg=; b=plxgzaZeCir5tC4mubGGFF9hyT+BhT8tCs0JLFaizS3EGgLkmBbJ5zW6coKkp9Smr8YNzRQuCetCav0veh023/VUO/F6pTZDjweRg9/Rz9A7LQ9yDPzPwZeOPfL6OQzlTCuFwec+eLoibsC90gAyitiOyby0t30waltFVjd2etw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) by DS0PR12MB7702.namprd12.prod.outlook.com (2603:10b6:8:130::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.20; Fri, 12 May 2023 14:05:01 +0000 Received: from DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::fe53:2742:10f9:b8f1]) by DM4PR12MB6280.namprd12.prod.outlook.com ([fe80::fe53:2742:10f9:b8f1%6]) with mapi id 15.20.6387.018; Fri, 12 May 2023 14:05:01 +0000 Message-ID: <9dd68975-b8a0-b7ec-3556-c0d7e16ac585@amd.com> Date: Fri, 12 May 2023 10:04:57 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] drm/amd/display: Simplify the calculation of variables To: Jiapeng Chong , harry.wentland@amd.com Cc: sunpeng.li@amd.com, Abaci Robot , Xinhui.Pan@amd.com, Rodrigo.Siqueira@amd.com, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, alexander.deucher@amd.com, airlied@gmail.com, christian.koenig@amd.com References: <20230512070451.107372-1-jiapeng.chong@linux.alibaba.com> Content-Language: en-US From: Hamza Mahfooz In-Reply-To: <20230512070451.107372-1-jiapeng.chong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YQBPR0101CA0010.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00::23) To DM4PR12MB6280.namprd12.prod.outlook.com (2603:10b6:8:a2::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB6280:EE_|DS0PR12MB7702:EE_ X-MS-Office365-Filtering-Correlation-Id: 680f5503-8fd8-4150-b145-08db52f1e03c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8QZFOSxaIhPQ8w4HUgTjdXuAql1z6v31SkWE7g5jw9Y7mHi8Rdfd+gNQuvhpvQbBBqu5Xdi26DrIyPIcRrq8Z8s7T0jxrSs7VcKeroytiOSGP+urmU7a6iZ7rUlLxSVkQ7gjk5Av6iEEy/GXes9Sd8eOmtt6B2TmgNSjs2YRgdrLVxUO3CetswNmMO85bc516l6j/Ga+rHx2o25Hi7CwR0QP+bkWu778Uvsm06R0zqmkXWUA76t8zq7k+mtWKmWx5obZymuytNfoRkt+/gdbwav4/rDKjrYLcfiPz7rXtSriEY3oPgq+kpzrTiSpSb0UB5hZ2OPl4bebFEoTL7AnATeL9bJ5XFC+jQPaxgvPSy+Me5pLmwVWjjz80L1oAsWKiovOAGLdUsOuibGrXD41iYT8m39DID0YL/exM0Uz0V9z4ms0FD8yQAuXL6pyYQIhGRJfKNi4Lnqbcn3zuzVMzVsu2L+owVZzsHqnuyowid2KhV72+QO6pZbVxnteI2FuqEcQHVrQJssazwoCy8sr/m09GOckhJzhsFFyWquRZOZSm8+14zxa7toaI08F7mBcbdowi/nkj0aEy87DDz1PLa1EH8aznvqQRjubf8u319aigc7yqzMjyZksyyObLzm3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB6280.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(376002)(396003)(39860400002)(346002)(451199021)(5660300002)(38100700002)(6486002)(6506007)(186003)(2616005)(6512007)(53546011)(2906002)(83380400001)(26005)(8936002)(44832011)(8676002)(41300700001)(966005)(478600001)(36756003)(316002)(6666004)(31696002)(66946007)(4326008)(66556008)(66476007)(6636002)(86362001)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d0o1Q2QzVllubjBocG03RmlkKzd2djk0aGM2NSsvOVhhR2EwREZuSnpGR2Fw?= =?utf-8?B?MDRMSzBhSEJjMlV3S3h2L2g2dmk1NVdna0MwZmxmc3BmT0RDZWJXRk1sc3pP?= =?utf-8?B?VjhYcDV2QThKdUt6VldUdTJJQmV5Q2lWOER5dU5DeTdXdmpLd2VTa3dnV0FR?= =?utf-8?B?dHAzSEZ2UEsvUzQ3MHZuSWF1VDZITzJoWXFTQUYrcWppTy80Q1phMVczRG1E?= =?utf-8?B?YWNwVWtWSDR5TzdzbzFRdkNIRmt4R1d3UnZPQkJWT2FtL1lpUGFSbGo3WHls?= =?utf-8?B?VFJtb3pNSGwyejB1Y3ovRUxqTE5CdlhKYmluWWdsOHFyTlpsajVOUkV1L01m?= =?utf-8?B?eUhNOG03U0VuVzJva2ozNmNEOCs0dFMwQ2xIYi8vQnEwWWordmZ2S2Z3dDBC?= =?utf-8?B?TDlwMkJwTFhEZmxlQTRiMTFKMG9uOHVZblVmRm1ZaXRxY2lSdFRSR2hMMy9C?= =?utf-8?B?U3F1MXI4VWkwQ05SaWtMRk9MQ3hkZG84Vm9qWXY2WkZ6bkhWbVB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NlFCWUlOZ2pXSERDSWk1N3B3MTVI?= =?utf-8?B?ZTRkNkVteEppcFc0MzBwVkVEV2NIWkd0TGdtMWVYUU1hWGJSeHRwTm1yY250?= =?utf-8?B?MVl5NlUrdzJXdHlCZ1dadXdqUmF3VHJmWEVoN01sNitxVXQvWHBLRTBpaVdj?= =?utf-8?B?Mys0L214V1FFdE9DeW9SR3lhU21PbkNBd28ycjBIN21waUV1ak5iOWhnVHlB?= =?utf-8?B?Q0MrMTVuTW9lUWoxMEgxMWpPQ0tHd2RLZjJxV0VUQmQ2QzdzVklHYjd6Tjha?= =?utf-8?B?L3N4RG1rV1RwRjRseXRmZlExWUpMczJxalc5OFllVHVZMWRxMzVFbG9ieGRV?= =?utf-8?B?OWdjdndGY043c2doMVc3RzdrOWhtT29tQW1WVXdNWk9FOHQrb08wWnZ0SmNP?= =?utf-8?B?azlyUys3WFp3YkFlQ3E4UDN4OWFzaHkzM25IR1hBdHlDZDk1TzM0UkFkRGxx?= =?utf-8?B?RVVpQzhNMWpQUUdBSnlwc2lYRTBWV1lZRDVEVDFCRE1LSHAxRHVqSEU0TVQ3?= =?utf-8?B?ckZiZm4vbWZFZFZFM0tMQmNVYVIxdEJGeXJxKysvQVV3eGN6a1o4R2NSWEwv?= =?utf-8?B?Q0tqMHNlQmNDdlBNNXBHZFEyVXFid0ExVmhUeFJkNytVYy8zN1VialBkMU9V?= =?utf-8?B?UWZLYzEyM0lNNG85U2pJNHJCdEVpYVZqVXR4YlRRSXNmRXZHZkdpQTlsSGhl?= =?utf-8?Q?nYV7rBan9toTxTS1Cul03c9i9?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 680f5503-8fd8-4150-b145-08db52f1e03c X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB6280.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 14:05:00.8281 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i/6Oa2eJyPTeOAKV6H/HBwwLUu4Jt8KK0c8OjEeHo9bBhJ3wJGLRDg4XLXaEfIcE2pn39sjaE2zxxp6iqFVkvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7702 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 5/12/23 03:04, Jiapeng Chong wrote: > ./drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c:586:37-39: WARNING !A || A && B is equivalent to !A || B. > ./drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c:595:37-39: WARNING !A || A && B is equivalent to !A || B. > > Reported-by: Abaci Robot > Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4941 > Signed-off-by: Jiapeng Chong Applied, thanks! > --- > drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c > index 4950eaa4406b..2de910e0ce75 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c > @@ -583,8 +583,8 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context) > struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; > struct hubp *hubp = pipe->plane_res.hubp; > > - if (!pipe->stream || (pipe->stream && !(pipe->stream->mall_stream_config.type == SUBVP_MAIN || > - pipe->stream->fpo_in_use))) { > + if (!pipe->stream || !(pipe->stream->mall_stream_config.type == SUBVP_MAIN || > + pipe->stream->fpo_in_use)) { > if (hubp && hubp->funcs->hubp_update_force_pstate_disallow) > hubp->funcs->hubp_update_force_pstate_disallow(hubp, false); > } > @@ -592,7 +592,7 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context) > /* Today only FPO uses cursor P-State force. Only clear cursor P-State force > * if it's not FPO. > */ > - if (!pipe->stream || (pipe->stream && !pipe->stream->fpo_in_use)) { > + if (!pipe->stream || !pipe->stream->fpo_in_use) { > if (hubp && hubp->funcs->hubp_update_force_cursor_pstate_disallow) > hubp->funcs->hubp_update_force_cursor_pstate_disallow(hubp, false); > } -- Hamza