[PATCH 16/19] vbe: don't use index for VBEInterpretPanelID (API)

Dave Airlie airlied at gmail.com
Mon May 14 09:41:09 PDT 2012


Remove use of xf86screens from vbe module.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/vbe/vbe.c |    7 +++----
 hw/xfree86/vbe/vbe.h |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index d3c9d36..97a9bcf 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -1027,23 +1027,22 @@ VBEDPMSSet(vbeInfoPtr pVbe, int mode)
 }
 
 void
-VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
+VBEInterpretPanelID(ScrnInfoPtr pScrn, struct vbePanelID *data)
 {
-    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     DisplayModePtr mode;
     const float PANEL_HZ = 60.0;
 
     if (!data)
         return;
 
-    xf86DrvMsg(scrnIndex, X_INFO, "PanelID returned panel resolution %dx%d\n",
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PanelID returned panel resolution %dx%d\n",
                data->hsize, data->vsize);
 
     if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh)
         return;
 
     if (data->hsize < 320 || data->vsize < 240) {
-        xf86DrvMsg(scrnIndex, X_INFO, "...which I refuse to believe\n");
+        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "...which I refuse to believe\n");
         return;
     }
 
diff --git a/hw/xfree86/vbe/vbe.h b/hw/xfree86/vbe/vbe.h
index 81be0ff..3907c53 100644
--- a/hw/xfree86/vbe/vbe.h
+++ b/hw/xfree86/vbe/vbe.h
@@ -350,7 +350,7 @@ struct vbePanelID {
     char reserved[14];
 };
 
-extern _X_EXPORT void VBEInterpretPanelID(int scrnIndex,
+extern _X_EXPORT void VBEInterpretPanelID(ScrnInfoPtr pScrn,
                                           struct vbePanelID *data);
 extern _X_EXPORT struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe);
 
-- 
1.7.6



More information about the xorg-devel mailing list