]> git.baikalelectronics.ru Git - kernel.git/commit
mach64: fix display corruption on big endian machines
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 8 Oct 2018 10:57:34 +0000 (12:57 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 8 Oct 2018 10:57:34 +0000 (12:57 +0200)
commit191cd8e80128137fb9eba6cc3cc8817ed75318c2
tree03505ba828035966cf526cf33effe4f8345c0c0a
parent50a89c8e879a436e5156ded079ba44ec0eec9189
mach64: fix display corruption on big endian machines

The code for manual bit triple is not endian-clean. It builds the variable
"hostdword" using byte accesses, therefore we must read the variable with
"le32_to_cpu".

The patch also enables (hardware or software) bit triple only if the image
is monochrome (image->depth). If we want to blit full-color image, we
shouldn't use the triple code.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Ville Syrjälä <syrjala@sci.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/aty/mach64_accel.c