[Intel-gfx] [PATCH 1/5] drm/i915: Initialise g4x watermarks for disabled pipes

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 5 23:12:19 CEST 2011


On Tue, 05 Apr 2011 13:56:37 -0700, Keith Packard <keithp at keithp.com> wrote:
> On Tue,  5 Apr 2011 10:24:14 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 
> >  	crtc = intel_get_crtc_for_plane(dev, plane);
> > -	if (crtc->fb == NULL || !crtc->enabled)
> > +	if (crtc->fb == NULL || !crtc->enabled) {
> > +		*cursor_wm = *plane_wm = display->guard_size;
> >  		return false;
> > +	}
> 
> Would it be clearer to have g4x_update_wm set these instead?
> 
> I'm also a bit concerned about the default value; it would be lovely to
> have the docs say what the value should be for disabled pipes, but I
> couldn't find any mention of them.

Indeed, I started by setting them to zero in the caller. Decided that
there was some precedent to use the guard_size as the minimum value for
unused planes (and so perhaps the unused planes on the unused pipes) and
so it was then natural to do it inside g4x_compute_wm. I guess it all
depends on how many FIFOs are split between the pipes. Using guard_size,
I believe, should be safest.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list