From patchwork Thu Mar 14 00:20:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helen Mae Koike Fornazier X-Patchwork-Id: 10852019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 71BDA17DF for ; Thu, 14 Mar 2019 00:20:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 508792A0A4 for ; Thu, 14 Mar 2019 00:20:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E0CB2A0B5; Thu, 14 Mar 2019 00:20:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD5C72A0A4 for ; Thu, 14 Mar 2019 00:20:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbfCNAUw (ORCPT ); Wed, 13 Mar 2019 20:20:52 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38110 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfCNAUw (ORCPT ); Wed, 13 Mar 2019 20:20:52 -0400 Received: from localhost.localdomain (unknown [IPv6:2804:431:9719:798c:867b:ebff:fe52:de60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: koike) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2BF1B26016E; Thu, 14 Mar 2019 00:20:41 +0000 (GMT) From: Helen Koike To: dri-devel@lists.freedesktop.org, nicholas.kazlauskas@amd.com Cc: andrey.grodzovsky@amd.com, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, Tomasz Figa , boris.brezillon@collabora.com, David Airlie , Sean Paul , kernel@collabora.com, harry.wentland@amd.com, =?utf-8?q?St=C3=A9phane_Marchesin?= , Helen Koike , Sean Paul , Sandy Huang , eric@anholt.net, Alex Deucher , Bhawanpreet Lakha , "David (ChunMing) Zhou" , Anthony Koo , amd-gfx@lists.freedesktop.org, linux-rockchip@lists.infradead.org, =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Rob Clark , =?utf-8?q?Heiko_St=C3=BCbner?= , Leo Li , linux-arm-msm@vger.kernel.org, =?utf-8?q?Chris?= =?utf-8?q?tian_K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, David Francis , Mikita Lipski , Maarten Lankhorst , Maxime Ripard , freedreno@lists.freedesktop.org, Mamta Shukla , Daniel Vetter Subject: [PATCH v3 0/5] drm: Fix fb changes for async updates Date: Wed, 13 Mar 2019 21:20:21 -0300 Message-Id: <20190314002027.7833-1-helen.koike@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, This series fixes the slow down in performance introduced by "[PATCH v2] drm: Block fb changes for async plane updates" where async update falls back to a sync update, causing igt failures of type: "CRITICAL: completed 97 cursor updated in a period of 30 flips, we expect to complete approximately 15360 updates, with the threshold set at 7680" Please read the commit message of "drm: don't block fb changes for async plane updates" to understand how it works. I tested on the rockchip, on i915 and on vc4 with igt plane_cursor_legacy and kms_cursor_legacy and I didn't see any regressions. I couldn't test on MSM and AMD because I don't have the hardware I would appreciate if anyone could help me testing those. v1 link: https://patchwork.kernel.org/cover/10837847/ Thanks! Helen Changes in v3: - use swap() to swap old and new framebuffers in async_update - get the reference to old_fb and set the worker after vop_plane_atomic_update() - add a FIXME tag for when we have multiple fbs to be released when vblank happens. - update commit message - Add Reviewed-by tags - Add TODO in drm_atomic_helper_async_commit() Changes in v2: - added reviewed-by tag - update CC stable and Fixes tag - Added reviewed-by tag - updated CC stable and Fixes tag - Change the order of the patch in the series, add this as the last one. - Add documentation - s/ballanced/balanced Helen Koike (5): drm/rockchip: fix fb references in async update drm/amd: fix fb references in async update drm/msm: fix fb references in async update drm/vc4: fix fb references in async update drm: don't block fb changes for async plane updates .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +- drivers/gpu/drm/drm_atomic_helper.c | 22 ++++---- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 4 ++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 51 ++++++++++--------- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- include/drm/drm_modeset_helper_vtables.h | 5 ++ 6 files changed, 49 insertions(+), 38 deletions(-)