From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Zimmermann Subject: [PATCH v2 4/4] drm/simple-kms: Let DRM core send VBLANK events by default Date: Mon, 13 Jan 2020 11:38:22 +0100 Message-ID: <20200113103822.24473-5-tzimmermann@suse.de> References: <20200113103822.24473-1-tzimmermann@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200113103822.24473-1-tzimmermann@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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 Cc: xen-devel@lists.xenproject.org, dri-devel@lists.freedesktop.or, Thomas Zimmermann , virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org 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 --- 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/bochs_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 #include "bochs.h" @@ -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 = pipe->crtc.dev->dev_private; - struct drm_crtc *crtc = &pipe->crtc; 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 = NULL; - spin_unlock_irq(&crtc->dev->event_lock); - } } static const struct drm_simple_display_pipe_funcs bochs_pipe_funcs = { 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