[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170623092603.2jcfbar7bs4c7xdi@phenom.ffwll.local>
Date: Fri, 23 Jun 2017 11:26:03 +0200
From: Daniel Vetter <daniel@...ll.ch>
To: Peter Rosin <peda@...ntia.se>
Cc: linux-kernel@...r.kernel.org,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
dri-devel@...ts.freedesktop.org,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
Daniel Vetter <daniel.vetter@...el.com>
Subject: Re: [PATCH v5 1/2] drm: atmel-hlcdc: add missing .set_property
helper to the crtc
On Thu, Jun 22, 2017 at 07:03:10AM +0200, Peter Rosin wrote:
> The default implementation should be used.
>
> Signed-off-by: Peter Rosin <peda@...ntia.se>
Purely optional refactor idea, since you're not the first one to stumble
over this, and in hindsight it makes sense to have these functions as the
defaults:
- Move all the set_property legacy2atomic helper functions into the core,
renaming them to e.g. drm_atomic_default_crtc_set_property. But we'd do
this for connectors and planes too ofc.
- Use them as the default handler if drm_drv_uses_atomic_modeset() is
true.
- Nuke the default assignment from all drivers.
This way there's less boilerplate, less confusion (some people thought you
must have atomic userspace to use atomic properties, which isn't true as
long as this is wired up) and happier driver developers :-)
But since you've volunteered already to fix the fbdev clut stuff this
really is just an idea.
-Daniel
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> index 5348985..cc00ce3 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> @@ -429,6 +429,7 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = {
> .atomic_destroy_state = atmel_hlcdc_crtc_destroy_state,
> .enable_vblank = atmel_hlcdc_crtc_enable_vblank,
> .disable_vblank = atmel_hlcdc_crtc_disable_vblank,
> + .set_property = drm_atomic_helper_crtc_set_property,
> };
>
> int atmel_hlcdc_crtc_create(struct drm_device *dev)
> --
> 2.1.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists