Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1345586pxb; Wed, 2 Feb 2022 02:53:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBl1+LEaDFwWotg7mQdU+gt6lC9n0RnSyQQG/UR2ybBOHI7zWx76+K9AnTAX+t+wJF3BNt X-Received: by 2002:a17:902:988e:: with SMTP id s14mr3966790plp.87.1643799210281; Wed, 02 Feb 2022 02:53:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643799210; cv=none; d=google.com; s=arc-20160816; b=w8myD9A+jnktAE9DvhHG1/ISv2/7IQ0Mtfa0iuElYeSb0rMu1WGVR8nCbnbAIKvPc6 DOmdUA0csgSoH7mqfPTdiVu+fLtz3+23ktV940hhuAmK/hWGeZCdZ2S6UkFJbVr+xZ6v nR88/M1xyhU02db8xZkOnYN/KkXL8oinAzWM2+qVN6pnd56YFf1KMRszMLBVghhfsWF0 h6CSLS4JRPuML2j5qn1ACknqWvKIw6S4KFzXabB/teTbpG+GH9Rob9izp2d323b6nkyd pKcWpodSiPe/cDy9z2rSfN0WFsl34I4phCTn6t0/MYto2AXrVcpCPK3CXTORvaudi+Ot jpww== 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:dkim-signature; bh=2/6KNv9/sT6GkrKOK9WEHCnafWs+1/uASbFZJ68bfvw=; b=sFncuTstpGq39VI+h50iXmQaLcLdXU73XtgVFcxKer2HZSuP1tWfxRZdUAgdbLXehB 0EGyj+HXX72T2fB5kU89VIbhFM5xzPsADJC0/eI9zGTro6RwgcLJLAQNkx+GE40KK5L/ 6QmNbKiPoczZS3T8ZRwD7jTVsqJDlZCEoGZRrVP2QRiu2XxYVS8ZB/UYWxvVIlsOQEdw u9DviNRjUW9J16WjbQ2iuKIHAaUImu1hGNvW3Y9mjpVu1Hmrzb2+yn9gjiIT4wYz/IFh qdHtcoO7BxMOQqx2IvCHZWwXZKvmQGEtIw4Gi0WaLTgz+SJDTg4ZMrAzQ20+JsbEgr0V VFeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="g5/k9Xny"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9si4479684pjp.56.2022.02.02.02.53.17; Wed, 02 Feb 2022 02:53:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="g5/k9Xny"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238831AbiBANpa (ORCPT + 99 others); Tue, 1 Feb 2022 08:45:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbiBANp2 (ORCPT ); Tue, 1 Feb 2022 08:45:28 -0500 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE414C061714 for ; Tue, 1 Feb 2022 05:45:28 -0800 (PST) Received: by mail-ot1-x333.google.com with SMTP id w27-20020a9d5a9b000000b005a17d68ae89so16236347oth.12 for ; Tue, 01 Feb 2022 05:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2/6KNv9/sT6GkrKOK9WEHCnafWs+1/uASbFZJ68bfvw=; b=g5/k9Xnyqr4hCFjiKV9VdFUS0An5UbQmLXEd7/TNbrj3V41u9lCYKOgsPddlPSzOpE 5eqbEqANjmcVoZeGc/sV7FiuBIFY1wnxkZxKtGkWuM2niUacHpSeS+rYvK+OTJxP7yfd /DTGhTzkjZ+3FIkC1a5uMQ1BeznnJ9geArMzY= 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=2/6KNv9/sT6GkrKOK9WEHCnafWs+1/uASbFZJ68bfvw=; b=dQsWz35Lhr15a7QLln8eYpy+FVo/VYSTDSW4VpOQ7u82Mym5eHzKfKx3uwAqKO3aSi rRYWwLNf5L7D608ndBXUktuiYWaa755H1FytBbeNsJakOl3eDM6trKYcy1JGL25jhavh IZfou3UDO0RIpKVHF1R3QwjEKQkjXERhX6IeKU/xEimQ6Tse3PTMtN2KSY9orB8JC4/l nqoFpROqq+M+3C6ggzf+leNwqKr4o4OjBJKg0hdD78F9IGrFNxEgN/lSpwue+bLWxVu8 aVBD3JTb6qaLJpdVVOrZDGdSrdfcU6X+47cwoXttG9ZnQsCBfFOcbrugZvpyRGyvb8kH +EUw== X-Gm-Message-State: AOAM533ZtM/p4nYJDty6YpdcAJ/o8AntfW0u0Xb8DGRzNOt2bL2AFJw8 QZU4kGDZIvzrqk5oq54trJw5VyA+Lg3M/4XeGfo98A== X-Received: by 2002:a05:6830:1153:: with SMTP id x19mr13573050otq.321.1643723128054; Tue, 01 Feb 2022 05:45:28 -0800 (PST) MIME-Version: 1.0 References: <20220131210552.482606-1-daniel.vetter@ffwll.ch> <20220131210552.482606-4-daniel.vetter@ffwll.ch> <9c22b709-cbcf-6a29-a45e-5a57ba0b9c14@gmx.de> <63018892-68e8-01b6-1e8f-853892e15c97@gmx.de> In-Reply-To: <63018892-68e8-01b6-1e8f-853892e15c97@gmx.de> From: Daniel Vetter Date: Tue, 1 Feb 2022 14:45:16 +0100 Message-ID: Subject: Re: [PATCH 03/21] fbcon: Restore fbcon scrolling acceleration To: Helge Deller Cc: DRI Development , Intel Graphics Development , linux-fbdev@vger.kernel.org, LKML , stable@vger.kernel.org, Claudio Suarez , Dave Airlie , Jani Nikula , Linus Torvalds , Pavel Machek , Sam Ravnborg , Greg Kroah-Hartman , Javier Martinez Canillas , Tomi Valkeinen , Geert Uytterhoeven , Thomas Zimmermann , Daniel Vetter , Sven Schnelle , Gerd Hoffmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 1, 2022 at 12:01 PM Helge Deller wrote: > On 2/1/22 11:36, Daniel Vetter wrote: > > On Tue, Feb 1, 2022 at 11:16 AM Helge Deller wrote: > >> > >> On 1/31/22 22:05, Daniel Vetter wrote: > >>> This functionally undoes 39aead8373b3 ("fbcon: Disable accelerated > >>> scrolling"), but behind the FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION > >>> option. > >> > >> you have two trivial copy-n-paste errors in this patch which still prevent the > >> console acceleration. > > > > Duh :-( > > > > But before we dig into details I think the big picture would be > > better. I honestly don't like the #ifdef pile here that much. > > Me neither. > The ifdefs give a better separation, but prevents that the compiler > checks the various paths when building. > > > I wonder whether your approach, also with GETVX/YRES adjusted > > somehow, wouldn't look cleaner? > I think so. > You wouldn't even need to touch GETVX/YRES because the compiler > will optimize/reduce it from > > #define GETVYRES(s,i) ({ \ > (s == SCROLL_REDRAW || s == SCROLL_MOVE) ? \ > (i)->var.yres : (i)->var.yres_virtual; }) > > to just become: > > #define GETVYRES(s,i) ((i)->var.yres) Yeah, but you need to roll out your helper to all the callsites. But since you #ifdef out info->scrollmode we should catch them all I guess. > > Like I said in the cover letter I got mostly distracted with fbcon > > locking last week, not really with this one here at all, so maybe > > going with your 4 (or 2 if we squash them like I did here) patches is > > neater? > > The benefit of my patch series was, that it could be easily backported first, > and then cleaned up afterwards. Even a small additional backport patch to disable > the fbcon acceleration for DRM in the old releases would be easy. > But I'm not insisting on backporting the patches, if we find good way forward. > > So, either with the 4 (or 2) patches would be OK for me (or even your approach). The idea behind the squash was that it's then impossible to backport without the Kconfig, and so we'll only enable this code when people intentionally want it. Maybe I'm too paranoid? Anyway, you feel like finishing off your approach? Or should I send out v2 of this with the issues fixed you spotted? Like I said either is fine with me. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch