From patchwork Mon Sep 9 14:06:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11138057 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 0F93314DB for ; Mon, 9 Sep 2019 14:06:45 +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 EBD1C218DE for ; Mon, 9 Sep 2019 14:06:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBD1C218DE 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 B968A89C68; Mon, 9 Sep 2019 14:06:43 +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 DA0BC89C80 for ; Mon, 9 Sep 2019 14:06:37 +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 4599CAE8B; Mon, 9 Sep 2019 14:06: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 Subject: [PATCH 0/2] Rate-limit shadow-FB-to-console-update to screen refresh Date: Mon, 9 Sep 2019 16:06:31 +0200 Message-Id: <20190909140633.31260-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. [1] https://lists.freedesktop.org/archives/dri-devel/2019-July/228663.html Thomas Zimmermann (2): drm/fb-helper: Synchronize dirty worker with vblank drm/mgag200: Add vblank support drivers/gpu/drm/drm_fb_helper.c | 12 ++++++++ drivers/gpu/drm/mgag200/mgag200_drv.c | 1 + drivers/gpu/drm/mgag200/mgag200_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_main.c | 33 ++++++++++++++++++++ drivers/gpu/drm/mgag200/mgag200_mode.c | 42 +++++++++++++++++++++++--- 5 files changed, 85 insertions(+), 4 deletions(-) --- 2.23.0