[Intel-gfx] [PATCH 1/2] drm/i915: Replaced Blitter ring based flips with MMIO flips

Gupta, Sourab sourab.gupta at intel.com
Wed May 28 11:42:51 CEST 2014


On Wed, 2014-05-28 at 07:30 +0000, Chris Wilson wrote:
> On Wed, May 28, 2014 at 12:42:01PM +0530, sourab.gupta at intel.com wrote:
> > +static int intel_postpone_flip(struct drm_i915_gem_object *obj)
> > +{
> > +	int ret;
> > +
> > +	if (!obj->ring)
> > +		return 0;
> > +
> > +	if (i915_seqno_passed(obj->ring->get_seqno(obj->ring, true),
> > +				obj->last_write_seqno))
> > +		return 0;
> 
> obj->last_write_seqno could be 0 here. To be correct, test against
> obj->last_write_seqno == 0 instead of obj->ring == NULL first.
> 
> > +	ret = i915_gem_check_olr(obj->ring, obj->last_write_seqno);
> > +	if (ret)
> > +		return ret;
> > +
> > +	if (WARN_ON(!obj->ring->irq_get(obj->ring)))
> > +		return 0;
> > +
> > +	return 1;
> > +}
> > +
> 
> >  static int intel_default_queue_flip(struct drm_device *dev,
> >  				    struct drm_crtc *crtc,
> >  				    struct drm_framebuffer *fb,
> > @@ -11515,6 +11652,9 @@ static void intel_init_display(struct drm_device *dev)
> >  		break;
> >  	}
> >  
> > +	if (intel_use_mmio_flip(dev))
> > +		dev_priv->display.queue_flip = intel_queue_mmio_flip;
> 
> I'd still like to see this as a tristate, i.e. use_mmio_flip(dev) > 1
> here. E.g. we will want to use mmio flips for !BCS, but GPU flips when
> BCS is active.
> -Chris
> 
Hi Chris,
We can extend the module param to have tristate here, but since the
current design assigns the .queue_flip parameter at the init time, not
at the page flip time, this kind of usecase of having driver discretion
in terms of assigning CS vs MMIO flip can't be applied in this patch.

If required, we can have a subsequent patch to make a flip time decision
of MMIO vs CS flip based on module parameter.

Regards,
Sourab


More information about the Intel-gfx mailing list