Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754731AbdFWJ0Q (ORCPT ); Fri, 23 Jun 2017 05:26:16 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33103 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754055AbdFWJ0O (ORCPT ); Fri, 23 Jun 2017 05:26:14 -0400 Date: Fri, 23 Jun 2017 11:26:03 +0200 From: Daniel Vetter To: Peter Rosin Cc: linux-kernel@vger.kernel.org, Boris Brezillon , Nicolas Ferre , dri-devel@lists.freedesktop.org, Alexandre Belloni , Daniel Vetter Subject: Re: [PATCH v5 1/2] drm: atmel-hlcdc: add missing .set_property helper to the crtc Message-ID: <20170623092603.2jcfbar7bs4c7xdi@phenom.ffwll.local> Mail-Followup-To: Peter Rosin , linux-kernel@vger.kernel.org, Boris Brezillon , Nicolas Ferre , dri-devel@lists.freedesktop.org, Alexandre Belloni , Daniel Vetter References: <1498107791-17450-1-git-send-email-peda@axentia.se> <1498107791-17450-2-git-send-email-peda@axentia.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1498107791-17450-2-git-send-email-peda@axentia.se> X-Operating-System: Linux phenom 4.9.0-2-amd64 User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1934 Lines: 54 On Thu, Jun 22, 2017 at 07:03:10AM +0200, Peter Rosin wrote: > The default implementation should be used. > > Signed-off-by: Peter Rosin 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