Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14811
b: refs/heads/master
c: 49d5c7b
h: refs/heads/master
i:
  14809: a65e79c
  14807: 5c89aca
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Nov 30, 2005
1 parent 2543b38 commit 0443aad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe655d3a06488c8a188461bca493e9f23fc8c448
refs/heads/master: 49d5c7b08713c3a482d62b5a0ad41b4ec32905a5
15 changes: 9 additions & 6 deletions trunk/drivers/video/cirrusfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ struct cirrusfb_info {
struct cirrusfb_regs currentmode;
int blank_mode;

u32 pseudo_palette[17];
u32 pseudo_palette[16];
struct { u8 red, green, blue, pad; } palette[256];

#ifdef CONFIG_ZORRO
Expand Down Expand Up @@ -1603,14 +1603,14 @@ static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,

switch (info->var.bits_per_pixel) {
case 8:
((u8*)(info->pseudo_palette))[regno] = v;
cinfo->pseudo_palette[regno] = v;
break;
case 16:
((u16*)(info->pseudo_palette))[regno] = v;
cinfo->pseudo_palette[regno] = v;
break;
case 24:
case 32:
((u32*)(info->pseudo_palette))[regno] = v;
cinfo->pseudo_palette[regno] = v;
break;
}
return 0;
Expand Down Expand Up @@ -2020,18 +2020,21 @@ static void cirrusfb_prim_fillrect(struct cirrusfb_info *cinfo,
const struct fb_fillrect *region)
{
int m; /* bytes per pixel */
u32 color = (cinfo->info->fix.visual == FB_VISUAL_TRUECOLOR) ?
cinfo->pseudo_palette[region->color] : region->color;

if(cinfo->info->var.bits_per_pixel == 1) {
cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
region->dx / 8, region->dy,
region->width / 8, region->height,
region->color,
color,
cinfo->currentmode.line_length);
} else {
m = ( cinfo->info->var.bits_per_pixel + 7 ) / 8;
cirrusfb_RectFill(cinfo->regbase, cinfo->info->var.bits_per_pixel,
region->dx * m, region->dy,
region->width * m, region->height,
region->color,
color,
cinfo->currentmode.line_length);
}
return;
Expand Down

0 comments on commit 0443aad

Please sign in to comment.