In one of my overzealous pipe/plane mapping patches, I renamed the pipes
field in drm_i915_flip_t to planes, since it's really dealing with
planes and so seemed to make sense.
However, drm_i915_flip_t has different compatibility requirements than
the i915 sarea private. The sarea private is duplicated in the Mesa
and DDX trees and used under a different name, so changes to it, as
long as they're binary compatible, are fine. drm_i915_flip_t, on the
other hand, is used under the same name by both the Mesa and DDX trees.
So if you build an old DDX or Mesa against a new DRM, they'll pick up
the new drm_i915_flip_t definition (since HAVE_I915_FLIP will be
defined) and promptly break. This patch reverts the DRM to the old
name and adds comments describing the actual field usage.
Sorry for the trouble.
Jesse
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index daa03df..3a9ecab 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -755,13 +755,14 @@ static int i915_flip_bufs(struct drm_device *dev, void *data, struct drm_file *f
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (param->planes & ~0x3) {
+ /* This is really planes */
+ if (param->pipes & ~0x3) {
DRM_ERROR("Invalid planes 0x%x, only <= 0x3 is valid\n",
- param->planes);
+ param->pipes);
return -EINVAL;
}
- i915_dispatch_flip(dev, param->planes, 0);
+ i915_dispatch_flip(dev, param->pipes, 0);
return 0;
}
diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h
index a57ffa7..9976804 100644
--- a/shared-core/i915_drm.h
+++ b/shared-core/i915_drm.h
@@ -182,7 +182,13 @@ typedef struct _drm_i915_sarea {
/* Asynchronous page flipping:
*/
typedef struct drm_i915_flip {
- int planes;
+ /*
+ * This is really talking about planes, and we could rename it
+ * except for the fact that some of the duplicated i915_drm.h files
+ * out there check for HAVE_I915_FLIP and so might pick up this
+ * version.
+ */
+ int pipes;
} drm_i915_flip_t;
/* Allow drivers to submit batchbuffers directly to hardware, relying
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel