From nobody Mon Feb 9 10:12:31 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578911989; cv=none; d=zohomail.com; s=zohoarc; b=XgBbQwzsWcOYLE2m8MWx/MsKyHv4hjjx4auwbGTSR8nKuxCCNu1CGeHK0+QFl1gKFuEUzfQMVGgbhTSdO3SGVL2AGAK16V6UrglV3AZR/tZLafCVcv8tKAhTuY0nhg197U3lCFI0kdnLu+b+oDn21g7e9zJ12dLIBrl5r0lmVkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578911989; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nqfYNXglE59xvFuQztuXn+STmu3o4ZZhx4ehNVUudDQ=; b=G/eUSJ08thuXya13wwakMmHiite6tL0ejHxXEzWuYTOq87ayBTlCRcV4hrHLRffOg5aaNCay9xYi973m/1SRFPMA5wczCF8WCLtis5tnE7fWsm2h5AcVfdjTk6JJl4WM/dxNQf7k0B3/Lz7JNdeLFzkU6oHRrp9l5StLgEAcxBc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578911989032353.8943659656443; Mon, 13 Jan 2020 02:39:49 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iqx7s-0007bw-7f; Mon, 13 Jan 2020 10:39:16 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iqx7M-0007aA-5i for xen-devel@lists.xenproject.org; Mon, 13 Jan 2020 10:38:44 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d771ebd6-35f0-11ea-b89f-bc764e2007e4; Mon, 13 Jan 2020 10:38:31 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BC818B167; Mon, 13 Jan 2020 10:38:29 +0000 (UTC) X-Inumbo-ID: d771ebd6-35f0-11ea-b89f-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Thomas Zimmermann To: airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, hdegoede@redhat.com, david@lechnology.com, noralf@tronnes.org, sean@poorly.run, oleksandr_andrushchenko@epam.com, sam@ravnborg.org, laurent.pinchart@ideasonboard.com, emil.velikov@collabora.com Date: Mon, 13 Jan 2020 11:38:19 +0100 Message-Id: <20200113103822.24473-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200113103822.24473-1-tzimmermann@suse.de> References: <20200113103822.24473-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 13 Jan 2020 10:39:14 +0000 Subject: [Xen-devel] [PATCH v2 1/4] drm: Document struct drm_crtc_state.no_vblank for faking VBLANK events X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, dri-devel@lists.freedesktop.or, Thomas Zimmermann , virtualization@lists.linux-foundation.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Drivers for CRTC hardware without support for VBLANK interrupts can set struct drm_crtc_state.no_vblank and let DRM's atomic commit helpers generate the VBLANK events automatically. Document this in order to make it official. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_atomic_helper.c | 4 +++- include/drm/drm_crtc.h | 9 +++++++-- include/drm/drm_simple_kms_helper.h | 7 +++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atom= ic_helper.c index 4511c2e07bb9..ce30a37971e4 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -2215,7 +2215,9 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_dependencies= ); * when a job is queued, and any change to the pipeline that does not touc= h the * connector is leading to timeouts when calling * drm_atomic_helper_wait_for_vblanks() or - * drm_atomic_helper_wait_for_flip_done(). + * drm_atomic_helper_wait_for_flip_done(). In addition to writeback + * connectors, this function can also fake VBLANK events for CRTCs without + * VBLANK interrupt. * * This is part of the atomic helper support for nonblocking commits, see * drm_atomic_helper_setup_commit() for an overview. diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 5e9b15a0e8c5..01caf5160596 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -179,7 +179,9 @@ struct drm_crtc_state { * In this case the VBLANK event is only generated when a job is queued * to the writeback connector, and we want the core to fake VBLANK * events when this part of the pipeline hasn't changed but others had - * or when the CRTC and connectors are being disabled. + * or when the CRTC and connectors are being disabled. In addition to + * writeback connectors, this function can also fake VBLANK events for + * CRTCs without VBLANK interrupt. * * __drm_atomic_helper_crtc_duplicate_state() will not reset the value * from the current state, the CRTC driver is then responsible for @@ -335,7 +337,10 @@ struct drm_crtc_state { * - Events for disabled CRTCs are not allowed, and drivers can ignore * that case. * - * This can be handled by the drm_crtc_send_vblank_event() function, + * For very simple hardware without VBLANK interrupt, enabling + * &struct drm_crtc_state.no_vblank makes DRM's atomic commit helpers + * send the event at an appropriate time. For more complex hardware this + * can be handled by the drm_crtc_send_vblank_event() function, * which the driver should call on the provided event upon completion of * the atomic commit. Note that if the driver supports vblank signalling * and timestamping the vblank counters and timestamps must agree with diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_k= ms_helper.h index 15afee9cf049..e253ba7bea9d 100644 --- a/include/drm/drm_simple_kms_helper.h +++ b/include/drm/drm_simple_kms_helper.h @@ -100,8 +100,11 @@ struct drm_simple_display_pipe_funcs { * This is the function drivers should submit the * &drm_pending_vblank_event from. Using either * drm_crtc_arm_vblank_event(), when the driver supports vblank - * interrupt handling, or drm_crtc_send_vblank_event() directly in case - * the hardware lacks vblank support entirely. + * interrupt handling, or drm_crtc_send_vblank_event() for more + * complex case. In case the hardware lacks vblank support entirely, + * drivers can set &struct drm_crtc_state.no_vblank in + * &struct drm_simple_display_pipe_funcs.check and let DRM's + * atomic helper fake a vblank event. */ void (*update)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *old_plane_state); --=20 2.24.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel