guibuilder_pel7x64builder0
3 years ago
21 changed files with 1143 additions and 975 deletions
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
From 38ae53c94a88c7bd5877c72a12582b60865e07ff Mon Sep 17 00:00:00 2001 |
||||
From: Hans de Goede <hdegoede@redhat.com> |
||||
Date: Thu, 17 Apr 2014 15:50:44 +0200 |
||||
Subject: [PATCH] Fedora hack: Make the suid-root wrapper start the server with |
||||
root rights |
||||
|
||||
Do NOT upstream. |
||||
|
||||
Since most display managers are not ready yet to start Xorg in way which will |
||||
keep it working without root-rights, see: |
||||
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights |
||||
|
||||
Just keep starting X as root for now, but do it through the wrapper, by |
||||
overriding the needs_root_rights = -1 (auto) default and setting it to 1. |
||||
|
||||
We set a special environment variable when starting X in a way where root |
||||
rights are not needed (from gdm and startx) and keep the upstream |
||||
needs_root_rights = -1 (auto) default in that case. |
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||
--- |
||||
hw/xfree86/xorg-wrapper.c | 3 +++ |
||||
1 file changed, 3 insertions(+) |
||||
|
||||
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c |
||||
index 4c37cfc..ae5d27f 100644 |
||||
--- a/hw/xfree86/xorg-wrapper.c |
||||
+++ b/hw/xfree86/xorg-wrapper.c |
||||
@@ -198,6 +198,9 @@ int main(int argc, char *argv[]) |
||||
int needs_root_rights = -1; |
||||
char *const empty_envp[1] = { NULL, }; |
||||
|
||||
+ if (getenv("XORG_RUN_AS_USER_OK") == NULL) |
||||
+ needs_root_rights = 1; |
||||
+ |
||||
progname = argv[0]; |
||||
|
||||
parse_config(&allowed, &needs_root_rights); |
||||
-- |
||||
2.4.3 |
||||
|
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
From 41e265988a0b6ec456ddd562253e0f82a7c2ede2 Mon Sep 17 00:00:00 2001 |
||||
From: Adam Jackson <ajax@redhat.com> |
||||
Date: Fri, 27 Sep 2019 11:43:52 -0400 |
||||
Subject: [PATCH xserver] modesetting: Reduce "glamor initialization failed" |
||||
message to X_INFO |
||||
MIME-Version: 1.0 |
||||
Content-Type: text/plain; charset=UTF-8 |
||||
Content-Transfer-Encoding: 8bit |
||||
|
||||
This might be an error or not, for example refusing to work on llvmpipe |
||||
is normal and expected. glamor_egl_init() will print X_ERROR messages if |
||||
appropriate, so we don't need to here. |
||||
|
||||
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> |
||||
|
||||
(cherry picked from commit cbdde938cbaf604741cd057fac743859ada342ec) |
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> |
||||
--- |
||||
hw/xfree86/drivers/modesetting/driver.c | 2 +- |
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
||||
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c |
||||
index 2aaea5f7d..783d53eaa 100644 |
||||
--- a/hw/xfree86/drivers/modesetting/driver.c |
||||
+++ b/hw/xfree86/drivers/modesetting/driver.c |
||||
@@ -772,7 +772,7 @@ try_enable_glamor(ScrnInfoPtr pScrn) |
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialized\n"); |
||||
ms->drmmode.glamor = TRUE; |
||||
} else { |
||||
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, |
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, |
||||
"glamor initialization failed\n"); |
||||
} |
||||
} else { |
||||
-- |
||||
2.26.2 |
||||
|
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
From efb4bc5b3da511d128144840d7eb3cf3c7cfa0ae Mon Sep 17 00:00:00 2001 |
||||
From: Adam Jackson <ajax@redhat.com> |
||||
Date: Tue, 3 Sep 2019 12:10:37 -0400 |
||||
Subject: [PATCH] mustard: Add DRI2 fallback driver mappings for i965 and |
||||
radeonsi |
||||
|
||||
--- |
||||
hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 2 ++ |
||||
1 file changed, 2 insertions(+) |
||||
|
||||
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
index 689a570..3825f52 100644 |
||||
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
@@ -45,8 +45,10 @@ static const struct { |
||||
int num_chips_ids; |
||||
} driver_map[] = { |
||||
{ 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, |
||||
+ { 0x8086, "i965", "va_gl", NULL, -1 }, |
||||
{ 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, |
||||
{ 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, |
||||
+ { 0x1002, "radeonsi", "radeonsi", NULL, -1 }, |
||||
{ 0x10de, "nouveau", "nouveau", NULL, -1 }, |
||||
{ 0x1af4, "virtio_gpu", "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, |
||||
{ 0x15ad, "vmwgfx", "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, |
||||
-- |
||||
2.23.0 |
||||
|
@ -0,0 +1,278 @@
@@ -0,0 +1,278 @@
|
||||
From b6e50ece375b6b1fbe053b30b52fc40dde5c682b Mon Sep 17 00:00:00 2001 |
||||
From: Adam Jackson <ajax@redhat.com> |
||||
Date: Tue, 13 Nov 2018 10:11:36 -0500 |
||||
Subject: [PATCH] mustard: Don't probe for drivers not shipped in RHEL8 |
||||
|
||||
As with RHEL7, this is mostly to keep spurious probe messages out of the |
||||
X log and prevent questions like "why isn't it loading mga on my |
||||
G200SE" or "why isn't it loading radeon_dri.so on my RN50". |
||||
--- |
||||
hw/xfree86/common/xf86pciBus.c | 162 -------------------- |
||||
hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 32 ---- |
||||
2 files changed, 194 deletions(-) |
||||
|
||||
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c |
||||
index b7f9999..398ed45 100644 |
||||
--- a/hw/xfree86/common/xf86pciBus.c |
||||
+++ b/hw/xfree86/common/xf86pciBus.c |
||||
@@ -1074,107 +1074,12 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md) |
||||
const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; |
||||
|
||||
switch (dev->vendor_id) { |
||||
- /* AMD Geode LX */ |
||||
- case 0x1022: |
||||
- if (dev->device_id == 0x2081) |
||||
- driverList[0] = "geode"; |
||||
- break; |
||||
- /* older Geode products acquired by AMD still carry an NSC vendor_id */ |
||||
- case 0x100b: |
||||
- if (dev->device_id == 0x0030) { |
||||
- /* NSC Geode GX2 specifically */ |
||||
- driverList[0] = "geode"; |
||||
- /* GX2 support started its life in the NSC tree and was later |
||||
- forked by AMD for GEODE so we keep it as a backup */ |
||||
- driverList[1] = "nsc"; |
||||
- } |
||||
- else |
||||
- /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */ |
||||
- driverList[0] = "nsc"; |
||||
- break; |
||||
- /* Cyrix Geode GX1 */ |
||||
- case 0x1078: |
||||
- if (dev->device_id == 0x0104) |
||||
- driverList[0] = "cyrix"; |
||||
- break; |
||||
- case 0x1142: |
||||
- driverList[0] = "apm"; |
||||
- break; |
||||
- case 0xedd8: |
||||
- driverList[0] = "ark"; |
||||
- break; |
||||
- case 0x1a03: |
||||
- driverList[0] = "ast"; |
||||
- break; |
||||
case 0x1002: |
||||
driverList[0] = "ati"; |
||||
break; |
||||
- case 0x102c: |
||||
- driverList[0] = "chips"; |
||||
- break; |
||||
- case 0x1013: |
||||
- driverList[0] = "cirrus"; |
||||
- break; |
||||
- case 0x3d3d: |
||||
- driverList[0] = "glint"; |
||||
- break; |
||||
- case 0x105d: |
||||
- driverList[0] = "i128"; |
||||
- break; |
||||
case 0x8086: |
||||
switch (dev->device_id) |
||||
{ |
||||
- /* Intel i740 */ |
||||
- case 0x00d1: |
||||
- case 0x7800: |
||||
- driverList[0] = "i740"; |
||||
- break; |
||||
- /* GMA500/Poulsbo */ |
||||
- case 0x8108: |
||||
- case 0x8109: |
||||
- /* Try psb driver on Poulsbo - if available */ |
||||
- driverList[0] = "psb"; |
||||
- driverList[1] = "psb_drv"; |
||||
- break; |
||||
- /* GMA600/Oaktrail */ |
||||
- case 0x4100: |
||||
- case 0x4101: |
||||
- case 0x4102: |
||||
- case 0x4103: |
||||
- case 0x4104: |
||||
- case 0x4105: |
||||
- case 0x4106: |
||||
- case 0x4107: |
||||
- /* Atom E620/Oaktrail */ |
||||
- case 0x4108: |
||||
- /* Medfield */ |
||||
- case 0x0130: |
||||
- case 0x0131: |
||||
- case 0x0132: |
||||
- case 0x0133: |
||||
- case 0x0134: |
||||
- case 0x0135: |
||||
- case 0x0136: |
||||
- case 0x0137: |
||||
- /* GMA 3600/CDV */ |
||||
- case 0x0be0: |
||||
- case 0x0be1: |
||||
- case 0x0be2: |
||||
- case 0x0be3: |
||||
- case 0x0be4: |
||||
- case 0x0be5: |
||||
- case 0x0be6: |
||||
- case 0x0be7: |
||||
- case 0x0be8: |
||||
- case 0x0be9: |
||||
- case 0x0bea: |
||||
- case 0x0beb: |
||||
- case 0x0bec: |
||||
- case 0x0bed: |
||||
- case 0x0bee: |
||||
- case 0x0bef: |
||||
- /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */ |
||||
- break; |
||||
/* Default to intel only on pre-gen4 chips */ |
||||
case 0x3577: |
||||
case 0x2562: |
||||
@@ -1196,14 +1101,7 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md) |
||||
break; |
||||
} |
||||
break; |
||||
- case 0x102b: |
||||
- driverList[0] = "mga"; |
||||
- break; |
||||
- case 0x10c8: |
||||
- driverList[0] = "neomagic"; |
||||
- break; |
||||
case 0x10de: |
||||
- case 0x12d2: |
||||
{ |
||||
int idx = 0; |
||||
|
||||
@@ -1229,77 +1127,17 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md) |
||||
|
||||
driverList[idx++] = "nouveau"; |
||||
#endif |
||||
- driverList[idx++] = "nv"; |
||||
break; |
||||
} |
||||
- case 0x1106: |
||||
- driverList[0] = "openchrome"; |
||||
- break; |
||||
case 0x1b36: |
||||
driverList[0] = "qxl"; |
||||
break; |
||||
- case 0x1163: |
||||
- driverList[0] = "rendition"; |
||||
- break; |
||||
- case 0x5333: |
||||
- switch (dev->device_id) { |
||||
- case 0x88d0: |
||||
- case 0x88d1: |
||||
- case 0x88f0: |
||||
- case 0x8811: |
||||
- case 0x8812: |
||||
- case 0x8814: |
||||
- case 0x8901: |
||||
- driverList[0] = "s3"; |
||||
- break; |
||||
- case 0x5631: |
||||
- case 0x883d: |
||||
- case 0x8a01: |
||||
- case 0x8a10: |
||||
- case 0x8c01: |
||||
- case 0x8c03: |
||||
- case 0x8904: |
||||
- case 0x8a13: |
||||
- driverList[0] = "s3virge"; |
||||
- break; |
||||
- default: |
||||
- driverList[0] = "savage"; |
||||
- break; |
||||
- } |
||||
- break; |
||||
- case 0x1039: |
||||
- driverList[0] = "sis"; |
||||
- break; |
||||
- case 0x126f: |
||||
- driverList[0] = "siliconmotion"; |
||||
- break; |
||||
- case 0x121a: |
||||
- if (dev->device_id < 0x0003) |
||||
- driverList[0] = "voodoo"; |
||||
- else |
||||
- driverList[0] = "tdfx"; |
||||
- break; |
||||
- case 0x1011: |
||||
- driverList[0] = "tga"; |
||||
- break; |
||||
- case 0x1023: |
||||
- driverList[0] = "trident"; |
||||
- break; |
||||
- case 0x100c: |
||||
- driverList[0] = "tseng"; |
||||
- break; |
||||
case 0x80ee: |
||||
driverList[0] = "vboxvideo"; |
||||
break; |
||||
case 0x15ad: |
||||
driverList[0] = "vmware"; |
||||
break; |
||||
- case 0x18ca: |
||||
- if (dev->device_id == 0x47) |
||||
- driverList[0] = "xgixp"; |
||||
- else |
||||
- driverList[0] = "xgi"; |
||||
- break; |
||||
default: |
||||
break; |
||||
} |
||||
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
index 7036d10..689a570 100644 |
||||
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
@@ -7,38 +7,12 @@ |
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) |
||||
#endif |
||||
|
||||
-static const int i915_chip_ids[] = { |
||||
-#define CHIPSET(chip, desc, name) chip, |
||||
-#include "pci_ids/i915_pci_ids.h" |
||||
-#undef CHIPSET |
||||
-}; |
||||
- |
||||
static const int i965_chip_ids[] = { |
||||
#define CHIPSET(chip, family, name) chip, |
||||
#include "pci_ids/i965_pci_ids.h" |
||||
#undef CHIPSET |
||||
}; |
||||
|
||||
-#ifndef DRIVER_MAP_GALLIUM_ONLY |
||||
-static const int r100_chip_ids[] = { |
||||
-#define CHIPSET(chip, name, family) chip, |
||||
-#include "pci_ids/radeon_pci_ids.h" |
||||
-#undef CHIPSET |
||||
-}; |
||||
- |
||||
-static const int r200_chip_ids[] = { |
||||
-#define CHIPSET(chip, name, family) chip, |
||||
-#include "pci_ids/r200_pci_ids.h" |
||||
-#undef CHIPSET |
||||
-}; |
||||
-#endif |
||||
- |
||||
-static const int r300_chip_ids[] = { |
||||
-#define CHIPSET(chip, name, family) chip, |
||||
-#include "pci_ids/r300_pci_ids.h" |
||||
-#undef CHIPSET |
||||
-}; |
||||
- |
||||
static const int r600_chip_ids[] = { |
||||
#define CHIPSET(chip, name, family) chip, |
||||
#include "pci_ids/r600_pci_ids.h" |
||||
@@ -70,13 +44,7 @@ static const struct { |
||||
const int *chip_ids; |
||||
int num_chips_ids; |
||||
} driver_map[] = { |
||||
- { 0x8086, "i915", "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, |
||||
{ 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, |
||||
-#ifndef DRIVER_MAP_GALLIUM_ONLY |
||||
- { 0x1002, "radeon", "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, |
||||
- { 0x1002, "r200", "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, |
||||
-#endif |
||||
- { 0x1002, "r300", "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, |
||||
{ 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, |
||||
{ 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, |
||||
{ 0x10de, "nouveau", "nouveau", NULL, -1 }, |
||||
-- |
||||
2.19.1 |
||||
|
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
From a4fc2f3a55776018eda20e09c11b3710f8f0e542 Mon Sep 17 00:00:00 2001 |
||||
From: Adam Jackson <ajax@redhat.com> |
||||
Date: Fri, 26 Oct 2018 14:16:17 -0400 |
||||
Subject: [PATCH xserver] mustard: Work around broken fbdev headers |
||||
|
||||
This configure check is somewhat pointless as we have our own copy of |
||||
the fbdev ioctl declarations. There's also a bug in the version of the |
||||
kernel headers I happen to want to build against, where an IS_ENABLED() |
||||
escaped into uapi like it oughtn't. |
||||
|
||||
Nerf the test so we build the right fbdevhw code. |
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com> |
||||
--- |
||||
configure.ac | 3 +-- |
||||
1 file changed, 1 insertion(+), 2 deletions(-) |
||||
|
||||
diff --git a/configure.ac b/configure.ac |
||||
index 57a2331024..2b8477ed61 100644 |
||||
--- a/configure.ac |
||||
+++ b/configure.ac |
||||
@@ -197,8 +197,7 @@ AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes) |
||||
AM_CONDITIONAL(AGP, [test "x$AGP" = xyes]) |
||||
|
||||
dnl fbdev header |
||||
-AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes) |
||||
-AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes]) |
||||
+AM_CONDITIONAL(FBDEVHW, true) |
||||
|
||||
dnl FreeBSD kldload support (sys/linker.h) |
||||
AC_CHECK_HEADERS([sys/linker.h], |
||||
-- |
||||
2.19.1 |
||||
|
@ -0,0 +1,152 @@
@@ -0,0 +1,152 @@
|
||||
From acf5a0100c98a040e5e07a79ecf4a83627da770e Mon Sep 17 00:00:00 2001 |
||||
From: Hans de Goede <hdegoede@redhat.com> |
||||
Date: Thu, 23 Mar 2017 12:54:07 +0100 |
||||
Subject: [PATCH xserver] xf86: dri2: Use va_gl as vdpau_driver for Intel i965 |
||||
GPUs |
||||
|
||||
The modesetting driver (which now often is used with Intel GPUs), |
||||
relies on dri2_probe_driver_name() to get the dri and vdpau driver |
||||
names, before this commit it would always assign the same name to |
||||
the 2 names. But the vdpau driver for i965 GPUs should be va_gl |
||||
(i915 does not support vdpau at all). |
||||
|
||||
This commit modifies the used lookup table and dri2_probe_driver_name() |
||||
to set the vdpau_driver to va_gl for i965 GPUs, it leaves the 2 |
||||
names the same for all other GPUs. |
||||
|
||||
Note this commit adds a FIXME comment for a memory leak in |
||||
dri2_probe_driver_name(), that leak was already present and fixing |
||||
it falls outside of the scope of this commit. |
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1413733 |
||||
Cc: kwizart@gmail.com |
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||
--- |
||||
hw/xfree86/dri2/dri2.c | 31 +++++++++++++-------- |
||||
hw/xfree86/dri2/pci_ids/pci_id_driver_map.h | 21 +++++++------- |
||||
2 files changed, 31 insertions(+), 21 deletions(-) |
||||
|
||||
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c |
||||
index 6619e3aa7..1f8ad14bc 100644 |
||||
--- a/hw/xfree86/dri2/dri2.c |
||||
+++ b/hw/xfree86/dri2/dri2.c |
||||
@@ -1437,14 +1437,18 @@ get_prime_id(void) |
||||
|
||||
#include "pci_ids/pci_id_driver_map.h" |
||||
|
||||
-static char * |
||||
-dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||
+static void |
||||
+dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info, |
||||
+ const char **dri_driver_ret, |
||||
+ const char **vdpau_driver_ret) |
||||
{ |
||||
#ifdef WITH_LIBDRM |
||||
int i, j; |
||||
- char *driver = NULL; |
||||
drmDevicePtr dev; |
||||
|
||||
+ *dri_driver_ret = NULL; |
||||
+ *vdpau_driver_ret = NULL; |
||||
+ |
||||
/* For non-PCI devices and drmGetDevice fail, just assume that |
||||
* the 3D driver is named the same as the kernel driver. This is |
||||
* currently true for vc4 and msm (freedreno). |
||||
@@ -1456,12 +1460,14 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||
xf86DrvMsg(pScreen->myNum, X_ERROR, |
||||
"[DRI2] Couldn't drmGetVersion() on non-PCI device, " |
||||
"no driver name found.\n"); |
||||
- return NULL; |
||||
+ return; |
||||
} |
||||
|
||||
- driver = strndup(version->name, version->name_len); |
||||
+ /* FIXME this gets leaked */ |
||||
+ *dri_driver_ret = strndup(version->name, version->name_len); |
||||
+ *vdpau_driver_ret = *dri_driver_ret; |
||||
drmFreeVersion(version); |
||||
- return driver; |
||||
+ return; |
||||
} |
||||
|
||||
for (i = 0; driver_map[i].driver; i++) { |
||||
@@ -1469,13 +1475,15 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||
continue; |
||||
|
||||
if (driver_map[i].num_chips_ids == -1) { |
||||
- driver = strdup(driver_map[i].driver); |
||||
+ *dri_driver_ret = driver_map[i].driver; |
||||
+ *vdpau_driver_ret = driver_map[i].vdpau_driver; |
||||
goto out; |
||||
} |
||||
|
||||
for (j = 0; j < driver_map[i].num_chips_ids; j++) { |
||||
if (driver_map[i].chip_ids[j] == dev->deviceinfo.pci->device_id) { |
||||
- driver = strdup(driver_map[i].driver); |
||||
+ *dri_driver_ret = driver_map[i].driver; |
||||
+ *vdpau_driver_ret = driver_map[i].vdpau_driver; |
||||
goto out; |
||||
} |
||||
} |
||||
@@ -1487,9 +1495,9 @@ dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) |
||||
dev->deviceinfo.pci->vendor_id, dev->deviceinfo.pci->device_id); |
||||
out: |
||||
drmFreeDevice(&dev); |
||||
- return driver; |
||||
#else |
||||
- return NULL; |
||||
+ *dri_driver_ret = NULL; |
||||
+ *vdpau_driver_ret = NULL; |
||||
#endif |
||||
} |
||||
|
||||
@@ -1610,7 +1618,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) |
||||
if (info->driverName) { |
||||
ds->driverNames[0] = info->driverName; |
||||
} else { |
||||
- ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info); |
||||
+ dri2_probe_driver_name(pScreen, info, |
||||
+ &ds->driverNames[0], &ds->driverNames[1]); |
||||
if (!ds->driverNames[0]) |
||||
return FALSE; |
||||
} |
||||
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
index da7ea1c1e..7036d1003 100644 |
||||
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |
||||
@@ -66,21 +66,22 @@ static const int vmwgfx_chip_ids[] = { |
||||
static const struct { |
||||
int vendor_id; |
||||
const char *driver; |
||||
+ const char *vdpau_driver; |
||||
const int *chip_ids; |
||||
int num_chips_ids; |
||||
} driver_map[] = { |
||||
- { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, |
||||
- { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, |
||||
+ { 0x8086, "i915", "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, |
||||
+ { 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, |
||||
#ifndef DRIVER_MAP_GALLIUM_ONLY |
||||
- { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, |
||||
- { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, |
||||
+ { 0x1002, "radeon", "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, |
||||
+ { 0x1002, "r200", "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, |
||||
#endif |
||||
- { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, |
||||
- { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, |
||||
- { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, |
||||
- { 0x10de, "nouveau", NULL, -1 }, |
||||
- { 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, |
||||
- { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, |
||||
+ { 0x1002, "r300", "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, |
||||
+ { 0x1002, "r600","r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, |
||||
+ { 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, |
||||
+ { 0x10de, "nouveau", "nouveau", NULL, -1 }, |
||||
+ { 0x1af4, "virtio_gpu", "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, |
||||
+ { 0x15ad, "vmwgfx", "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, |
||||
{ 0x0000, NULL, NULL, 0 }, |
||||
}; |
||||
|
||||
-- |
||||
2.19.0 |
||||
|
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
From 71703e4e8bd00719eefad53c2ed6c604079f87ea Mon Sep 17 00:00:00 2001 |
||||
From: rpm-build <rpm-build> |
||||
Date: Wed, 17 Oct 2018 09:00:59 +1000 |
||||
Subject: [PATCH xserver] xfree86: ensure the readlink buffer is |
||||
null-terminated |
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
||||
Reviewed-by: Dave Airlie <airlied@redhat.com> |
||||
--- |
||||
hw/xfree86/fbdevhw/fbdevhw.c | 4 ++-- |
||||
1 file changed, 2 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c |
||||
index 95089515c..f146ff4a4 100644 |
||||
--- a/hw/xfree86/fbdevhw/fbdevhw.c |
||||
+++ b/hw/xfree86/fbdevhw/fbdevhw.c |
||||
@@ -331,12 +331,12 @@ fbdev_open(int scrnIndex, const char *dev, char **namep) |
||||
|
||||
/* only touch non-PCI devices on this path */ |
||||
{ |
||||
- char buf[PATH_MAX]; |
||||
+ char buf[PATH_MAX] = {0}; |
||||
char *sysfs_path = NULL; |
||||
char *node = strrchr(dev, '/') + 1; |
||||
|
||||
if (asprintf(&sysfs_path, "/sys/class/graphics/%s", node) < 0 || |
||||
- readlink(sysfs_path, buf, sizeof(buf)) < 0 || |
||||
+ readlink(sysfs_path, buf, sizeof(buf) - 1) < 0 || |
||||
strstr(buf, "devices/pci")) { |
||||
free(sysfs_path); |
||||
close(fd); |
||||
-- |
||||
2.19.1 |
||||
|
Loading…
Reference in new issue