devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: devicetree@vger.kernel.org,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	linux-aspeed@lists.ozlabs.org, David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, Andrew Jeffery <andrew@aj.id.au>,
	Rob Herring <robh+dt@kernel.org>, Joel Stanley <joel@jms.id.au>,
	Sean Paul <sean@poorly.run>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] drm: Add ASPEED GFX driver
Date: Mon, 1 Apr 2019 20:48:31 +0200	[thread overview]
Message-ID: <20190401184831.GA14599@ravnborg.org> (raw)
In-Reply-To: <730c140f-b4a2-7df9-3d90-9d47d720f643@tronnes.org>

Hi Joel.

Replying to Noralf's mail as I lost the original mail.

> > diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
> > new file mode 100644
> > index 000000000000..e2d1d7497352
> > --- /dev/null
> > +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
> > @@ -0,0 +1,248 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +// Copyright 2018 IBM Corporation
> > +
> > +#include <linux/clk.h>
> > +#include <linux/reset.h>
> > +#include <linux/regmap.h>
> > +
> > +#include <drm/drm_crtc_helper.h>
> > +#include <drm/drm_device.h>
> > +#include <drm/drm_fb_cma_helper.h>
> > +#include <drm/drm_gem_cma_helper.h>
> > +#include <drm/drm_simple_kms_helper.h>
> > +#include <drm/drm_gem_framebuffer_helper.h>
> > +#include <drm/drm_panel.h>
> 
> I prefer includes sorted alphabetically, but no requirement.
Please sort them as Noralf suggest, as this makes it much more obvious
when one is adding a duplicate header.

> > +
> > +	priv->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> > +	if (IS_ERR(priv->rst)) {
> > +		dev_err(&pdev->dev,
> > +			"missing or invalid reset controller device tree entry");
Add error code to your dev_err() calls, so one later better
can tell what was wrong if river fails to load.
Same goes for other dev_xxx calls in this function / dirver.
(Most dev_xxx have the return code, only a few seems to miss it)

> > +static const struct of_device_id aspeed_gfx_match[] = {
> > +	{ .compatible = "aspeed,ast2400-gfx" },
> > +	{ .compatible = "aspeed,ast2500-gfx" },
> > +	{ }
Many drivers put a /* sentinel */ comment inside the empty {}

With the few things suggested above considered this is
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-04-01 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28  5:43 [PATCH 0/2] drm: Add ASPEED BMC 'GFX' driver Joel Stanley
2019-03-28  5:43 ` [PATCH 1/2] dt-bindings: gpu: Add ASPEED GFX bindings document Joel Stanley
2019-03-28  5:43 ` [PATCH 2/2] drm: Add ASPEED GFX driver Joel Stanley
2019-03-28  7:53   ` Daniel Vetter
2019-04-02  2:09     ` Joel Stanley
2019-04-01 17:48   ` Noralf Trønnes
2019-04-01 18:48     ` Sam Ravnborg [this message]

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=20190401184831.GA14599@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=andrew@aj.id.au \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=noralf@tronnes.org \
    --cc=robh+dt@kernel.org \
    --cc=sean@poorly.run \
    /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;
as well as URLs for NNTP newsgroup(s).