From: Daniel Vetter <daniel@ffwll.ch>
To: Peter Rosin <peda@axentia.se>
Cc: linux-kernel@vger.kernel.org,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
dri-devel@lists.freedesktop.org,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH v5 1/2] drm: atmel-hlcdc: add missing .set_property helper to the crtc
Date: Fri, 23 Jun 2017 11:26:03 +0200 [thread overview]
Message-ID: <20170623092603.2jcfbar7bs4c7xdi@phenom.ffwll.local> (raw)
In-Reply-To: <1498107791-17450-2-git-send-email-peda@axentia.se>
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@axentia.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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2017-06-23 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 5:03 [PATCH v5 0/2] drm: atmel-hlcdc: clut support Peter Rosin
2017-06-22 5:03 ` [PATCH v5 1/2] drm: atmel-hlcdc: add missing .set_property helper to the crtc Peter Rosin
2017-06-23 9:26 ` Daniel Vetter [this message]
2017-06-22 5:03 ` [PATCH v5 2/2] drm: atmel-hlcdc: add support for 8-bit color lookup table mode Peter Rosin
2017-06-22 8:12 ` [PATCH v5 0/2] drm: atmel-hlcdc: clut support Nicolas Ferre
2017-06-22 20:59 ` Boris Brezillon
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=20170623092603.2jcfbar7bs4c7xdi@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=peda@axentia.se \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®