Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp912000lqs; Fri, 14 Jun 2024 09:04:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXvB6L+91af6KgDabNydqkKmav5cQlqF8TvCSL9aAt7MFS2FsWDnuU0pX3KqCJh+7iBHj/hHxVZhlWG1eLI4c+qEflm0hnO7I60LC8v4Q== X-Google-Smtp-Source: AGHT+IFfoVZ/SuWUxnFsilDROocLPd96LphdDtYSaCWewfphXZIqaMnVSqyNmrbLT0o4RzQf4r0f X-Received: by 2002:a05:6a20:748f:b0:1b6:c527:7e42 with SMTP id adf61e73a8af0-1bae7e2f743mr3616206637.3.1718381085282; Fri, 14 Jun 2024 09:04:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718381085; cv=pass; d=google.com; s=arc-20160816; b=fPEmpmzCzm1IMIuTb3GuxmzM1ER46GW92v0MPyb3u7QEelqgjQuILywGNHOpcfPR+i 8WPW2HCFU2ZxPy7caOd1f0d2luraR8QzEDUzrc3Ar4NQl9jBf7wCOm2w2iOrg6zvokjO LK6z0rAWvpn4HKZBMUu+FUiFFuO8zzER/8SfKuGExphNOvusmKBPlcT2x1SgvU4BHgIh fsp6LnM3Y3hd+52PcO2sXNsc+ZcTUEKXG8i9dYgxykyXOEecZ8if7M2lDj9uGamqJQln faa7H8FpCaaJt/MbKh8B1J1qytjbKBfmhskhRiPWfyPJSasCrxyBnkWRNVS7iLCDu+AZ a1ug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=LmgvFS549yo/YJvBvlKRwZA43KduQg2X1Xw5E+iXCqk=; fh=63W4dWKO34EGHE3T1vWmuYqFyINTaFbMpUFQla9Mwa0=; b=U0DZ/DqAxEJSJDFdnrETi76c4TCNiu+y4HVB0mgf9ccwP1qjc7hgwNMSHAU/4K/olZ j0ZhhpHcl8YGj8yDCbiuI+cDia9uSp71Qi7OULaHO9k+HHd9X9eL8q9AF+08i8ikzTbT ocUESm3ali9rhIow2JXRhxqOzqgMO8PTthZFU99MJSBYud2BPoiVbS3OrU4gg3DsgwA2 zYkFUmbdqNtzoDonrzU6tNgzZSBLDpQiipureMi7Bzr+K5TY1qqp+Dni47xmcr1HJVxx f5Nx8gTFDHjweyZatJ2krdL60J7cNUBIhn4PItwzKrHSD2R7wc/9ra1MLn4mv/GgSM31 JlHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=oCqhgpcJ; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-215156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215156-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd5e9683si4046757a12.66.2024.06.14.09.04.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 09:04:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=oCqhgpcJ; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-215156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215156-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 25A93B278B3 for ; Fri, 14 Jun 2024 15:36:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6A9D16DEB7; Fri, 14 Jun 2024 15:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="oCqhgpcJ" Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B1E7154457 for ; Fri, 14 Jun 2024 15:35:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.60.130.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718379365; cv=none; b=RB0jbnxUv7X9DMNEgHW6/7iHmraAGMVz3zpJ8anTpYkgQEXrI+3wSy9WTWtYxSljf0jfncHECemasJEruCngCR3jP2vEVpcoG01cfieddvqcU24p8B4JGF6RiUCE6VcSfG7377xuRAdI07bR+3fUOwoaE6LSzBdZwQjaDssoXZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718379365; c=relaxed/simple; bh=VwRqPOS8y46VqB8sUNGMNMY2Lqxkut+KtxqK2F0ldMM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=HK1fbbz1enb8MW4ABJzsdV7TrfhjhSA1u00aokQRiomUmR15dNy1LlGAvIhdh4Np087TRf+vOlQb8dZkH0+G57Rv4b+s3XZqQpAF0hOSgqXb+50hSTRsaM+slsDVSefKMNYMPpRLJ5yGY1o0GMzPO8vWGqRwe74Ed89h+SX5Cpw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=oCqhgpcJ; arc=none smtp.client-ip=178.60.130.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LmgvFS549yo/YJvBvlKRwZA43KduQg2X1Xw5E+iXCqk=; b=oCqhgpcJY25QyoVWX+uB03kyG2 /ZKPtyUgAi+WRtJpJbSAk0Z8S+juSoNehw0j1cMQHQusZN4oWiE9eVpoM3ptOxGy3PQHvW6imEZVk ZXFRl9I8/HCKYWPbhWggebBI1GbsZU42PN4F53sCx6P5no9VliYDpbY0CiKuOrP/c2dtAHW1NhJb0 qGqbxOJ2GbJX3WrWAyLSgmy0/Mj63yzynYCzaRD9QvrXiOP+mYzrHbgcc9O80zRAn7y4oWaUwtgQK KzwWD4d4fJ1SMm/VdD7KaTvbe3nWyRimrT60THmDJWDh2XjbxL6ZhkjG7hqp3poSga0GdOaUFRz+3 kE6URfiA==; Received: from [179.118.191.115] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1sI8xu-003B8v-DG; Fri, 14 Jun 2024 17:35:46 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: 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 Cc: kernel-dev@igalia.com, Melissa Wen , alexander.deucher@amd.com, christian.koenig@amd.com, Simon Ser , Pekka Paalanen , daniel@ffwll.ch, Daniel Stone , =?UTF-8?q?=27Marek=20Ol=C5=A1=C3=A1k=27?= , Dave Airlie , ville.syrjala@linux.intel.com, Xaver Hugl , Joshua Ashton , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Sam Ravnborg , Boris Brezillon , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Jani Nikula , Rodrigo Vivi , Karol Herbst , Lyude Paul , =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v6 0/8] drm: Support per-plane async flip configuration Date: Fri, 14 Jun 2024 12:35:27 -0300 Message-ID: <20240614153535.351689-1-andrealmeid@igalia.com> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 +++- include/drm/drm_plane.h | 5 +++++ 8 files changed, 29 insertions(+), 4 deletions(-) -- 2.45.2