Re: Recent vesa changes

From: Antoine Brodin <antoine.brodin_at_laposte.net>
Date: Thu, 2 Jun 2005 17:10:12 +0200
Antoine Brodin <antoine.brodin_at_laposte.net> wrote:
> Hi,
> 
> The recent vesa changes cause a problem on my laptop.
> During startup, when ispcvt is called by syscons_precmd
> (in /etc/rc.d/syscons), it clears my screen and the screen keeps
> cleared.
> 
> I investigated a bit, and chmod'ing -x ispcvt solves the problem.
> 
> Vidcontrol -i mode shows that mode 369 is supported so I think that
> there is perhaps an ioctl collision between
> . this mode: _IO('V', 369 - 256)
> . and VGAPCVTID: _IOWR('V',113, struct pcvtid)

A quick workaround is attached

%%%
Index: scvesactl.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/syscons/scvesactl.c,v
retrieving revision 1.21
diff -u -p -r1.21 scvesactl.c
--- scvesactl.c	29 May 2005 08:43:43 -0000	1.21
+++ scvesactl.c	2 Jun 2005 14:56:09 -0000
_at__at_ -115,7 +115,9 _at__at_ vesa_ioctl(struct cdev *dev, u_long cmd,
 
 			mode = (cmd & 0xff) + M_VESA_BASE;
 
-			if ((mode > M_VESA_FULL_1280) &&
+			/* Avoid collisions with pcvt. */
+			if (((cmd & IOC_DIRMASK) == IOC_VOID) &&
+			    (mode > M_VESA_FULL_1280) &&
 			    (mode < M_VESA_MODE_MAX))
 				return sc_set_graphics_mode(scp, tp, mode);
 		}
%%%
Received on Thu Jun 02 2005 - 13:11:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC