From nobody@FreeBSD.org  Sun Sep 14 02:46:14 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1C59106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Sep 2008 02:46:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id BCCF78FC1F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Sep 2008 02:46:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m8E2kE25065365
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Sep 2008 02:46:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m8E2kEPO065364;
	Sun, 14 Sep 2008 02:46:14 GMT
	(envelope-from nobody)
Message-Id: <200809140246.m8E2kEPO065364@www.freebsd.org>
Date: Sun, 14 Sep 2008 02:46:14 GMT
From: Pedro Giffuni <pfgshield-freebsd@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Improve VESA support for Parallels (patch from DragonFlyBSD)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127367
>Category:       i386
>Synopsis:       [vesa] [patch] Improve VESA support for Parallels (patch from DragonFlyBSD)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 14 02:50:00 UTC 2008
>Closed-Date:    Fri Jul 10 06:57:53 UTC 2009
>Last-Modified:  Fri Jul 10 07:00:07 UTC 2009
>Originator:     Pedro Giffuni
>Release:        7.0-Release
>Organization:
>Environment:
FreeBSD kakumen.cable.net.co 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #0: Fri Aug  8 16:42:27 COT 2008     root@kakumen.cable.net.co:/usr/src/sys/amd64/compile/GENERIC  amd64
>Description:
From DragonFlyBSD's (Sascha Wildner) log:

http://leaf.dragonflybsd.org/mailarchive/commits/2008-09/msg00126.html

Add line width calculations for 15/16 and 24/32 bit modes in case
the "Get Scan Line Length" function fails, as it does in Parallels
(in Version 2.2, Build 2112 at least).
>How-To-Repeat:
The patch is untested: I don't have Parallels and this is amd64, but it looks pretty safe.
>Fix:
--- /sys/i386/isa/vesa.c.orig	2008-09-13 21:30:25.000000000 -0500
+++ /sys/i386/isa/vesa.c	2008-09-13 21:33:41.000000000 -0500
@@ -1111,6 +1111,14 @@
 		default: /* shouldn't happen */
 			vesa_adp->va_line_width = info.vi_width;
 			break;
+		case 15:
+		case 16:
+			vesa_adp->va_line_width = info.vi_width*2;
+			break;
+		case 24:
+		case 32:
+			vesa_adp->va_line_width = info.vi_width*4;
+			break;
 		}
 	} else {
 		vesa_adp->va_line_width = info.vi_width;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Tue Jun 9 00:55:18 UTC 2009 
State-Changed-Why:  
Patch applied against -HEAD. 


Responsible-Changed-From-To: freebsd-i386->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Tue Jun 9 00:55:18 UTC 2009 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127367 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/127367: commit references a PR
Date: Tue,  9 Jun 2009 00:55:14 +0000 (UTC)

 Author: delphij
 Date: Tue Jun  9 00:54:57 2009
 New Revision: 193790
 URL: http://svn.freebsd.org/changeset/base/193790
 
 Log:
   Add line width calculations for 15/16 and 24/32 bit modes in case
   the "Get Scan Line Length" function fails, as it does in Parallels
   (in Version 2.2, Build 2112 at least).
   
   PR:		i386/127367
   Obtained from:	DragonFly
   Submitted by:	Pedro Giffuni
   MFC after:	1 month
 
 Modified:
   head/sys/i386/isa/vesa.c
 
 Modified: head/sys/i386/isa/vesa.c
 ==============================================================================
 --- head/sys/i386/isa/vesa.c	Tue Jun  9 00:47:54 2009	(r193789)
 +++ head/sys/i386/isa/vesa.c	Tue Jun  9 00:54:57 2009	(r193790)
 @@ -1111,6 +1111,14 @@ vesa_set_mode(video_adapter_t *adp, int 
  		default: /* shouldn't happen */
  			vesa_adp->va_line_width = info.vi_width;
  			break;
 +		case 15:
 +		case 16:
 +			vesa_adp->va_line_width = info.vi_width*2;
 +			break;
 +		case 24:
 +		case 32:
 +			vesa_adp->va_line_width = info.vi_width*4;
 +			break;
  		}
  	} else {
  		vesa_adp->va_line_width = info.vi_width;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Fri Jul 10 06:57:20 UTC 2009 
State-Changed-Why:  
Patch applied against 7-STABLE, thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127367 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/127367: commit references a PR
Date: Fri, 10 Jul 2009 06:57:10 +0000 (UTC)

 Author: delphij
 Date: Fri Jul 10 06:57:00 2009
 New Revision: 195529
 URL: http://svn.freebsd.org/changeset/base/195529
 
 Log:
   MFC r193790:
   
   Add line width calculations for 15/16 and 24/32 bit modes in case
   the "Get Scan Line Length" function fails, as it does in Parallels
   (in Version 2.2, Build 2112 at least).
   
   PR:		i386/127367
   Obtained from:	DragonFly
   Submitted by:	Pedro Giffuni
 
 Modified:
   stable/7/sys/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
   stable/7/sys/i386/isa/vesa.c
 
 Modified: stable/7/sys/i386/isa/vesa.c
 ==============================================================================
 --- stable/7/sys/i386/isa/vesa.c	Fri Jul 10 06:55:30 2009	(r195528)
 +++ stable/7/sys/i386/isa/vesa.c	Fri Jul 10 06:57:00 2009	(r195529)
 @@ -1111,6 +1111,14 @@ vesa_set_mode(video_adapter_t *adp, int 
  		default: /* shouldn't happen */
  			vesa_adp->va_line_width = info.vi_width;
  			break;
 +		case 15:
 +		case 16:
 +			vesa_adp->va_line_width = info.vi_width*2;
 +			break;
 +		case 24:
 +		case 32:
 +			vesa_adp->va_line_width = info.vi_width*4;
 +			break;
  		}
  	} else {
  		vesa_adp->va_line_width = info.vi_width;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
