From patchwork Sun Jan 28 21:25:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= X-Patchwork-Id: 19556 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp230279dyb; Sun, 28 Jan 2024 13:26:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFewLG0eX6wR9sJ8XxSTx1vLZt0lrho2jd9EYpLtK5ZGDZKFHFx45/Gun6RXhYAKsD2mdAU X-Received: by 2002:a17:906:54e:b0:a35:518f:551a with SMTP id k14-20020a170906054e00b00a35518f551amr2827342eja.26.1706477200862; Sun, 28 Jan 2024 13:26:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706477200; cv=pass; d=google.com; s=arc-20160816; b=j01+3c9WQVzaVMMr9CDZ2swBQ358Fi2ZDyHbBsEB08YcOSSt4Q9xl2lfkc06RbT1Qe uREGoBt02tD9GxIoQ26ujxWBw++eqiBgf2+QU6oUahBwMneZ6Mmd+SxxafCNoYWJZDlS O9oc7q/U1lzsIKr/V4/roccSRYR5+5mZQcKPysBJvD9ECcdwjPyx4LwI6IgOhsSXt1S3 E8Df/WsQu0zVdxnB93zzQUQ7f4QUi1ouLEPyK+pO58wtMNpMKqOCh6tifaIbrumyn+Zo kasFrig33kpwTk+XXJY5ne12sTPK4SPZSrK/t3t+enC+A7bIgv1EqiCadoSMV60HCMM1 g/bw== 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=MNiq0HNP4Q9Rqomb+cMUTJBSTivA7YPuGDdGMrmslc0=; fh=njd2ecPfO+MOSUbjxezZy5Zaoa3J5aSXR1p04i4lAW0=; b=JfKXa2iQPXAhpXwANyr58weufHbLF/iu3+BYkUlBLcmmg8DbSVtyYebiPiaaFlE6sI j/MK3Qwf+lu4HgK569Hs/w/j/QV2kpMCU6NSL8u9PBUjTjQaCBbdGY6MUOpxMy6CQFrE /ii/5tXBw8H8QzC92r543N1l1eycxKybGYGPZykQF/53FPI4oEXh1XMDaXgAwxX0d7/u SJtMGzgDuMI/nnsZC17bgrgTkH4YU9g9mmTi3RN4+v/AB206v0XtGsrule6BuWptGfCD gHDcKig+B200qV+nlNMNCTLusHBIA7LrScbAzJWzFf4sepALnr1xrg7ktff59OP7r7GL Oqeg== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=Tj4qXk8M; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-41963-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41963-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id rp13-20020a170906d96d00b00a35b76bac09si316204ejb.337.2024.01.28.13.26.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 13:26:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41963-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=Tj4qXk8M; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-41963-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41963-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1E6E11F2106B for ; Sun, 28 Jan 2024 21:26:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E2C641C9A; Sun, 28 Jan 2024 21:25:40 +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="Tj4qXk8M" Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 4D6B11DFD9 for ; Sun, 28 Jan 2024 21:25:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706477137; cv=none; b=TqzLjTDmWNZskOPjchLa24y2oZ+ai6u2vt6H8tK80qDNiEsHr59qv0SC8emzpPFRgI+RNLhU9j3vq0lpaWBeMWQMk6r4ZqWopY7WYZKlnYz1E0+870gMpIDqwk0pZkoaYYgibbKPjEMZEF4YZNmGeGp2TdaCZVsmxVId2oPVdwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706477137; c=relaxed/simple; bh=qZP50DNmV6i1En0HHhsG+38vD8v/gyaGde7BMOi1FMU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=T9mImumcL8T8WpmPhZHitVr0S7ZEmGApmJBrZQG3EM8qYjk6AVlwH1BqrqTECcbDn1/qDtaYMjickVuK/Pue3NhIwIjE7NzqzwWl9qIBX9PpnqIMj1pdARYQkTezV1azhbR8XPlsO0QLboE3hjxF1nWt8i15zzcGDmcmTyxh2s8= 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=Tj4qXk8M; arc=none smtp.client-ip=213.97.179.56 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=MNiq0HNP4Q9Rqomb+cMUTJBSTivA7YPuGDdGMrmslc0=; b=Tj4qXk8M5MGR2/SV09cUxgKkji PdCr4hKuDhjJIBXLeGZ/XFYbFKr+eTPPK71e2cF0+DKbH30y7ZWmikT9C8ApW69kHrtrDWoMopApS By4xFIiOnrLlI/MLfMyG+bzobIb4X6zdVpJ8Gisb4ye3EYAagSF6Vw5fZOSwO5fPHhOetySdfLJym w/aEkWAYhlWIKU0wJ2n2gvYT5yqN4NQrbTlFqKh35Sa6rv18BOvZ0hBCCL2icXCDyvEYPDlLUFOdL junGRoQIvRmdXe5glxcAWtxj3HGDGMtPWxScL03NwkSu0fzoFDehFZ61X/yoGlemuN3QN8nJ8TuP3 ZtYygtSA==; Received: from 201-42-129-61.dsl.telesp.net.br ([201.42.129.61] helo=steammachine.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1rUCeY-00B1M8-Gj; Sun, 28 Jan 2024 22:25:22 +0100 From: =?utf-8?q?Andr=C3=A9_Almeida?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: kernel-dev@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com, Simon Ser , Pekka Paalanen , daniel@ffwll.ch, Daniel Stone , =?utf-8?b?J01hcmVrIE9sxaHDoWsn?= , Dave Airlie , ville.syrjala@linux.intel.com, Xaver Hugl , Joshua Ashton , =?utf-8?q?Michel_D=C3=A4nzer?= , =?utf-8?q?Andr?= =?utf-8?q?=C3=A9_Almeida?= Subject: [PATCH v3 0/3] drm/atomic: Allow drivers to write their own plane check for async Date: Sun, 28 Jan 2024 18:25:12 -0300 Message-ID: <20240128212515.630345-1-andrealmeid@igalia.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789371036918706843 X-GMAIL-MSGID: 1789371036918706843 Hi, AMD hardware can do more on the async flip path than just the primary plane, so to lift up the current restrictions, this patchset allows drivers to write their own check for planes for async flips. This patchset allows for async commits with IN_FENCE_ID in any driver and overlay planes on AMD. Userspace can query if a driver supports this with TEST_ONLY commits. Changes from v2: - Allow IN_FENCE_ID for any driver - Allow overlay planes again v2: https://lore.kernel.org/lkml/20240119181235.255060-1-andrealmeid@igalia.com/ Changes from v1: - Drop overlay planes option for now v1: https://lore.kernel.org/dri-devel/20240116045159.1015510-1-andrealmeid@igalia.com/ André Almeida (3): drm/atomic: Allow drivers to write their own plane check for async flips drm/atomic: Allow userspace to use explicit sync with atomic async flips drm/amdgpu: Implement check_async_props for planes .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 29 +++++++++ drivers/gpu/drm/drm_atomic_uapi.c | 63 ++++++++++++++----- include/drm/drm_atomic_uapi.h | 12 ++++ include/drm/drm_plane.h | 5 ++ 4 files changed, 92 insertions(+), 17 deletions(-)