patch-2.2.3 linux/drivers/video/atyfb.c
Next file: linux/drivers/video/bwtwofb.c
Previous file: linux/drivers/video/atafb.c
Back to the patch index
Back to the overall index
- Lines: 101
- Date:
Sun Mar 7 10:38:37 1999
- Orig file:
v2.2.2/linux/drivers/video/atyfb.c
- Orig date:
Wed Jan 20 23:14:06 1999
diff -u --recursive --new-file v2.2.2/linux/drivers/video/atyfb.c linux/drivers/video/atyfb.c
@@ -1,4 +1,4 @@
-/* $Id: atyfb.c,v 1.98 1999/01/14 08:50:53 geert Exp $
+/* $Id: atyfb.c,v 1.102 1999/01/21 22:44:42 geert Exp $
* linux/drivers/video/atyfb.c -- Frame buffer device for ATI Mach64
*
* Copyright (C) 1997-1998 Geert Uytterhoeven
@@ -66,6 +66,8 @@
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#include <video/macmodes.h>
+#include <asm/adb.h>
+#include <asm/pmu.h>
#endif
#ifdef __sparc__
#include <asm/pbm.h>
@@ -439,10 +441,10 @@
/* mach64CT family / mach64GT (3D RAGE) class */
{ 0x4c42, 0x4c42, "3D RAGE LT PRO (AGP)" },
- { 0x4c42, 0x4c44, "3D RAGE LT PRO" },
- { 0x4c42, 0x4c47, "3D RAGE LT PRO" },
- { 0x4c42, 0x4c49, "3D RAGE LT PRO" },
- { 0x4c42, 0x4c50, "3D RAGE LT PRO" },
+ { 0x4c44, 0x4c44, "3D RAGE LT PRO" },
+ { 0x4c47, 0x4c47, "3D RAGE LT PRO" },
+ { 0x4c49, 0x4c49, "3D RAGE LT PRO" },
+ { 0x4c50, 0x4c50, "3D RAGE LT PRO" },
{ 0x4c54, 0x4c54, "3D RAGE LT" },
{ 0x4754, 0x4754, "3D RAGE (GT)" },
{ 0x4755, 0x4755, "3D RAGE II+ (GTB)" },
@@ -1282,7 +1284,7 @@
bpp = 16;
var->red.offset = 11;
var->red.length = 5;
- var->green.offset = 6;
+ var->green.offset = 5;
var->green.length = 6;
var->blue.offset = 0;
var->blue.length = 5;
@@ -2321,8 +2323,6 @@
if (!map_size)
return -EINVAL;
- vma->vm_file = file;
- file->f_count++;
vma->vm_flags |= VM_IO;
if (!fb->mmaped) {
@@ -2353,10 +2353,10 @@
for (i = 0; i < 256; i++) {
tmp = aty_ld_8(DAC_CNTL, info) & 0xfc;
- if ((Gx == GT_CHIP_ID) || (Gx == GU_CHIP_ID) ||
- (Gx == LG_CHIP_ID) || (Gx == GB_CHIP_ID) ||
- (Gx == GD_CHIP_ID) || (Gx == GI_CHIP_ID) ||
- (Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID))
+ if (Gx == GT_CHIP_ID || Gx == GU_CHIP_ID || Gx == GV_CHIP_ID ||
+ Gx == GW_CHIP_ID || Gx == GZ_CHIP_ID || Gx == LG_CHIP_ID ||
+ Gx == GB_CHIP_ID || Gx == GD_CHIP_ID || Gx == GI_CHIP_ID ||
+ Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
tmp |= 0x2;
aty_st_8(DAC_CNTL, tmp, info);
aty_st_8(DAC_MASK, 0xff, info);
@@ -3296,6 +3296,11 @@
struct fb_info_aty *info = (struct fb_info_aty *)fb;
u8 gen_cntl;
+#if defined(CONFIG_PPC)
+ if ((_machine == _MACH_Pmac) && blank)
+ pmu_enable_backlight(0);
+#endif
+
gen_cntl = aty_ld_8(CRTC_GEN_CNTL, info);
if (blank > 0)
switch (blank-1) {
@@ -3315,6 +3320,11 @@
else
gen_cntl &= ~(0x4c);
aty_st_8(CRTC_GEN_CNTL, gen_cntl, info);
+
+#if defined(CONFIG_PPC)
+ if ((_machine == _MACH_Pmac) && !blank)
+ pmu_enable_backlight(1);
+#endif
}
@@ -3359,9 +3369,10 @@
info->palette[regno].green = green;
info->palette[regno].blue = blue;
i = aty_ld_8(DAC_CNTL, info) & 0xfc;
- if ((Gx == GT_CHIP_ID) || (Gx == GU_CHIP_ID) || (Gx == LG_CHIP_ID) ||
- (Gx == GB_CHIP_ID) || (Gx == GD_CHIP_ID) || (Gx == GI_CHIP_ID) ||
- (Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID))
+ if (Gx == GT_CHIP_ID || Gx == GU_CHIP_ID || Gx == GV_CHIP_ID ||
+ Gx == GW_CHIP_ID || Gx == GZ_CHIP_ID || Gx == LG_CHIP_ID ||
+ Gx == GB_CHIP_ID || Gx == GD_CHIP_ID || Gx == GI_CHIP_ID ||
+ Gx == GP_CHIP_ID || Gx == GQ_CHIP_ID)
i |= 0x2; /*DAC_CNTL|0x2 turns off the extra brightness for gt*/
aty_st_8(DAC_CNTL, i, info);
aty_st_8(DAC_MASK, 0xff, info);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)