From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helen Koike 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> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "amd-gfx" To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org Cc: =?UTF-8?q?Heiko=20St=C3=BCbner?= , Sean Paul , David Airlie , daniel.vetter-/w4YWyX8dFk@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org, Mamta Shukla , kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org, Anthony Koo , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , "David (ChunMing) Zhou" , Maxime Ripard , Bhawanpreet Lakha , David Francis , amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, harry.wentland-5C7GfCeVMHo@public.gmane.org, andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org, Leo Li , linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Maarten Lankhorst , Helen Koike , Mikita Lipski , Sean Paul lin List-Id: linux-arm-msm@vger.kernel.org SGVsbG8sCgpUaGlzIHNlcmllcyBmaXhlcyB0aGUgc2xvdyBkb3duIGluIHBlcmZvcm1hbmNlIGlu dHJvZHVjZWQgYnkKIltQQVRDSCB2Ml0gZHJtOiBCbG9jayBmYiBjaGFuZ2VzIGZvciBhc3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bWRncHVfZG0uYyB8ICAzICstCiBkcml2 ZXJzL2dwdS9kcm0vZHJtX2F0b21pY19oZWxwZXIuYyAgICAgICAgICAgfCAyMiArKysrLS0tLQog ZHJpdmVycy9ncHUvZHJtL21zbS9kaXNwL21kcDUvbWRwNV9wbGFuZS5jICAgIHwgIDQgKysKIGRy aXZlcnMvZ3B1L2RybS9yb2NrY2hpcC9yb2NrY2hpcF9kcm1fdm9wLmMgICB8IDUxICsrKysrKysr KystLS0tLS0tLS0KIGRyaXZlcnMvZ3B1L2RybS92YzQvdmM0X3BsYW5lLmMgICAgICAgICAgICAg ICB8ICAyICstCiBpbmNsdWRlL2RybS9kcm1fbW9kZXNldF9oZWxwZXJfdnRhYmxlcy5oICAgICAg fCAgNSArKwogNiBmaWxlcyBjaGFuZ2VkLCA0OSBpbnNlcnRpb25zKCspLCAzOCBkZWxldGlvbnMo LSkKCi0tIAoyLjIwLjEKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fCmFtZC1nZnggbWFpbGluZyBsaXN0CmFtZC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3Jn Cmh0dHBzOi8vbGlzdHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vYW1kLWdmeA== From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,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 47E23C43381 for ; Thu, 14 Mar 2019 00:20:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15B5C213A2 for ; Thu, 14 Mar 2019 00:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbfCNAUw (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=20Marchesin?= , 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?q?Ville=20Syrj=C3=A4l=C3=A4?= , Rob Clark , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Leo Li , linux-arm-msm@vger.kernel.org, =?UTF-8?q?Christian=20K=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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 A695AC4360F for ; Thu, 14 Mar 2019 00:21:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 72872213A2 for ; Thu, 14 Mar 2019 00:21:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FnwRHIP5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72872213A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ohb60PN/5ZKSc8Qea6Wm5oTY2tK6U66es/usASyHqh0=; b=FnwRHIP5Dg6Mg3 K/YC0rJ8M4ec0TALFbL57bik8McfjKHw/J9PBIEgTxR1chse7DyZimYQ7oPavGsel+7Swq29t94JR hoqAdT1UJSvgDKmZASP+hxeK0zhjYBOxXfU1SqR2ZNaa3m9n/sC0KSDeVcdbgJVacHkD1lLW/HpKo 8AjYx+A6eUtdaLUyMq6FSv37NnBPKntvEe2hiy4GmNboaef5sdu+sd91qDy+dn3047BcGqgfStz7B LTsoXVkZZFJgTKjU47yKrQ0UfgY+ZUHZHsWD2gYHHe3A5e1BmNnw6AKjH5cqlfiI+OOQEtFoNocZD xOsYSb+rPfHwHNURPQIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4E7D-0001Lm-PH; Thu, 14 Mar 2019 00:20:55 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4E7A-0001L0-NP; Thu, 14 Mar 2019 00:20:53 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_172053_026829_57E7B8AF X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Heiko=20St=C3=BCbner?= , Sean Paul , David Airlie , daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, eric@anholt.net, Mamta Shukla , kernel@collabora.com, Anthony Koo , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , "David \(ChunMing\) Zhou" , Maxime Ripard , Bhawanpreet Lakha , David Francis , amd-gfx@lists.freedesktop.org, linux-rockchip@lists.infradead.org, harry.wentland@amd.com, andrey.grodzovsky@amd.com, Leo Li , linux-arm-msm@vger.kernel.org, Maarten Lankhorst , Helen Koike , Mikita Lipski , Sean Paul , linux-arm-kernel@lists.infradead.org, =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Sandy Huang , Tomasz Figa , Rob Clark , boris.brezillon@collabora.com, Daniel Vetter , Alex Deucher , freedreno@lists.freedesktop.org, =?UTF-8?q?Christian=20K=C3=B6nig?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel