From patchwork Thu Jan 16 16:25:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13941934 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 41F2CC02188 for ; Thu, 16 Jan 2025 16:25:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB34310E9C1; Thu, 16 Jan 2025 16:25:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=emersion.fr header.i=@emersion.fr header.b="dyrrrvmr"; dkim-atps=neutral Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id BED3710E9C1 for ; Thu, 16 Jan 2025 16:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1737044741; x=1737303941; bh=H7B666yZOAMUf9BEHZLBaTb06/RsgL8B4L/HyGdK19c=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=dyrrrvmrhrulbIbQb8h8r8wy63Qfy35GDVlsGlNb8lIhqaw8rU/RS6xPsvR/iItU7 HAjQZCxfOu4ZkSvtAHREyWHxMjGQ85vgBj62gTUHkhAiI/pdv/1qDWZ+OiZEeBomia IsEmBjKQSpjJNaulrwPo/sAEUh3QQwRswwKq2nggMUinlU8KYXhlPHXYXC8MpWBQw3 HiE6NKJpoDFr5FScCW7+poiUQTUFnEYTTI9PcSrurNi6P0LwXaVuwb3h3B1Eiv3swK AkcwaSBUUPenr6N5sEAc+bKPxo11BIhsag3A1wId70Ya/LC5iVNTIThW63C2Ekm5Md /PJ59Rtp4IoUw== Date: Thu, 16 Jan 2025 16:25:35 +0000 To: dri-devel@lists.freedesktop.org From: Simon Ser Cc: Simona Vetter , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Pekka Paalanen , David Turner Subject: [PATCH] drm: document DRM_MODE_PAGE_FLIP_EVENT interactions with atomic Message-ID: <20250116162528.2235991-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton X-Pm-Message-ID: eec6c185f11e108b133fd6d75107012abbffb10f 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" It's not obvious off-hand which CRTCs will get a page-flip event when using this flag in an atomic commit, because it's all implicitly implied based on the contents of the atomic commit. Document requirements for using this flag and Note, because prepare_signaling() runs right after drm_atomic_set_property() calls, page-flip events are not delivered for CRTCs pulled in later by DRM core (e.g. on modeset by drm_atomic_helper_check_modeset()) or the driver (e.g. other CRTCs sharing a DP-MST connector). Signed-off-by: Simon Ser Cc: Simona Vetter Cc: Ville Syrjälä Cc: Pekka Paalanen Cc: David Turner --- include/uapi/drm/drm_mode.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c082810c08a8..a122bea25593 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -962,6 +962,14 @@ struct hdr_output_metadata { * Request that the kernel sends back a vblank event (see * struct drm_event_vblank) with the &DRM_EVENT_FLIP_COMPLETE type when the * page-flip is done. + * + * When used with atomic uAPI, one event will be delivered per CRTC included in + * the atomic commit. A CRTC is included in an atomic commit if one of its + * properties is set, or if a property is set on a connector or plane linked + * via the CRTC_ID property to the CRTC. At least one CRTC must be included, + * and all pulled in CRTCs must be either previously or newly powered on (in + * other words, a powered off CRTC which stays off cannot be included in the + * atomic commit). */ #define DRM_MODE_PAGE_FLIP_EVENT 0x01 /**