Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / driver / 
xserver-xorg-video-vesa


Commits:
36662233 by Adam Jackson at 2018-08-28T15:26:46-04:00
Newline-terminate a few error messages

Signed-off-by: Adam Jackson <[email protected]>

- - - - -
2645e0aa by Adam Jackson at 2018-08-29T14:45:35-04:00
Refuse to run on UEFI machines

No possible good can come of this.

v2: Check for .../efi-framebuffer.0 ("is there an EFI framebuffer")
instead of /sys/firmware/efi ("is this an EFI machine"). Suggested by
Peter Jones.

Reviewed-by: Peter Jones <[email protected]>
Signed-off-by: Adam Jackson <[email protected]>

- - - - -
50366592 by Alan Coopersmith at 2018-11-18T16:43:51-08:00
Update README for gitlab migration

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
637c968d by Alan Coopersmith at 2018-12-07T19:19:22-08:00
Update configure.ac bug URL for gitlab migration

Signed-off-by: Alan Coopersmith <[email protected]>

- - - - -
634dae74 by Adam Jackson at 2019-03-06T12:45:11-05:00
Try harder to avoid 24bpp

We're preferring depth 24 even if that means 24bpp. Newer servers don't
support 24bpp anymore, and even for old servers it's suboptimal. Change
the heuristic to only try 24bpp if the alternative is pseudocolor.

Fixes: xorg/driver/xf86-video-vesa#3

- - - - -
53c7796e by Benjamin Tissoires at 2019-05-10T10:43:53+02:00
Refuse to run on UEFI machines running older kernels

Prior to kernel v3.12, the efi framebuffer driver was named "efifb".
This cause problem on RHEL 7 as the base kernel is 3.10.

"efi-framebuffer.0" was added by commit 2645e0aa for that reason
(don't run on UEFI machine).
The change from "efifb" to "efi-framebuffer" was done with 
commit
e6816a8 in the kernel

Signed-off-by: Benjamin Tissoires <[email protected]>
[ofourdan: updated commit message with commit references]
Reviewed-by: Olivier Fourdan <[email protected]>

- - - - -
51a73f2f by Adam Jackson at 2019-07-10T14:53:51+00:00
Disable shadow by default on known-virtual GPUs

Device memory is the same domain as host memory, in this case, so the
shadow just introduces more memcpy.

Signed-off-by: Adam Jackson <[email protected]>

- - - - -
68f2589c by Adam Jackson at 2020-09-10T18:01:44-04:00
vesa 2.5.0

- - - - -


4 changed files:

- Makefile.am
- README → README.md
- configure.ac
- src/vesa.c


Changes:

=====================================
Makefile.am
=====================================
@@ -29,3 +29,5 @@ ChangeLog:
        $(CHANGELOG_CMD)
 
 dist-hook: ChangeLog INSTALL
+
+EXTRA_DIST = README.md


=====================================
README → README.md
=====================================
@@ -1,20 +1,17 @@
 xf86-video-vesa - Generic VESA video driver for the Xorg X server
-
-Please submit bugs & patches to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+-----------------------------------------------------------------
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
 
-        http://lists.freedesktop.org/mailman/listinfo/xorg
+  https://lists.x.org/mailman/listinfo/xorg
 
 The master development code repository can be found at:
 
-        git://anongit.freedesktop.org/git/xorg/driver/xf86-video-vesa
+  https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa
 
-        http://cgit.freedesktop.org/xorg/driver/xf86-video-vesa
+Please submit bug reports and requests to merge patches there.
 
-For more information on the git code manager, see:
+For patch submission instructions, see:
 
-        http://wiki.x.org/wiki/GitPage
+  https://www.x.org/wiki/Development/Documentation/SubmittingPatches


=====================================
configure.ac
=====================================
@@ -23,8 +23,8 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-vesa],
-        [2.4.0],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+        [2.5.0],
+        [https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa/issues],
         [xf86-video-vesa])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])


=====================================
src/vesa.c
=====================================
@@ -43,7 +43,7 @@
 #endif
 
 #include <string.h>
-
+#include <unistd.h>
 #include "vesa.h"
 
 /* All drivers initialising the SW cursor need this */
@@ -450,7 +450,15 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct 
pci_device *dev,
             intptr_t match_data)
 {
     ScrnInfoPtr pScrn;
-    
+
+#ifdef __linux__
+    if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0 ||
+        access("/sys/devices/platform/efifb.0", F_OK) == 0) {
+        ErrorF("vesa: Refusing to run on UEFI\n");
+        return FALSE;
+    }
+#endif
+
     pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, 
                                NULL, NULL, NULL, NULL, NULL);
     if (pScrn != NULL) {
@@ -683,12 +691,14 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
                                    V_MODETYPE_VBE);
 
     /* Preferred order for default depth selection. */
-    if (depths & V_DEPTH_24)
+    if (depths & V_DEPTH_24 && (flags24 & Support32bppFb))
        defaultDepth = 24;
     else if (depths & V_DEPTH_16)
        defaultDepth = 16;
     else if (depths & V_DEPTH_15)
        defaultDepth = 15;
+    else if (depths & V_DEPTH_24)
+        defaultDepth = 24; /* ew though */
     else if (depths & V_DEPTH_8)
        defaultDepth = 8;
     else if (depths & V_DEPTH_4)
@@ -844,9 +854,38 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
     memcpy(pVesa->Options, VESAOptions, sizeof(VESAOptions));
     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVesa->Options);
 
-    /* Use shadow by default */
-    pVesa->shadowFB = xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB,
-                                           TRUE);
+    /* Use shadow by default, for non-virt hardware */
+    if (!xf86GetOptValBool(pVesa->Options, OPTION_SHADOW_FB, &pVesa->shadowFB))
+    {
+       switch (pVesa->pciInfo->vendor_id) {
+           case 0x1234: /* bochs vga (not in pci.ids) */
+           case 0x15ad: /* vmware */
+           case 0x1b36: /* qemu qxl */
+           case 0x80ee: /* virtualbox */
+           case 0xaaaa: /* parallels (not in pci.ids) */
+               pVesa->shadowFB = FALSE;
+               break;
+
+           case 0x1013: /* qemu's cirrus emulation */
+               if (pVesa->pciInfo->subvendor_id == 0x1af4)
+                   pVesa->shadowFB = FALSE;
+               else
+                   pVesa->shadowFB = TRUE;
+               break;
+
+           case 0x1414: /* microsoft hyper-v */
+               if (pVesa->pciInfo->device_id == 0x5353)
+                   pVesa->shadowFB = FALSE;
+               else
+                   pVesa->shadowFB = TRUE;
+               break;
+
+           default:
+               pVesa->shadowFB = TRUE;
+               break;
+       }
+    }
+
     /*  Use default refresh by default. Too many VBE 3.0
      *   BIOSes are incorrectly implemented.
      */
@@ -874,14 +913,14 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
                    break;
                default:
                    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                              "Unsupported bpp: %d", pScrn->bitsPerPixel);
+                              "Unsupported bpp: %d\n", pScrn->bitsPerPixel);
                    vbeFree(pVesa->pVbe);
                    return FALSE;
            }
            break;
        default:
            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                      "Unsupported Memory Model: %d", mode->MemoryModel);
+                      "Unsupported Memory Model: %d\n", mode->MemoryModel);
            return FALSE;
     }
 



View it on GitLab: 
https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-vesa/-/compare/07e4a0f0b3bd6308da2e000c12230b1e171e65a7...68f2589c687c132fc9abfd1501930bf191701165

-- 
View it on GitLab: 
https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-vesa/-/compare/07e4a0f0b3bd6308da2e000c12230b1e171e65a7...68f2589c687c132fc9abfd1501930bf191701165
You're receiving this email because of your account on salsa.debian.org.


Reply via email to