On Mon, Oct 29, 2012 at 03:14:51PM +0000, Damien Lespiau wrote: > From: Damien Lespiau <damien.lesp...@intel.com> > > v2: Use a switch for consistency (Chris Wilson) > > Signed-off-by: Damien Lespiau <damien.lesp...@intel.com> > --- > drivers/gpu/drm/i915/intel_sprite.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c > b/drivers/gpu/drm/i915/intel_sprite.c > index 87c8f1b..03307be 100644 > --- a/drivers/gpu/drm/i915/intel_sprite.c > +++ b/drivers/gpu/drm/i915/intel_sprite.c > @@ -466,6 +466,15 @@ intel_update_plane(struct drm_plane *plane, struct > drm_crtc *crtc, > if (intel_plane->pipe != intel_crtc->pipe) > return -EINVAL; > > + /* Sprite planes can be linear or x-tiled surfaces */ > + switch (obj->tiling_mode) { > + case I915_TILING_NONE: > + case I915_TILING_X: > + break; > + default: > + return -EINVAL; > + }
I'm confused why this is necessary. intel_pin_and_fence_fb_obj() already has the check, so things should never go much further than this. Futhermore someone can still go and change the tiling mode after this point. Or indeed even at the same time as we're not holding struct_mutex here (but this would be caught by intel_pin_and_fence_fb_obj()). -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx