Re: [PATCH] drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
> Reviewed-by: Derek Basehore <dbasehore@xxxxxxxxxxxx>
> Reviewed-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Cc: Jitao Shi <jitao.shi@xxxxxxxxxxxx>
> Cc: Rock wang <rock_wang@xxxxxxxxxxxx>
> ---

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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux