Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp605506lqc; Fri, 8 Mar 2024 06:56:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiXvZCwmHWA5iBn1ptpAqWuBcjI07Kf5f4jhGBTawlnnfyg9cVEW6ymraORel5aYznO2aNAF40e4l4bDnfblL6cOgkW/v/emQximAotg== X-Google-Smtp-Source: AGHT+IHjaZhQf4JY8PhYPN1BUmnf5qroh7ds92/Qm8Bbq1pgTJQVfRoFZPS6IK3veNVLF+U7mGvM X-Received: by 2002:a50:d658:0:b0:567:9306:5d0b with SMTP id c24-20020a50d658000000b0056793065d0bmr2231083edj.28.1709909791085; Fri, 08 Mar 2024 06:56:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709909791; cv=pass; d=google.com; s=arc-20160816; b=MhzPFQIVLWnc37luwKIdZgBkdG9wE9LAg/ZFAwuHWqTUl1vM5LSCMw2K/N9PEm99UZ eBDm/rXppE0O0kh0+FEaNNwLTH/TJh714n/b7YKYLAxnACz6zHeDCWZdW3hjd+X3AuOk ztg2LrDk4ogC5Ucl7Xf+tPH5SKIT0G9T+xpKGMs4ALh8sWYM/XaSXIY4qYjKEkuYkA0P dwqGWCifghSnjpScy8WD5naL7VsA/OwC8VvW/Tq04Sa5RQBLsZVy79bwgJs/+z0/Vcaa /4A52qyFr7zir6ZqpfSv5QmDU6PL1lMa/2q1XfJYukaw2VkbAKv4We7LTNVSREgAzOsG jtKA== 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=njd2ecPfO+MOSUbjxezZy5Zaoa3J5aSXR1p04i4lAW0=; b=U4VsbAapHDwmYLX4Hw9W67QiuozqB/xkHZHz9/eU5L00cpD0Dr/faBPF3XlYnCjh6x xeaOgnDpWQfV1opF3HRxnhpH1fBQLbCasBjKwafaT4vdi9bxmQOiSKO4PjFxwVIl2KOz zKBEpmIEVIdbdyQu6JlIXHVOH/Ntf15FOJi2J+Tw/krLFAUTLvY3UlPvlOIw3B3O7FgQ cMeRavbDw8ZpqpngKKEZjuHumAgrLSLHkHNqpXmLOms9aob8Y02jwEqLCpNeWiYptn70 y/LiNCxJQrj+VPm0UFZoEzhHoQ/4y2q5fUyNlbXBJpT0nbTQvFGuMtNahBJUvWbfSWOR EjaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=amqk+UvB; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-97195-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97195-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z15-20020a05640235cf00b00566a43cffecsi7943817edc.40.2024.03.08.06.56.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 06:56:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97195-linux.lists.archive=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=amqk+UvB; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-97195-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97195-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8024C1F2164B for ; Fri, 8 Mar 2024 14:56:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C76341DFDE; Fri, 8 Mar 2024 14:56:15 +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="amqk+UvB" 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 165044C90 for ; Fri, 8 Mar 2024 14:56:11 +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=1709909775; cv=none; b=iu/oYDNLQZflqkq6QVmKS2MDdffYKFYUUTYHpLBDOa9ZwBSp/mx9gUhLvYUyLdtaxUFbd5249TL7SmhyJJxpHKhwJfJ+QYt/uSe5wWXmb12A9V/yQO9gv8aor/a+h4o4b5YRxpi0rmMP5syVSqiErHihnPrcYhJjt5QiKQg1VL0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709909775; c=relaxed/simple; bh=GuJytFwSCI7IAd2cG0GrQp6NqcFum5PQWvL4VQCu4CE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dPE7EfEfUGOPc3PTgc1wTP7FoPS5hjgP8v71M7NjMfaoDL2e/e+b1ZUowAfAbiysCxPBtCumCmOMfgiekUMayRAyVHPQP+8kzcbEryl9bKNUX4NJh4wwMhYp1ivNW+VIIbaCdGm6frWItXZdyvMAUD2YC033VREyKzkvjBIPJv4= 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=amqk+UvB; 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=amqk+UvB+WUvrusoCbz188aBRH RjR9wHoPGJhAcrg9Pnq5qBtjfC8jqb2OYMjbwvjNqXMt9a4sh550+IFisn/xBWld9a5ZbkrAsMeRz KQNB/oH97dAnpAuQE9yGwrS5e1zhTPt9KAB/2OXRlLzQrD0orZqJwpldbUIKIvh/Jd8IH0qv4e2oI 3XTH70d/rJspVhNV5YFfRSCLKVgeuWnZeesD2oYD97SCv98PedmlcvvIPcZFRIlHkfx7wrvdDv/rS a9alOKvL0Uqgy88zv1B0ka4cR/BN6QX7wVwYeNt5D1zOoFvjmDXBDIVkGyoj/5MVsyyzgv0cDUXmQ C/3vpw8w==; Received: from [152.249.135.210] (helo=steammachine.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1ribdp-007p93-8a; Fri, 08 Mar 2024 15:56:09 +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: [RESEND PATCH v4 1/3] drm/atomic: Allow userspace to use explicit sync with atomic async flips Date: Fri, 8 Mar 2024 11:55:51 -0300 Message-ID: <20240308145553.194165-2-andrealmeid@igalia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240308145553.194165-1-andrealmeid@igalia.com> References: <20240308145553.194165-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