Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1590903pxb; Wed, 2 Feb 2022 08:14:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPZSo57EaPp2VYQisH+qV+Vegt0pv5F0CkeoDaQRvf4VmjOo42YVm60FO8TNxVjvU1vOMn X-Received: by 2002:a17:90b:1b46:: with SMTP id nv6mr8835163pjb.105.1643818474552; Wed, 02 Feb 2022 08:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643818474; cv=none; d=google.com; s=arc-20160816; b=NEB47WaO4AyT+naAYGhtsDzIABPbKqc95LvuxhUB+fXnqK13qfmQJR5Dedc/Ts10EU irKio0mdUIxx06lHAPUqWqaJ70rjYCyKvbNqO58VYUkLwuIw1EKF7iQRBXjYr0IySceA CyaItia6DpKNdN5ZOvIok6pIXP927FTKK0x+lyf+uzmmqwgoqUTAz2eltPdqSdr+O6I2 l5xTkdd6ejZweHMdYSGjIO1mgFsSLh4lBjrSjjLtnvD4hjIw8JKxp5Ej+kk+9RRhwOPk GieXsKEiQoqHOJ9ZT1AjsyNtIkWfBfY60f3tjjewOSqRxHZIYsKaqM46svAaTBwDJKlu pxmA== 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=SmoAfGUcv3WuX5MTMsQtLDuakLAcJhTCCEdC4MKfCJU=; b=qpPMZHfX8akihl49da2jf9R65LrHiZ6Sh2Z/aHycyuaK/2OTLBo1B3ylkIgjM5p1OB REp2f8pXJ1Etmu4Bow1QU3Ps3VRf5VK3KsbZTRDbZ1cVOa5n+E1Khqnh8/db85x6USJu f+dO81iN5jfCr3XclaOg7Dqm9rOKabLqJOl1MgoxZOoksjdNHmasGeKkIQD5JyICF1Fp gqFsvIM79SZ0mWmdS442t5JDhzmNtxK6b6RZdEO0ZzbfRs3DWkoikCZBcqVi+E16C5gR cuGH3weExjhv3+kajUdrlRkbR6Imck3oAHeeNfnRjxAjCaYv8rtJ7g+wthMqUSe0m548 orFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=hE0dHoYE; 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 x6si18191768pla.46.2022.02.02.08.14.19; Wed, 02 Feb 2022 08:14:34 -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=hE0dHoYE; 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 S241097AbiBAQau (ORCPT + 99 others); Tue, 1 Feb 2022 11:30:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbiBAQas (ORCPT ); Tue, 1 Feb 2022 11:30:48 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47A35C061714 for ; Tue, 1 Feb 2022 08:30:48 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id r27so12160980oiw.4 for ; Tue, 01 Feb 2022 08:30:48 -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=SmoAfGUcv3WuX5MTMsQtLDuakLAcJhTCCEdC4MKfCJU=; b=hE0dHoYE2FXofMs4e1RcU8c6vfA8rv8R3XWFaQ0os1A+wPd9bM/1RxDIdOUGSJs44C IbvTPs4DM04VagcMezxMBUFH8mDLy9QtjjQblNkO/XUP+kEMmcvVuSs6Ghbzv6BTRJkJ xLtV9OHhTOddvn0QXAX7viusKmGqEOG1wVJo8= 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=SmoAfGUcv3WuX5MTMsQtLDuakLAcJhTCCEdC4MKfCJU=; b=7av8swA5u/IYSjl2T9fadoYXx7GrWP03Ok4wgDKevaRfU3xE1E6jVnd74T9aqCSEXC ExoLerMmzPhlsqMcjEiAIf8eO1ACrKGmRUdshQrfDDvq6Q6i1xKFN+IQIV7mYwDFM4FG TlEzK0OL0MyXulh2NkwkmaYWmp8M/aD2Lfbih6m75shLQPxT0bgpn7ZAb9ztXUvk4DyI RLLRWzmVsb/3T/weuuDUSDafG4A1u+iNsvGMqYYB4GuYnYV144L+8U6GTt45bCabQmkb niJYrCG9FLAESsluvk4lTwUzJdisIyHvuEhTsd/nmKGs+FnJnx7N7/KRUUE+5e8PdUh9 OrUw== X-Gm-Message-State: AOAM532yQNLn906SXRHckQeAs2plNeSpcPtdpZJNmByU8b5Kz18w3KI1 SYJxFMsEW3GEa+8Q/MYJKJaB8deXk5CrgYMnV6yGvg== X-Received: by 2002:a54:4803:: with SMTP id j3mr1774572oij.279.1643733047225; Tue, 01 Feb 2022 08:30:47 -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> <313c4c72-364b-1d61-09c1-e4a83cbefe6a@gmx.de> In-Reply-To: <313c4c72-364b-1d61-09c1-e4a83cbefe6a@gmx.de> From: Daniel Vetter Date: Tue, 1 Feb 2022 17:30:36 +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 3:52 PM Helge Deller wrote: > > On 2/1/22 14:45, Daniel Vetter wrote: > > 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. > > Right. That was the only reason why I ifdef'ed it out. > Technically we don't need that ifdef. > > >>> 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, > > Yes, my proposal was to simply revert the 2 patches and immediatly send > the Kconfig patch to disable it again. > > > and so we'll only enable this code when people > > intentionally want it. Maybe I'm too paranoid? > > I think you are too paranoid :-) > If all patches incl. the Kconfig patch are backported then people shouldn't > do it wrong. > > > 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. > > Ok, then let me try to finish my approach until tomorrow, and then you > check if you can and want to add your locking and other patches on top of it. > In the end I leave the decision which approach to take to you. > Ok? Sounds good, and yeah rough idea is that the maintainers + revert + Kconfig should go in for rc3 or rc4 if we hit another bump, and the locking stuff then in for -next (since it needs a backmerge and is defo tricky stuff). Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch