Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp534281rdb; Thu, 8 Feb 2024 13:06:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXBP14I6uwaahzworR2sbp/6OsvXwZjwijobc9nbztIhdvk5kYztFjc9FtVT4wUjKdIlEhOLiSz74GwY4LKHqpv5cY2U3ygrV1RXDNeig== X-Google-Smtp-Source: AGHT+IFL8CaDbs3ZCm/pdh0FFPVdNzzCXEwrlCn0LusaOpAlhi1Ap94s8uPn0gTuT/JRqCR231fg X-Received: by 2002:a17:90a:fe96:b0:296:33bc:5ed6 with SMTP id co22-20020a17090afe9600b0029633bc5ed6mr500853pjb.32.1707426404124; Thu, 08 Feb 2024 13:06:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707426404; cv=pass; d=google.com; s=arc-20160816; b=SC19X1Nyz/f2YYSYKj3+fGsRL+KFq3gUqanfZjfc7Z3p1c3ILXgzgzeGafHb7exz1P lkOFd/hwyMcXUaaI136V/kqmVkRI3ZUHfRSyhSsG9hkpkP0N1Ed/d1JbxyEiJy9KZ698 zcRLimlz43VwRgZMOWCfy4Jt53LsRw6ecbDR3D2KL8fvm0Pqze3HxP90mJSPSoFzdHkb dYEYYq4Cv1ivGYl1VtXzcAC1UkAXt7DdL1bGu4RWObUP4d/Luv92ljcBrgSIL1g6IkcF sI9WJA4Rx+CEiSuOYXZTaX27nHrvb6zjk8mA7hFgmPNBETUG152WNT1/MVLa8buQTlUH jTLg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=R+C5C00hqwaItnGEh4nhXpDi1vrMiefpdzqj2L/NgqM=; fh=n+PXYuOoBXA7e0PM+71nwxNf8Qi2VfmHYEksEmy8xKg=; b=MZu5LrDSdw6j+XzjCAi9VojEUUKX8O7/dCELWXK2TPrd7EbPutuASbtxJEoQN34ork Rh5dTxOepn411seyCslxFdXUR9/7nBUrDSLyC6Lz7sI4cOAiqdWGAY1WSGDJa3ujAMer YdHpXS4APoMhvQYN21MvJ83dO+GzB8h7VoTfDG5I1JEvHikqb2g0wyIvsFsliJ/vDE3i tW8BHLYylEDTb1M8t4+UZTE7Jl9C8qnf+ZP9X5fJaQiLms1N5ZBxOw21ZGipH36h3VKf UCL5vzGgya+ObPXIUo4EpmIxxdSbYwJgZ5ASiWFgIKit4Ef/H3Irq6pqkcQeotgZmkn5 rnXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=CRhFBIZ9; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-58696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58696-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXkl1/QVRlbEUy59O2I+Jf9MrkgfE1iSvSoKc4WK+U3F2JH1hFRRbb6ewNBZt12YGGjyvgh9b5ZGlzqxRs+DYGmaUWZblFVyJH/KyQagA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w15-20020a17090ad60f00b00295ebb2bde8si327287pju.162.2024.02.08.13.06.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 13:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=CRhFBIZ9; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-58696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58696-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 374C0287C41 for ; Thu, 8 Feb 2024 21:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEF064C3AF; Thu, 8 Feb 2024 21:06:13 +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="CRhFBIZ9" 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 7B1D64C3D0 for ; Thu, 8 Feb 2024 21:06:08 +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=1707426372; cv=none; b=ZeWroX881BLu5apZWkacaK3stwXnTTertNBfLgD9xwQ6hgJEyZVVIq+YG40N2C8E+cDA4NUSm03HcG7+v11fDHkfNIWgXqJlQBRDObJiflOmqxiJkUMk3vQWGtuEWm5/9QRSOP/t8wl+fvixHAAkR0g5IS17jf6fqjGg5BbgxK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707426372; c=relaxed/simple; bh=GuJytFwSCI7IAd2cG0GrQp6NqcFum5PQWvL4VQCu4CE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=npMvu4R+XrHI66qHtkpJfpkMTUId9xYx9Nf/hjqTwTLFiB5htUsO7oofsdBnplDqDDh++XxZ5Ph54inPvCSjKXgTWH2EjwHHcGSyheZR+p33uTnySwUxDN/16WIOOq4ZjadRv6XPbtjJsTYXTBf5KWvjhffxvOyb8NxspdhYsxs= 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=CRhFBIZ9; 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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=R+C5C00hqwaItnGEh4nhXpDi1vrMiefpdzqj2L/NgqM=; b=CRhFBIZ9eZuYEM/QpqEgSOLdXO 9ExvAuRldCOtHHGgBnm2pVi8efy0yUYoGoO+26H0znNwyK9/1scNirpC2hINUXfR29AOjBU+yqsoc WK6n1u5R11EntDDw8Cw3Nt45/6holMCQ/MzONCEF4n7hf07eD265R43mFEMU6TD7m/TB7RYLYjKCG 85mvnwB5YKjpH88WUQg0SCkr66Q/aP9YWuc/g5Fz0TLKRjScou3fVnnzpkWPkHa2/0qpk0ps9JA+E gY/ll+fv/Rzglubkb89ypjeRqyIB1556HPe/10LtBPo7RCU543+MtK0TlxwGb0vwSFdZVK6arzI+Z o6eQIwTA==; Received: from [177.45.63.184] (helo=steammachine.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1rYBao-00FMBk-QY; Thu, 08 Feb 2024 22:05:59 +0100 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= 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?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?= , =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v4 1/3] drm/atomic: Allow userspace to use explicit sync with atomic async flips Date: Thu, 8 Feb 2024 18:05:40 -0300 Message-ID: <20240208210542.550626-2-andrealmeid@igalia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208210542.550626-1-andrealmeid@igalia.com> References: <20240208210542.550626-1-andrealmeid@igalia.com> 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 Allow userspace to use explicit synchronization with atomic async flips. That means that the flip will wait for some hardware fence, and then will flip as soon as possible (async) in regard of the vblank. Signed-off-by: André Almeida --- v4: no changes drivers/gpu/drm/drm_atomic_uapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 29d4940188d4..1eecfb9e240d 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1066,7 +1066,9 @@ int drm_atomic_set_property(struct drm_atomic_state *state, break; } - if (async_flip && prop != config->prop_fb_id) { + if (async_flip && + prop != config->prop_fb_id && + prop != config->prop_in_fence_fd) { ret = drm_atomic_plane_get_property(plane, plane_state, prop, &old_val); ret = drm_atomic_check_prop_changes(ret, old_val, prop_value, prop); -- 2.43.0