[Intel-gfx] [PATCH 06/14] Remove can_resize, which was always true (except when a bug interfered)

Eric Anholt eric at anholt.net
Wed Apr 22 01:13:28 CEST 2009


---
 src/drmmode_display.c |    6 +-----
 src/i830.h            |    2 --
 src/i830_driver.c     |   13 ++-----------
 src/i830_memory.c     |    7 -------
 4 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8f682d5..298c471 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -824,9 +824,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	if (scrn->virtualX == width && scrn->virtualY == height)
 		return TRUE;
 
-	if (!pI830->can_resize)
-		return FALSE;
-
 	pitch = i830_pad_drawable_width(width, pI830->cpp);
 	tiled = i830_tiled_width(pI830, &pitch, pI830->cpp);
 	xf86DrvMsg(scrn->scrnIndex, X_INFO,
@@ -896,7 +893,6 @@ static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
 
 Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
 {
-	I830Ptr pI830 = I830PTR(pScrn);
 	xf86CrtcConfigPtr   xf86_config;
 	drmmode_ptr drmmode;
 	int i;
@@ -921,7 +917,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
 	for (i = 0; i < drmmode->mode_res->count_connectors; i++)
 		drmmode_output_init(pScrn, drmmode, i);
 
-	xf86InitialConfiguration(pScrn, pI830->can_resize);
+	xf86InitialConfiguration(pScrn, TRUE);
 
 	return TRUE;
 }
diff --git a/src/i830.h b/src/i830.h
index e8975cc..0b7dca7 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -408,8 +408,6 @@ typedef struct _I830Rec {
 
    i830_memory *memory_manager;		/**< DRI memory manager aperture */
 
-   Bool can_resize;
-
    Bool need_mi_flush;
 
    Bool tiling;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 44d7d75..c27cfaa 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1108,7 +1108,7 @@ i830_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
     scrn->virtualX = width;
     scrn->virtualY = height;
 #ifdef DRI2
-    if (i830->can_resize && i830->front_buffer)
+    if (i830->front_buffer)
     {
 	i830_memory *new_front, *old_front;
 	Bool	    tiled;
@@ -1602,16 +1602,8 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
     I830SetupOutputs(pScrn);
 
     SaveHWState(pScrn);
-    pI830->can_resize = FALSE;
-    if (pI830->accel == ACCEL_UXA)
-	pI830->can_resize = TRUE;
-
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "Resizable framebuffer: %s (%d %d)\n",
-	       pI830->can_resize ? "available" : "not available",
-	       pI830->directRenderingType, pI830->accel);
 
-    if (!xf86InitialConfiguration (pScrn, pI830->can_resize))
+    if (!xf86InitialConfiguration (pScrn, TRUE))
     {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
 	RestoreHWState(pScrn);
@@ -1637,7 +1629,6 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
     int ret;
 
     pI830->accel = ACCEL_UXA;
-    pI830->can_resize = TRUE;
 
     bus_id = DRICreatePCIBusID(pI830->PciInfo);
 
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 0f17098..8888223 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1097,13 +1097,6 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn)
      * rotation.
      */
     fb_height = pScrn->virtualY;
-    if (!pI830->can_resize)
-    {
-	if (!pI830->use_drm_mode && pScrn->virtualX > pScrn->virtualY)
-	    fb_height = pScrn->virtualX;
-	else
-	    fb_height = pScrn->virtualY;
-    }
 
     /* Calculate how much framebuffer memory to allocate.  For the
      * initial allocation, calculate a reasonable minimum.  This is
-- 
1.6.2.2




More information about the Intel-gfx mailing list