From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70FC3C0015E for ; Fri, 28 Jul 2023 21:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FrNaW0pCpfLOSjCYQMtCs7hAK4qDf2Som+Iz1JksuIk=; b=GSKJobcmK5AJ5x rJ2jmvGNbWteM2p3q789k4M4LePwaNf92FlL9s8bIYUI+w27xier7T41PvKKLaf00ikndMAEakFPm DcqkPBNXiYO5ob5WxRQu6VJw2YD2nVZsPdOEoQkfEqAJEn8Hj0C5lmnzPj+/6CH7a67TqmwmX+z8w M6nZfsaRcu6kGnLq7GSSU66B92FyWy+8GOAw+rRhcVTuo+i/nQvOipQOUblD2hG5w1w4AH80nVFin S+cZyhQpTmH3HrMy9McYUDz4M8ctMMnKcVK3EJCnut2mrcstAa9M7ipubRwP4H7ud22B8Ma/b8d/k bkqxhQpBWuPC48i8I2lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qPUah-00521R-1j; Fri, 28 Jul 2023 21:01:39 +0000 Received: from mailrelay3-1.pub.mailoutpod2-cph3.one.com ([2a02:2350:5:402::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qPUad-0051wo-04 for linux-arm-kernel@lists.infradead.org; Fri, 28 Jul 2023 21:01:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=2M7I6GspW66DQLncO4JKL/r3gVWBlh/Z61h7j/4ZXwQ=; b=VmorxddsvliAc2zCAOdnHcnfpXk3HL6FA27GlnhkXSDoGE0taO0g/r11MTt0+sI0kBn9KF5g/nrJO YBHws5h7tg8z3vU2AXdiQl9zEYuH8U/rlDvV9qOR0LqdOqrOTT8Q280NatZ58QFneNl5qS40d2PF4M EUS5sJGrrFwpIycoYicR9+NrqKdO9dYIH7hOkxrBCPEzDbnuW5lyt3OSZ3qejIsC5BlnWolgnIV57W oWgE09YqMgvptwaf+e3S6UG3fSVu9ZZWZQL0aj4IVi0oMKAI1oKRsI8Jyw+i3pIMQPCcYbWIvLP5Ea 2ZNE/tlQONtqNXH1lFqn6N8xJ+w3WZQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=2M7I6GspW66DQLncO4JKL/r3gVWBlh/Z61h7j/4ZXwQ=; b=dkD1HMHNc3u2lokBeS9EgDAhIVt0/YZ+STE3czXIeWa0urEuoYnPhcLDxQzwHTeu678MjBdhgtiY7 JMYlTDXDg== X-HalOne-ID: eaf56fd1-2d89-11ee-8d0f-b90637070a9d Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay3 (Halon) with ESMTPSA id eaf56fd1-2d89-11ee-8d0f-b90637070a9d; Fri, 28 Jul 2023 21:01:29 +0000 (UTC) Date: Fri, 28 Jul 2023 23:01:27 +0200 From: Sam Ravnborg To: Helge Deller Cc: Thomas Zimmermann , javierm@redhat.com, linux-media@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-geode@lists.infradead.org, linux-omap@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 00/47] fbdev: Use I/O helpers Message-ID: <20230728210127.GA1156027@ravnborg.org> References: <20230728182234.10680-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230728_140135_973103_774D800B X-CRM114-Status: GOOD ( 19.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Helge, On Fri, Jul 28, 2023 at 08:46:59PM +0200, Helge Deller wrote: > On 7/28/23 18:39, Thomas Zimmermann wrote: > > Most fbdev drivers operate on I/O memory. > > Just nitpicking here: > What is I/O memory? > Isn't it either memory, or I/O ? > I mean, I would never think of the cfb* draw functions under I/O. > > > And most of those use the > > default implementations for file I/O and console drawing. Convert all > > these low-hanging fruits to the fb_ops initializer macro and Kconfig > > token for fbdev I/O helpers. > > I do see the motivation for your patch, but I think the > macro names are very misleading. > > You have: > #define __FB_DEFAULT_IO_OPS_RDWR \ > .fb_read = fb_io_read, \ > .fb_write = fb_io_write > > #define __FB_DEFAULT_IO_OPS_DRAW \ > .fb_fillrect = cfb_fillrect, \ > .fb_copyarea = cfb_copyarea, \ > .fb_imageblit = cfb_imageblit > > #define __FB_DEFAULT_IO_OPS_MMAP \ > .fb_mmap = NULL /* default implementation */ > > #define FB_DEFAULT_IO_OPS \ > __FB_DEFAULT_IO_OPS_RDWR, \ > __FB_DEFAULT_IO_OPS_DRAW, \ > __FB_DEFAULT_IO_OPS_MMAP > > I think FB_DEFAULT_IO_OPS is OK for read/write/mmap. > But I would suggest to split out __FB_DEFAULT_IO_OPS_DRAW. > Something like: > #define FB_DEFAULT_IO_OPS \ > __FB_DEFAULT_IO_OPS_RDWR, \ > __FB_DEFAULT_IO_OPS_MMAP > #define FB_DEFAULT_CFB_OPS \ > .fb_fillrect = cfb_fillrect, \ > .fb_copyarea = cfb_copyarea, \ > .fb_imageblit = cfb_imageblit The prefix cfb, I have recently learned, equals color frame buffer. They are named such for purely historical reasons. What is important is where the data are copied as we have two implementations of for example copyarea - one using system memory, the other using IO memory. The naming FB_DEFAULT_IO_OPS says this is the defaults to IO memory operations, which tell what they do and avoid the strange cfb acronym. Reserve cfb for color frame buffers only - and maybe in the end rename the three cfbcopyarea, cfbfillrect, cfbimgblt to use the io prefix. Which is much simpler to do after this series - and nice extra benefit. I hope this properly explains why I like the current naming and acked it when the macros were introduced. Sam _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel