From patchwork Tue Jul 2 21:22:15 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: 13720340 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 ED0D2C41513 for ; Tue, 2 Jul 2024 21:22:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 714BB10E6A5; Tue, 2 Jul 2024 21:22:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="gmnxE7WA"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F55010E6A8; Tue, 2 Jul 2024 21:22:29 +0000 (UTC) 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=8shIziYaH1I6kOcy98r2qE87n4FfKZ/MbO4p811IbiM=; b=gmnxE7WAsdbc4xx6JtWi80SL9Z LGNskCrCfY7H3AL/+BS9I4HeVTckf2+bAxMqXbCLuR77S3CW+g7Vi446yKfP17dEvhVzBkA1eNzIs YoMem5nCFUfD557HrucmH9/lZ5rms8dfKu/RZnpvZz+KvvDzeZMV/FYlTb/tPwCqRFtq0UebBL3ne DPnom9YTBweetrnH0B58WVq7wZw5oVsgchCfUAgiIrBsUC/yTBn9Y1UeIEMPT/lVIpLJ9qe5E4FXB 9iFK8t4BejDAo5t++rTt1xoM3TqTq8fVxQ8UxbIOy59sG0Lv9VUUTZnBLcISOGOX+BEmL2k0UVCBD 5WWweOUA==; Received: from [191.19.134.16] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1sOkxH-00ASeG-7s; Tue, 02 Jul 2024 23:22:27 +0200 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?= , Dmitry Baryshkov , =?utf-8?q?Andr=C3=A9_Almeid?= =?utf-8?q?a?= Subject: [PATCH v2 2/2] drm/atomic: Allow userspace to use damage clips with async flips Date: Tue, 2 Jul 2024 18:22:15 -0300 Message-ID: <20240702212215.109696-2-andrealmeid@igalia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702212215.109696-1-andrealmeid@igalia.com> References: <20240702212215.109696-1-andrealmeid@igalia.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Allow userspace to use damage clips with atomic async flips. Damage clips are useful for partial plane updates, which can be helpful for clients that want to do flips asynchronously. Signed-off-by: André Almeida Reviewed-by: Simon Ser --- v2 changes: - new patch drivers/gpu/drm/drm_atomic_uapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 2e1d9391febe..7609c798d73d 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1072,7 +1072,8 @@ int drm_atomic_set_property(struct drm_atomic_state *state, if (async_flip && prop != config->prop_fb_id && - prop != config->prop_in_fence_fd) { + prop != config->prop_in_fence_fd && + prop != config->prop_fb_damage_clips) { ret = drm_atomic_plane_get_property(plane, plane_state, prop, &old_val); ret = drm_atomic_check_prop_changes(ret, old_val, prop_value, prop);