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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 64BD1C2BA15 for ; Wed, 19 Jun 2024 11:57:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4D1F10EC5B; Wed, 19 Jun 2024 11:57:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="klr34nXX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4552D10EC5B; Wed, 19 Jun 2024 11:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718798233; x=1750334233; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=98v0QsjuhOFlSgXs59YI6oLQih9ErGbd498Z59dGdvY=; b=klr34nXXkQKUgGbNSCnWKPAZ/xGX+R9020XladBomZQvQT09tep1424P BOkJtm5mKHMNgml6onqlKTOhMUjGuk6f6k4Jj9jBna4nRBQ5v49RbPP8d K/z9IjqADkH2iPrS3HkVGMDOVcfwJWgtF40BB037TtfQ/IQcxvogHuAq2 u4ScHc0c/FJ7eW5FZsqezyqx4zUBNkqRgBEomlu1KDLMee+8oxsrg/ZXR e+yI64KHwYZz4QVDfMzEL786Q6EGnigiqLXta+bU8LUZu6QTfaPN7M4aw 761vo6M2QXOffmcrw2xlQIAmeIGACHHT3PkxKSLUC2/8aCsuDAbyfwsfZ w==; X-CSE-ConnectionGUID: DCOqKo/5QO6j7NAvScnScw== X-CSE-MsgGUID: ftk1PxLJQEGoA33EeHtWUA== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="33278888" X-IronPort-AV: E=Sophos;i="6.08,250,1712646000"; d="scan'208";a="33278888" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 04:57:12 -0700 X-CSE-ConnectionGUID: tac/HbubTq2gjwPROTUcRQ== X-CSE-MsgGUID: ZLRsZ1yhTtWEXmZuK6lYZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,250,1712646000"; d="scan'208";a="41851288" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 19 Jun 2024 04:57:04 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 19 Jun 2024 14:57:03 +0300 Date: Wed, 19 Jun 2024 14:57:03 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: =?iso-8859-1?Q?Andr=E9?= Almeida Cc: Dmitry Baryshkov , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kernel-dev@igalia.com, Melissa Wen , alexander.deucher@amd.com, christian.koenig@amd.com, Simon Ser , Pekka Paalanen , daniel@ffwll.ch, Daniel Stone , 'Marek =?utf-8?B?T2zFocOhayc=?= , Dave Airlie , Xaver Hugl , Joshua Ashton , Michel =?iso-8859-1?Q?D=E4nzer?= , Sam Ravnborg , Boris Brezillon , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Jani Nikula , Rodrigo Vivi , Karol Herbst , Lyude Paul Subject: Re: [PATCH v6 0/8] drm: Support per-plane async flip configuration Message-ID: References: <20240614153535.351689-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Fri, Jun 14, 2024 at 04:37:41PM -0300, André Almeida wrote: > Hi Dmitry, > > Em 14/06/2024 14:32, Dmitry Baryshkov escreveu: > > On Fri, Jun 14, 2024 at 12:35:27PM GMT, André Almeida wrote: > >> AMD hardware can do async flips with overlay planes, but currently there's no > >> easy way to enable that in DRM. To solve that, this patchset creates a new > >> drm_plane field, bool async_flip, that allows drivers to choose which plane can > >> or cannot do async flips. This is latter used on drm_atomic_set_property when > >> users want to do async flips. > >> > >> Patch 1 allows async commits with IN_FENCE_ID in any driver. > >> > >> Patches 2 to 7 have no function change. As per current code, every driver that > >> allows async page flips using the atomic API, allows doing it only in the > >> primary plane. Those patches then enable it for every driver. > >> > >> Patch 8 finally enables async flip on overlay planes for amdgpu. > >> > >> Changes from v5: > >> - Instead of enabling plane->async_flip in the common code, move it to driver > >> code. > >> - Enable primary plane async flip on every driver > >> https://lore.kernel.org/dri-devel/20240612193713.167448-1-andrealmeid@igalia.com/ > >> > >> André Almeida (8): > >> drm/atomic: Allow userspace to use explicit sync with atomic async > >> flips > >> drm: Support per-plane async flip configuration > >> drm/amdgpu: Enable async flips on the primary plane > >> drm: atmel-hlcdc: Enable async flips on the primary plane > >> drm/i915: Enable async flips on the primary plane > >> drm/nouveau: Enable async flips on the primary plane > >> drm/vc4: Enable async flips on the primary plane > >> drm/amdgpu: Make it possible to async flip overlay planes > >> > >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 2 ++ > >> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 3 +++ > >> drivers/gpu/drm/drm_atomic_uapi.c | 8 +++++--- > >> drivers/gpu/drm/i915/display/i9xx_plane.c | 3 +++ > >> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++++ > >> drivers/gpu/drm/nouveau/dispnv50/wndw.c | 4 ++++ > >> drivers/gpu/drm/vc4/vc4_plane.c | 4 +++- > > > > The main question is why only these drivers were updated. > > > > According to `git grep async_page_flip`, only those drivers supports > async page flip. The only corner case is radeon, that does supports > async but doesn't support planes. The primary plane will alwyas exist (drm_crtc_init() will create one for the old drivers that don't do it explicitly). So you should be able to convert radeon as well. And looks like some pre-dc amdgpu stuff is in a similar situation. That should presumably allow the old flag to be removed entirely? Hmm, I suppose drm_getcap() would need a bit of work to eg. go through all the planes to see if any of them support async flips. > > Do you know any other driver that should be updated to? > > >> include/drm/drm_plane.h | 5 +++++ > >> 8 files changed, 29 insertions(+), 4 deletions(-) > >> > >> -- > >> 2.45.2 > >> > > -- Ville Syrjälä Intel 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BB654C27C53 for ; Wed, 19 Jun 2024 11:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i6bLAQR6AxYUHCaDT1Qsknw1s5u9+LJYmjvQEUWRXPY=; b=HENdzD/yvJ5Xvs3Ofw/SCJcQuD lE6lZuhPDkuCDLlnDx1VQWrV/3YZX/Vk8Ne0u2lty25/1QDOs0qXu8WE5ilCA9xqo3B7vDAaE2T2h UoWFFF71cUsXDTCilhqVVDEfyVu0j3y34oB/5HTvphK5eTJK7ECR79efIN0pIjWXYDTsv08Sg0xwc SsUcX+l5FLtNPahnBsFzFKWpb0geWpDR6O/C25HO68mIwiqPa0VYZlIEgCK8Y9/oIMTZretg8sXoo FpRmQK1OPMSi/vAnCENkUob2iwx14ayhDH6r3R9oGlg7oee1qDz+cNZoOMXJSnFWypUPj2BBHoUZK FcM5Ss9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJtwH-000000014vd-1j6i; Wed, 19 Jun 2024 11:57:21 +0000 Received: from mgamail.intel.com ([192.198.163.8]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJtwD-000000014rz-2tl7 for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 11:57:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718798238; x=1750334238; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=98v0QsjuhOFlSgXs59YI6oLQih9ErGbd498Z59dGdvY=; b=nIb3BZoEo+x8jpEY9UyRa2XmJBSshKflIlNmVROjcaEPKffgnuXwqYYb VHovd3jCaNsOUzMIs6UbLg0En/4/LMXcHIhc7SsMn98lL4byn88fJwDBj J3PrllwcJEyc7oT3UOr0LEVJ/pkHtaAnDPPR9NMstLHKW/B8mbaMnpU2R SNLWhxD3oluHuSaG77jvPNTGONatxB7jOkO5oi72yLxfcefrTNzgq7UXe U54TpRBos5XP3pKvAQcaS+13sluNp312VYgaf9JHedFS1mfehYNPGOh8c heOVrI5TxRiay5ca6vAipqV3+v3hzJVqz4DQderFMy8A0kXFVN6ieQrL2 A==; X-CSE-ConnectionGUID: ErI+ij/BTl2MrJ1umjmpBg== X-CSE-MsgGUID: X7eTCvedQminVpJxoWSvfg== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="33278887" X-IronPort-AV: E=Sophos;i="6.08,250,1712646000"; d="scan'208";a="33278887" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 04:57:12 -0700 X-CSE-ConnectionGUID: tac/HbubTq2gjwPROTUcRQ== X-CSE-MsgGUID: ZLRsZ1yhTtWEXmZuK6lYZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,250,1712646000"; d="scan'208";a="41851288" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 19 Jun 2024 04:57:04 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 19 Jun 2024 14:57:03 +0300 Date: Wed, 19 Jun 2024 14:57:03 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: =?iso-8859-1?Q?Andr=E9?= Almeida Subject: Re: [PATCH v6 0/8] drm: Support per-plane async flip configuration Message-ID: References: <20240614153535.351689-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_045717_760558_F0BCC9B5 X-CRM114-Status: GOOD ( 26.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , 'Marek =?utf-8?B?T2zFocOhayc=?= , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Xaver Hugl , Daniel Stone , Claudiu Beznea , Sam Ravnborg , Karol Herbst , Michel =?iso-8859-1?Q?D=E4nzer?= , Dave Airlie , amd-gfx@lists.freedesktop.org, Lyude Paul , kernel-dev@igalia.com, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Melissa Wen , Dmitry Baryshkov , Pekka Paalanen , Jani Nikula , Rodrigo Vivi , linux-arm-kernel@lists.infradead.org, Thomas Zimmermann , Boris Brezillon , Simon Ser , linux-kernel@vger.kernel.org, daniel@ffwll.ch, alexander.deucher@amd.com, christian.koenig@amd.com, Joshua Ashton Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 14, 2024 at 04:37:41PM -0300, André Almeida wrote: > Hi Dmitry, > > Em 14/06/2024 14:32, Dmitry Baryshkov escreveu: > > On Fri, Jun 14, 2024 at 12:35:27PM GMT, André Almeida wrote: > >> AMD hardware can do async flips with overlay planes, but currently there's no > >> easy way to enable that in DRM. To solve that, this patchset creates a new > >> drm_plane field, bool async_flip, that allows drivers to choose which plane can > >> or cannot do async flips. This is latter used on drm_atomic_set_property when > >> users want to do async flips. > >> > >> Patch 1 allows async commits with IN_FENCE_ID in any driver. > >> > >> Patches 2 to 7 have no function change. As per current code, every driver that > >> allows async page flips using the atomic API, allows doing it only in the > >> primary plane. Those patches then enable it for every driver. > >> > >> Patch 8 finally enables async flip on overlay planes for amdgpu. > >> > >> Changes from v5: > >> - Instead of enabling plane->async_flip in the common code, move it to driver > >> code. > >> - Enable primary plane async flip on every driver > >> https://lore.kernel.org/dri-devel/20240612193713.167448-1-andrealmeid@igalia.com/ > >> > >> André Almeida (8): > >> drm/atomic: Allow userspace to use explicit sync with atomic async > >> flips > >> drm: Support per-plane async flip configuration > >> drm/amdgpu: Enable async flips on the primary plane > >> drm: atmel-hlcdc: Enable async flips on the primary plane > >> drm/i915: Enable async flips on the primary plane > >> drm/nouveau: Enable async flips on the primary plane > >> drm/vc4: Enable async flips on the primary plane > >> drm/amdgpu: Make it possible to async flip overlay planes > >> > >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 2 ++ > >> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 3 +++ > >> drivers/gpu/drm/drm_atomic_uapi.c | 8 +++++--- > >> drivers/gpu/drm/i915/display/i9xx_plane.c | 3 +++ > >> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++++ > >> drivers/gpu/drm/nouveau/dispnv50/wndw.c | 4 ++++ > >> drivers/gpu/drm/vc4/vc4_plane.c | 4 +++- > > > > The main question is why only these drivers were updated. > > > > According to `git grep async_page_flip`, only those drivers supports > async page flip. The only corner case is radeon, that does supports > async but doesn't support planes. The primary plane will alwyas exist (drm_crtc_init() will create one for the old drivers that don't do it explicitly). So you should be able to convert radeon as well. And looks like some pre-dc amdgpu stuff is in a similar situation. That should presumably allow the old flag to be removed entirely? Hmm, I suppose drm_getcap() would need a bit of work to eg. go through all the planes to see if any of them support async flips. > > Do you know any other driver that should be updated to? > > >> include/drm/drm_plane.h | 5 +++++ > >> 8 files changed, 29 insertions(+), 4 deletions(-) > >> > >> -- > >> 2.45.2 > >> > > -- Ville Syrjälä Intel