From: Sam Ravnborg <sam@ravnborg.org>
To: Marek Vasut <marex@denx.de>
Cc: robert.foss@linaro.org, Andrzej Hajda <andrzej.hajda@intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org,
Maxime Ripard <maxime@cerno.tech>
Subject: Re: [PATCH v3] drm/bridge: ti-sn65dsi83: Convert to drm_of_get_data_lanes_count
Date: Sun, 12 Jun 2022 14:15:06 +0200 [thread overview]
Message-ID: <YqXYyrQG2LKtnRet@ravnborg.org> (raw)
In-Reply-To: <20220612102947.13912-1-marex@denx.de>
Hi Marek,
On Sun, Jun 12, 2022 at 12:29:47PM +0200, Marek Vasut wrote:
> Convert driver to use this new helper to standardize
> OF "data-lanes" parsing.
>
> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Maxime Ripard <maxime@cerno.tech>
> Cc: Robert Foss <robert.foss@linaro.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> To: dri-devel@lists.freedesktop.org
Looks fine.
I wondered why the _ep variant could not be used, but endpoint is
required later and there is no need to look it up twice.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Sam
> ---
> V2: - Rename drm_of_get_data_lanes{,_ep} to drm_of_get_data_lanes_count{,_ep}
> - Add RB from Andrzej
> V3: - Rebase on latest next
> ---
> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> index 8bf99b32776e2..b27c0d7c451ad 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> @@ -620,7 +620,7 @@ static int sn65dsi83_host_attach(struct sn65dsi83 *ctx)
> int dsi_lanes, ret;
>
> endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
> - dsi_lanes = of_property_count_u32_elems(endpoint, "data-lanes");
> + dsi_lanes = drm_of_get_data_lanes_count(endpoint, 1, 4);
> host_node = of_graph_get_remote_port_parent(endpoint);
> host = of_find_mipi_dsi_host_by_node(host_node);
> of_node_put(host_node);
> --
> 2.35.1
prev parent reply other threads:[~2022-06-12 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 10:29 [PATCH v3] drm/bridge: ti-sn65dsi83: Convert to drm_of_get_data_lanes_count Marek Vasut
2022-06-12 12:15 ` Sam Ravnborg [this message]
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=YqXYyrQG2LKtnRet@ravnborg.org \
--to=sam@ravnborg.org \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=marex@denx.de \
--cc=maxime@cerno.tech \
--cc=robert.foss@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.