]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fbdev: core: tileblit: Implement missing margin clearing for tileblit
authorZsolt Kajtar <soci@c64.rulez.org>
Sat, 1 Feb 2025 08:18:09 +0000 (09:18 +0100)
committerHelge Deller <deller@gmx.de>
Wed, 26 Mar 2025 21:39:19 +0000 (22:39 +0100)
commit76d3ca89981354e1f85a3e0ad9ac4217d351cc72
treee4318b2e67e7f23ca9c7cdb39b6e57de6b8fa372
parentf6e0150b2003fb2b9265028a618aa1732b3edc8f
fbdev: core: tileblit: Implement missing margin clearing for tileblit

I was wondering why there's garbage at the bottom of the screen when
tile blitting is used with an odd mode like 1080, 600 or 200. Sure there's
only space for half a tile but the same area is clean when the buffer
is bitmap.

Then later I found that it's supposed to be cleaned but that's not
implemented. So I took what's in bitblit and adapted it for tileblit.

This implementation was tested for both the horizontal and vertical case,
and now does the same as what's done for bitmap buffers.

If anyone is interested to reproduce the problem then I could bet that'd
be on a S3 or Ark. Just set up a mode with an odd line count and make
sure that the virtual size covers the complete tile at the bottom. E.g.
for 600 lines that's 608 virtual lines for a 16 tall tile. Then the
bottom area should be cleaned.

For the right side it's more difficult as there the drivers won't let an
odd size happen, unless the code is modified. But once it reports back a
few pixel columns short then fbcon won't use the last column. With the
patch that column is now clean.

Btw. the virtual size should be rounded up by the driver for both axes
(not only the horizontal) so that it's dividable by the tile size.
That's a driver bug but correcting it is not in scope for this patch.

Implement missing margin clearing for tileblit

Signed-off-by: Zsolt Kajtar <soci@c64.rulez.org>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/core/tileblit.c