From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752006AbdKGEcb (ORCPT ); Mon, 6 Nov 2017 23:32:31 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:40134 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbdKGEc3 (ORCPT ); Mon, 6 Nov 2017 23:32:29 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0CAF16021C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH 4.4 28/40] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Laurent Pinchart , Laurent Pinchart , Rob Clark , Sasha Levin References: <20171106094501.346859822@linuxfoundation.org> <20171106094502.459603468@linuxfoundation.org> From: Archit Taneja Message-ID: <6d8b2410-2b62-6420-2f0b-2f32a3bba74c@codeaurora.org> Date: Tue, 7 Nov 2017 10:02:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20171106094502.459603468@linuxfoundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On 11/06/2017 03:15 PM, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. This patch isn't needed on 4.4 or the 4.9 stable branches. This was required only after drm_bridge API was changed with the commit: (3bb80f2495) drm: bridge: Link encoder and bridge in core code This was merged only in 4.11. Thanks, Archit > > ------------------ > > From: Archit Taneja > > > [ Upstream commit 0bb70b82c2f91e4667f3c617505235efd6d77e46 ] > > 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 > Reviewed-by: Laurent Pinchart > Signed-off-by: Archit Taneja > Signed-off-by: Rob Clark > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- > drivers/gpu/drm/msm/dsi/dsi.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > --- 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 > 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 > 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 > > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project