[PATCH v2 26/27] drm/tegra: Add DSI support

Stephen Warren swarren at wwwdotorg.org
Sat Oct 12 00:43:35 CEST 2013


On 10/07/2013 02:34 AM, Thierry Reding wrote:
> This commit adds support for both DSI outputs found on Tegra. Only very
> minimal functionality is implemented, so advanced features like ganged
> mode won't work.
> 
> Due to the lack of other test hardware, some sections of the driver are
> hardcoded to work with Dalmore.

> diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c

> +static int tegra_dsi_show_regs(struct seq_file *s, void *data)
> +{
> +	struct drm_info_node *node = s->private;
> +	struct tegra_dsi *dsi = node->info_ent->data;
> +
> +#define DUMP_REG(name)						\
> +	seq_printf(s, "%-32s %#05x %08lx\n", #name, name,	\
> +		   tegra_dsi_readl(dsi, name))
> +
> +	DUMP_REG(DSI_INCR_SYNCPT);

Does it make sense to use an MMIO regmap instead? That way, you get all
the debugfs files for free...

> +static int tegra_dsi_probe(struct platform_device *pdev)

> +	dsi->clk_parent = devm_clk_get(&pdev->dev, "parent");
> +	if (IS_ERR(dsi->clk_parent))
> +		return PTR_ERR(dsi->clk_parent);
...
> +static const struct of_device_id tegra_dsi_of_match[] = {
> +	{ .compatible = "nvidia,tegra114-dsi", },

Is this DT binding documented? The clk_get() call above in particular
imposes the requirement that DT contain a clock with that name, which
should be part of the binding documentation.

Hopefully the values that this driver hard-codes won't be an issue for
the DT binding; we can simply make those values the default if
properties are missing. I assume it's likely that such a strategy will
work here?


More information about the dri-devel mailing list