patch-2.4.10 linux/drivers/video/offb.c
Next file: linux/drivers/video/platinumfb.c
Previous file: linux/drivers/video/newport_con.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Fri Sep 14 14:04:07 2001
- Orig file:
v2.4.9/linux/drivers/video/offb.c
- Orig date:
Fri Feb 9 11:30:23 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/video/offb.c linux/drivers/video/offb.c
@@ -49,7 +49,8 @@
cmap_m64, /* ATI Mach64 */
cmap_r128, /* ATI Rage128 */
cmap_M3A, /* ATI Rage Mobility M3 Head A */
- cmap_M3B /* ATI Rage Mobility M3 Head B */
+ cmap_M3B, /* ATI Rage Mobility M3 Head B */
+ cmap_radeon /* ATI Radeon */
};
struct fb_info_offb {
@@ -433,6 +434,10 @@
unsigned long regbase = dp->parent->addrs[2].address;
info->cmap_adr = ioremap(regbase, 0x1FFF);
info->cmap_type = cmap_M3B;
+ } else if (dp && !strncmp(name, "ATY,Rage6", 9)) {
+ unsigned long regbase = dp->addrs[1].address;
+ info->cmap_adr = ioremap(regbase, 0x1FFF);
+ info->cmap_type = cmap_radeon;
} else if (!strncmp(name, "ATY,", 4)) {
unsigned long base = address & 0xff000000UL;
info->cmap_adr = ioremap(base + 0x7ff000, 0x1000) + 0xcc0;
@@ -669,6 +674,10 @@
out_8(info2->cmap_adr + 0xb0, i);
out_le32((unsigned *)(info2->cmap_adr + 0xb4), 0);
break;
+ case cmap_radeon:
+ out_8(info2->cmap_adr + 0xb0, i);
+ out_le32((unsigned *)(info2->cmap_adr + 0xb4), 0);
+ break;
}
}
else
@@ -748,6 +757,12 @@
out_le32((unsigned *)(info2->cmap_adr + 0xb4),
(red << 16 | green << 8 | blue));
break;
+ case cmap_radeon:
+ /* Set palette index & data (could be smarter) */
+ out_8(info2->cmap_adr + 0xb0, regno);
+ out_le32((unsigned *)(info2->cmap_adr + 0xb4),
+ (red << 16 | green << 8 | blue));
+ break;
}
if (regno < 16)
@@ -783,3 +798,5 @@
fb_set_cmap(fb_default_cmap(size), 1, offb_setcolreg, info);
}
}
+
+MODULE_LICENSE("GPL");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)