[PATCH v2 2/4] drm: panel: Add support for Renesas R61307 based MIPI DSI panel
Neil Armstrong
neil.armstrong at linaro.org
Mon May 5 13:57:10 UTC 2025
On 05/05/2025 13:41, Svyatoslav Ryhel wrote:
> пн, 5 трав. 2025 р. о 10:50 Neil Armstrong <neil.armstrong at linaro.org> пише:
>>
>> On 03/05/2025 11:41, Svyatoslav Ryhel wrote:
>>> R61307 is liquid crystal driver for high-definition amorphous silicon
>>> (a-Si) panels and is ideal for tablets and smartphones.
>>>
>>> Supported compatibles are:
>>> - hit,tx13d100vm0eaa
>>> - koe,tx13d100vm0eaa
>>>
>>> Signed-off-by: Svyatoslav Ryhel <clamor95 at gmail.com>
>>> ---
>>> drivers/gpu/drm/panel/Kconfig | 13 +
>>> drivers/gpu/drm/panel/Makefile | 1 +
>>> drivers/gpu/drm/panel/panel-renesas-r61307.c | 327 +++++++++++++++++++
>>> 3 files changed, 341 insertions(+)
>>> create mode 100644 drivers/gpu/drm/panel/panel-renesas-r61307.c
>>>
>>
>> <snip>
>>
>>> +static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
>>> +{
>>> + struct device *dev = &dsi->dev;
>>> + struct renesas_r61307 *priv;
>>> + int ret;
>>> +
>>> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>>> + if (!priv)
>>> + return -ENOMEM;
>>> +
>>> + priv->vcc_supply = devm_regulator_get(dev, "vcc");
>>> + if (IS_ERR(priv->vcc_supply))
>>> + return dev_err_probe(dev, PTR_ERR(priv->vcc_supply),
>>> + "Failed to get vcc-supply\n");
>>> +
>>> + priv->iovcc_supply = devm_regulator_get(dev, "iovcc");
>>> + if (IS_ERR(priv->iovcc_supply))
>>> + return dev_err_probe(dev, PTR_ERR(priv->iovcc_supply),
>>> + "Failed to get iovcc-supply\n");
>>> +
>>> + priv->reset_gpio = devm_gpiod_get_optional(dev, "reset",
>>> + GPIOD_OUT_HIGH);
>>> + if (IS_ERR(priv->reset_gpio))
>>> + return dev_err_probe(dev, PTR_ERR(priv->reset_gpio),
>>> + "Failed to get reset gpios\n");
>>> +
>>> + if (device_property_read_bool(dev, "renesas,inversion"))
>>> + priv->inversion = true;
>>> +
>>> + if (device_property_read_bool(dev, "renesas,contrast"))
>>> + priv->dig_cont_adj = true;
>>> +
>>> + priv->gamma = 0;
>>> + device_property_read_u32(dev, "renesas,gamma", &priv->gamma);
>>> +
>>> + priv->dsi = dsi;
>>> + mipi_dsi_set_drvdata(dsi, priv);
>>> +
>>> + dsi->lanes = 4;
>>> + dsi->format = MIPI_DSI_FMT_RGB888;
>>> + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
>>> + MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM;
>>> +
>>> + drm_panel_init(&priv->panel, dev, &renesas_r61307_panel_funcs,
>>> + DRM_MODE_CONNECTOR_DSI);
>>
>> Please switch to devm_drm_panel_alloc()
>>
>
> This helper is not available as for 6.15-rc5
Please rebase on on drm-misc-next or linux-next:
https://cgit.freedesktop.org/drm/drm-misc/
Thanks,
Neil
>
>>> +
>>> + ret = drm_panel_of_backlight(&priv->panel);
>>> + if (ret)
>>> + return dev_err_probe(dev, ret, "Failed to get backlight\n");
>>> +
>>> + drm_panel_add(&priv->panel);
>>> +
>> <snip>
>>
>> With that:
>> Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
More information about the dri-devel
mailing list