All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Add kernel-doc for plane functions
Date: Wed, 5 Jun 2013 14:52:29 +0300	[thread overview]
Message-ID: <20130605115229.GG5004@intel.com> (raw)
In-Reply-To: <2041669.WXR2M19hJY@avalon>

On Wed, Jun 05, 2013 at 04:13:01AM +0200, Laurent Pinchart wrote:
> Hi Ville,
> 
> Thank you for the patch.
> 
> On Tuesday 04 June 2013 10:58:35 ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/drm_crtc.c | 31 +++++++++++++++++++++++++++++++
> >  1 file changed, 31 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index f00ba75..f1f11e1 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -795,6 +795,21 @@ void drm_encoder_cleanup(struct drm_encoder *encoder)
> >  }
> >  EXPORT_SYMBOL(drm_encoder_cleanup);
> > 
> > +/**
> > + * drm_plane_init - Initialise a new plane object
> > + * @dev: DRM device
> > + * @plane: plane object to init
> > + * @possible_crtcs: bitmask of possible CRTCs
> > + * @funcs: callbacks for the new plane
> > + * @formats: array of supported formats (%DRM_FORMAT_*)
> > + * @format_count: number of elements in @formats
> > + * @priv: plane is private (hidden from userspace)?
> > + *
> > + * Inits a new object created as base part of an driver plane object.
> 
> s/an driver/a driver/

You can blame the guy who wrote the drm_crtc_init() docs :)

> 
> > + *
> > + * RETURNS:
> > + * Zero on success, error code on failure.
> > + */
> >  int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
> >  		   unsigned long possible_crtcs,
> >  		   const struct drm_plane_funcs *funcs,
> > @@ -843,6 +858,13 @@ int drm_plane_init(struct drm_device *dev, struct
> > drm_plane *plane, }
> >  EXPORT_SYMBOL(drm_plane_init);
> > 
> > +/**
> > + * drm_plane_cleanup - Cleans up the core plane usage.
> 
> Nitpicking, you could remove the full stop at the end of the line to be 
> consistent with the other two kerneldoc blocks.
> 
> And s/Cleans/Clean/

Same deal here. I'll fix up the originals as well...

> 
> > + * @plane: plane to cleanup
> > + *
> > + * Cleanup @plane. Removes from drm modesetting space
> > + * does NOT free object, caller does that.
> 
> As this is documentation, I'd use a more verbose style.
> 
> This function clean up @plane and removes it from the DRM mode setting core. 
> Note that the function does *not* free the plane structure itself, this is the 
> responsibility of the caller.

Again just copy-pasted from somewhere.

> 
> > + */
> >  void drm_plane_cleanup(struct drm_plane *plane)
> >  {
> >  	struct drm_device *dev = plane->dev;
> > @@ -859,6 +881,15 @@ void drm_plane_cleanup(struct drm_plane *plane)
> >  }
> >  EXPORT_SYMBOL(drm_plane_cleanup);
> > 
> > +/**
> > + * drm_plane_force_disable - Forcibly disable a plane
> > + * @plane: plane to disable
> > + *
> > + * Forces the plane to be disabled.
> 
> This feels a bit unclear to me. In particular, how is "force_disable" 
> different from just disabling the plane ? Maybe the function should be renamed 
> to drm_plane_disable(), and the documentation updated to mention that the 
> function just disables the plane and disassociate with from its frame buffer.

Normal disable would happen in response to the setplane ioctl w/ NULL
fb, whereas this guy is meant more for unsolicited disable.

I'm afraid if I call it drm_plane_disable() someone will send a patch
to call it from setplane, or people start to call it from drivers'
disable_plane hook.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-06-05 11:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 13:10 [PATCH 0/3] drm: fbdev mode restoration improvements v3 ville.syrjala
2013-06-03 13:10 ` [PATCH v2 1/3] drm: Add drm_plane_force_disable() ville.syrjala
2013-06-04  1:37   ` Laurent Pinchart
2013-06-04  7:58     ` [PATCH] drm: Add kernel-doc for plane functions ville.syrjala
2013-06-05  2:13       ` Laurent Pinchart
2013-06-05 11:52         ` Ville Syrjälä [this message]
2013-06-05 12:39         ` [PATCH 1/2] drm: Improve drm_crtc documentation ville.syrjala
2013-06-05 12:39           ` [PATCH v2 2/2] drm: Add kernel-doc for plane functions ville.syrjala
2013-06-05 12:56           ` [PATCH 1/2] drm: Improve drm_crtc documentation Alex Deucher
2013-06-03 13:10 ` [PATCH 2/3] drm/vmwgfx: Don't access file_priv in cursor_set when handle==0 ville.syrjala
2013-06-03 14:52   ` Jakob Bornecrantz
2013-06-03 13:10 ` [PATCH 3/3] drm/fb-helper: Disable cursors and planes when restoring fbdev mode ville.syrjala
2013-06-04  9:39   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130605115229.GG5004@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.