summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-21 13:09:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-21 13:09:39 -0700
commita04b1bf574e1f4875ea91f5c62ca051666443200 (patch)
tree3f2f1a37642f9930e58bf921a75a92f359d60e6c /drivers
parent93287e28bcc8bcb3f23d46196845bf7c311cb8aa (diff)
parent53d862fac4a09b9c56cca0433fa9de5732fd05a1 (diff)
Merge tag 'for-5.18/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture updates from Helge Deller: - add vDSO support (allows us to use non-executable stacks) - many TLB and cache flush optimizations (by Dave Anglin) - fix handling of probe non-access faults (by Dave Anglin) - fix invalidate/flush vmap routines (by Dave Anglin) - avoid using hardware single-step in kprobes - enable ARCH_HAS_DEBUG_VM_PGTABLE - many cleanups in unaligned handlers, e.g. rewrite of existing assembly code - always use the self-extracting kernel feature - big refacturing and code reductions regarding space-register usage in get_user() and put_user() - add fillrect() support to stifb graphics driver * tag 'for-5.18/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (23 commits) parisc: Fix invalidate/flush vmap routines parisc: Avoid flushing cache on cache-less machines parisc: Avoid using hardware single-step in kprobes parisc: Improve CPU socket and core bootup info text parisc: Enable ARCH_HAS_DEBUG_VM_PGTABLE parisc: Avoid calling SMP cache flush functions on cache-less machines parisc: Increase parisc_cache_flush_threshold setting parisc/unaligned: Enhance user-space visible output parisc/unaligned: Rewrite 32-bit inline assembly of emulate_sth() parisc/unaligned: Rewrite 32-bit inline assembly of emulate_ldd() parisc/unaligned: Rewrite inline assembly of emulate_ldw() parisc/unaligned: Rewrite inline assembly of emulate_ldh() parisc/unaligned: Use EFAULT fixup handler in unaligned handlers parisc: Reduce code size by optimizing get_current() function calls parisc: Use constants to encode the space registers like SR_KERNEL parisc: Use SR_USER and SR_KERNEL in get_user() and put_user() parisc: Add defines for various space register parisc: Always use the self-extracting kernel feature video/fbdev/stifb: Implement the stifb_fillrect() function parisc: Add vDSO support ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/stifb.c45
1 files changed, 43 insertions, 2 deletions
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 265865610edc..bebb2eea6448 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1041,6 +1041,47 @@ stifb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
SETUP_FB(fb);
}
+#define ARTIST_VRAM_SIZE 0x000804
+#define ARTIST_VRAM_SRC 0x000808
+#define ARTIST_VRAM_SIZE_TRIGGER_WINFILL 0x000a04
+#define ARTIST_VRAM_DEST_TRIGGER_BLOCKMOVE 0x000b00
+#define ARTIST_SRC_BM_ACCESS 0x018008
+#define ARTIST_FGCOLOR 0x018010
+#define ARTIST_BGCOLOR 0x018014
+#define ARTIST_BITMAP_OP 0x01801c
+
+static void
+stifb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
+{
+ struct stifb_info *fb = container_of(info, struct stifb_info, info);
+
+ if (rect->rop != ROP_COPY)
+ return cfb_fillrect(info, rect);
+
+ SETUP_HW(fb);
+
+ if (fb->info.var.bits_per_pixel == 32) {
+ WRITE_WORD(0xBBA0A000, fb, REG_10);
+
+ NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, 0xffffffff);
+ } else {
+ WRITE_WORD(fb->id == S9000_ID_HCRX ? 0x13a02000 : 0x13a01000, fb, REG_10);
+
+ NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, 0xff);
+ }
+
+ WRITE_WORD(0x03000300, fb, ARTIST_BITMAP_OP);
+ WRITE_WORD(0x2ea01000, fb, ARTIST_SRC_BM_ACCESS);
+ NGLE_QUICK_SET_DST_BM_ACCESS(fb, 0x2ea01000);
+ NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, rect->color);
+ WRITE_WORD(0, fb, ARTIST_BGCOLOR);
+
+ NGLE_SET_DSTXY(fb, (rect->dx << 16) | (rect->dy));
+ SET_LENXY_START_RECFILL(fb, (rect->width << 16) | (rect->height));
+
+ SETUP_FB(fb);
+}
+
static void __init
stifb_init_display(struct stifb_info *fb)
{
@@ -1105,7 +1146,7 @@ static const struct fb_ops stifb_ops = {
.owner = THIS_MODULE,
.fb_setcolreg = stifb_setcolreg,
.fb_blank = stifb_blank,
- .fb_fillrect = cfb_fillrect,
+ .fb_fillrect = stifb_fillrect,
.fb_copyarea = stifb_copyarea,
.fb_imageblit = cfb_imageblit,
};
@@ -1297,7 +1338,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
goto out_err0;
}
info->screen_size = fix->smem_len;
- info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA;
+ info->flags = FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;
info->pseudo_palette = &fb->pseudo_palette;
/* This has to be done !!! */