[Intel-gfx] [Mesa3d-dev] [PATCH] Remove Intel pageflipping support from mesa

Owain Ainsworth zerooa at googlemail.com
Sat Jan 17 16:50:31 CET 2009


On Sat, Jan 17, 2009 at 12:39:26AM +0200, Timo Aaltonen wrote:
> On Fri, 16 Jan 2009, Timo Aaltonen wrote:
> 
> > On Fri, 16 Jan 2009, Brian Paul wrote:
> >
> >> Owain Ainsworth wrote:
> >>> Hey,
> >>>
> >>> As a companion to the DDX diff I just sent out, this patch rips all of
> >>> the broken i9XX pageflipping code from mesa.
> >>>
> >>> There's one chunk I'm not sure about (whether the for loops in
> >>> IntelWindowMoved are still needed), but the rest is definitely good to
> >>> die. Jbarnes looked at this, but it needs a bit more review.
> >>>
> >>> Working fine for me on top of 7.3 rc1 on a GM965.
> >>>
> >>> I'd love if this could make it in before 7.3 is cut.
> >>
> >> I'm OK with this going into 7.3 if someone can do a little testing.  My
> >> 915/945 system isn't in a runable state right now.
> >>
> >> I think I'll wrap up 7.3 on Saturday.
> >
> > Please do include it.. intel ddx and dri fail to build against the 2.6.28
> > drm headers because of the pageflipping code poking functions that aren't
> > there. I'll test both patches shortly.
> 
> The mesa 7.3rc2 build does get past the previous error, but still fails in 
> intel_buffers.c:
> 
> gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver 
> -I../../../../.
> ./include -I../../../../../src/mesa -I../../../../../src/egl/main 
> -I../../../../../src/egl/drivers/dri -I/usr/include/drm    -Wall -g -O2 
> -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing 
> -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM 
> -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_USE_TLS -DPTHREADS 
> -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING 
> -DHAVE_ALIAS -DGLX_DIRECT_RENDERING -I../intel -I../intel/server -DI915 
> -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP intel_buffers.c -o intel_buffers.o
> intel_buffers.c: Function ???intel_get_cliprects???:
> intel_buffers.c:117: warning: unused variable ???intel_fb???
> intel_buffers.c: Function ???intelWindowMoved???:
> intel_buffers.c:162: error: dereferencing pointer to incomplete type
> intel_buffers.c:162: error: dereferencing pointer to incomplete type
> intel_buffers.c:163: error: dereferencing pointer to incomplete type
> intel_buffers.c:163: error: dereferencing pointer to incomplete type
> intel_buffers.c:164: error: dereferencing pointer to incomplete type
> intel_buffers.c:164: error: dereferencing pointer to incomplete type
> intel_buffers.c:165: error: dereferencing pointer to incomplete type
> intel_buffers.c:165: error: dereferencing pointer to incomplete type
> intel_buffers.c:166: error: dereferencing pointer to incomplete type
> intel_buffers.c:166: error: dereferencing pointer to incomplete type
> intel_buffers.c:167: error: dereferencing pointer to incomplete type
> intel_buffers.c:167: error: dereferencing pointer to incomplete type
> make[6]: *** [intel_buffers.o] Error 1
> 
> something else is missing?

That's very odd. It 73.rcs are building again kernel headers on openbsd
here (with only that pageflipping patch applied). The linux kernel
doesn't have conpat defines for planeA -> pipeA, so the following patch
should solve that:

-0-
-- 
God is Dead
		-- Nietzsche
Nietzsche is Dead
		-- God
Nietzsche is God
		-- The Dead
-------------- next part --------------
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 0cb3162..dd7e8f5 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -114,7 +114,6 @@ intel_get_cliprects(struct intel_context *intel,
 		    int *x_off, int *y_off)
 {
    __DRIdrawablePrivate *dPriv = intel->driDrawable;
-   struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
 
    if (intel->constant_cliprect) {
       /* FBO or DRI2 rendering, which can just use the fb's size. */
@@ -159,14 +158,14 @@ intelWindowMoved(struct intel_context *intel)
       volatile struct drm_i915_sarea *sarea = intel->sarea;
       drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w,
 				   .y1 = dPriv->y, .y2 = dPriv->y + dPriv->h };
-      drm_clip_rect_t planeA_rect = { .x1 = sarea->planeA_x, .y1 = sarea->planeA_y,
-				     .x2 = sarea->planeA_x + sarea->planeA_w,
-				     .y2 = sarea->planeA_y + sarea->planeA_h };
-      drm_clip_rect_t planeB_rect = { .x1 = sarea->planeB_x, .y1 = sarea->planeB_y,
-				     .x2 = sarea->planeB_x + sarea->planeB_w,
-				     .y2 = sarea->planeB_y + sarea->planeB_h };
-      GLint areaA = driIntersectArea( drw_rect, planeA_rect );
-      GLint areaB = driIntersectArea( drw_rect, planeB_rect );
+      drm_clip_rect_t pipeA_rect = { .x1 = sarea->pipeA_x, .y1 = sarea->pipeA_y,
+				     .x2 = sarea->pipeA_x + sarea->pipeA_w,
+				     .y2 = sarea->pipeA_y + sarea->pipeA_h };
+      drm_clip_rect_t pipeB_rect = { .x1 = sarea->pipeB_x, .y1 = sarea->pipeB_y,
+				     .x2 = sarea->pipeB_x + sarea->pipeB_w,
+				     .y2 = sarea->pipeB_y + sarea->pipeB_h };
+      GLint areaA = driIntersectArea( drw_rect, pipeA_rect );
+      GLint areaB = driIntersectArea( drw_rect, pipeB_rect );
       GLuint flags = dPriv->vblFlags;
 
       /* Update vblank info


More information about the Intel-gfx mailing list