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)(478600001)(66476007)(66556008)(36756003)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GQoAzajVTg+6MaQAuEMr4M45TYzo5veS6QPb9U2bGI1lFuLBOfLtdACkXy5T8gJhyjz1DlkX6Ist9bqfA5G+lW2XkA06UMJBuXdWU9DQfuxBa4uk0JnRIs0KFWAo+b3jTkqVzPgaNu0DBO0AGe92vGB8rX6YROZDxaMgmzC567d0GvrRFG0qARGE0B3kKKm5ql9ZJlpBWc/tl2vMBcfHy0UKG28daPsM9JXDWLSAxoQACNmGz6Zq6Ry4HK0jieoqX6yqqySb9rr6+w090v7d4ktLWNur2cXYx4ZlyMUkXZF6I6esliPAHMwQhB4RRDWIFfrNzuuxGhnU2UEitddHx6gHReBo+rKGOwrhiiX/yi9RIAE73bpPn4Zwn2iaawOcN7ODTqdsOF2kzKPqIk9YC+Th/PLP6Vrmyql2ixckEb6X+D12XhVJ6qQXe9a35h+XD60oG74d0AsS+XYoK8xnWadjJrasvrq//qxySu13BdIpzxm+jN2VDsM+e3zh116sQ6N/tcjDPODcSxVBIi8oGWbbJl2sA96g4AgsBHYxLV1fNL9fFQglpL3PWq6hUaUqDYwKng7sE4OkLRqjAEgQMl/fcjRGT6Ep3xavq9dUuIyNA2vnoa9lndF6ftwhfnF88Zo+bFnZ1Pusf6anJAyJyRo4vd4VjkMxa+keUFh5iKO8WbWWA5lb9O7r0f2YpYY4Wlkflndgt8BoP9u9KF2B9Ue8M6L2pK4VrPmGRqI/zSkw5i88+U1iE6UpkosccaJzo+AebgRIa3MgAaHrDz5EFV3XXwpIxkHQorP2xfx6cfdHCFw9z8yODaWld04p64zm2gM0FcM8RWXuLLTIt2S65Z/UTT2dRmRppgjoTFEPHVy5AQ+7BwCM7NN2Mj13AU3z+GvzkuYGNv6YptYwbApPtSi6soJEtQES5Aj8t4PMheIjCuC8+F9ypo0Q1sjrIb+cTpoBbCoV+PbSYleW0NiA+V9nVzCU+j9BmyrPOSSp5vBPsd0Sibl7S+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, From patchwork Tue Jan 12 14:55:06 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: 12013673 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 5C437C433E0 for ; Tue, 12 Jan 2021 14:56:02 +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 F0EBB221EC for ; Tue, 12 Jan 2021 14:56:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0EBB221EC 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 20B7C6E25B; Tue, 12 Jan 2021 14:55:58 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2049.outbound.protection.outlook.com [40.107.244.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 411626E25B; Tue, 12 Jan 2021 14:55:56 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G+mvxTX/S/vKJHlFQpPbglJV2j+fRejKiqhcHq1q9zRiB8WnhEg1PVnlFRGqC9KdtYzNKTu4MGKlg690ZzTgVUopp4mICy3+zQVFmEXwgWErJ0hv24mHwrApUpQxYGhiGTGYfW1ySqRqFs4FN9oafl/q8KxefRwbMM51buBquj1grw0gyco9LD/etUZxo1B/7R65iaoHhJcuj+ktCkrFd5Zlobq3lpHeOSPsPdDPJWpmWJO57ETMhAJdwK9TzgJ2PKVh68z8/OTrE+2iaJP7t46XKItnvIQ5lamjxgnNJJ788xDVf69o7aO3t6JPwDd5CuacwdleWiy55dovXBElnA== 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=WwIszL8A/+On9SwObMmJaIEM2V2yKaP9m0XTnGrKcHQ=; b=QKSCl2FY7uK8wyRPm+pg30QL1zrtPaJRAcDmJ8KUT1IdbQZ3WVJwVnL0XzKRSiIt5pXhG4IzRv0P4iBoYzPp8JgXLEWymqC8lMi+Laszte2ymg3GS9keAB/d85d/+6DZgbmARtD6pr8cCd36mdHk6OlImjP8amVgNK0QS5e4A6fg+g8RhSXUqA0dVdZGv2SUwgVJGKPEgXjrZi6v+xl2N1Ky3+Oe2zt0G53RDzovzgBjQujENwXNvtOFjkWedwoSEEDM51CwsZk1SZlrqxprSDbFgepoWSOf8K1V/YYUdI0sMAgv0pfBM45IB5MDM8VsmSLWw4WBna6BrFpd0VVj+Q== 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=WwIszL8A/+On9SwObMmJaIEM2V2yKaP9m0XTnGrKcHQ=; b=Rs1ae4Zco7vFFIDqFoKdJypLvr3YTGZE3vcMIur0yysLrn3/uDTH1F3Nitj/3O0MRrMsHqEAXMmHDtvni5QpXpu0OZF/sKi/wa68eKWS/NAY8F8Rj4USEHIR9dIdFMbj7Xb8NrWrK7Wz6N13V7di0x5S1qH6lS5SZdQTI004VIU= 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:55 +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:53 +0000 From: Rodrigo Siqueira To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 2/4] Revert "drm/amdgpu/disply: fix documentation warnings in display manager" Date: Tue, 12 Jan 2021 09:55:06 -0500 Message-Id: <20210112145508.1564863-3-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:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f5f85b07-52b8-46ef-f234-08d8b70a28e4 X-MS-TrafficTypeDiagnostic: DM5PR1201MB2490: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:131; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MmYKkDh3lB0ioCkiBvz5/H6cd0xZwT0O7gzkx08wJCGHwRB2qt/eC8bcviuvq5siXH82dGRKt7g25aBGlWjTbHzXpAP+NBAxQSxSoF6hlfbFkQzRhuxA0VKyhXa/V5uf3rHPBmUmbdcTDiu0CNi6T2oFbpjbgAN5GY4OU+/s6x2t6gOKQqaTwBuGPwXTzoNDYCEGq7gxOPMNDVmbBbSy0lVB8Lra6E7diBU9k3y7JNUt6FWvSUnVJ8hkkOptxPiEXUhsh/Fn4IhgBFQ4HfC5tufP1ca7jRGUko8XFgnEHNUKHuymH42Ib+LjzWsSW1EjoT5bWa4cKUYjAZFhCuGfdzUyaUCxzwSt+B22RqTFIAIdyYj37fQiHJsf7PS7dPOavYPkmOIidjjOme11zc+jdg== 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)(478600001)(66476007)(66556008)(36756003)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: gmALUrp1gHooZApCNckYTdJfZ9csz5Afk7RN1ucuUr2xl2CtwFQmXKkxLGhdbfPbWXkKBRugfoWob588raaAED9u53umuUy3dXyfeabX+cfyVjtWsGeZzmw/VQG6QiSeEoP5o+G7E3sV60/fj1YD0WDfyDStTfIZYGXXu3U8lY98pgqPrcToFfJLz1bLVD0tv9VPxNkRbRk44S9qVMC52MeQCaxd+iN3q4rzwG1/IM3uNIHmcjt55YVjyZtwXofLhbCis2fNXVknCkY1ZHbLQrxJ4mVk2sxZw7HLe0yrGhGPUHAJhTns6xdK6A/hBizNTYpgYL3Z7QKP6NnI/FJbgkFBaDemtRrQZYpUr0a7G9SI1yCI3RmqxVOnwb1RpKXu8V7o1uzx0nqPNVrLgJH0PD3qh5JixKRKyTyChQC9Opr7sT4ktrFgzpsSKGpHgbGMR93Md6yHg1L+B97nKQfCLP+nE5QJziky0FmTcH5Ch6K5MUG+cefxHNXTnzUx8pZCjzqDAcXbJZtAWQNCyL3+yntjuAQUOvgrmZNVlBjZM30HrB/Rm3hHIvFZNqITCobRQ2FhgHgXG975ZnLQq93V5bkXfEjubTsGiiUmgkxeB46JXjFLWjaW8qanOxjW0scEh2Qc1wfOq88+nDr8vRhiNEzsTdji86bH+MeExx68NLfwgUeYOo6ups6D9rXwIM+5gYbNeaRBee0BCX8ysv1bqiAJ8YYBmg+s0W3y5NQLlyBpUxDuTv5eieg+2qOWbsQU5zHC+BpmSImCNm9UE3LkXZ4jktAvUGfXydCCtKFwdCWcmwS7XzCKWhfnw+YBB5Yw2h8dizRYif7eOBqua/rmwMxmqeNnciBU91cg77IDAS0IhnNAMWksj6t4FRWhgQIL06iXyMuCs+VLgmqI4ARJ5fxqa6hWqJdXu6vY0EooXr3A4kyV8IdaM3Ut7Ttx0HSatC5tBHtJi7Gc5gbDjJYpTOFdNC2+jWnsSXgq6RXHA/WFXJmaL80aUqzQU4mkGHS3CUbYbAnjzB5b8jU+hm2n9BIQ7gZEsReQDMkkFtBofZOiKnSN1SJKTE3SXPwKQyXN 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:53.5384 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-Network-Message-Id: f5f85b07-52b8-46ef-f234-08d8b70a28e4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hp6tehTujkXLb1DpLGB0H1RofVkVF9NDWUOneUtMnyf/mseQulNwmPdku4rbXvcDGUJNy4lA2oAgQ6krD9UczA== 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 1206904465c8a9eebff9ca5a65effc8cf8f3cb84. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 68df94a8b609..2a370d6a5a26 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -344,29 +344,10 @@ struct amdgpu_display_manager { uint32_t active_vblank_irq_count; #ifdef CONFIG_DEBUG_FS - /** - * @crc_win_x_start_property: - * - * X start of the crc calculation window - */ + /* set the crc calculation window*/ struct drm_property *crc_win_x_start_property; - /** - * @crc_win_y_start_property: - * - * Y start of the crc calculation window - */ struct drm_property *crc_win_y_start_property; - /** - * @crc_win_x_end_property: - * - * X end of the crc calculation window - */ struct drm_property *crc_win_x_end_property; - /** - * @crc_win_y_end_property: - * - * Y end of the crc calculation window - */ struct drm_property *crc_win_y_end_property; #endif /** From patchwork Tue Jan 12 14:55:07 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: 12013675 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 46C85C433E6 for ; Tue, 12 Jan 2021 14:56:06 +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 00CA8221EC for ; Tue, 12 Jan 2021 14:56:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00CA8221EC 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 C7BF86E2A3; Tue, 12 Jan 2021 14:56:00 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2045.outbound.protection.outlook.com [40.107.244.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 41E326E296; Tue, 12 Jan 2021 14:55:57 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fG/0+61KD8MGaTdPlR0+JBkFfThPJc7eMQPdHJ7azlMjmOWTFjGOyQQ7ReCKdM52hcIaYFPcbzG1HbIuExStpcj67AO8qh02TQSUVqrcxRXu6UYpxHBLieL6ptb7xIg94GKuNNBC6hxALWAOlCRfUordVvwNvKFMB/qSSIYmnIbvOeOgnIyrZogweVcoLll3bafl8ypyEzoRIWPGcXoFC8QyrpY3YQB6tQvoxZOcssl+o0aYfZNl5Bn7Qiq9VicMyQqhw7bOe7DwO8L5hMmJBoAiDeJXt3sBw7lipVOUYJTnR5d3Bb7gAv+gCWw3JraAveLyodfmiKNFVrQbmExtQw== 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=oCHd40TxyFOTHxmQBSo7ZzU6P1r/ou7UfFpEANxIHU8=; b=nZNUSsugpA211xmdlFaIc9dlTQuBWq3nixnbfpHnvaONq9Q7VWSpADpYN6eAmtuDmg89xirO8DWhK0XQJI8sXczDXS2IhT25DCZlWglWVt6/R2JzHwzLWuVVEvD1B/kr/arUgcR2NBlZumoWDyQ41YwhaiJZ+xBM2i5bSXLHd6lGKPZQZ2gGSFZvilXx3ueMnR2Yv5909WsO+hYdHPWCXnO4I16+IklwarQLwnomiMf+b8+ATud7E3R1M7CLEIDPeoJEN/yZMbGrlMyL5eYl4YFRYkhcQb91IBKrFsMQIArLk7P9lgdr49g2+OkgWhP0CWsEn1h08Y8aLvr4QQJ9sA== 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=oCHd40TxyFOTHxmQBSo7ZzU6P1r/ou7UfFpEANxIHU8=; b=QcxKF5W6fWlw0W7DGYYgeNhZ7jbWDeYZviwYx5f2FI7+FcuCw9aLMm7hcjzZIdwB2ORS44sTVD3MlC0ackJqrymnB7ubByoQ9W3GYyKF7GqOhJjKl5UOSwSPjcatYyqZgpN7vb7HKD3NbbCWTa+yq09I+Iih6YRUfs1wgf5ugUE= 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:55 +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:55 +0000 From: Rodrigo Siqueira To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 3/4] Revert "drm/amd/display: Expose new CRC window property" Date: Tue, 12 Jan 2021 09:55:07 -0500 Message-Id: <20210112145508.1564863-4-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:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6794c571-afa4-420c-61fb-08d8b70a2a25 X-MS-TrafficTypeDiagnostic: DM5PR1201MB2490: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:469; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: odtYpnw9yYxfUaBzVbV5oQlJEat9waJbtBKoCERDNFhp0WY4kJAjdI/LZH/0iBAbxHnX2+ouuZRvDtP24uuOfWkvV0ojDxlNpGRaKoJxIT4CPW4XYva80uIJL8YDrkxI/jMUtwoSNTgBdVEQigH0kWkKcbtTe1/fjITjyiBQcIa6H8wVDLF390tAEM09aceBk+9TP38GaJwPiYqRu6U6HGQrAtlcP0zd+YVFHAcwPtbeOOKOYgeWrLy6rrELmRzWZ8mDR0ZHUEUabbm+x0JM4Bm32Dq5rbMOhT4aFDdVJ4r5JBMEkO7ECKZeBDTVfpX45VF2uzdc8SX7OyhxBhQSSJv3Vj6gzA0+yABLOs9RcRHtRo3vtYe+7KW+Bkx/ySnIIzEmBAnh4dfZxP1RciLKGw== 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)(30864003)(86362001)(52116002)(66946007)(83380400001)(16526019)(8676002)(5660300002)(6486002)(2906002)(316002)(4326008)(1076003)(478600001)(66476007)(66556008)(36756003)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IaVUkV1gpMl9xhbJd+UWEFeOjKGCuGEQ3Z11M+1CnqSmz75bDsd1I2B+OXeRybO/HF2O/DfUssM+ETLIBeP+WzjCnuMqXcaI26ZtwEDu6nlp3NA7akBKCs3KGQk3F3bNucs5ymZhSQUpScXX362DJDDY0+FsZihU9Zl9AkjHnm4KFG1m7OecMeaDI7KB0fPT8v7tIZxwzeMplPMDycd1/lzQw4X0x5MgBWwLggEdWmIwgNp1O5jHhB6e26NDf+THs7pLPLvBvwGgxKAm3YUr6hE03CS6pxhn3SBrH8fPpoEaOiWXX6hnJPAqQKIVmr/7uosw/H17SCM60wzotu1d+sV6zKOCeYmflXR1Zz2jlffPL7F0AcarmYW5KczJE2GV1ejuMjn9sGpcRgSfrNv4VC/dcbUt2u3T+H/NPCLKg2nqwO9Sa63ZicrO7/rrda3ndaY0MUdeK4CdLgWY4WxVefLn/1Ily+eor9LRBUwFbLdx9QXIOC4Rsa8PADJSFm2sUKIQWxZ88iFhVZspgCqOh42XcyogrpbwvuRzQtUuQfRIuG27TqbMVooSNL+ST3Sl4tyEff3sED1tMotkopQaxfYrOHLVjibdJqQmF2/r3wKSFzPZ6Abj7ldfumwfk3si+xWdP8+r/Aw9IoHKJzjOy0B1Uno+ZvoZicdcUSdv6WbmsQB+3StZNk/iEyGW39A5UOED3DZJmh0OVgSVq2X48cm/j73xGCNmitnzwtiAvtnSnjLHzRA11HakUEmBuHjXLQR4W8mkUdMnR1TcFO/G0jqJz0gm8WNSq8BQnppGYbahXSngkJtQSBurX+DmF08pKEIzSTX2HRm3bZ31uRTPfRcxj2/bYkk919PfC975PWAfcQ56l10EfJLomkwwCDOKldIQhA557f2W+Bvp99+XvyhA1n6c/BydgABLuPOyKRMliFsA5qeVhs1Ha30qR1SIyb1jmrIBfTzM7dP+t66DyLGNjvj9jAYkaZ+BXSHN1wK4QjV0wRcDOc6NIv5Uj1/1B/BOj7d8WbQy2Rt4c6+w73bCVJ4npNCD1YWQids8oK/btEiCnoiNh63QsOPEO/1m 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:54.8968 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-Network-Message-Id: 6794c571-afa4-420c-61fb-08d8b70a2a25 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c0AlgnpYMReaoPDColrMEJIfPl8MESACJoFlJlh5HZdGiPvC2320JWdV2+R8x3bJwdonM0iVHFcGAx+Qksz+Dg== 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 110d586ba77ed573eb7464ca69b6490ec0b70c5f. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 142 +----------------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 19 --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 56 +------ .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 3 - 4 files changed, 10 insertions(+), 210 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 1ebd83337e29..3f1e960b1d84 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -938,41 +938,6 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_ } #endif -#ifdef CONFIG_DEBUG_FS -static int create_crtc_crc_properties(struct amdgpu_display_manager *dm) -{ - dm->crc_win_x_start_property = - drm_property_create_range(adev_to_drm(dm->adev), - DRM_MODE_PROP_ATOMIC, - "AMD_CRC_WIN_X_START", 0, U16_MAX); - if (!dm->crc_win_x_start_property) - return -ENOMEM; - - dm->crc_win_y_start_property = - drm_property_create_range(adev_to_drm(dm->adev), - DRM_MODE_PROP_ATOMIC, - "AMD_CRC_WIN_Y_START", 0, U16_MAX); - if (!dm->crc_win_y_start_property) - return -ENOMEM; - - dm->crc_win_x_end_property = - drm_property_create_range(adev_to_drm(dm->adev), - DRM_MODE_PROP_ATOMIC, - "AMD_CRC_WIN_X_END", 0, U16_MAX); - if (!dm->crc_win_x_end_property) - return -ENOMEM; - - dm->crc_win_y_end_property = - drm_property_create_range(adev_to_drm(dm->adev), - DRM_MODE_PROP_ATOMIC, - "AMD_CRC_WIN_Y_END", 0, U16_MAX); - if (!dm->crc_win_y_end_property) - return -ENOMEM; - - return 0; -} -#endif - static int amdgpu_dm_init(struct amdgpu_device *adev) { struct dc_init_data init_data; @@ -1119,10 +1084,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) dc_init_callbacks(adev->dm.dc, &init_params); } -#endif -#ifdef CONFIG_DEBUG_FS - if (create_crtc_crc_properties(&adev->dm)) - DRM_ERROR("amdgpu: failed to create crc property.\n"); #endif if (amdgpu_dm_initialize_drm_device(adev)) { DRM_ERROR( @@ -5456,64 +5417,12 @@ dm_crtc_duplicate_state(struct drm_crtc *crtc) state->crc_src = cur->crc_src; state->cm_has_degamma = cur->cm_has_degamma; state->cm_is_degamma_srgb = cur->cm_is_degamma_srgb; -#ifdef CONFIG_DEBUG_FS - state->crc_window = cur->crc_window; -#endif + /* TODO Duplicate dc_stream after objects are stream object is flattened */ return &state->base; } -#ifdef CONFIG_DEBUG_FS -static int amdgpu_dm_crtc_atomic_set_property(struct drm_crtc *crtc, - struct drm_crtc_state *crtc_state, - struct drm_property *property, - uint64_t val) -{ - struct drm_device *dev = crtc->dev; - struct amdgpu_device *adev = drm_to_adev(dev); - struct dm_crtc_state *dm_new_state = - to_dm_crtc_state(crtc_state); - - if (property == adev->dm.crc_win_x_start_property) - dm_new_state->crc_window.x_start = val; - else if (property == adev->dm.crc_win_y_start_property) - dm_new_state->crc_window.y_start = val; - else if (property == adev->dm.crc_win_x_end_property) - dm_new_state->crc_window.x_end = val; - else if (property == adev->dm.crc_win_y_end_property) - dm_new_state->crc_window.y_end = val; - else - return -EINVAL; - - return 0; -} - -static int amdgpu_dm_crtc_atomic_get_property(struct drm_crtc *crtc, - const struct drm_crtc_state *state, - struct drm_property *property, - uint64_t *val) -{ - struct drm_device *dev = crtc->dev; - struct amdgpu_device *adev = drm_to_adev(dev); - struct dm_crtc_state *dm_state = - to_dm_crtc_state(state); - - if (property == adev->dm.crc_win_x_start_property) - *val = dm_state->crc_window.x_start; - else if (property == adev->dm.crc_win_y_start_property) - *val = dm_state->crc_window.y_start; - else if (property == adev->dm.crc_win_x_end_property) - *val = dm_state->crc_window.x_end; - else if (property == adev->dm.crc_win_y_end_property) - *val = dm_state->crc_window.y_end; - else - return -EINVAL; - - return 0; -} -#endif - static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable) { enum dc_irq_source irq_source; @@ -5601,10 +5510,6 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = { .enable_vblank = dm_enable_vblank, .disable_vblank = dm_disable_vblank, .get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp, -#ifdef CONFIG_DEBUG_FS - .atomic_set_property = amdgpu_dm_crtc_atomic_set_property, - .atomic_get_property = amdgpu_dm_crtc_atomic_get_property, -#endif }; static enum drm_connector_status @@ -6831,25 +6736,6 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, return 0; } -#ifdef CONFIG_DEBUG_FS -static void attach_crtc_crc_properties(struct amdgpu_display_manager *dm, - struct amdgpu_crtc *acrtc) -{ - drm_object_attach_property(&acrtc->base.base, - dm->crc_win_x_start_property, - 0); - drm_object_attach_property(&acrtc->base.base, - dm->crc_win_y_start_property, - 0); - drm_object_attach_property(&acrtc->base.base, - dm->crc_win_x_end_property, - 0); - drm_object_attach_property(&acrtc->base.base, - dm->crc_win_y_end_property, - 0); -} -#endif - static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm, struct drm_plane *plane, uint32_t crtc_index) @@ -6897,9 +6783,7 @@ static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm, drm_crtc_enable_color_mgmt(&acrtc->base, MAX_COLOR_LUT_ENTRIES, true, MAX_COLOR_LUT_ENTRIES); drm_mode_crtc_set_gamma_size(&acrtc->base, MAX_COLOR_LEGACY_LUT_ENTRIES); -#ifdef CONFIG_DEBUG_FS - attach_crtc_crc_properties(dm, acrtc); -#endif + return 0; fail: @@ -8540,7 +8424,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) */ for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); - bool configure_crc = false; dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); @@ -8550,30 +8433,21 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) dc_stream_retain(dm_new_crtc_state->stream); acrtc->dm_irq_params.stream = dm_new_crtc_state->stream; manage_dm_interrupts(adev, acrtc, true); - } + #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 * settings for the stream. */ dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); - dm_old_crtc_state = to_dm_crtc_state(old_crtc_state); - - if (amdgpu_dm_crc_window_is_default(dm_new_crtc_state)) { - if (!old_crtc_state->active || drm_atomic_crtc_needs_modeset(new_crtc_state)) - configure_crc = true; - } else { - if (amdgpu_dm_crc_window_changed(dm_new_crtc_state, dm_old_crtc_state)) - configure_crc = true; - } - if (configure_crc) + if (amdgpu_dm_is_valid_crc_source(dm_new_crtc_state->crc_src)) { amdgpu_dm_crtc_configure_crc_source( - crtc, dm_new_crtc_state, dm_new_crtc_state->crc_src); - } + 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.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 2a370d6a5a26..3e78baf59b33 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -343,13 +343,6 @@ struct amdgpu_display_manager { */ uint32_t active_vblank_irq_count; -#ifdef CONFIG_DEBUG_FS - /* set the crc calculation window*/ - struct drm_property *crc_win_x_start_property; - struct drm_property *crc_win_y_start_property; - struct drm_property *crc_win_x_end_property; - struct drm_property *crc_win_y_end_property; -#endif /** * @mst_encoders: * @@ -436,15 +429,6 @@ struct dm_plane_state { struct dc_plane_state *dc_state; }; -#ifdef CONFIG_DEBUG_FS -struct crc_rec { - uint16_t x_start; - uint16_t y_start; - uint16_t x_end; - uint16_t y_end; - }; -#endif - struct dm_crtc_state { struct drm_crtc_state base; struct dc_stream_state *stream; @@ -467,9 +451,6 @@ struct dm_crtc_state { struct dc_info_packet vrr_infopacket; int abm_level; -#ifdef CONFIG_DEBUG_FS - struct crc_rec crc_window; -#endif }; #define to_dm_crtc_state(x) container_of(x, struct dm_crtc_state, base) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c index 7b886a779a8c..c29dc11619f7 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c @@ -81,41 +81,6 @@ const char *const *amdgpu_dm_crtc_get_crc_sources(struct drm_crtc *crtc, return pipe_crc_sources; } -static void amdgpu_dm_set_crc_window_default(struct dm_crtc_state *dm_crtc_state) -{ - dm_crtc_state->crc_window.x_start = 0; - dm_crtc_state->crc_window.y_start = 0; - dm_crtc_state->crc_window.x_end = 0; - dm_crtc_state->crc_window.y_end = 0; -} - -bool amdgpu_dm_crc_window_is_default(struct dm_crtc_state *dm_crtc_state) -{ - bool ret = true; - - if ((dm_crtc_state->crc_window.x_start != 0) || - (dm_crtc_state->crc_window.y_start != 0) || - (dm_crtc_state->crc_window.x_end != 0) || - (dm_crtc_state->crc_window.y_end != 0)) - ret = false; - - return ret; -} - -bool amdgpu_dm_crc_window_changed(struct dm_crtc_state *dm_new_crtc_state, - struct dm_crtc_state *dm_old_crtc_state) -{ - bool ret = false; - - if ((dm_new_crtc_state->crc_window.x_start != dm_old_crtc_state->crc_window.x_start) || - (dm_new_crtc_state->crc_window.y_start != dm_old_crtc_state->crc_window.y_start) || - (dm_new_crtc_state->crc_window.x_end != dm_old_crtc_state->crc_window.x_end) || - (dm_new_crtc_state->crc_window.y_end != dm_old_crtc_state->crc_window.y_end)) - ret = true; - - return ret; -} - int amdgpu_dm_crtc_verify_crc_source(struct drm_crtc *crtc, const char *src_name, size_t *values_cnt) @@ -140,7 +105,6 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc, struct dc_stream_state *stream_state = dm_crtc_state->stream; bool enable = amdgpu_dm_is_valid_crc_source(source); int ret = 0; - struct crc_params *crc_window = NULL, tmp_window; /* Configuration will be deferred to stream enable. */ if (!stream_state) @@ -149,25 +113,9 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc, mutex_lock(&adev->dm.dc_lock); /* Enable CRTC CRC generation if necessary. */ - if (dm_is_crc_source_crtc(source) || source == AMDGPU_DM_PIPE_CRC_SOURCE_NONE) { - if (!enable) - amdgpu_dm_set_crc_window_default(dm_crtc_state); - - if (!amdgpu_dm_crc_window_is_default(dm_crtc_state)) { - crc_window = &tmp_window; - - tmp_window.windowa_x_start = dm_crtc_state->crc_window.x_start; - tmp_window.windowa_y_start = dm_crtc_state->crc_window.y_start; - tmp_window.windowa_x_end = dm_crtc_state->crc_window.x_end; - tmp_window.windowa_y_end = dm_crtc_state->crc_window.y_end; - tmp_window.windowb_x_start = dm_crtc_state->crc_window.x_start; - tmp_window.windowb_y_start = dm_crtc_state->crc_window.y_start; - tmp_window.windowb_x_end = dm_crtc_state->crc_window.x_end; - tmp_window.windowb_y_end = dm_crtc_state->crc_window.y_end; - } - + if (dm_is_crc_source_crtc(source)) { if (!dc_stream_configure_crc(stream_state->ctx->dc, - stream_state, crc_window, enable, enable)) { + stream_state, NULL, enable, enable)) { ret = -EINVAL; goto unlock; } 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 0235bfb246e5..f7d731797d3f 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 @@ -47,9 +47,6 @@ 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); From patchwork Tue Jan 12 14:55:08 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: 12013677 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 A8E57C433DB for ; Tue, 12 Jan 2021 14:56:08 +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 5C041221EC for ; Tue, 12 Jan 2021 14:56:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C041221EC 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 5F53A6E2C7; Tue, 12 Jan 2021 14:56:01 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2045.outbound.protection.outlook.com [40.107.244.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5EFD56E29D; Tue, 12 Jan 2021 14:55:57 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R4EvzTrfm+U5wV+0FXM9dzvOYgFBHax+XvhjlP4HYkxlYy9/DrP6m4ho+mCKWWPu3W+wGwnlN8K/WaAbfPR7vT9akuT2dgAfo5FpYJOMvp1dyft68nZZ00xpF4uOdRGhPpwq0ojRjrF7b96otRsHaxMTsOVJAkcXO+nJ66DL3grpeUcYUyBOyOVUFsqSZSDlor8M1PVBgCdqggkAbyupa6EvuIRd1Ojnz5vAvIP2RzujKSFBch1ufUIGhjw1V1uM19HWWOkKV/ebGFrKo0XF82zjLQ3NILGDwDTv8YO8bIdhZmm00U0crHfKAD4IAgsoDcoo6CodG4IXF3cYs1OFXA== 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=N7Xl0Tw/H21ojFBvnOx7TqiJF/N1NxVha6E18Pm2PPo=; b=aOvwLzCo4FfGNLWI2Uu6DhCoFkoxCUgA2TX/2B4cmFwpjPFmXXgHZOzK8tFMv/rVphCxZ8y2k6Q0JBVetWqOQk33WV+cbbBKouipdp/SSn4FFryxal9hvuG0fchh7QFPGj6k+rDg0IfFkmvAii/kbj7WlXMH+SuehaRl6ekY58NKYQGgH0QCH1k4huER7QylJE6wscDZXcI9s2fOVhxkzuQq3guTsKHaxcBVuyfPVlhHj7QIzvhfuKeEqc5f1ZdrqKtKuypKv4rl2+/HdigFQW4DMjPohYcHalRfkXBetXRBx9ng9ytCl1VhLyWe3HMJ5A4olwLAiCWJozMejS3ywA== 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=N7Xl0Tw/H21ojFBvnOx7TqiJF/N1NxVha6E18Pm2PPo=; b=ihBbNQkQvptKY313ki8nlY159sIhLhO1CuMu1xn1jYUZ+PHvUFJtCTZAyPs9aRkAWm23q5M55Epv74UgbHcvRiV7WDs5HYHNvOnEBqxHY1cO9K9JeEIYGtsT3wPFnETtL5Z4BfsjQOG2ISl4S7Zj/hxqcatATfUqd+2GwMFzpWs= 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:56 +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:56 +0000 From: Rodrigo Siqueira To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 4/4] drm/amd/display: Fix to be able to stop crc calculation Date: Tue, 12 Jan 2021 09:55:08 -0500 Message-Id: <20210112145508.1564863-5-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:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a82ad742-d5e2-45e5-a7ae-08d8b70a2a81 X-MS-TrafficTypeDiagnostic: DM5PR1201MB2490: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oK0Fsh/JxVAXkehV59dV0AHjLv0t44fkzcnPQYOY4qnyzisY+WRMhP0H9z13+soqYGLCRoRXIdMkM4Npjp7TBeuNb0yC2kZcTa+0DhBX3zCGloDMG5Q0/X3ddS4MOvkoOIQItMAecAE3lq2NBRl/jpBzVoGRPauWQPx/UqeG3zeT+Roj1vYF6AaNa53vO5k7nzlQ99fwuCXG84GEz2EaZJgbWAestVCAPmFLV0/8N/tECkA8Q1WpvCG6vyus722ZA0FnTH/ntechoOotKQoBsiYxxdZp1PNwwUR5J7/Lbm/BSB6DvTEaW8GJhRL38isT0CA1bl4qF0gz67sEthL5yXCjRaVyzwHg0bR+mA8F+PhDiGVKqP9s6CC25RtoFVkv/OlaiLNZHgO9VMrPnol77w== 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)(478600001)(66476007)(66556008)(36756003)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YALokEVMJTnepLXXvpq838il6LMYbNxcK7/CAv6MqSsH/TdSnLPcMfuTU1lfIyjgSqf7q36vC9vKeMIQbpn9nx5iFy/XLH5Jo6MmEm+asMBsSh2xu0DvLjGyeZRFcbNnFouYC4OvjVWJIEnYqGKTTCKzRHIEig4CXdo0YGi1Dr283jy9UWbbEwwuO+J2Go2+tjzzRrf+LdV8kB208dBrkOB5AADUnqSakXhf2H47YXORs88x32tMo93YA5yMkeBRy0B+kPaU0Fn2COK/pFgNBzuwthAWFULpBKrPpOH9zFzq8Bc1I2v33i+kZZJP7glTfJel+VEUXFVM+EMFt+jidH7rRVe5CdAT5Ff2t/6AjTdhR2UFFuS2NrCEn3RCVFQqdcxMmvG9Nt3l0PBmKbDnPL2S0e4uwPtjgb/mTvJIvyenITt78v009cxd56MKIpSDhlF60XE3x0Ehh0RZYHHeIRffE5/rjSR9A5zWj1K54YSKuIMHHcaPNidPe7p7JSuTTupsgmSGNRvzqCricGGCbkrPtutInJCV7WEyE2FlcpSUac6O3D3OI5vT4H9iF/bvp1ZFvfgFOiuh+X6CiVmI2dkOm908jKLx1h+c87ahPOh+tLYTzvzst/X16ccEBKNsKt1yKto6cE13fG1cU/TrSzvK7xdjOtG38FL22tCPHrhYEi9Qm5cHnwBHncGv7iJNiqWiGWLIrhmfjWyKET0W5e8Nc9BAQn6CyUjckZLm8AxUWaS6gdp3MkVFlGP02PsKmfh6ktG7lMw0Ie34Sun+SHeP6gtCyCUrHEVOUXkV7MyXj+TvBkuDTJHRVBE+gMpb0E9Kl3ekBQ7XWeLvBHCbSxKDpJRioP5wPkrV3e+3P1KRwwjqKe+M5gu69zFqv35wA1FfC4S5ES37D8IcyVc0kT4yXVN+Ebd+PMgxxqgZZu0HhB46vEYx2sdvuvNamrqBmbRDfpg5O4ZOnop31ceeANxKr20sRdZ2XvkFevzc+xI+vd16qNARkgCWuxiEKFdYJ49VH24EuYQP90LS6xBkgU1atwdfBO9003Ko3OmxaqgND3ESxkFWogG4RVaRksUM 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:56.2012 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-Network-Message-Id: a82ad742-d5e2-45e5-a7ae-08d8b70a2a81 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4s0Sd2sJPL0+7TQ7kckRR6Tgohi2MsL5M+6jd1KNOSAUwx0RnDTPMjpzi+8KOJTZexFqK59PPCG238tmai1xrw== 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" From: Wayne Lin [Why] Find out when we try to disable CRC calculation, crc generation is still enabled. Main reason is that dc_stream_configure_crc() will never get called when the source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE. [How] Add checking condition that when source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE, we should also call dc_stream_configure_crc() to disable crc calculation. Signed-off-by: Wayne Lin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c index c29dc11619f7..66cb8730586b 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c @@ -113,7 +113,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc, mutex_lock(&adev->dm.dc_lock); /* Enable CRTC CRC generation if necessary. */ - if (dm_is_crc_source_crtc(source)) { + if (dm_is_crc_source_crtc(source) || source == AMDGPU_DM_PIPE_CRC_SOURCE_NONE) { if (!dc_stream_configure_crc(stream_state->ctx->dc, stream_state, NULL, enable, enable)) { ret = -EINVAL;