dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jerry Han <jerry.han.hq@gmail.com>
Cc: Jitao Shi <jitao.shi@mediatek.com>,
	Rock wang <rock_wang@himax.com.cn>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel
Date: Fri, 13 Dec 2019 19:33:01 +0100	[thread overview]
Message-ID: <20191213183301.GB32650@ravnborg.org> (raw)
In-Reply-To: <20191212115208.3878-1-jerry.han.hq@gmail.com>

Hi Jerry.

Thanks!

On Thu, Dec 12, 2019 at 07:52:08PM +0800, Jerry Han wrote:
> Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI
> panel.
> 
> V11:
> - Use the backlight support in drm_panel to simplify the driver (Sam)
...

> - Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI
>     panel.
> 
> Signed-off-by: Jerry Han <jerry.han.hq@gmail.com>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> Reviewed-by: Derek Basehore <dbasehore@chromium.org>
> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Jitao Shi <jitao.shi@mediatek.com>
> Cc: Rock wang <rock_wang@himax.com.cn>
> ---

Applied to drm-misc-next with the following changes:
- fix build in boe_panel_get_modes()
- fix backlight - drm_panel_of_backlight() must be called after
  drm_panel_init()

	Sam

diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
index 3a6ee2069158..74d58ee7d04c 100644
--- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
+++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
@@ -219,26 +219,27 @@ static int boe_panel_enable(struct drm_panel *panel)
 	return 0;
 }
 
-static int boe_panel_get_modes(struct drm_panel *panel)
+static int boe_panel_get_modes(struct drm_panel *panel,
+			       struct drm_connector *connector)
 {
 	struct panel_info *pinfo = to_panel_info(panel);
 	const struct drm_display_mode *m = pinfo->desc->display_mode;
 	struct drm_display_mode *mode;
 
-	mode = drm_mode_duplicate(panel->drm, m);
+	mode = drm_mode_duplicate(connector->dev, m);
 	if (!mode) {
-		DRM_DEV_ERROR(panel->drm->dev, "failed to add mode %ux%u@%u\n",
+		DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
 			      m->hdisplay, m->vdisplay, m->vrefresh);
 		return -ENOMEM;
 	}
 
 	drm_mode_set_name(mode);
 
-	drm_mode_probed_add(panel->connector, mode);
+	drm_mode_probed_add(connector, mode);
 
-	panel->connector->display_info.width_mm = pinfo->desc->width_mm;
-	panel->connector->display_info.height_mm = pinfo->desc->height_mm;
-	panel->connector->display_info.bpc = pinfo->desc->bpc;
+	connector->display_info.width_mm = pinfo->desc->width_mm;
+	connector->display_info.height_mm = pinfo->desc->height_mm;
+	connector->display_info.bpc = pinfo->desc->bpc;
 
 	return 1;
 }
@@ -888,13 +889,13 @@ static int panel_add(struct panel_info *pinfo)
 		return ret;
 	}
 
+	drm_panel_init(&pinfo->base, dev, &panel_funcs,
+		       DRM_MODE_CONNECTOR_DSI);
+
 	ret = drm_panel_of_backlight(&pinfo->base);
 	if (ret)
 		return ret;
 
-	drm_panel_init(&pinfo->base, dev, &panel_funcs,
-		       DRM_MODE_CONNECTOR_DSI);
-
 	return drm_panel_add(&pinfo->base);
 }
 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-12-13 20:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 11:52 [PATCH] drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel Jerry Han
2019-12-13 18:33 ` Sam Ravnborg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-12-14  9:11 Jerry Han
2019-12-09  1:46 Jerry Han
2019-12-09 13:53 ` Emil Velikov
2019-12-11 20:06 ` Sam Ravnborg
2019-12-12  2:28   ` Jerry Han
2019-12-06  7:45 Jerry Han
2019-12-07 20:30 ` kbuild test robot
2019-12-09  1:51   ` Jerry Han
2019-11-25  8:31 Jerry Han
2019-11-28 12:57 ` Emil Velikov
2019-12-06  7:51   ` Jerry Han

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=20191213183301.GB32650@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jerry.han.hq@gmail.com \
    --cc=jitao.shi@mediatek.com \
    --cc=rock_wang@himax.com.cn \
    /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