[PATCH V2 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel
Neil Armstrong
neil.armstrong at linaro.org
Thu May 21 00:47:19 PDT 2026
On 5/20/26 16:29, Chris Morgan wrote:
> On Mon, May 18, 2026 at 03:55:08PM +0200, neil.armstrong at linaro.org wrote:
>> On 5/16/26 00:19, Chris Morgan wrote:
>>> From: Chris Morgan <macromorgan at hotmail.com>
>>>
<snip>
>>> +
>>> + return dsi_ctx.accum_err;
>>> +
>>> +err_reset:
>>
>> And you don't check it here
>
> Should I check the value and print an error if it fails? I had planned
> on continuing even after a failure with the shutdown so it could turn
> the device off, unless that's incorrect.
yeah continue and ignore the return value on the error path
>
>>
<snip>
>>> +
>>> +static void panel_anbernic_td4310_remove(struct mipi_dsi_device *dsi)
>>> +{
>>> + struct anbernic_panel_td4310 *ctx = mipi_dsi_get_drvdata(dsi);
>>> + int ret;
>>> +
>>> + ret = mipi_dsi_detach(dsi);
>>> + if (ret < 0)
>>> + dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
>>> +
>>> + drm_panel_remove(&ctx->panel);
>>> +}
>>
>> And drop remove completely
>>
>
> I take it the devm calls above remove the need for a remove callback?
> I take it that's new? Thank you.
Yep !
>
>>> +
>>> +static const struct drm_display_mode anbernic_vitapro_modes[] = {
>>> + {
>>> + .clock = 140020,
>>> + .hdisplay = 1080,
>>> + .hsync_start = 1080 + 50,
>>> + .hsync_end = 1080 + 50 + 4,
>>> + .htotal = 1080 + 50 + 4 + 50,
>>> + .vdisplay = 1920,
>>> + .vsync_start = 1920 + 15,
>>> + .vsync_end = 1920 + 15 + 4,
>>> + .vtotal = 1920 + 15 + 4 + 32,
>>> + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
>>> + },
>>> +};
>>> +
>>> +static const struct anbernic_panel_td4310_info anbernic_vitapro_info = {
>>> + .display_modes = anbernic_vitapro_modes,
>>> + .num_modes = ARRAY_SIZE(anbernic_vitapro_modes),
>>> + .width_mm = 69,
>>> + .height_mm = 121,
>>> + .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
>>> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
>>> + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET |
>>> + MIPI_DSI_CLOCK_NON_CONTINUOUS,
>>> + .format = MIPI_DSI_FMT_RGB888,
>>> + .lanes = 4,
>>> + .prepare_delay = 50,
>>> + .reset_delay = 220,
>>> + .enable_delay = 120,
>>> + .disable_delay = 50,
>>> + .unprepare_delay = 20,
>>> +};
>>> +
>>> +static const struct of_device_id panel_anbernic_td4310_of_match[] = {
>>> + {
>>> + .compatible = "anbernic,panel-vita-pro",
>>> + .data = &anbernic_vitapro_info,
>>> + },
>>> + { },
>>> +};
>>> +MODULE_DEVICE_TABLE(of, panel_anbernic_td4310_of_match);
>>> +
>>> +static struct mipi_dsi_driver anbernic_panel_td4310_driver = {
>>> + .driver = {
>>> + .name = "panel-anbernic-td4310",
>>> + .of_match_table = panel_anbernic_td4310_of_match,
>>> + },
>>> + .probe = panel_anbernic_td4310_probe,
>>> + .remove = panel_anbernic_td4310_remove,
>>> +};
>>> +module_mipi_dsi_driver(anbernic_panel_td4310_driver);
>>> +
>>> +MODULE_AUTHOR("Chris Morgan <macromorgan at hotmail.com>");
>>> +MODULE_DESCRIPTION("DRM driver for Anbernic TD4310 MIPI DSI panels");
>>> +MODULE_LICENSE("GPL");
>>
>> Thanks,
>> Neil
>
> Thank you,
> Chris
More information about the Linux-rockchip
mailing list