[PATCH v2 2/2] drm/panel: Add Visionox G2647FB105 panel driver

Dmitry Baryshkov dmitry.baryshkov at oss.qualcomm.com
Sun Mar 30 17:22:15 UTC 2025


On Thu, Mar 27, 2025 at 07:37:45PM +0300, Alexander Baransky wrote:
> Add the driver for Visionox G2647FB105 6.47" FHD Plus CMD mode AMOLED panel
> support found in:
> - Xiaomi Mi Note 10 / CC9 Pro (sm7150-xiaomi-tucana)
> - Xiaomi Mi Note 10 Lite (sm7150-xiaomi-toco)
> 
> Signed-off-by: Alexander Baransky <sanyapilot496 at gmail.com>
> ---
>  drivers/gpu/drm/panel/Kconfig                 |   9 +
>  drivers/gpu/drm/panel/Makefile                |   1 +
>  .../gpu/drm/panel/panel-visionox-g2647fb105.c | 282 ++++++++++++++++++
>  3 files changed, 292 insertions(+)
>  create mode 100644 drivers/gpu/drm/panel/panel-visionox-g2647fb105.c
> 
> +
> +static int visionox_g2647fb105_prepare(struct drm_panel *panel)
> +{
> +	struct visionox_g2647fb105 *ctx = to_visionox_g2647fb105(panel);
> +	struct device *dev = &ctx->dsi->dev;
> +	int ret;
> +
> +	ret = regulator_bulk_enable(ARRAY_SIZE(visionox_g2647fb105_supplies), ctx->supplies);
> +	if (ret < 0) {
> +		dev_err(dev, "Failed to enable regulators: %d\n", ret);
> +		return ret;
> +	}
> +
> +	visionox_g2647fb105_reset(ctx);
> +
> +	ret = visionox_g2647fb105_on(ctx);
> +	if (ret < 0) {
> +		dev_err(dev, "Failed to initialize panel: %d\n", ret);
> +		gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +		regulator_bulk_disable(ARRAY_SIZE(visionox_g2647fb105_supplies), ctx->supplies);

Unfortunately, you can't disable the regulators here. panel bridge
doesn't check for an error (and it can not further propagate an error),
so if visionox_g2647fb105_on() fails, then there will be an extra call
to regulator_bulk_disable() in visionox_g2647fb105_unprepare().

> +		return ret;
> +	}
> +
> +	return 0;
> +}
> +

LGTM otherwise

-- 
With best wishes
Dmitry


More information about the dri-devel mailing list