Re: [PATCH 5/6] drm/i915: Stop hand rolling drm_mode_match()

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

 



On Thu, Mar 21, 2019 at 05:23:30PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2019-03-21 13:24:45)
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Utilize drm_mode_match() instead of hand rolling it when
> > looking for the DRRS downclock mode.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_panel.c | 49 +++++++++++++++---------------
> >  1 file changed, 24 insertions(+), 25 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> > index cf111eba1a93..4727e74f7437 100644
> > --- a/drivers/gpu/drm/i915/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/intel_panel.c
> > @@ -46,6 +46,16 @@ intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
> >         drm_mode_set_crtcinfo(adjusted_mode, 0);
> >  }
> >  
> > +static bool is_downclock_mode(const struct drm_display_mode *downclock_mode,
> > +                             const struct drm_display_mode *fixed_mode)
> > +{
> > +       return drm_mode_match(downclock_mode, fixed_mode,
> > +                             DRM_MODE_MATCH_TIMINGS |
> 
> Adds m1->vscan == m2->vscan
> 
> Makes sense.
> 
> > +                             DRM_MODE_MATCH_FLAGS |
> > +                             DRM_MODE_MATCH_3D_FLAGS) &&
> 
> Together adds m1->flags == m2->flags
> 
> And also makes sense.

Somehow I didn't even notice it wasn't checking the flags.
But yeah, seems appropriate to make it check this.

-- 
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