summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorSedat Dilek <sedat.dilek@googlemail.com>2011-02-26 21:04:22 +0100
committerMichel Dänzer <daenzer@vmware.com>2011-03-01 16:14:17 +0100
commit8a8862e4165dc5be779bce5e327a31da4826db3b (patch)
tree68ace435d64ec1095a941f9c55bc3a803200d93a /src/radeon_kms.c
parent88304fe9c0ce69012d44a77a5368c35236511dac (diff)
kms: Fix warning XNFprintf is deprecated (v2)
The first take of my patch missed the breakage against pre-1.10 xservers and now I know XNFasprintf() is not a 1:1 replacement for XNFprintf(). The idea for the fix seemed to be so obvious, but as usual "really" test the patch you are sending to any ML. I am awfully sorry for the overhasty bad hack. Thanks to Alan and Alex for the help to fix it correctly, now. Tested-By: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 4f6f1200..b618045b 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -409,8 +409,13 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn)
goto out;
}
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
+ XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
+ dev->domain, dev->bus, dev->dev, dev->func);
+#else
busid = XNFprintf("pci:%04x:%02x:%02x.%d",
dev->domain, dev->bus, dev->dev, dev->func);
+#endif
info->dri2.drm_fd = drmOpen("radeon", busid);
if (info->dri2.drm_fd == -1) {