On Fri, Mar 28, 2014 at 03:11:55PM -0700, Jesse Barnes wrote:
> On Fri, 28 Mar 2014 23:29:32 +0200
> [email protected] wrote:
> 
> > From: Ville Syrjälä <[email protected]>
> > 
> > If vsyncshift comes out as negative, add one htotal to it to get the
> > corresponding positive value.
> > 
> > This is rather theoretical as it would require a mode where the
> > hsync+back porch is very long and the active+front porch very short.
> > 
> > Signed-off-by: Ville Syrjälä <[email protected]>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c 
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 3ab40e3..7d3b18b 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -5377,7 +5377,8 @@ static void intel_set_pipe_timings(struct intel_crtc 
> > *intel_crtc)
> >     enum transcoder cpu_transcoder = intel_crtc->config.cpu_transcoder;
> >     struct drm_display_mode *adjusted_mode =
> >             &intel_crtc->config.adjusted_mode;
> > -   uint32_t vsyncshift = 0, crtc_vtotal, crtc_vblank_end;
> > +   uint32_t crtc_vtotal, crtc_vblank_end;
> > +   int vsyncshift = 0;
> >  
> >     /* We need to be careful not to changed the adjusted mode, for otherwise
> >      * the hw state checker will get angry at the mismatch. */
> > @@ -5394,6 +5395,8 @@ static void intel_set_pipe_timings(struct intel_crtc 
> > *intel_crtc)
> >             else
> >                     vsyncshift = adjusted_mode->crtc_hsync_start -
> >                             adjusted_mode->crtc_htotal / 2;
> > +           if (vsyncshift < 0)
> > +                   vsyncshift += adjusted_mode->crtc_htotal;
> >     }
> >  
> >     if (INTEL_INFO(dev)->gen > 3)
> 
> 
> Funky indeed.  I wonder if we should congratulate the user if we detect
> this configuration.  "Achievement unlocked: funky mode timings!".

Would be a neat bounty-hunt sprinkling this all over ...
> 
> Reviewed-by: Jesse Barnes <[email protected]>

All 3 merged, thanks for patches&review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to