Re: [PATCH 10/42] drm/i915: make plane helpers fully atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 12, 2015 at 04:43:09PM +0300, Ville Syrjälä wrote:
> On Tue, May 12, 2015 at 03:33:12PM +0200, Maarten Lankhorst wrote:
> > Op 12-05-15 om 10:18 schreef Daniel Vetter:
> > > On Mon, May 11, 2015 at 04:24:46PM +0200, Maarten Lankhorst wrote:
> > >> @@ -155,24 +163,9 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
> > >>  	/* Clip all planes to CRTC size, or 0x0 if CRTC is disabled */
> > >>  	intel_state->clip.x1 = 0;
> > >>  	intel_state->clip.y1 = 0;
> > >> -	intel_state->clip.x2 =
> > >> -		crtc_state->base.active ? crtc_state->pipe_src_w : 0;
> > >> -	intel_state->clip.y2 =
> > >> -		crtc_state->base.active ? crtc_state->pipe_src_h : 0;
> > >> -
> > >> -	/*
> > >> -	 * Disabling a plane is always okay; we just need to update
> > >> -	 * fb tracking in a special way since cleanup_fb() won't
> > >> -	 * get called by the plane helpers.
> > >> -	 */
> > >> -	if (state->fb == NULL && plane->state->fb != NULL) {
> > >> -		/*
> > >> -		 * 'prepare' is never called when plane is being disabled, so
> > >> -		 * we need to handle frontbuffer tracking as a special case
> > >> -		 */
> > >> -		intel_crtc->atomic.disabled_planes |=
> > >> -			(1 << drm_plane_index(plane));
> > >> -	}
> > >> +	drm_crtc_get_hv_timing(&crtc_state->mode,
> > >> +			       &intel_state->clip.x2,
> > >> +			       &intel_state->clip.y2);
> > > Imo this is obfuscating things a bit, why not just unconditionally copy
> > > pipe_src_w/h to clip.x/y2? get_hv_timing is for the pipe size, which on
> > > most platforms must match the primary plane window except for gen2 and
> > > gen9+.
> > pipe_src_* is calculated in the same way,
> 
> Except we may end up rounding pipe_src_w down if we have
> double-wide/dual link lvds etc., and we definitely need to clip the
> planes against the real pipe src size.

Oh and we definitely want to keep the 'user mode == pipe src'
assumptions to a minimum so that we might some day finish the "expose
panel fitter to userland" task.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux