xf86-video-ati: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Tue Mar 1 07:33:38 PST 2011


 src/radeon_kms.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 8a8862e4165dc5be779bce5e327a31da4826db3b
Author: Sedat Dilek <sedat.dilek at googlemail.com>
Date:   Sat Feb 26 21:04:22 2011 +0100

    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 at gmail.com>
    Signed-off-by: Sedat Dilek <sedat.dilek at gmail.com>

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 4f6f120..b618045 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) {


More information about the xorg-commit mailing list