xserver: Branch 'master' - 3 commits
Peter Hutterer
whot at kemper.freedesktop.org
Wed Jan 11 01:18:12 UTC 2017
hw/xfree86/common/xf86Option.c | 2 +-
hw/xfree86/drivers/modesetting/driver.c | 24 +++++++++++-------------
hw/xfree86/drivers/modesetting/driver.h | 6 ------
randr/rrprovider.c | 3 +++
4 files changed, 15 insertions(+), 20 deletions(-)
New commits:
commit 436da935bde43076f3052a758a463ed080e8a747
Author: Qiang Yu <Qiang.Yu at amd.com>
Date: Tue Jan 10 18:51:57 2017 +0800
modesetting: cleanup pci device open
Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index a27b327..d7030e5 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -812,7 +812,6 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn)
EntityInfoPtr pEnt;
modesettingPtr ms;
modesettingEntPtr ms_ent;
- char *BusID = NULL;
ms = modesettingPTR(pScrn);
ms_ent = ms_ent_priv(pScrn);
@@ -845,25 +844,24 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn)
}
else
#endif
+#if XSERVER_LIBPCIACCESS
if (pEnt->location.type == BUS_PCI) {
- ms->PciInfo = xf86GetPciInfoForEntity(ms->pEnt->index);
- if (ms->PciInfo) {
+ char *BusID = NULL;
+ struct pci_device *PciInfo;
+
+ PciInfo = xf86GetPciInfoForEntity(ms->pEnt->index);
+ if (PciInfo) {
BusID = XNFalloc(64);
sprintf(BusID, "PCI:%d:%d:%d",
-#if XSERVER_LIBPCIACCESS
- ((ms->PciInfo->domain << 8) | ms->PciInfo->bus),
- ms->PciInfo->dev, ms->PciInfo->func
-#else
- ((pciConfigPtr) ms->PciInfo->thisCard)->busnum,
- ((pciConfigPtr) ms->PciInfo->thisCard)->devnum,
- ((pciConfigPtr) ms->PciInfo->thisCard)->funcnum
-#endif
- );
+ ((PciInfo->domain << 8) | PciInfo->bus),
+ PciInfo->dev, PciInfo->func);
}
ms->fd = drmOpen(NULL, BusID);
free(BusID);
}
- else {
+ else
+#endif
+ {
const char *devicename;
devicename = xf86FindOptionValue(ms->pEnt->device->options, "kmsdev");
ms->fd = open_hw(devicename);
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h
index eee96e5..25e3a54 100644
--- a/hw/xfree86/drivers/modesetting/driver.h
+++ b/hw/xfree86/drivers/modesetting/driver.h
@@ -89,12 +89,6 @@ typedef struct _modesettingRec {
int Chipset;
EntityInfoPtr pEnt;
-#if XSERVER_LIBPCIACCESS
- struct pci_device *PciInfo;
-#else
- pciVideoPtr PciInfo;
- PCITAG PciTag;
-#endif
Bool noAccel;
CloseScreenProcPtr CloseScreen;
commit 555e0a42d138ac8d83af62638752a1bebad602d6
Author: Qiang Yu <Qiang.Yu at amd.com>
Date: Tue Jan 10 18:51:55 2017 +0800
randr: fix xserver crash when xrandr setprovideroutputsource
xrandr --setprovideroutputsource <screen> <gpu screen>
Xorg: ../../../xserver/dix/dispatch.c:4018: AttachOutputGPU:
Assertion `new->isGPU' failed.
GPUScreen is not allowed to be sink output.
Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index f9df67e..e4bc2bf 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -338,6 +338,9 @@ ProcRRSetProviderOutputSource(ClientPtr client)
pScreen = provider->pScreen;
pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScreen->isGPU)
+ return BadValue;
+
pScrPriv->rrProviderSetOutputSource(pScreen, provider, source_provider);
RRInitPrimeSyncProps(pScreen);
commit 1012510620de7dadd0ab18b19a8e11facd884601
Author: Qiang Yu <Qiang.Yu at amd.com>
Date: Tue Jan 10 18:51:54 2017 +0800
xfree86: fix wrong usage of xf86optionListMerge
Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 929724d..06973bc 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -87,7 +87,7 @@ xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts)
if (device && device->options) {
tmp = xf86optionListDup(device->options);
if (pScrn->options)
- xf86optionListMerge(pScrn->options, tmp);
+ pScrn->options = xf86optionListMerge(pScrn->options, tmp);
else
pScrn->options = tmp;
}
More information about the xorg-commit
mailing list