changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: devvga: use uintptr for VGAscr.paddr and VGAscr.storage

changeset 4215: 4a09496c5f5f
parent 4214: d9f445833252
child 4216: c6b239f2aac5
author: cinap_lenrek@felloff.net
date: Fri, 16 Jan 2015 11:36:11 +0100
files: sys/src/9/pc/devvga.c sys/src/9/pc/screen.h
description: devvga: use uintptr for VGAscr.paddr and VGAscr.storage

some vga drivers use virtual addresses in VGAscr.storage,
so has to be uintptr sized for amd64.
     1.1--- a/sys/src/9/pc/devvga.c
     1.2+++ b/sys/src/9/pc/devvga.c
     1.3@@ -217,7 +217,7 @@ vgaread(Chan* c, void* a, long n, vlong 
     1.4 		len += snprint(p+len, READSTR-len, "hwaccel %s\n", hwaccel ? "on" : "off");
     1.5 		len += snprint(p+len, READSTR-len, "hwblank %s\n", hwblank ? "on" : "off");
     1.6 		len += snprint(p+len, READSTR-len, "panning %s\n", panning ? "on" : "off");
     1.7-		len += snprint(p+len, READSTR-len, "addr p 0x%lux v 0x%p size 0x%ux\n", scr->paddr, scr->vaddr, scr->apsize);
     1.8+		len += snprint(p+len, READSTR-len, "addr p %#p v %#p size %#ux\n", scr->paddr, scr->vaddr, scr->apsize);
     1.9 		len += snprint(p+len, READSTR-len, "softscreen %s\n", scr->softscreen ? "on" : "off");
    1.10 		USED(len);
    1.11 
     2.1--- a/sys/src/9/pc/screen.h
     2.2+++ b/sys/src/9/pc/screen.h
     2.3@@ -95,16 +95,16 @@ struct VGAscr {
     2.4 	Pcidev*	pci;
     2.5 
     2.6 	VGAcur*	cur;
     2.7-	ulong	storage;
     2.8+	uintptr	storage;
     2.9 	Cursor;
    2.10 
    2.11 	int	useflush;
    2.12 
    2.13-	ulong	paddr;		/* frame buffer */
    2.14+	uintptr	paddr;		/* frame buffer */
    2.15 	void*	vaddr;
    2.16-	int		apsize;
    2.17+	int	apsize;
    2.18 
    2.19-	ulong	io;				/* device specific registers */
    2.20+	ulong	io;		/* device specific registers */
    2.21 	ulong	*mmio;
    2.22 	
    2.23 	ulong	colormap[Pcolours][3];
    2.24@@ -118,9 +118,9 @@ struct VGAscr {
    2.25 	int	(*scroll)(VGAscr*, Rectangle, Rectangle);
    2.26 	void	(*blank)(VGAscr*, int);
    2.27 	ulong	id;	/* internal identifier for driver use */
    2.28-	int isblank;
    2.29-	int overlayinit;
    2.30-	int softscreen;
    2.31+	int	isblank;
    2.32+	int	overlayinit;
    2.33+	int	softscreen;
    2.34 };
    2.35 
    2.36 extern VGAscr vgascreen[];