From nobody Mon May 6 00:04:23 2024 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=1579092809; cv=none; d=zohomail.com; s=zohoarc; b=bpI4cSVmGwbkMusyP4L+N7yqrvkTeX2TUKJWg8UdQQrVQJmg7Eku+LpSTclxadCN8z7jzj+URf43oYNSXf85jeWRyroay4xsiu+duybEp19Cv16UlwrdHH4u3h9sR06yVjMv7XmSW+jkw4VQju1US0BpSgNe+0skqplpbKD3eHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579092809; 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=MAksdGtFTUSJs5MqCBz4uBfQN2AwNztiCWcYoZDtJ17aYMnBh8rGruw0tmCMOujZocDz8oRSoACAf3oDkf6FoST2HlzUNwpuAWYTVqvfh1y035dGztnYlQ67fcUW5BqH1YnMDIhQHEFPaCNEtMSwXWhvhcugO04GSeV1QgnDVLY= 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 1579092809495463.9443149324718; Wed, 15 Jan 2020 04:53:29 -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 1iriAJ-00016A-9i; Wed, 15 Jan 2020 12:52:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iriAI-00015s-Fm for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 12:52:54 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e712d13a-3795-11ea-a985-bc764e2007e4; Wed, 15 Jan 2020 12:52:35 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7B93AAFDF; Wed, 15 Jan 2020 12:52:34 +0000 (UTC) X-Inumbo-ID: e712d13a-3795-11ea-a985-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: Wed, 15 Jan 2020 13:52:23 +0100 Message-Id: <20200115125226.13843-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200115125226.13843-1-tzimmermann@suse.de> References: <20200115125226.13843-1-tzimmermann@suse.de> MIME-Version: 1.0 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, Thomas Zimmermann , dri-devel@lists.freedesktop.org, 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 Reviewed-by: Hans de Goede --- 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 From nobody Mon May 6 00:04:23 2024 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=1579092806; cv=none; d=zohomail.com; s=zohoarc; b=k97eRbg774Ds1eOKLFqNJcGSaSU+ElFjdNE/xvISvpz7T2hWFLEoWEkkr8QSdom8BVCv/R0h4h6wa35G5yfpKvOvYhlktI4jhh5A3uZRQ2dilKr+ZsoVI2VEj7ut4ES6huQCtDm9NkzerTd4hzJfIoWqpZRbkoXT50ZeD1O0ncY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579092806; 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=/rwjOsGgo0dD0KmKaTdtvs7gDR3su/5qp2pjlvWX5Bg=; b=LpY0Xxs18WFSQzvpG4MfQakjbjLwaPzvOXc2nBf/z6bF0w/aop5X9GvIa91/HcgfZMQTRFEJAvGoNjRrx68SZno7YF/sidWDGeeAvOSaiEXlH48A25knepI4CidrMEvaUd1uA7WSnrHKQDR7mrdPOuAxNn8/e545mp89TPZ5eHg= 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 1579092806296715.9202576733323; Wed, 15 Jan 2020 04:53:26 -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 1iriAE-00014n-Uo; Wed, 15 Jan 2020 12:52:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iriAD-00014Q-Fd for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 12:52:49 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e7167448-3795-11ea-a985-bc764e2007e4; Wed, 15 Jan 2020 12:52:36 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7C2B1AFE1; Wed, 15 Jan 2020 12:52:34 +0000 (UTC) X-Inumbo-ID: e7167448-3795-11ea-a985-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: Wed, 15 Jan 2020 13:52:24 +0100 Message-Id: <20200115125226.13843-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200115125226.13843-1-tzimmermann@suse.de> References: <20200115125226.13843-1-tzimmermann@suse.de> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 2/4] drm/ast: Set struct drm_crtc_state.no_vblank in atomic_check() 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, Thomas Zimmermann , dri-devel@lists.freedesktop.org, 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" CRTC state properties should be computed in atomic_check(). Do so for the no_vblank field. Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede --- drivers/gpu/drm/ast/ast_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 34608f0499eb..ef7a0b08cc05 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -800,6 +800,8 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc= *crtc, return -EINVAL; } =20 + state->no_vblank =3D true; + ast_state =3D to_ast_crtc_state(state); =20 format =3D ast_state->format; @@ -833,8 +835,6 @@ static void ast_crtc_helper_atomic_flush(struct drm_crt= c *crtc, struct ast_vbios_mode_info *vbios_mode_info; struct drm_display_mode *adjusted_mode; =20 - crtc->state->no_vblank =3D true; - ast_state =3D to_ast_crtc_state(crtc->state); =20 format =3D ast_state->format; --=20 2.24.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon May 6 00:04:23 2024 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=1579092808; cv=none; d=zohomail.com; s=zohoarc; b=YYd7D6OlSPoB3gNXYnQpVPOK+Wt5/4QdEIRmn5Doa7tornefMOh1vvdfdNMRhVyU98GzjIGrX3BSPPrCx5RRNjhqX6WAqqPVMLjP+WSvftecsO4hC1v2NJL74/Pj/nEBPr4n0PieMD5L7Bj2Ls8Kd6I7mk28nUa/qxBtN2fx3Oo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579092808; 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=ntCGX6oVymCmnDTkqz+6QIBp1dVx4l0B0TIEJuamBN8=; b=j7Xph8Sl5Xh2Qo81ha+fuNk2h/VaUjo7x7k5SFxx7/f8/F3cFUg/Fr7fVMF9xO5u+oo02r4HvUw7xTErCGYLBPWhc1Xzm5FjJd3Sgdy375/ccE0mBZ10Wkgw0S/VN7rF01e+h+2hYnvvnk6+n7yWtKybMuzQVO1JKJ7u/bDR05w= 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 1579092808676978.5050035673938; Wed, 15 Jan 2020 04:53:28 -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 1iriA9-00014G-L1; Wed, 15 Jan 2020 12:52:45 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iriA8-00014B-Ho for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 12:52:44 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e70e874c-3795-11ea-a985-bc764e2007e4; Wed, 15 Jan 2020 12:52:35 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 91269AFFE; Wed, 15 Jan 2020 12:52:34 +0000 (UTC) X-Inumbo-ID: e70e874c-3795-11ea-a985-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: Wed, 15 Jan 2020 13:52:25 +0100 Message-Id: <20200115125226.13843-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200115125226.13843-1-tzimmermann@suse.de> References: <20200115125226.13843-1-tzimmermann@suse.de> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 3/4] drm/cirrus: Let DRM core send 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, Thomas Zimmermann , dri-devel@lists.freedesktop.org, 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" In drm_atomic_helper_fake_vblank(), the DRM core sends out VBLANK events if struct drm_crtc_state.no_vblank is enabled. Replace cirrus' VBLANK events with the DRM core's functionality. v2: * set struct_drm_crtc_state.no_vblank in cirrus_pipe_check() Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede --- drivers/gpu/drm/cirrus/cirrus.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus.c b/drivers/gpu/drm/cirrus/cirru= s.c index 248c9f765c45..5ff15e8a2a0a 100644 --- a/drivers/gpu/drm/cirrus/cirrus.c +++ b/drivers/gpu/drm/cirrus/cirrus.c @@ -38,7 +38,6 @@ #include #include #include -#include =20 #define DRIVER_NAME "cirrus" #define DRIVER_DESC "qemu cirrus vga" @@ -404,6 +403,8 @@ static int cirrus_pipe_check(struct drm_simple_display_= pipe *pipe, { struct drm_framebuffer *fb =3D plane_state->fb; =20 + crtc_state->no_vblank =3D true; + if (!fb) return 0; return cirrus_check_size(fb->width, fb->height, fb); @@ -434,13 +435,6 @@ static void cirrus_pipe_update(struct drm_simple_displ= ay_pipe *pipe, =20 if (drm_atomic_helper_damage_merged(old_state, state, &rect)) cirrus_fb_blit_rect(pipe->plane.state->fb, &rect); - - if (crtc->state->event) { - spin_lock_irq(&crtc->dev->event_lock); - drm_crtc_send_vblank_event(crtc, crtc->state->event); - crtc->state->event =3D NULL; - spin_unlock_irq(&crtc->dev->event_lock); - } } =20 static const struct drm_simple_display_pipe_funcs cirrus_pipe_funcs =3D { --=20 2.24.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Mon May 6 00:04:23 2024 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=1579092823; cv=none; d=zohomail.com; s=zohoarc; b=j94NeKHexpTZsRA1URIMIEntVT/X+wyUttU1grRqlaQrMHInyQ4JS7x3QkjHnKFfMxfsd2Bnu2ear8eiNrAldBYaw3A3eRXIp5Fd7RZq77BvzM2zL+URxAQCsqVztIndz/K8jPWaw241yqcCFHtCLzSPzU37SP3NiFdNvdtfLlI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579092823; 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=KwqPP/DqeeImL9d/xGblBNYiu8i38+PU/Jg1RZoqlCA=; b=d/xRFEOeVTbVdbAABTZgE1SqhZc7tBNeD8Q7jyeKr5Mad2U/dSB75yNdUYw2iOkEO2DGLza7lwSn6SMkwgtT6lQ7W89ySxoxn+pBmh5hqlDIO9N0lNrVc+4YRl2en4B53mWnlQCc1hDBk8qGqUZ756lptA7cLCvQCLiHoWUimYQ= 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 1579092823995326.24441036345763; Wed, 15 Jan 2020 04:53:43 -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 1iriAT-00019W-V4; Wed, 15 Jan 2020 12:53:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iriAS-000191-FX for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 12:53:04 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e74a06e6-3795-11ea-a2eb-bc764e2007e4; Wed, 15 Jan 2020 12:52:36 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 17B48B033; Wed, 15 Jan 2020 12:52:35 +0000 (UTC) X-Inumbo-ID: e74a06e6-3795-11ea-a2eb-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: Wed, 15 Jan 2020 13:52:26 +0100 Message-Id: <20200115125226.13843-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200115125226.13843-1-tzimmermann@suse.de> References: <20200115125226.13843-1-tzimmermann@suse.de> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 4/4] drm/simple-kms: Let DRM core send VBLANK events by default 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, Thomas Zimmermann , dri-devel@lists.freedesktop.org, 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" In drm_atomic_helper_fake_vblank() the DRM core sends out VBLANK events if struct drm_crtc_state.no_vblank is enabled in the check() callbacks. For drivers that have neither an enable_vblank() callback nor a check() callback, the simple-KMS helpers enable VBLANK generation by default. This simplifies bochs, udl, several tiny drivers, and drivers based upon MIPI DPI helpers. The driver for Xen explicitly disables no_vblank, as it has its own logic for sending these events. Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede --- drivers/gpu/drm/bochs/bochs_kms.c | 9 --------- drivers/gpu/drm/drm_mipi_dbi.c | 9 --------- drivers/gpu/drm/drm_simple_kms_helper.c | 19 +++++++++++++++---- drivers/gpu/drm/tiny/gm12u320.c | 9 --------- drivers/gpu/drm/tiny/ili9225.c | 9 --------- drivers/gpu/drm/tiny/repaper.c | 9 --------- drivers/gpu/drm/tiny/st7586.c | 9 --------- drivers/gpu/drm/udl/udl_modeset.c | 11 ----------- drivers/gpu/drm/xen/xen_drm_front_kms.c | 13 +++++++++++++ 9 files changed, 28 insertions(+), 69 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/boch= s_kms.c index 3f0006c2470d..ff275faee88d 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -7,7 +7,6 @@ #include #include #include -#include =20 #include "bochs.h" =20 @@ -57,16 +56,8 @@ static void bochs_pipe_update(struct drm_simple_display_= pipe *pipe, struct drm_plane_state *old_state) { struct bochs_device *bochs =3D pipe->crtc.dev->dev_private; - struct drm_crtc *crtc =3D &pipe->crtc; =20 bochs_plane_update(bochs, pipe->plane.state); - - if (crtc->state->event) { - spin_lock_irq(&crtc->dev->event_lock); - drm_crtc_send_vblank_event(crtc, crtc->state->event); - crtc->state->event =3D NULL; - spin_unlock_irq(&crtc->dev->event_lock); - } } =20 static const struct drm_simple_display_pipe_funcs bochs_pipe_funcs =3D { diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 16bff1be4b8a..13b753cb3f67 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -24,7 +24,6 @@ #include #include #include -#include #include