From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14163C2D0DB for ; Mon, 20 Jan 2020 12:20:59 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E2ED3208E4 for ; Mon, 20 Jan 2020 12:20:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2ED3208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A0CB6FA8A; Mon, 20 Jan 2020 12:20:58 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0BB486FA8A for ; Mon, 20 Jan 2020 12:20:57 +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 BE130AC7C; Mon, 20 Jan 2020 12:20:54 +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 Subject: [PATCH v3 0/4] Use no_vblank property for drivers without VBLANK Date: Mon, 20 Jan 2020 13:20:47 +0100 Message-Id: <20200120122051.25178-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 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: , Cc: xen-devel@lists.xenproject.org, Thomas Zimmermann , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Instead of faking VBLANK events by themselves, drivers without VBLANK support can enable drm_crtc_vblank.no_vblank and let DRM do the rest. The patchset makes this official and converts over drivers. The current implementation looks at the number of initialized CRTCs wrt vblanking. If vblanking has been initialized for a CRTC, the driver is responsible for sending out VBLANK events. Otherwise, DRM will send out the event. The behaviour selected by initializing no_vblank as part of drm_atomic_helper_check_modeset(). I went through all drivers, looking for those that call send out VBLANK events but do not call drm_vblank_init(). These are converted to the new semantics. This affects tiny drivers; drivers for virtual hardware; and a few others, which do not support interrupts. Xen comes with its own VBLANK logic and disables no_vblank explictly. For now, I left out Hans' R-b on v2 of the series, as the patches changed quite a bit. v3: * reorder and squash patches * set no_vblank in drm_atomic_helper_check_modeset() for *all* drivers (Daniel) * convert all drivers to new semnatics as necessary v2: * document functionality (Daniel) * cleanup ast (Daniel) * let simple-kms handle no_vblank where possible Thomas Zimmermann (4): drm: Add drm_crtc_has_vblank() drm: Initialize struct drm_crtc_state.no_vblank from device settings drm/ast: Don't set struct drm_crtc_state.no_vblank explictly drm/udl: Don't set struct drm_crtc_state.no_vblank explictly drivers/gpu/drm/arc/arcpgu_crtc.c | 16 ------------- drivers/gpu/drm/ast/ast_mode.c | 2 -- drivers/gpu/drm/bochs/bochs_kms.c | 9 ------- drivers/gpu/drm/cirrus/cirrus.c | 8 ------- drivers/gpu/drm/drm_atomic_helper.c | 10 +++++++- drivers/gpu/drm/drm_mipi_dbi.c | 9 ------- drivers/gpu/drm/drm_vblank.c | 30 ++++++++++++++++++++++++ drivers/gpu/drm/qxl/qxl_display.c | 14 ----------- 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/vboxvideo/vbox_mode.c | 12 ---------- drivers/gpu/drm/virtio/virtgpu_display.c | 8 ------- drivers/gpu/drm/xen/xen_drm_front_kms.c | 13 ++++++++++ include/drm/drm_crtc.h | 27 +++++++++++++++------ include/drm/drm_simple_kms_helper.h | 7 ++++-- include/drm/drm_vblank.h | 1 + 19 files changed, 78 insertions(+), 135 deletions(-) -- 2.24.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel