xf86-video-modesetting: src/driver.c src/drmmode_display.c src/drmmode_display.h

Dave Airlie airlied at kemper.freedesktop.org
Mon Jun 10 17:31:58 PDT 2013


 src/driver.c          |   13 +++----------
 src/drmmode_display.c |    2 +-
 src/drmmode_display.h |    2 +-
 3 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit a62d5e60896166be88fcf3778921b8d10baec2c1
Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jun 11 10:29:25 2013 +1000

    modesetting: fix adjust frame crash
    
    When SDL called this it was totally broken, actually hook
    up to the underlying drmmode function.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64808
    
    Thanks to Peter Wu <lekensteyn at gmail.com> for harassing me.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/src/driver.c b/src/driver.c
index 742aadd..c3d78be 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -956,16 +956,9 @@ static void
 AdjustFrame(ADJUST_FRAME_ARGS_DECL)
 {
     SCRN_INFO_PTR(arg);
-    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
-    xf86OutputPtr output = config->output[config->compat_output];
-    xf86CrtcPtr crtc = output->crtc;
-
-    if (crtc && crtc->enabled) {
-	crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x,
-			      y);
-	crtc->x = output->initial_x + x;
-	crtc->y = output->initial_y + y;
-    }
+    modesettingPtr ms = modesettingPTR(pScrn);
+
+    drmmode_adjust_frame(pScrn, &ms->drmmode, x, y);
 }
 
 static void
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 2dc7576..ce90cea 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1267,7 +1267,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 	return TRUE;
 }
 
-void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags)
+void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
 {
 	xf86CrtcConfigPtr	config = XF86_CRTC_CONFIG_PTR(pScrn);
 	xf86OutputPtr  output = config->output[config->compat_output];
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 1d5522b..adf4b99 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -118,7 +118,7 @@ Bool drmmode_SetSlaveBO(PixmapPtr ppix,
 #endif
 
 extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp);
-void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags);
+void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y);
 extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
 extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);
 


More information about the xorg-commit mailing list