Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1165262pxb; Fri, 21 Jan 2022 11:14:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxT6wg25GOs1b7SUhZdi3WxyEGoG62cfpnMCdj9++ZQzpci+pZzaNdxGvsAWy/mYzi+aP+9 X-Received: by 2002:a17:90a:470a:: with SMTP id h10mr2113605pjg.25.1642792446189; Fri, 21 Jan 2022 11:14:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642792446; cv=none; d=google.com; s=arc-20160816; b=gVl5Kse0aMZY0MF9Hh5n7xMgQETCNGkORHTghuWOrXkhSJfsQ5J9wTxfdIuRAEPlJS OB77xNdRLwn6T1NyhGdBpOmVap14mkVQ6m8PQ5AD5r0zqch+fKbxF7kYNs65VC0KyQU/ 1j6yc47w7HiZBIFLVz0rarBH3pf0Gvc5mYPzQdEwwCI3Xa/EvJnMAR60F66jk1g3dhhs ClT8ucEbIdpJqfApDJ1cx2MpMSO5tbpXEB0leFZK2A0TcauRiDLF4Qh50jZLa69v4DrQ XOCSvRsJHoyCBFi9ZAnTSD/h/Y9TUoW+gdT98qqJg/zwguD0tzWuVyZm+z0tdoNB7Qec b+0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=jSJaWLFbSmKDo2PDFLJ/OlDDjxv/sePlYig27gKKORM=; b=juS7pwzrHV/ngtrmkUmSH1Y9rpbAovHSNXnyfX/5GtUn/zsf/FgIk1M5CM3DNHicd5 sM5WoceS7vI4UbR02Cdu2wkTKdEnRsAPU7BF9KB7SjGGgSIyVCzEL42iVUaSJRqY7nZF JU5Pyo4y2NDci4P2nJpWNOtM5N8FT0DLUroWFQoyUrT6Aol+Un+wg2nIck9unUTh42Tx fZE60bAGlljszQeiLaHKZ3GpaL/dS4QAo1BvqgMNwpZuPRZent/kV2yV7jn7AInXTHdY W6o1O/3cqd4ad0ddkSfWwsFMgZALAL6DhBUHrNctMsaVyK9i33h0fYBiL2HxEUFMDgSD okBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si7853691plg.225.2022.01.21.11.13.54; Fri, 21 Jan 2022 11:14:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349728AbiASMqK (ORCPT + 99 others); Wed, 19 Jan 2022 07:46:10 -0500 Received: from mail-ua1-f47.google.com ([209.85.222.47]:40756 "EHLO mail-ua1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245463AbiASMqH (ORCPT ); Wed, 19 Jan 2022 07:46:07 -0500 Received: by mail-ua1-f47.google.com with SMTP id w21so4222273uan.7; Wed, 19 Jan 2022 04:46:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jSJaWLFbSmKDo2PDFLJ/OlDDjxv/sePlYig27gKKORM=; b=3u7mBhgt4YNpY8+GLAA3HgafJhumKwn/Ezbwe1mi2JXqzneBntTFm2v4wsKncJyrBg JXhxSaCN8J1Imv/b2zjhELBY6dw5XxArAK5hdm1JERlR4JOUpCzu76AEdfKVMXGJNom5 ADZD3jB4IDLh9cQM2ONdzosGrcjRkXzS1ILZFKxW/eiGdqciOI93/sM3F2MEcGvSBn83 UW+OgwXP7n2OxAkTugcub1pmE6HECaEDroSHpSui3f+g2W80X1AgANRv06N+Nhi3i/6c +kW/q5Ux/RoG0w3liBbV4dvVlWsVn76Z43TIwtrkM/JU+0lvS00h1WL0VRrGsdIx2sfJ /swQ== X-Gm-Message-State: AOAM530+k0Wk1vPcmpJz22UslLn4Idt56zDUD4gvokW+E7S74AV1nOOa kW/FlIl7OlAr0kIMZ2qVc9dDH+mFw0bTig== X-Received: by 2002:a67:d315:: with SMTP id a21mr11100069vsj.51.1642596366888; Wed, 19 Jan 2022 04:46:06 -0800 (PST) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com. [209.85.222.46]) by smtp.gmail.com with ESMTPSA id k5sm2243920vsc.14.2022.01.19.04.46.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 04:46:05 -0800 (PST) Received: by mail-ua1-f46.google.com with SMTP id m90so4279777uam.2; Wed, 19 Jan 2022 04:46:04 -0800 (PST) X-Received: by 2002:a9f:3e01:: with SMTP id o1mr11968203uai.89.1642596364458; Wed, 19 Jan 2022 04:46:04 -0800 (PST) MIME-Version: 1.0 References: <20220119110839.33187-1-deller@gmx.de> In-Reply-To: <20220119110839.33187-1-deller@gmx.de> From: Geert Uytterhoeven Date: Wed, 19 Jan 2022 13:45:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] Fix regression introduced by disabling accelerated scrolling in fbcon To: Helge Deller Cc: Thomas Zimmermann , Greg Kroah-Hartman , Linux Fbdev development list , Sven Schnelle , Linus Torvalds , Javier Martinez Canillas , Daniel Vetter , Ilia Mirkin , Tomi Valkeinen , DRI Development , Jani Nikula , Pavel Machek , Linux Kernel Mailing List , Gerd Hoffmann , Sam Ravnborg , Claudio Suarez Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Helge, On Wed, Jan 19, 2022 at 12:10 PM Helge Deller wrote: > This series reverts two patches which disabled scrolling acceleration in > fbcon/fbdev. Those patches introduced a regression for fbdev-supported graphic > cards because of the performance penalty by doing screen scrolling by software > instead of using hardware acceleration. > > Console scrolling acceleration was disabled by dropping code which checked at > runtime the driver hardware possibilities for the BINFO_HWACCEL_COPYAREA or > FBINFO_HWACCEL_FILLRECT flags and if set, it enabled scrollmode SCROLL_MOVE > which uses hardware acceleration to move screen contents. After dropping those > checks scrollmode was hard-wired to SCROLL_REDRAW instead, which forces all > graphic cards to redraw every character at the new screen position when > scrolling. > > This change effectively disabled all hardware-based scrolling acceleration for > ALL drivers, because now all kind of 2D hardware acceleration (bitblt, > fillrect) in the drivers isn't used any longer. > > The original commit message mentions that only 3 DRM drivers (nouveau, omapdrm > and gma500) used hardware acceleration in the past and thus code for checking > and using scrolling acceleration is obsolete. > > This statement is NOT TRUE, because beside the DRM drivers there are around 35 > other fbdev drivers which depend on fbdev/fbcon and still provide hardware > acceleration for fbdev/fbcon. > > The original commit message also states that syzbot found lots of bugs in fbcon > and thus it's "often the solution to just delete code and remove features". > This is true, and the bugs - which actually affected all users of fbcon, > including DRM - were fixed, or code was dropped like e.g. the support for > software scrollback in vgacon (commit 973c096f6a85). > > So to further analyze which bugs were found by syzbot, I've looked through all > patches in drivers/video which were tagged with syzbot or syzkaller back to > year 2005. The vast majority fixed the reported issues on a higher level, e.g. > when screen is to be resized, or when font size is to be changed. The few ones > which touched driver code fixed a real driver bug, e.g. by adding a check. > > But NONE of those patches touched code of either the SCROLL_MOVE or the > SCROLL_REDRAW case. > > That means, there was no real reason why SCROLL_MOVE had to be ripped-out and > just SCROLL_REDRAW had to be used instead. The only reason I can imagine so far > was that SCROLL_MOVE wasn't used by DRM and as such it was assumed that it > could go away. That argument completely missed the fact that SCROLL_MOVE is > still heavily used by fbdev (non-DRM) drivers. > > Some people mention that using memcpy() instead of the hardware acceleration is > pretty much the same speed. But that's not true, at least not for older graphic > cards and machines where we see speed decreases by factor 10 and more and thus > this change leads to console responsiveness way worse than before. > > That's why I propose to revert those patches, re-introduce hardware-based > scrolling acceleration and fix the performance-regression for fbdev drivers. > There isn't any impact on DRM when reverting those patches. > > Helge Deller (2): > Revert "fbdev: Garbage collect fbdev scrolling acceleration, part 1 > (from TODO list)" > Revert "fbcon: Disable accelerated scrolling" Thank you for this series, and the prior analysis! Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds