rpms/xorg-x11-drv-intel/devel copy-fb.patch, 1.1, 1.2 xorg-x11-drv-intel.spec, 1.1, 1.2

Kristian Høgsberg krh at fedoraproject.org
Wed Feb 25 03:43:11 UTC 2009


Author: krh

Update of /cvs/pkgs/rpms/xorg-x11-drv-intel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23745

Modified Files:
	copy-fb.patch xorg-x11-drv-intel.spec 
Log Message:
* Tue Feb 24 2009 Kristian Høgsberg <krh at redhat.com> - 2.6.0-9
- Fix copy-fb to be less dumb about picking the crtc.


copy-fb.patch:

Index: copy-fb.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-intel/devel/copy-fb.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- copy-fb.patch	24 Feb 2009 20:51:11 -0000	1.1
+++ copy-fb.patch	25 Feb 2009 03:43:11 -0000	1.2
@@ -1,18 +1,6 @@
-From e65e1eeb74775ab98b9e8912e35fc7ad1af1ffb2 Mon Sep 17 00:00:00 2001
-From: =?utf-8?q?Kristian=20H=C3=B8gsberg?= <krh at redhat.com>
-Date: Tue, 24 Feb 2009 10:49:45 -0500
-Subject: [PATCH 2/2] Copy initial framebuffer contents when starting with -br.
-
----
- src/drmmode_display.c |   87 ++++++++++++++++++++++++++++++++++++++++++++++++-
- src/i830.h            |    1 +
- src/i830_driver.c     |    2 +
- 3 files changed, 89 insertions(+), 1 deletions(-)
-
-diff --git a/src/drmmode_display.c b/src/drmmode_display.c
-index 5b48bda..527b293 100644
---- a/src/drmmode_display.c
-+++ b/src/drmmode_display.c
+diff -up xf86-video-intel-2.6.0/src/drmmode_display.c.copy-fb xf86-video-intel-2.6.0/src/drmmode_display.c
+--- xf86-video-intel-2.6.0/src/drmmode_display.c.copy-fb	2009-02-24 21:43:59.000000000 -0500
++++ xf86-video-intel-2.6.0/src/drmmode_display.c	2009-02-24 22:10:51.000000000 -0500
 @@ -29,6 +29,8 @@
  #include "config.h"
  #endif
@@ -22,7 +10,7 @@
  #include "xorgVersion.h"
  
  #ifdef XF86DRM_MODE
-@@ -145,7 +147,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
+@@ -145,7 +147,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc,
  	unsigned int pitch = pScrn->displayWidth * pI830->cpp;
  
  	if (drmmode->fb_id == 0) {
@@ -31,7 +19,7 @@
  				   pScrn->virtualX, pScrn->virtualY,
  				   pScrn->depth, pScrn->bitsPerPixel,
  				   pitch, pI830->front_buffer->bo->handle,
-@@ -733,6 +735,8 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
+@@ -733,6 +735,8 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn,
  
  	xf86InitialConfiguration(pScrn, pI830->can_resize);
  
@@ -40,7 +28,7 @@
  	return TRUE;
  }
  
-@@ -760,4 +764,85 @@ Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData, dri_bo **bo)
+@@ -760,4 +764,96 @@ Bool drmmode_is_rotate_pixmap(ScrnInfoPt
  #endif
  }
  
@@ -48,9 +36,7 @@
 +drmmode_create_pixmap_for_fbcon(ScrnInfoPtr pScrn)
 +{
 +	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-+	drmmode_crtc_private_ptr
-+		/* FIXME: Find currently active crtc */
-+		drmmode_crtc = xf86_config->crtc[1]->driver_private;
++	drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[0]->driver_private;
 +	ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
 +	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 +	I830Ptr pI830 = I830PTR(pScrn);
@@ -58,9 +44,17 @@
 +	struct drm_gem_flink flink;
 +	drm_intel_bo *bo;
 +	PixmapPtr pixmap = NULL;
++	int i;
 +
-+	fbcon = drmModeGetFB(drmmode->fd, drmmode_crtc->mode_crtc->buffer_id);
-+	if (fbcon == NULL)
++	for (i = 0; i < drmmode->mode_res->count_crtcs; i++) {
++		drmmode_crtc = xf86_config->crtc[i]->driver_private;
++		fbcon = drmModeGetFB(drmmode->fd, drmmode_crtc->mode_crtc->buffer_id);
++		ErrorF("buffer_id: %d, fbcon: %p\n",
++		       drmmode_crtc->mode_crtc->buffer_id, fbcon);
++		if (fbcon != NULL)
++			break;
++	}
++	if (i == drmmode->mode_res->count_crtcs)
 +		return NULL;
 +
 +	flink.handle = fbcon->handle;
@@ -102,6 +96,11 @@
 +	unsigned int pitch = pScrn->displayWidth * pI830->cpp;
 +
 +	src = drmmode_create_pixmap_for_fbcon(pScrn);
++	if (src == NULL) {
++		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++			   "Couldn't create pixmap for fbcon\n");
++		return;
++	}
 +
 +	/* We dont have a screen Pixmap yet */
 +	dst = GetScratchPixmapHeader(pScreen,
@@ -126,22 +125,9 @@
 +}
 +
  #endif
-diff --git a/src/i830.h b/src/i830.h
-index 7904b9f..74b04e9 100644
---- a/src/i830.h
-+++ b/src/i830.h
-@@ -832,6 +832,7 @@ void I830DRI2CloseScreen(ScreenPtr pScreen);
- extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
- extern Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData,
- 				     dri_bo **bo);
-+extern void drmmode_copy_fb(ScrnInfoPtr pScrn);
- #endif
- 
- extern Bool I830AccelInit(ScreenPtr pScreen);
-diff --git a/src/i830_driver.c b/src/i830_driver.c
-index 0a8a9c6..8aa33b6 100644
---- a/src/i830_driver.c
-+++ b/src/i830_driver.c
+diff -up xf86-video-intel-2.6.0/src/i830_driver.c.copy-fb xf86-video-intel-2.6.0/src/i830_driver.c
+--- xf86-video-intel-2.6.0/src/i830_driver.c.copy-fb	2009-02-24 21:43:59.000000000 -0500
++++ xf86-video-intel-2.6.0/src/i830_driver.c	2009-02-24 21:43:59.000000000 -0500
 @@ -3690,6 +3690,8 @@ I830EnterVT(int scrnIndex, int flags)
         /* Clear the framebuffer */
         memset(pI830->FbBase + pScrn->fbOffset, 0,
@@ -151,6 +137,14 @@
     }
  
     if (!xf86SetDesiredModes (pScrn))
--- 
-1.6.1.3
-
+diff -up xf86-video-intel-2.6.0/src/i830.h.copy-fb xf86-video-intel-2.6.0/src/i830.h
+--- xf86-video-intel-2.6.0/src/i830.h.copy-fb	2009-02-24 21:43:59.000000000 -0500
++++ xf86-video-intel-2.6.0/src/i830.h	2009-02-24 21:43:59.000000000 -0500
+@@ -832,6 +832,7 @@ void I830DRI2CloseScreen(ScreenPtr pScre
+ extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
+ extern Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData,
+ 				     dri_bo **bo);
++extern void drmmode_copy_fb(ScrnInfoPtr pScrn);
+ #endif
+ 
+ extern Bool I830AccelInit(ScreenPtr pScreen);


Index: xorg-x11-drv-intel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-intel/devel/xorg-x11-drv-intel.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xorg-x11-drv-intel.spec	24 Feb 2009 20:51:11 -0000	1.1
+++ xorg-x11-drv-intel.spec	25 Feb 2009 03:43:11 -0000	1.2
@@ -8,7 +8,7 @@
 Summary:   Xorg X11 Intel video driver(s)
 Name:      xorg-x11-drv-intel
 Version:   2.6.0
-Release:   8%{?dist}
+Release:   9%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -108,6 +108,9 @@
 %{_libdir}/libIntelXvMC.so
 
 %changelog
+* Tue Feb 24 2009 Kristian Høgsberg <krh at redhat.com> - 2.6.0-9
+- Fix copy-fb to be less dumb about picking the crtc.
+
 * Tue Feb 24 2009 Adam Jackson <ajax at redhat.com> 2.6.0-8
 - Rename to xorg-x11-drv-intel
 




More information about the fedora-extras-commits mailing list