/*-*- linux-c -*- * linux/drivers/video/savage/savage_accel.c -- Hardware Acceleration * * Copyright (C) 2004 Antonino Daplas * All Rights Reserved * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. */ #include #include #include #include #include "savagefb.h" static u32 savagefb_rop[] = { 0xCC, /* ROP_COPY */ 0x5A /* ROP_XOR */ }; int savagefb_sync(struct fb_info *info) { struct savagefb_par *par = info->par; par->SavageWaitIdle(par); return 0; } void savagefb_copyarea(struct fb_info *info, const struct fb_copyarea *region) { struct savagefb_par *par = info->par; int sx = region->sx, dx = region->dx; int sy = region->sy, dy = region->dy; int cmd; if (!region->width || !region->height) return; par->bci_ptr = 0; cmd = BCI_CMD_RECT | BCI_CMD_DEST_GBD | BCI_CMD_SRC_GBD; BCI_CMD_SET_ROP(cmd, savagefb_rop[0]); if (dx <= sx) { cmd |= BCI_CMD_RECT_XP; } else { sx += region->width - 1; dx += region->width - 1; } if (dy <= sy) { cmd |= BCI_CMD_RECT_YP; } else { sy += region->height - 1; dy += region->height - 1; } par->SavageWaitFifo(par,4); BCI_SEND(cmd); BCI_SEND(BCI_X_Y(sx, sy)); BCI_SEND(BCI_X_Y(dx, dy)); BCI_SEND(BCI_W_H(region->width, region->height)); } void savagefb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { struct savagefb_par *par = info->par; int cmd, color; if (!rect->width || !rect->height) return; if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) color = rect->color; else color = ((u32 *)info->pseudo_palette)[rect->color]; cmd = BCI_CMD_RECT | BCI_CMD_RECT_XP | BCI_CMD_RECT_YP | BCI_CMD_DEST_GBD | BCI_CMD_SRC_SOLID | BCI_CMD_SEND_COLOR; par->bci_ptr = 0; BCI_CMD_SET_ROP(cmd, savagefb_rop[rect->rop]); par->SavageWaitFifo(par,4); BCI_SEND(cmd); BCI_SEND(color); BCI_SEND( BCI_X_Y(rect->dx, rect->dy) ); BCI_SEND( BCI_W_H(rect->width, rect->height) ); } void savagefb_imageblit(struct fb_info *info, const struct fb_image *image) { struct savagefb_par *par = info->par; int fg, bg, size, i, width; int cmd; u32 *src = (u32 *) image->data; if (!image->width || !image->height) return; if (image->depth != 1) { cfb_imageblit(info, image); return; } if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) { fg = image->fg_color; bg = image->bg_color; } else { fg = ((u32 *)info->pseudo_palette)[image->fg_color]; bg = ((u32 *)info->pseudo_palette)[image->bg_color]; } cmd = BCI_CMD_RECT | BCI_CMD_RECT_XP | BCI_CMD_RECT_YP | BCI_CMD_CLIP_LR | BCI_CMD_DEST_GBD | BCI_CMD_SRC_MONO | BCI_CMD_SEND_COLOR; par->bci_ptr = 0; BCI_CMD_SET_ROP(cmd, savagefb_rop[0]); width = (image->width + 31) & ~31; size = (width * image->height)/8; size >>= 2; par->SavageWaitFifo(par, size + 5); BCI_SEND(cmd); BCI_SEND(BCI_CLIP_LR(image->dx, image->dx + image->width - 1)); BCI_SEND(fg); BCI_SEND(bg); BCI_SEND(BCI_X_Y(image->dx, image->dy)); BCI_SEND(BCI_W_H(width, image->height)); for (i = 0; i < size; i++) BCI_SEND(src[i]); } MODULE_LICENSE("GPL"); 'nohover'>AgeCommit message (Expand)AuthorFilesLines ected='selected'>3space:mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-01 12:27:05 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-01 12:27:05 -0800
commit4759d386d55fef452d692bf101167914437e848e (patch)
treee7109c192ec589fcea2a98f9702aa3c0e4009581 /net/core/net_namespace.c
parent238d1d0f79f619d75c2cc741d6770fb0986aef24 (diff)
parent1db175428ee374489448361213e9c3b749d14900 (diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull DAX updates from Dan Williams: "The completion of Jan's DAX work for 4.10. As I mentioned in the libnvdimm-for-4.10 pull request, these are some final fixes for the DAX dirty-cacheline-tracking invalidation work that was merged through the -mm, ext4, and xfs trees in -rc1. These patches were prepared prior to the merge window, but we waited for 4.10-rc1 to have a stable merge base after all the prerequisites were merged. Quoting Jan on the overall changes in these patches: "So I'd like all these 6 patches to go for rc2. The first three patches fix invalidation of exceptional DAX entries (a bug which is there for a long time) - without these patches data loss can occur on power failure even though user called fsync(2). The other three patches change locking of DAX faults so that ->iomap_begin() is called in a more relaxed locking context and we are safe to start a transaction there for ext4" These have received a build success notification from the kbuild robot, and pass the latest libnvdimm unit tests. There have not been any -next releases since -rc1, so they have not appeared there" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: ext4: Simplify DAX fault path dax: Call ->iomap_begin without entry lock during dax fault dax: Finish fault completely when loading holes dax: Avoid page invalidation races and unnecessary radix tree traversals mm: Invalidate DAX radix tree entries only if appropriate ext2: Return BH_New buffers for zeroed blocks
Diffstat (limited to 'net/core/net_namespace.c')