From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Archit Taneja <architt@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge
Date: Wed, 11 Jan 2017 13:14 +0200 [thread overview]
Message-ID: <3677330.O08tiBxdIm@avalon> (raw)
In-Reply-To: <1484116791-20523-1-git-send-email-architt@codeaurora.org>
Hi Archit,
Thank you for the patch.
On Wednesday 11 Jan 2017 12:09:51 Archit Taneja wrote:
> The commit "drm: bridge: Link encoder and bridge in core code" updated
> the drm_bridge_attach() API to also include the drm_encoder pointer
> the bridge attaches to.
>
> The func msm_dsi_manager_bridge_init() now relies on the drm_encoder
> pointer stored in msm_dsi->encoders to pass the encoder to the bridge
> API.
>
> msm_dsi->encoders is unfortunately set after this function is called,
> resulting in us passing a NULL pointer to drm_brigde_attach. This
> results in an error and the DSI driver probe fails.
>
> Move the initialization of msm_dsi->encoders[] a bit up. Also, don't
> try to set the encoder's bridge. That's now managed by the bridge
> API.
>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Sorry for having missed that :-(
> Signed-off-by: Archit Taneja <architt@codeaurora.org>
> ---
> drivers/gpu/drm/msm/dsi/dsi.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
> index ec572f8..9593238 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi.c
> @@ -205,6 +205,9 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct
> drm_device *dev, goto fail;
> }
>
> + for (i = 0; i < MSM_DSI_ENCODER_NUM; i++)
> + msm_dsi->encoders[i] = encoders[i];
> +
> msm_dsi->bridge = msm_dsi_manager_bridge_init(msm_dsi->id);
> if (IS_ERR(msm_dsi->bridge)) {
> ret = PTR_ERR(msm_dsi->bridge);
> @@ -213,11 +216,6 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi,
> struct drm_device *dev, goto fail;
> }
>
> - for (i = 0; i < MSM_DSI_ENCODER_NUM; i++) {
> - encoders[i]->bridge = msm_dsi->bridge;
> - msm_dsi->encoders[i] = encoders[i];
> - }
> -
> /*
> * check if the dsi encoder output is connected to a panel or an
> * external bridge. We create a connector only if we're connected to a
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-01-11 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 6:39 [PATCH] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge Archit Taneja
2017-01-11 11:14 ` Laurent Pinchart [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=3677330.O08tiBxdIm@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=architt@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-arm-msm@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox