Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbdDCKFg (ORCPT ); Mon, 3 Apr 2017 06:05:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57310 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbdDCKFf (ORCPT ); Mon, 3 Apr 2017 06:05:35 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7F1F860D39 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] megachips-stdpxxxx-ge-b850v3-fw: Fix drm bridge initialization To: Peter Senna Tschudin References: <20170330081928.8537-1-peter.senna@collabora.com> Cc: martin.donnelly@ge.com, martyn.welch@collabora.co.uk, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, peter.senna@gmail.com From: Archit Taneja Message-ID: <8f65733a-fe18-1b2f-28bf-52e0d2165047@codeaurora.org> Date: Mon, 3 Apr 2017 15:35:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170330081928.8537-1-peter.senna@collabora.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1934 Lines: 53 On 03/30/2017 01:49 PM, Peter Senna Tschudin wrote: > Reordering of the device nodes based on unit address resulted in > ge_b850v3_lvds_attach() being called before > ge_b850v3_lvds_ptr->stdp4028_i2c was populated. > > This patch moves the drm bridge initialization from > ge_b850v3_lvds_init() to stdp4028_ge_b850v3_fw_probe() ensuring that > ge_b850v3_lvds_ptr->stdp4028_i2c is properly populated. queued to drm-misc-next Archit > > Signed-off-by: Peter Senna Tschudin > --- > drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c > index e53c243..b9f32e8 100644 > --- a/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c > +++ b/drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c > @@ -279,10 +279,6 @@ static int ge_b850v3_lvds_init(struct device *dev) > return -ENOMEM; > } > > - ge_b850v3_lvds_ptr->bridge.funcs = &ge_b850v3_lvds_funcs; > - ge_b850v3_lvds_ptr->bridge.of_node = dev->of_node; > - drm_bridge_add(&ge_b850v3_lvds_ptr->bridge); > - > success: > mutex_unlock(&ge_b850v3_lvds_dev_mutex); > return 0; > @@ -317,6 +313,11 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c, > ge_b850v3_lvds_ptr->stdp4028_i2c = stdp4028_i2c; > i2c_set_clientdata(stdp4028_i2c, ge_b850v3_lvds_ptr); > > + /* drm bridge initialization */ > + ge_b850v3_lvds_ptr->bridge.funcs = &ge_b850v3_lvds_funcs; > + ge_b850v3_lvds_ptr->bridge.of_node = dev->of_node; > + drm_bridge_add(&ge_b850v3_lvds_ptr->bridge); > + > /* Clear pending interrupts since power up. */ > i2c_smbus_write_word_data(stdp4028_i2c, > STDP4028_DPTX_IRQ_STS_REG, > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project