All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	linux-pwm@vger.kernel.org,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Pawel Moll <pawel.moll@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Rob Herring <robh+dt@kernel.org>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Bo Shen <voice.shen@atmel.com>, Kumar Gala <galak@codeaurora.org>,
	Lee Jones <lee.jones@linaro.org>,
	Andrew Victor <linux@maxim.org.za>
Subject: Re: [PATCH v5 05/11] drm: add Atmel HLCDC Display Controller support
Date: Sat, 27 Sep 2014 22:12:55 +0200	[thread overview]
Message-ID: <20140927221255.58f4d14d@bbrezillon> (raw)
In-Reply-To: <CAF6AEGup9qvivbcovHBrf6me-sStrK_jaBTd5ofohCS9DfRV4g@mail.gmail.com>

Hi Rob,

On Fri, 26 Sep 2014 17:10:49 -0400
Rob Clark <robdclark@gmail.com> wrote:

> On Mon, Sep 8, 2014 at 4:43 AM, Boris BREZILLON
> <boris.brezillon@free-electrons.com> wrote:
> > The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
> > at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
> > controller device.
> >
> > This display controller supports at least one primary plane and might
> > provide several overlays and an hardware cursor depending on the IP
> > version.
> >
> > At the moment, this driver only implements an RGB connector to interface
> > with LCD panels, but support for other kind of external devices might be
> > added later.
> >
> > Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
> > Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> 
> A few small comments below, but with those addressed it has my
> 
> Reviewed-by: Rob Clark <robdclark@gmail.com>

Thanks for your review.

> 
> 
> > ---
> >  drivers/gpu/drm/Kconfig                          |   2 +
> >  drivers/gpu/drm/Makefile                         |   1 +
> >  drivers/gpu/drm/atmel-hlcdc/Kconfig              |  13 +
> >  drivers/gpu/drm/atmel-hlcdc/Makefile             |   7 +
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c   | 286 ++++++++
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c     | 488 +++++++++++++
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h     | 224 ++++++
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c  | 656 ++++++++++++++++++
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h  | 403 +++++++++++
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 476 +++++++++++++
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c  | 836 +++++++++++++++++++++++
> >  11 files changed, 3392 insertions(+)
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> >  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> >
> 
> [snip]
> 
> > +
> > +/**
> > + * Atmel HLCDC plane rotation enum
> > + *
> > + * TODO: export DRM_ROTATE_XX macros defined by omap driver and use them
> > + * instead of defining this enum.
> > + */
> > +enum atmel_hlcdc_plane_rotation {
> > +       ATMEL_HLCDC_PLANE_NO_ROTATION,
> > +       ATMEL_HLCDC_PLANE_90DEG_ROTATION,
> > +       ATMEL_HLCDC_PLANE_180DEG_ROTATION,
> > +       ATMEL_HLCDC_PLANE_270DEG_ROTATION,
> > +};
> 
> DRM_ROTATE_* are already in drm_crtc.h
> 
> [snip]

Yep, I changed that, but won't be able to test until next week.

> 
> > +static int atmel_hlcdc_rgb_mode_valid(struct drm_connector *connector,
> > +                                     struct drm_display_mode *mode)
> > +{
> > +       return MODE_OK;
> > +}
> 
> your _mode_valid() should perhaps somehow check the constraints in
> atmel_hlcdc_crtc_mode_set()?  This way invalid modes get filtered out
> earlier..

I'm not sure, the test done in atmel_hlcdc_crtc_mode_set are not
connector related, but rather imposed by the display controller
limitations.
Anyway, let me know if you still think I should move those tests in the
connector mode_valid implementation.

> 
> [snip]
> 
> > +static struct atmel_hlcdc_plane_properties *
> > +atmel_hlcdc_plane_create_properties(struct drm_device *dev)
> > +{
> > +       struct atmel_hlcdc_plane_properties *props;
> > +       const struct drm_prop_enum_list rotations[] = {
> > +               { ATMEL_HLCDC_PLANE_NO_ROTATION,   "rotate-0" },
> > +               { ATMEL_HLCDC_PLANE_90DEG_ROTATION,  "rotate-90" },
> > +               { ATMEL_HLCDC_PLANE_180DEG_ROTATION, "rotate-180" },
> > +               { ATMEL_HLCDC_PLANE_270DEG_ROTATION, "rotate-270" },
> > +       };
> > +
> 
> you could just use drm_mode_create_rotation_property() now
> 

Yep, I changed that too. Thanks for the tip.

Best Regards,

Boris

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2014-09-27 20:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08  8:43 [PATCH v5 00/11] drm: add support for Atmel HLCDC Display Controller Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 01/11] mfd: add atmel-hlcdc driver Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 02/11] mfd: add documentation for atmel-hlcdc DT bindings Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 03/11] pwm: add support for atmel-hlcdc-pwm device Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 04/11] pwm: add DT bindings documentation for atmel-hlcdc-pwm driver Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 05/11] drm: add Atmel HLCDC Display Controller support Boris BREZILLON
2014-09-19 13:10   ` David Herrmann
2014-09-22  9:15     ` Boris BREZILLON
2014-09-22 19:18   ` Boris BREZILLON
2014-09-23  6:32     ` Thierry Reding
2014-09-23  7:24       ` Boris BREZILLON
2014-09-23  8:42         ` Thierry Reding
2014-09-23  9:55           ` Nicolas Ferre
2014-09-26 21:10   ` Rob Clark
2014-09-27 20:12     ` Boris BREZILLON [this message]
2014-09-28  3:52       ` Rob Clark
2014-09-08  8:43 ` [PATCH v5 06/11] drm: add DT bindings documentation for atmel-hlcdc-dc driver Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 07/11] ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode configs Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 08/11] ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 09/11] ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 10/11] ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi Boris BREZILLON
2014-09-08  8:43 ` [PATCH v5 11/11] ARM: at91/dt: enable the LCD panel on sama5d3xek boards Boris BREZILLON
2014-09-09  8:09 ` [PATCH v5 00/11] drm: add support for Atmel HLCDC Display Controller Harivel, Anthony
2014-09-26  0:02 ` Rob Clark

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=20140927221255.58f4d14d@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux@maxim.org.za \
    --cc=ludovic.desroches@atmel.com \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=pawel.moll@arm.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=voice.shen@atmel.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.