From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Zimmermann" <tzimmermann@suse.de>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Robin Murphy" <robin.murphy@arm.com>
Cc: "Helge Deller" <deller@gmx.de>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Vineet Gupta" <vgupta@kernel.org>,
"Huacai Chen" <chenhuacai@kernel.org>,
"WANG Xuerui" <kernel@xen0n.name>,
"David S . Miller" <davem@davemloft.net>,
"James E . J . Bottomley" <James.Bottomley@hansenpartnership.com>,
"Sam Ravnborg" <sam@ravnborg.org>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Linux-Arch <linux-arch@vger.kernel.org>,
linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, sparclinux@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-parisc@vger.kernel.org
Subject: Re: [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions
Date: Sat, 29 Apr 2023 16:11:13 +0200 [thread overview]
Message-ID: <260ee591-a71b-4c83-a775-5591d4222cec@app.fastmail.com> (raw)
In-Reply-To: <df6fa134-3a62-0872-e008-393e4a29a5ab@suse.de>
On Sat, Apr 29, 2023, at 14:26, Thomas Zimmermann wrote:
> Am 28.04.23 um 15:17 schrieb Arnd Bergmann:
>> The only implementations in fbdev are
>>
>> 1) sparc sbus
>> 2) __raw_writel
>> 3) direct pointer dereference
>>
>> But none use the byte-swapping writel() implementations, and
>> the only ones that use the direct pointer dereference or sbus
>> are the ones on which these are defined the same as __raw_writel
>
> After thinking a bit more about the requirements, I'd like to got back
> to v1, but with a different spin. We want to avoid ordering guarantees,
> so I looked at the _relaxed() helpers, but they seem to swap bytes to
> little endian.
Right, the _relaxed() oens are clearly wrong, aside from
the byteswap they also include barriers on some architectures
where the __raw_* version is more relaxed than the required
semantics for relaxed.
> I guess we can remove the fb_mem*() functions entirely. They are the
> same as the non-fb_ counterparts.
These might actually be different in some cases, or sub-optimal
at the moment. memcpy()/memset() don't take __iomem pointers, so they
cause sparse warnings, while the memset_io()/memcpy_fromio()/
memcpy_toio() sometimes fall back to bytewise access that is slower
than word-sized copy. I only looked at the readl/writel style
functions earlier, no idea what we want here.
> For the fb read/write helpers, I'd
> like to add them to <asm-generic/fb.h> in a platform-neutral way. They'd
> be wrappers around __raw_(), as I wouldn't want invocations of __raw_()
> functions in the fbdev drivers.
That sounds good to me.
Arnd
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2023-04-29 14:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 9:27 [PATCH v2 0/5] fbdev: Use regular I/O function for framebuffers Thomas Zimmermann
2023-04-28 9:27 ` [PATCH v2 1/5] fbdev/matrox: Remove trailing whitespaces Thomas Zimmermann
2023-04-28 13:00 ` Sam Ravnborg
2023-04-28 9:27 ` [PATCH v2 2/5] ipu-v3: Include <linux/io.h> Thomas Zimmermann
2023-04-28 13:01 ` Sam Ravnborg
2023-04-28 9:27 ` [PATCH v2 3/5] fbdev: Include <linux/io.h> in various drivers Thomas Zimmermann
2023-04-28 13:01 ` Sam Ravnborg
2023-04-28 9:27 ` [PATCH v2 4/5] fbdev: Include <linux/io.h> in drivers Thomas Zimmermann
2023-04-28 13:07 ` Sam Ravnborg
2023-04-28 13:13 ` Thomas Zimmermann
2023-04-28 9:27 ` [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions Thomas Zimmermann
2023-04-28 12:18 ` Robin Murphy
2023-04-28 12:27 ` Geert Uytterhoeven
2023-04-28 12:59 ` Thomas Zimmermann
2023-04-28 13:10 ` Thomas Zimmermann
2023-04-28 13:17 ` Arnd Bergmann
2023-04-29 12:26 ` Thomas Zimmermann
2023-04-29 14:11 ` Arnd Bergmann [this message]
2023-04-28 13:12 ` Sam Ravnborg
2023-04-28 14:18 ` Thomas Zimmermann
2023-04-28 16:54 ` Sam Ravnborg
2023-04-29 12:28 ` Thomas Zimmermann
2023-04-28 13:13 ` [PATCH v2 0/5] fbdev: Use regular I/O function for framebuffers Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=260ee591-a71b-4c83-a775-5591d4222cec@app.fastmail.com \
--to=arnd@arndb.de \
--cc=James.Bottomley@hansenpartnership.com \
--cc=chenhuacai@kernel.org \
--cc=daniel@ffwll.ch \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=javierm@redhat.com \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=loongarch@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=tzimmermann@suse.de \
--cc=vgupta@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).