Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3767434pxk; Tue, 22 Sep 2020 01:51:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNNtzZ7q/H4NdCPp33ja4ykEpPGBh9zgT9O6uVEV4g+rbxbbE++A31vugBK6+Ab4O9z1AB X-Received: by 2002:a17:906:a2d9:: with SMTP id by25mr3829725ejb.326.1600764673109; Tue, 22 Sep 2020 01:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600764673; cv=none; d=google.com; s=arc-20160816; b=d8Ubgmd2Oq1laKzuwlfKkaxYrqjZpy5Vq9rIBwVQC7oXnt4VYFG0/WeAD5uJ8/YYSo RQqrJP/abNc8tON1tVAcLvNTLTFDmzAlzuGWWxSI55h4xtYvQ7bWU+wjqCC+u9Qo3PsZ r6pAvhBidyet+FDqr+nE71+2EKRCC50gLjWNc41x2QJAlLQRS4bPInKfwDWPmIZXKykL KLrblo2NsJkx2qarob4LajCH4Gv3IHYcEuzLqtMqQFjWOdikvRqLxElaeNfOea9koChp 4NHF08yvtauDqr0X66QkSr+Zil9pFwEmyupRxWxI2Uco7ZHU9tQr2PPgADZbu3EoCgqO VRVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=jsNWWtoa6X+sZSQeIIkB8rH8cAInWaMct+qDJoJAhII=; b=fB1cXOkNPPK+9PUUYis68+om9nQ79+pCZnshWGeWoa8ST2I8JxfCiD3td20NSGwkYd c1M279bR5cJ7Pr5Sa2KSKOIhSK9iJTbgpEE2ZFUqw+kJMJdk3rqKAyys/JgnuBmte4sK DzxEwBDACzMhlTcWwbfL2hx5Pi4jQjN+8ifIXxtsztQDNEATtLLaAMmEd/majW7bgNqB zm1PUFGKSTv0YX1Jg3BSlQ36ZyiZFznKerCr8GUeA7oTw1uXze2T0eO6FjI1IWhKPTia 1pzGZlj71RcLfHF+ROV08A1biDIIdx4/9OGXbK2wmZ3Kq4knrZ7oQRtX9Pq+W4PmUHtm B/NQ== 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 i7si13101119ejo.706.2020.09.22.01.50.49; Tue, 22 Sep 2020 01:51:13 -0700 (PDT) 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 S1726489AbgIVItW (ORCPT + 99 others); Tue, 22 Sep 2020 04:49:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbgIVItV (ORCPT ); Tue, 22 Sep 2020 04:49:21 -0400 Received: from smtp1.goneo.de (smtp1.goneo.de [IPv6:2001:1640:5::8:30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131EDC061755 for ; Tue, 22 Sep 2020 01:49:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.goneo.de (Postfix) with ESMTP id B960023F145; Tue, 22 Sep 2020 10:49:18 +0200 (CEST) X-Virus-Scanned: by goneo X-Spam-Flag: NO X-Spam-Score: -2.992 X-Spam-Level: X-Spam-Status: No, score=-2.992 tagged_above=-999 tests=[ALL_TRUSTED=-1, AWL=-0.092, BAYES_00=-1.9] autolearn=ham Received: from smtp1.goneo.de ([127.0.0.1]) by localhost (smtp1.goneo.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5pBoK3EoOgG4; Tue, 22 Sep 2020 10:49:17 +0200 (CEST) Received: from lem-wkst-02.lemonage (hq.lemonage.de [87.138.178.34]) by smtp1.goneo.de (Postfix) with ESMTPSA id 7766E23F1E7; Tue, 22 Sep 2020 10:49:17 +0200 (CEST) Date: Tue, 22 Sep 2020 10:49:12 +0200 From: Lars Poeschel To: Willy Tarreau Cc: Miguel Ojeda Sandonis , open list Subject: Re: [PATCH v2 28/32] auxdisplay: hd44780: Remove clear_fast Message-ID: <20200922084912.sck4j3iazqevaskg@lem-wkst-02.lemonage> References: <20191016082430.5955-1-poeschel@lemonage.de> <20200921144645.2061313-1-poeschel@lemonage.de> <20200921144645.2061313-29-poeschel@lemonage.de> <20200922052227.GA16386@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922052227.GA16386@1wt.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Willy, On Tue, Sep 22, 2020 at 07:22:27AM +0200, Willy Tarreau wrote: > Hi Lars, > > On Mon, Sep 21, 2020 at 04:46:40PM +0200, poeschel@lemonage.de wrote: > > From: Lars Poeschel > > > > We remove the hd44780_clear_fast (display) clear implementation. charlcd > > will fall back to use hd44780_common_clear_display then, which is much > > much faster. > > I might have got confused, but it looks to me like patches 27 and 28 > basically undo patch 26: in 26 you moved code to hd44780 and wrote a > fallback, just to later delete that code. To be honest: I also got confused by this whole clear code and why are there 3 different clear variants. ;-) The reason why I did it this way is to show what happened to the original code. The original code has a fallback that kind of does the same like my naive implementation but it uses the fact, that on hd44780 displays the underlying buffer can be accessed in a linear manner to speed things up a little. This then also clears the not visible area of the buffer (which my naive implementation does not). To become independent of hd44780 code at this point I had to do something. I opted to for this naive implementation as a replacement for the old optimized clear loop. The fallback was already there. And then I did a separate step to remove it because I found it a bit suboptimal. All current users have the clear command... > I seem to remember that the reason for the clear_fast() implementation > is that the default clear_display() is quite slow for small displays, > compared to what can be achieved by just filling the display with spaces > (in the order of tens of milliseconds vs hundreds of microseconds). But > I could be mistaken given how old this is, so please take my comment > with a grain of salt. ... well, and what the hd44780 controller does when it executes the clear command is also writing a space character to all character locations (also to the not visible ones). Probably very much the same than the original fallback implementation. For me issuing the clear command is faster by at least one order! I have one of these cheap china displays with 4x20 characters. The flow is like this: i2c -> gpio -> hd44780 in 4 bit mode. And gpio is issuing a i2c request for EVERY SINGLE gpio. This is slow as hell. But it works. :-) As I said I also was a bit confused by the different clean implementations, but the only real user of the clear_fast is the panel driver. The hd44780 one I use did not provide a clear_fast. So I would opt for the way I proposed in the patch series with the clear command instead of the loop. And let the panel driver use its optimized clear. I am open about squashing things together if that is wanted, so we don't have the step inbetween with the naive implementation and to not confuse people. ;-) Regards, Lars