[parisc-linux-cvs] linux deller

Helge Deller deller@gmx.de
Mon, 17 Jun 2002 23:48:13 +0200


--Boundary-00=_dklD9Q7DQUZCw4C
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

On Monday 17 June 2002 23:46, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux
> Changes by:	deller	02/06/17 15:46:23
>
> Modified files:
> 	.              : Makefile
> 	drivers/video/sti: stifb.c
>
> Log message:
> 2.4.18-pa38:
> - added CRX24 kernel framebuffer support as desribed by Steve Pacenka
> <spacenka@lightlink.com>


--Boundary-00=_dklD9Q7DQUZCw4C
Content-Type: text/plain;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="diff"

Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.308
diff -u -p -r1.308 Makefile
--- Makefile	2002/06/14 17:19:57	1.308
+++ Makefile	2002/06/17 21:41:00
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 18
-EXTRAVERSION = -pa37
+EXTRAVERSION = -pa38
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: drivers/video/sti/stifb.c
===================================================================
RCS file: /var/cvs/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.31
diff -u -p -r1.31 stifb.c
--- drivers/video/sti/stifb.c	2002/04/22 00:04:10	1.31
+++ drivers/video/sti/stifb.c	2002/06/17 21:41:01
@@ -1148,6 +1148,8 @@ stifb_set_disp(struct stifb_info *fb)
 	    else {
 		ngleSetupAttrPlanes(fb, BUFF1_CMAP0);
 	    }
+	    if (id == S9000_ID_A1439A)
+		ngleClearOverlayPlanes(fb, 0xff, 0);
 	    break;
 	 case S9000_ID_ARTIST:
 	 case CRT_ID_VISUALIZE_EG:
@@ -1220,7 +1222,7 @@ stifb_init_fb(struct sti_struct *sti, in
 
 	fb = kmalloc(sizeof(struct stifb_info), GFP_ATOMIC);
 	if (!fb) {
-		printk(KERN_ERR "Could not allocate stifb structure\n");
+		printk(KERN_ERR "stifb: Could not allocate stifb structure\n");
 		return -ENODEV;
 	}
 	
@@ -1237,15 +1239,20 @@ stifb_init_fb(struct sti_struct *sti, in
 	fb->id = fb->sti->graphics_id[0];
 	fb->real_id = fb->id;	/* save the real id */
 
-#if 1
-	/* HACK: Only allow tested gfx */
-	if ((fb->id != S9000_ID_ARTIST) &&
-	    (fb->id != S9000_ID_HCRX) &&
-	    (fb->id != S9000_ID_TIMBER) &&
-	    (fb->id != S9000_ID_A1659A) &&
-	    (fb->id != CRT_ID_VISUALIZE_EG))
+	/* only supported cards are allowed */
+	switch (fb->id) {
+	case S9000_ID_ARTIST:
+	case S9000_ID_HCRX:
+	case S9000_ID_TIMBER:
+	case S9000_ID_A1659A:
+	case S9000_ID_A1439A:
+	case CRT_ID_VISUALIZE_EG:
+		break;
+	default:
+		printk(KERN_WARNING "stifb: Unsupported gfx card id 0x%08x\n",
+			fb->id);
 		goto out_err1;
-#endif
+	}
 	
 	/* default to 8 bpp on most graphic chips */
 	bpp = 8;
@@ -1327,12 +1334,8 @@ stifb_init_fb(struct sti_struct *sti, in
 	}
 
 
-	/* get framebuffer pysical and virtual base addr & len */	
-#ifdef __LP64__
+	/* get framebuffer pysical and virtual base addr & len (64bit ready) */
 	fix->smem_start = fb->sti->regions_phys[1] | 0xffffffff00000000;
-#else
-	fix->smem_start = fb->sti->regions_phys[1];
-#endif
 	fix->smem_len = fb->sti->regions[1].region_desc.length * 4096;
 
 	fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8;
@@ -1402,13 +1405,13 @@ stifb_init_fb(struct sti_struct *sti, in
 	stifb_set_disp(fb);
 
 	if (!request_mem_region(fix->smem_start, fix->smem_len, "stifb")) {
-		printk(KERN_ERR "cannot reserve fb region 0x%04lx-0x%04lx\n",
+		printk(KERN_ERR "stifb: cannot reserve fb region 0x%04lx-0x%04lx\n",
 				fix->smem_start, fix->smem_start+fix->smem_len);
 		goto out_err1;
 	}
 		
 	if (!request_mem_region(fix->mmio_start, fix->mmio_len, "stifb mmio")) {
-		printk(KERN_ERR "cannot reserve sti mmio region 0x%04lx-0x%04lx\n",
+		printk(KERN_ERR "stifb: cannot reserve sti mmio region 0x%04lx-0x%04lx\n",
 				fix->mmio_start, fix->mmio_start+fix->mmio_len);
 		goto out_err2;
 	}
@@ -1471,7 +1474,7 @@ void
 stifb_cleanup(struct fb_info *info)
 {
 	// unregister_framebuffer(info); 
-	printk(KERN_WARNING "%s: you're on crack.\n", __FUNCTION__);
+	printk(KERN_WARNING "stifb: %s: you're on crack.\n", __FUNCTION__);
 }
 
 

--Boundary-00=_dklD9Q7DQUZCw4C--