From patchwork Thu Sep 12 06:42:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11142405 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 DD43314ED for ; Thu, 12 Sep 2019 06:42:43 +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 C5B21206CD for ; Thu, 12 Sep 2019 06:42:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5B21206CD 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 36D676EB57; Thu, 12 Sep 2019 06:42:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 816EC6EB59 for ; Thu, 12 Sep 2019 06:42:38 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ADE72AE5E; Thu, 12 Sep 2019 06:42:36 +0000 (UTC) From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@redhat.com, noralf@tronnes.org, rong.a.chen@intel.com, feng.tang@intel.com, ying.huang@intel.com, kraxel@redhat.com, ville.syrjala@linux.intel.com Subject: [PATCH v2 0/3] Rate-limit shadow-FB-to-console-update to screen refresh Date: Thu, 12 Sep 2019 08:42:27 +0200 Message-Id: <20190912064230.27972-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" A full-screen memcpy() moves the console's shadow buffer to hardware; with possibly significant runtime overhead. [1] The console's dirty worker now waits for the vblank to rate limit the output frequency. Screen output can pile up while waiting and there's a chance that multiple screen updates can be handled with a single memcpy(). Note that this has no effect on tearing: while the dirty worker updates the hardware buffer, new data can still arrive in the shadow buffer. This can create a tearing effcet, even though console output is synchronized to vblank. The patchset adds vblank support to mgag200, because the problem was first reported with Matrox hardware. v2: * remove locking from fbdev patch * use constants fro mgag200 register names and fields * double-check that VLINE irq is active on mgag200 * only signal vblank on CRTC 0 of mgag200 * coding-style fixes [1] https://lists.freedesktop.org/archives/dri-devel/2019-July/228663.html Thomas Zimmermann (3): drm/fb-helper: Synchronize dirty worker with vblank drm/mgag200: Rename constant MGAREG_Status to MGAREG_STATUS drm/mgag200: Add vblank support drivers/gpu/drm/drm_fb_helper.c | 10 +++++ drivers/gpu/drm/mgag200/mgag200_drv.c | 1 + drivers/gpu/drm/mgag200/mgag200_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_main.c | 40 +++++++++++++++++++ drivers/gpu/drm/mgag200/mgag200_mode.c | 53 ++++++++++++++++++++++---- drivers/gpu/drm/mgag200/mgag200_reg.h | 7 +++- 6 files changed, 104 insertions(+), 8 deletions(-) --- 2.23.0