Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64b76abf authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Greg Kroah-Hartman
Browse files

drm/panel: Add and fill drm_panel type field



[ Upstream commit 9a2654c0f62a1704f36acb6329f9ccbd539f75ad ]

Add a type field to the drm_panel structure to report the panel type,
using DRM_MODE_CONNECTOR_* macros (the values that make sense are LVDS,
eDP, DSI and DPI). This will be used to initialise the corresponding
connector type.

Update all panel drivers accordingly. The panel-simple driver only
specifies the type for the known to be LVDS panels, while all other
panels are left as unknown and will be converted on a case-by-case
basis as they all need to be carefully reviewed.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190904132804.29680-2-laurent.pinchart@ideasonboard.com


Stable-dep-of: 2c56a751845d ("drm/panel: simple: Add connector_type for innolux_at043tn24")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 362940f8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -46,16 +46,19 @@ static LIST_HEAD(panel_list);
 * @panel: DRM panel
 * @dev: parent device of the panel
 * @funcs: panel operations
 * @connector_type: the connector type (DRM_MODE_CONNECTOR_*) corresponding to
 *	the panel interface
 *
 * Initialize the panel structure for subsequent registration with
 * drm_panel_add().
 */
void drm_panel_init(struct drm_panel *panel, struct device *dev,
		    const struct drm_panel_funcs *funcs)
		    const struct drm_panel_funcs *funcs, int connector_type)
{
	INIT_LIST_HEAD(&panel->list);
	panel->dev = dev;
	panel->funcs = funcs;
	panel->connector_type = connector_type;
}
EXPORT_SYMBOL(drm_panel_init);

+2 −1
Original line number Diff line number Diff line
@@ -350,7 +350,8 @@ static int versatile_panel_probe(struct platform_device *pdev)
			dev_info(dev, "panel mounted on IB2 daughterboard\n");
	}

	drm_panel_init(&vpanel->panel, dev, &versatile_panel_drm_funcs);
	drm_panel_init(&vpanel->panel, dev, &versatile_panel_drm_funcs,
		       DRM_MODE_CONNECTOR_DPI);

	return drm_panel_add(&vpanel->panel);
}
+2 −1
Original line number Diff line number Diff line
@@ -204,7 +204,8 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
	mipi_dsi_set_drvdata(dsi, ctx);
	ctx->dsi = dsi;

	drm_panel_init(&ctx->panel, &dsi->dev, &feiyang_funcs);
	drm_panel_init(&ctx->panel, &dsi->dev, &feiyang_funcs,
		       DRM_MODE_CONNECTOR_DSI);

	ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd");
	if (IS_ERR(ctx->dvdd)) {
+2 −1
Original line number Diff line number Diff line
@@ -895,7 +895,8 @@ static int ili9322_probe(struct spi_device *spi)
		ili->input = ili->conf->input;
	}

	drm_panel_init(&ili->panel, dev, &ili9322_drm_funcs);
	drm_panel_init(&ili->panel, dev, &ili9322_drm_funcs,
		       DRM_MODE_CONNECTOR_DPI);

	return drm_panel_add(&ili->panel);
}
+2 −1
Original line number Diff line number Diff line
@@ -433,7 +433,8 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
	mipi_dsi_set_drvdata(dsi, ctx);
	ctx->dsi = dsi;

	drm_panel_init(&ctx->panel, &dsi->dev, &ili9881c_funcs);
	drm_panel_init(&ctx->panel, &dsi->dev, &ili9881c_funcs,
		       DRM_MODE_CONNECTOR_DSI);

	ctx->power = devm_regulator_get(&dsi->dev, "power");
	if (IS_ERR(ctx->power)) {
Loading