diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-03 01:50:08 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-03 01:50:08 -0500 |
commit | 0281cfdc20a522e4a42c667eae0f8f62493dd36f (patch) | |
tree | c423e84bd79cdc0b29e89b77f60cd8296379027a /system/easy-kernel-power8/ast-endianness.patch | |
parent | 8f0c74f2701ffc4b1d7680b62dbc5c661a9f3ec5 (diff) | |
download | packages-0281cfdc20a522e4a42c667eae0f8f62493dd36f.tar.gz packages-0281cfdc20a522e4a42c667eae0f8f62493dd36f.tar.bz2 packages-0281cfdc20a522e4a42c667eae0f8f62493dd36f.tar.xz packages-0281cfdc20a522e4a42c667eae0f8f62493dd36f.zip |
system/easy-kernel-power8: lo, our first kernel flavour
Diffstat (limited to 'system/easy-kernel-power8/ast-endianness.patch')
-rw-r--r-- | system/easy-kernel-power8/ast-endianness.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/system/easy-kernel-power8/ast-endianness.patch b/system/easy-kernel-power8/ast-endianness.patch new file mode 100644 index 000000000..03ee209b8 --- /dev/null +++ b/system/easy-kernel-power8/ast-endianness.patch @@ -0,0 +1,38 @@ +Author: Elizabeth Myers <elizabeth@adelielinux.org> + +I'm certain this fix is wrong fwiw, but it's the best I could come with + +--- linux-4.14/drivers/gpu/drm/ast/ast_fb.c.old 2017-11-12 12:46:13.000000000 -0600 ++++ linux-4.14/drivers/gpu/drm/ast/ast_fb.c 2018-06-30 20:54:43.530000000 -0500 +@@ -109,9 +109,30 @@ + unmap = true; + } + for (i = y; i <= y2; i++) { ++ int copy_width = x2 - x + 1; + /* assume equal stride for now */ + src_offset = dst_offset = i * afbdev->afb.base.pitches[0] + (x * bpp); +- memcpy_toio(bo->kmap.virtual + src_offset, afbdev->sysram + src_offset, (x2 - x + 1) * bpp); ++ switch (bpp) { ++ case 4: ++ while (copy_width) { ++ iowrite32(*(u32 *)(afbdev->sysram + src_offset), ++ bo->kmap.virtual + src_offset); ++ src_offset += 4; ++ copy_width--; ++ } ++ break; ++ case 2: ++ while (copy_width) { ++ iowrite16(*(u16 *)(afbdev->sysram + src_offset), ++ bo->kmap.virtual + src_offset); ++ src_offset += 2; ++ copy_width--; ++ } ++ break; ++ default: ++ memcpy_toio(bo->kmap.virtual + src_offset, afbdev->sysram + src_offset, (x2 - x + 1) * bpp); ++ break; ++ } + + } + if (unmap) |