From patchwork Tue Jan 12 14:55:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira Jordao X-Patchwork-Id: 12013671 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A0C3C433E6 for ; Tue, 12 Jan 2021 14:55:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 145D0221EC for ; Tue, 12 Jan 2021 14:55:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 145D0221EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EF2E6E284; Tue, 12 Jan 2021 14:55:56 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2062.outbound.protection.outlook.com [40.107.244.62]) by gabe.freedesktop.org (Postfix) with ESMTPS id C1EF26E25B; Tue, 12 Jan 2021 14:55:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DOeRHcWS8t1Coffojb76mNLIFyHa7KzfI3XmNgQGt4+AXOGUaKeUx2RJP10KaoUlRNLVcebTFlnQAtWrKcT7mWP2aW/ocM6/dQWTupL9XI7ovaMj29IdBBNb36ik8Jkx3XOjRVQeqwHZLrrdTef26MoBspd97UQ9JInJKYn9VH/jqa7AFLkh+R0ZgXIixPmlyH1Oztfe9v4hw3mv6o/A5gAE2sDxSWvX+8u7VR3zOLB1WAqp3Q3u6HBwg9t8W+8Sw3hPSvQ4SnO5Df1OVb/xBqdh+IIj8Vw5FpGpzrNfegRK3EMZ0fa4oOgfou5/hx2WsFHWWq/0vtHskJPUA/hJog== 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-SenderADCheck; bh=JPShVxRQDUpZAPhPFTaRQ/idyIedPXI+iSyt3sDWyfg=; b=BgXZ8Mrrz29VYyGKttJ3YnIM6xEFzWOA0z6zovSK0brtE57u0HNRUCmuhpl6ZKyZKVB+82N6Cm3yQfukBJNiQ+fAcJJwYvp4RKutvTyOIA4VtH9Ut/mvNDu3P6pRGFaZ4tKo5a7iMCUg1mzIX24siCuDRQ1j6PMN4hoEKxOc6OK1IM4oUCUeUFQvPCVEQCSXmiz25RVpo+rP+1Ajfxl+/NoqSzEfLeFcg1TMutipz/fCy7JK1i/2UejUb8i/gPH0MEIiJpesNbKWF4xBIEWjwHbPotqHTvB9s5YrONJKJ5aoyTm7SvL+mK0ekpeFm9a/GaGVrwkASirHqYrFT1ZUMg== 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=JPShVxRQDUpZAPhPFTaRQ/idyIedPXI+iSyt3sDWyfg=; b=dtj2496OspGMz4ycnXIVoooA6ElHN5Sa1eiNiKQnwSuu4IFp+orihkooaD2mXfZAuQv3aWy1YXuN3dG6yubRHnOQkgDJLEpFDIsjTb7t81PV0taK1Ziogs8WQf5KuLbU1BImVjYw2ze2r/w7tyBwz0XikIdXqUET69BspTEhkJw= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1753.namprd12.prod.outlook.com (2603:10b6:3:10d::16) by DM5PR1201MB2490.namprd12.prod.outlook.com (2603:10b6:3:e3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 14:55:52 +0000 Received: from DM5PR12MB1753.namprd12.prod.outlook.com ([fe80::1cf5:9c9e:7374:4540]) by DM5PR12MB1753.namprd12.prod.outlook.com ([fe80::1cf5:9c9e:7374:4540%12]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 14:55:52 +0000 From: Rodrigo Siqueira To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 1/4] Revert "drm/amd/display: Fix unused variable warning" Date: Tue, 12 Jan 2021 09:55:05 -0500 Message-Id: <20210112145508.1564863-2-Rodrigo.Siqueira@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112145508.1564863-1-Rodrigo.Siqueira@amd.com> References: <20210112145508.1564863-1-Rodrigo.Siqueira@amd.com> X-Originating-IP: [2607:fea8:56e0:6d60:24ef:ec9:b88:9a22] X-ClientProxiedBy: BN8PR16CA0011.namprd16.prod.outlook.com (2603:10b6:408:4c::24) To DM5PR12MB1753.namprd12.prod.outlook.com (2603:10b6:3:10d::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from atma2.hitronhub.home (2607:fea8:56e0:6d60:24ef:ec9:b88:9a22) by BN8PR16CA0011.namprd16.prod.outlook.com (2603:10b6:408:4c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Tue, 12 Jan 2021 14:55:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f36b4307-7954-469c-59e7-08d8b70a2829 X-MS-TrafficTypeDiagnostic: DM5PR1201MB2490: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dbs2kJmXKgAEOaR18eDYuFY+BxqrHAgG2h0WSgezvo7A4P8R4otcA9KujtAO/0W5yF7hH8wqyLs4gT377dLXBufxRAOwauBqmu7jnPnciTnIddhasISijgZ1fiwbDXgLe2BBJGOhykYStGeiMS+MoiONE80Zz+wmbT1+Yt42ZdqD0oZJNjICFfLsbGZBoGYZtgrOEogpvlmos7y74iIWP0BLNACJ/+ekxIbsV6qOvVqQ/+zUXAhChTroTKg0Aomgg2S2uG72wA8/yK+BBDCLQeqgs1DavKjO0G40ZuxfdPeLG7EO/2SwbDR/+6h1Cr1AhjDTY3DF6YWMNtbB3T+ouXE5jfvdw7VwAR6jMa2hsbkQBTywS1XvJ2j1iq1RWF2ESNPJeH9i9RcnNU21fXETVw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(346002)(39860400002)(136003)(376002)(54906003)(186003)(6666004)(6506007)(6512007)(8936002)(86362001)(52116002)(66946007)(83380400001)(16526019)(8676002)(5660300002)(6486002)(2906002)(316002)(4326008)(1076003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l7S+eZZ5zw8jOAa92eLG1htnB6M7whXD4FrTSvvW6Rb2GnjTO+61UzyWW22aUABy4fL+HUd9ok8t16 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 14:55:52.2810 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-Network-Message-Id: f36b4307-7954-469c-59e7-08d8b70a2829 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4SvAP/fCu4uzI6i1bP6WQjFiWWnawiuBn0y5VCbKi+i1OtlG+X+aTejbVj6wWUkM/dCz7wpyEi/0Lakh516LrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB2490 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: , Cc: Roman Li , Wayne Lin , Alexander Deucher , Bindu R Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit b5d8f1d02ba7021cad1bd5ad8460ce5611c479d8. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index de71b6c21590..1ebd83337e29 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8551,7 +8551,8 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) acrtc->dm_irq_params.stream = dm_new_crtc_state->stream; manage_dm_interrupts(adev, acrtc, true); } - if (IS_ENABLED(CONFIG_DEBUG_FS) && new_crtc_state->active && +#ifdef CONFIG_DEBUG_FS + if (new_crtc_state->active && amdgpu_dm_is_valid_crc_source(dm_new_crtc_state->crc_src)) { /** * Frontend may have changed so reapply the CRC capture @@ -8572,6 +8573,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) amdgpu_dm_crtc_configure_crc_source( crtc, dm_new_crtc_state, dm_new_crtc_state->crc_src); } +#endif } for_each_new_crtc_in_state(state, crtc, new_crtc_state, j) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h index eba2f1d35d07..0235bfb246e5 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h @@ -46,13 +46,13 @@ static inline bool amdgpu_dm_is_valid_crc_source(enum amdgpu_dm_pipe_crc_source } /* amdgpu_dm_crc.c */ +#ifdef CONFIG_DEBUG_FS bool amdgpu_dm_crc_window_is_default(struct dm_crtc_state *dm_crtc_state); bool amdgpu_dm_crc_window_changed(struct dm_crtc_state *dm_new_crtc_state, struct dm_crtc_state *dm_old_crtc_state); int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc, struct dm_crtc_state *dm_crtc_state, enum amdgpu_dm_pipe_crc_source source); -#ifdef CONFIG_DEBUG_FS int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name); int amdgpu_dm_crtc_verify_crc_source(struct drm_crtc *crtc, const char *src_name,