From: Sam Ravnborg <sam@ravnborg.org>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm: panel: add Khadas TS050 panel driver
Date: Sat, 5 Dec 2020 20:15:02 +0100 [thread overview]
Message-ID: <20201205191502.GB332836@ravnborg.org> (raw)
In-Reply-To: <20201204081949.38418-3-narmstrong@baylibre.com>
Hi Neil,
> +
> +static int khadas_ts050_panel_probe(struct mipi_dsi_device *dsi)
> +{
> + struct khadas_ts050_panel *khadas_ts050;
> + int err;
> +
> + dsi->lanes = 4;
> + dsi->format = MIPI_DSI_FMT_RGB888;
> + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
> + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET;
> +
> + khadas_ts050 = devm_kzalloc(&dsi->dev, sizeof(*khadas_ts050),
> + GFP_KERNEL);
> + if (!khadas_ts050)
> + return -ENOMEM;
> +
> + mipi_dsi_set_drvdata(dsi, khadas_ts050);
> + khadas_ts050->link = dsi;
> +
> + err = khadas_ts050_panel_add(khadas_ts050);
> + if (err < 0)
> + return err;
> +
> + return mipi_dsi_attach(dsi);
> +}
If mipi_dsi_attach() failes then da a drm_panel_remove() like this:
ret = mipi_dsi_attach(dsi);
if (ret)
drm_panel_remove(&khadas_ts050->base);
return ret;
This is again something several panels gets wrong.
With this fixed:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
I assume you will fix it while applying.
Sam
next prev parent reply other threads:[~2020-12-05 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 8:19 [PATCH v2 0/2] drm: panel: add support for the Khadas TS050 panel Neil Armstrong
2020-12-04 8:19 ` [PATCH v2 1/2] dt-bindings: panel-simple-dsi: add Khadas TS050 panel bindings Neil Armstrong
2020-12-04 8:19 ` [PATCH v2 2/2] drm: panel: add Khadas TS050 panel driver Neil Armstrong
2020-12-05 19:15 ` Sam Ravnborg [this message]
2020-12-07 13:49 ` Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201205191502.GB332836@ravnborg.org \
--to=sam@ravnborg.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).