Re: [PATCH 01/23] drm/i915: Fix rotation setup during plane HW readout

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

 



On Thu, Mar 11, 2021 at 06:04:57PM +0200, Ville Syrjälä wrote:
> On Thu, Mar 11, 2021 at 12:17:14AM +0200, Imre Deak wrote:
> > The HW plane state is cleared and inited after we store the rotation to
> > it, so store it instead to the uapi state to match what we do with all
> > other plane state until intel_plane_copy_uapi_to_hw_state() is called.
> 
> Feels a bit backwards. Ideally I'd like the readout to go the other way.
> But given how this code is atm this is consistent with the rest.

Yes makes sense to read out to an i915 specific state first, if that's
what you mean.

> Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Looks like we could also nuke the
>  intel_state->uapi.src = drm_plane_state_src(plane_state);
>  intel_state->uapi.dst = drm_plane_state_dest(plane_state);
> since intel_plane_copy_uapi_to_hw_state() also does that for us.

Yes, though the fn name suggests that it only copies from uapi -> hw.

> > Rotation for initial FBs is not supported atm, but let's still fix the
> > plane state setup here.
> > 
> > Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 5bfc06c46e28..12b54e032bc1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -2468,11 +2468,11 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
> >  	return;
> >  
> >  valid_fb:
> > -	intel_state->hw.rotation = plane_config->rotation;
> > +	plane_state->rotation = plane_config->rotation;
> >  	intel_fill_fb_ggtt_view(&intel_state->view, fb,
> > -				intel_state->hw.rotation);
> > +				plane_state->rotation);
> >  	intel_state->color_plane[0].stride =
> > -		intel_fb_pitch(fb, 0, intel_state->hw.rotation);
> > +		intel_fb_pitch(fb, 0, plane_state->rotation);
> >  
> >  	__i915_vma_pin(vma);
> >  	intel_state->vma = i915_vma_get(vma);
> > -- 
> > 2.25.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux