All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Dave Airlie <airlied@gmail.com>
Cc: David Airlie <airlied@redhat.com>,
	kernel@pengutronix.de, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 14/20] drm: add convenience function to create an enum property
Date: Sat, 4 Feb 2012 00:40:13 +0100	[thread overview]
Message-ID: <20120203234013.GG1990@pengutronix.de> (raw)
In-Reply-To: <CAPM=9twZJaOdyzS8-fGXS2_dQKPN6eM3cJiw49uqdCqk88MD4w@mail.gmail.com>

On Fri, Feb 03, 2012 at 10:08:12AM +0000, Dave Airlie wrote:
> On Wed, Feb 1, 2012 at 1:05 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > On Wed, Feb 01, 2012 at 07:55:40AM -0500, David Airlie wrote:
> >>
> >>
> >> > > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> >> > > index 8d593ad..cdbbb40 100644
> >> > > --- a/include/drm/drm_crtc.h
> >> > > +++ b/include/drm/drm_crtc.h
> >> > > @@ -394,7 +394,7 @@ struct drm_crtc {
> >> > >   s64 framedur_ns, linedur_ns, pixeldur_ns;
> >> > >
> >> > >   /* if you are using the helper */
> >> > > - void *helper_private;
> >> > > + struct drm_crtc_helper_funcs *helper_private;
> >> > >  };
> >> > >
> >> > >
> >> > > @@ -481,7 +481,7 @@ struct drm_encoder {
> >> > >
> >> > >   struct drm_crtc *crtc;
> >> > >   const struct drm_encoder_funcs *funcs;
> >> > > - void *helper_private;
> >> > > + struct drm_encoder_helper_funcs *helper_private;
> >> > >  };
> >> > >
> >> > >  enum drm_connector_force {
> >> > > @@ -573,7 +573,7 @@ struct drm_connector {
> >> > >   /* requested DPMS state */
> >> > >   int dpms;
> >> > >
> >> > > - void *helper_private;
> >> > > + struct drm_connector_helper_funcs *helper_private;
> >> > >
> >> > >   /* forced on connector */
> >> > >   enum drm_connector_force force;
> >> >
> >> > This is a separate chunk.
> >>
> >> And totally wrong, using the helper should remain optional, and the
> >> helper includes should not be included into the main headers.
> >
> > The intention was to prevent people from thinking that they
> > should invent their own set of helper functions. As these
> > are only pointers we could also add a
> >
> > struct drm_crtc_helper_funcs;
> > struct drm_connector_helper_funcs;
> > struct drm_encoder_helper_funcs;
> >
> > to drm_crtc.h without having to include the helper includes.
> >
> 
> This might be better, though driver can invent their own helpers if
> they need it, its the whole point of using helpers and not forcing
> drivers to do stuff one single way.

I hope to get the drivers more uniform. When people want to invent
their own helpers I think the question we have to ask is what is wrong
with the helpers and what is missing and try to fix/implement this
before adding a new set of helpers. If someone really has a good reason
to implement new helpers we can easily revert this change, but we
shouldn't motivate him to do so.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-02-03 23:40 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 10:38 [PATCH] drm cleanup patches Sascha Hauer
2012-02-01 10:38 ` [PATCH 01/20] drm crtc: use drm_mode_destroy instead of kfree in drm_mode_remove Sascha Hauer
2012-02-01 10:38 ` [PATCH 02/20] drm crtc: add forgotten idr cleanup functions Sascha Hauer
2012-02-01 10:38 ` [PATCH 03/20] drm drm_edit: drm modes have to be free with drm_mode_destroy Sascha Hauer
2012-02-01 10:38 ` [PATCH 04/20] drm drm_fb_helper: destroy modes Sascha Hauer
2012-02-01 10:38 ` [PATCH 05/20] drm: add proper return value for drm_mode_crtc_set_gamma_size Sascha Hauer
2012-02-01 10:38 ` [PATCH 06/20] drm fb helper: use drm_helper_connector_dpms to do dpms Sascha Hauer
2012-02-01 10:38 ` [PATCH 07/20] drm fb helper: remove unused variable conn_limit Sascha Hauer
2012-02-01 10:38 ` [PATCH 08/20] drm fb helper: remove unused variable crtc_id Sascha Hauer
2012-02-01 10:38 ` [PATCH 09/20] drm fb_helper: use lists for crtcs Sascha Hauer
2012-02-03 10:04   ` Dave Airlie
2012-02-04 10:47     ` Sascha Hauer
2012-02-04 11:21       ` Dave Airlie
2012-02-06 11:08         ` Sascha Hauer
2012-02-01 10:38 ` [PATCH 10/20] drm: remove now unused crtc_count parameter from drm_fb_helper_init Sascha Hauer
2012-02-01 10:38 ` [PATCH 11/20] drm fb helper: add the connectors inside drm_fb_helper_initial_config Sascha Hauer
2012-02-01 10:38 ` [PATCH 12/20] drm crtc_helper: use list_for_each_entry Sascha Hauer
2012-02-01 10:38 ` [PATCH 13/20] drm crtc: Fix locking comments Sascha Hauer
2012-02-01 10:38 ` [PATCH 14/20] drm: add convenience function to create an enum property Sascha Hauer
2012-02-01 11:48   ` Chris Wilson
2012-02-01 11:53     ` Sascha Hauer
2012-02-01 12:55     ` David Airlie
2012-02-01 13:05       ` Sascha Hauer
2012-02-01 14:00         ` Daniel Vetter
2012-02-03 10:08         ` Dave Airlie
2012-02-03 23:40           ` Sascha Hauer [this message]
2012-02-01 10:38 ` [PATCH 15/20] drm: add convenience function to create an range property Sascha Hauer
2012-02-01 11:34   ` Chris Wilson
2012-02-01 10:38 ` [PATCH 16/20] drm: store connector properties in list Sascha Hauer
2012-02-01 10:38 ` [PATCH 17/20] drm: remove checks for same value in set_prop Sascha Hauer
2012-02-01 11:55   ` Chris Wilson
2012-02-01 12:13     ` Sascha Hauer
2012-02-01 12:23       ` Chris Wilson
2012-02-01 10:38 ` [PATCH 18/20] drm: do not call drm_connector_property_set_value from drivers Sascha Hauer
2012-02-01 10:38 ` [PATCH 19/20] drm exynos: use drm_fb_helper_set_par directly Sascha Hauer
2012-02-02  2:25   ` Inki Dae
2012-02-01 10:38 ` [PATCH 20/20] drm: do not set fb_info->pixmap fields Sascha Hauer
2012-02-01 12:00   ` Chris Wilson
2012-02-02 14:13 ` [PATCH] drm cleanup patches Sascha Hauer
2012-02-03 10:21   ` Dave Airlie

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=20120203234013.GG1990@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    /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.