From patchwork Wed Jan 15 12:52:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11334379 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0670A17EA for ; Wed, 15 Jan 2020 12:54:23 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0492206D7 for ; Wed, 15 Jan 2020 12:54:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0492206D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Inumbo-ID: e70e874c-3795-11ea-a985-bc764e2007e4 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) X-Virus-Scanned: by amavisd-new at test-mx.suse.de 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) 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 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 --- 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/cirrus.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 #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 = plane_state->fb; + crtc_state->no_vblank = 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_display_pipe *pipe, 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 = NULL; - spin_unlock_irq(&crtc->dev->event_lock); - } } static const struct drm_simple_display_pipe_funcs cirrus_pipe_funcs = {