summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-03-18 16:58:07 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2016-03-18 16:58:07 +0900
commit43af92ede0968f2108f9562aa4c2c861ac703617 (patch)
tree9c8f88bc8ae8a3cb919ae60ad5e1c12b09b38e89 /src
parent5ec1797a2858d693d18d21326e2307d71555e1db (diff)
Build RandR 1.4 provider name from chipset name and bus ID
Instead of just "amdgpu", it's now e.g. "TONGA @ pci:0000:01:00.0". (Ported from radeon commit c7cf00487cd6d4a5d0f39d5b92ff04f6420d6a32) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 658eb90..17a0f67 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -43,6 +43,10 @@
#include "amdgpu_glamor.h"
#include "amdgpu_pixmap.h"
+#ifdef AMDGPU_PIXMAP_SHARING
+#include <dri.h>
+#endif
+
/* DPMS */
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
@@ -1904,6 +1908,9 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
int i, num_dvi = 0, num_hdmi = 0;
unsigned int crtcs_needed = 0;
drmModeResPtr mode_res;
+#ifdef AMDGPU_PIXMAP_SHARING
+ char *bus_id_string, *provider_name;
+#endif
xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
@@ -1947,7 +1954,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
drmmode_clones_init(pScrn, drmmode, mode_res);
#ifdef AMDGPU_PIXMAP_SHARING
- xf86ProviderSetup(pScrn, NULL, "amdgpu");
+ bus_id_string = DRICreatePCIBusID(info->PciInfo);
+ XNFasprintf(&provider_name, "%s @ %s", pScrn->chipset, bus_id_string);
+ free(bus_id_string);
+ xf86ProviderSetup(pScrn, NULL, provider_name);
+ free(provider_name);
#endif
xf86InitialConfiguration(pScrn, TRUE);