All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Stephan Gerhold <stephan@gerhold.net>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v7] drm/panel: Add driver for Sony ACX424AKP panel
Date: Sat, 4 Jan 2020 15:15:07 +0100	[thread overview]
Message-ID: <20200104141507.GA17768@ravnborg.org> (raw)
In-Reply-To: <20200104001026.201086-1-linus.walleij@linaro.org>

Hi Linus.

On Sat, Jan 04, 2020 at 01:10:26AM +0100, Linus Walleij wrote:
> The Sony ACX424AKP is a command/videomode DSI panel for
> mobile devices. It is used on the ST-Ericsson HREF520
> reference design. We support video mode by default, but
> it is possible to switch the panel into command mode
> by using the bool property "dsi-command-mode".
> 
> Cc: Stephan Gerhold <stephan@gerhold.net>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Driver looks good but there are a few issues yet to address:
It does not build on top of drm-misc-next due to changes to the
drm_panel code.

And then there is a few checkpatch warnings that needs to be looked at:
-:25: WARNING:CONFIG_DESCRIPTION: please write a paragraph that describes the config symbol fully
#25: FILE: drivers/gpu/drm/panel/Kconfig:330:
+config DRM_PANEL_SONY_ACX424AKP

-:52: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#52:
new file mode 100644

-:307: CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#307: FILE: drivers/gpu/drm/panel/panel-sony-acx424akp.c:251:
+	udelay(20);

-:310: WARNING:MSLEEP: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst
#310: FILE: drivers/gpu/drm/panel/panel-sony-acx424akp.c:254:
+	msleep(11);

-:319: WARNING:MSLEEP: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst
#319: FILE: drivers/gpu/drm/panel/panel-sony-acx424akp.c:263:
+	msleep(11);

-:543: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#543: FILE: drivers/gpu/drm/panel/panel-sony-acx424akp.c:487:
+	acx->reset_gpio = devm_gpiod_get_optional(dev, "reset",
+						 GPIOD_OUT_HIGH);


The build errors was easy to fix - but please have a look at the other
warnings.

I did the following changes locally to fix the build.
But I did not try to look into the delay stuff.

	Sam

diff --git a/drivers/gpu/drm/panel/panel-sony-acx424akp.c b/drivers/gpu/drm/panel/panel-sony-acx424akp.c
index fe33f97cd812..38c83f5b16d5 100644
--- a/drivers/gpu/drm/panel/panel-sony-acx424akp.c
+++ b/drivers/gpu/drm/panel/panel-sony-acx424akp.c
@@ -407,17 +407,17 @@ static int acx424akp_disable(struct drm_panel *panel)
 	return 0;
 }
 
-static int acx424akp_get_modes(struct drm_panel *panel)
+static int acx424akp_get_modes(struct drm_panel *panel,
+			       struct drm_connector *connector)
 {
 	struct acx424akp *acx = panel_to_acx424akp(panel);
-	struct drm_connector *connector = panel->connector;
 	struct drm_display_mode *mode;
 
 	if (acx->video_mode)
-		mode = drm_mode_duplicate(panel->drm,
+		mode = drm_mode_duplicate(connector->dev,
 					  &sony_acx424akp_vid_mode);
 	else
-		mode = drm_mode_duplicate(panel->drm,
+		mode = drm_mode_duplicate(connector->dev,
 					  &sony_acx424akp_cmd_mode);
 	if (!mode) {
 		DRM_ERROR("bad mode or failed to add mode\n");
@@ -484,7 +484,7 @@ static int acx424akp_probe(struct mipi_dsi_device *dsi)
 
 	/* This asserts RESET by default */
 	acx->reset_gpio = devm_gpiod_get_optional(dev, "reset",
-						 GPIOD_OUT_HIGH);
+						  GPIOD_OUT_HIGH);
 	if (IS_ERR(acx->reset_gpio)) {
 		ret = PTR_ERR(acx->reset_gpio);
 		if (ret != -EPROBE_DEFER)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2020-01-04 14:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04  0:10 [PATCH v7] drm/panel: Add driver for Sony ACX424AKP panel Linus Walleij
2020-01-04 14:15 ` 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=20200104141507.GA17768@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --cc=stephan@gerhold.net \
    --cc=thierry.reding@gmail.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.