On Thu, 2009-04-02 at 04:16 +0800, Eric Anholt wrote:
> On Mon, 2009-03-23 at 11:15 +0800, yakui_zhao wrote:
> > Subject: [DRM/I915]: Sync the mode validation for INTERLACE/DBLSCAN
> > From: Zhao Yakui <yakui.z...@intel.com>
> > 
> >      Sync the mode validation for INTERLACE/DBLSCAN
> >      This covers:
> >      Check whether the INTERLACE/DBLSCAN is supported by output device. If
> > not, the mode containing the flag of INTERLACE/DBLSCAN will be marked
> > as unsupported.
> >      
> >      Fix the code-style based on Eric's suggestion
> > Signed-off-by: Zhao Yakui <yakui.z...@intel.com>
> 
> The commit message here should look like:
> 
> drm: Sync the mode validation for INTERLACE/DBLSCAN
> 
> Check whether the INTERLACE/DBLSCAN is supported by output device. If
> not, the mode containing the flag of INTERLACE/DBLSCAN will be marked
> as unsupported.
> 
> Signed-off-by: Zhao Yakui <yakui.z...@intel.com>
> 
> (drm: not drm/i915: since it doesn't touch i915 at all, and you've got
> lines duplicated, strangely indented, and a line about a change in this
> commit to the previous revision of the commit instead of about what this
> code does compared to the code it's changing)
Thanks for pointing out the error. 
I will pay attention to this.
> 
> The drm versus drm/i915: is an important signal to me for whether it
> should go through my tree or airlied's.
> 
> > ---
> >  drivers/gpu/drm/drm_crtc_helper.c |   29 +++++++++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> > 
> > Index: linux-2.6/drivers/gpu/drm/drm_crtc_helper.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/gpu/drm/drm_crtc_helper.c        2009-03-23 
> > 09:29:59.000000000 +0800
> > +++ linux-2.6/drivers/gpu/drm/drm_crtc_helper.c     2009-03-23 
> > 11:13:43.000000000 +0800
> > @@ -42,6 +42,25 @@
> >                DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
> >  };
> >  
> > +static void drm_mode_validate_flag(struct drm_connector *connector,
> > +                              int flags)
> > +{
> > +   struct drm_display_mode *mode, *t;
> 
> Usually we put a blank line between declarations and code.
> 
> > +   if (flags == (DRM_MODE_FLAG_DBLSCAN | DRM_MODE_FLAG_INTERLACE))
> > +           return;
> > +
> > +   list_for_each_entry_safe(mode, t, &connector->modes, head) {
> > +           if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
> > +                           !(flags & DRM_MODE_FLAG_INTERLACE))
> > +                   mode->status = MODE_NO_INTERLACE;
> > +           if ((mode->flags & DRM_MODE_FLAG_DBLSCAN) &&
> > +                           !(flags & DRM_MODE_FLAG_DBLSCAN))
> > +                   mode->status = MODE_NO_DBLESCAN;
> > +   }
> > +
> > +   return;
> > +}
> > +
> >  /**
> >   * drm_helper_probe_connector_modes - get complete set of display modes
> >   * @dev: DRM device
> > @@ -72,6 +91,7 @@
> >     struct drm_connector_helper_funcs *connector_funcs =
> >             connector->helper_private;
> >     int count = 0;
> > +   int mode_flags = 0;
> >  
> >     DRM_DEBUG("%s\n", drm_get_connector_name(connector));
> >     /* set all modes to the unverified state */
> > @@ -96,6 +116,15 @@
> >     if (maxX && maxY)
> >             drm_mode_validate_size(dev, &connector->modes, maxX,
> >                                    maxY, 0);
> > +
> > +   {
> > +           if (connector->interlace_allowed)
> > +                   mode_flags |= DRM_MODE_FLAG_INTERLACE;
> > +           if (connector->doublescan_allowed)
> > +                   mode_flags |= DRM_MODE_FLAG_DBLSCAN;
> > +           drm_mode_validate_flag(connector, mode_flags);
> > +   }
> > +
> 
> Why is this mysteriously in a new block?
I copied this from the 2D driver. I will refresh it.
thanks.
> 


------------------------------------------------------------------------------
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to