Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbdFFKPp (ORCPT ); Tue, 6 Jun 2017 06:15:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55120 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbdFFKPn (ORCPT ); Tue, 6 Jun 2017 06:15:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BD2C6607B5 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 v2 7/7] drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge. To: Boris Brezillon , Sean Paul References: <20170511183128.25085-1-eric@anholt.net> <20170511183128.25085-7-eric@anholt.net> <57d82797-7639-63ae-cef4-720861301e6c@codeaurora.org> <20170606105717.1ae5983a@bbrezillon> Cc: Eric Anholt , Andrzej Hajda , Laurent Pinchart , CK Hu , dri-devel@lists.freedesktop.org, Philipp Zabel , Yannick Fertre , Philippe Cornu , linux-kernel@vger.kernel.org, Daniel Vetter , Jani Nikula From: Archit Taneja Message-ID: <20e1423a-b7b5-5f9d-be19-8b5d225f3aed@codeaurora.org> Date: Tue, 6 Jun 2017 15:45:35 +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: <20170606105717.1ae5983a@bbrezillon> 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: 2814 Lines: 97 On 06/06/2017 02:27 PM, Boris Brezillon wrote: > Hi Archit, > > On Mon, 5 Jun 2017 21:06:20 +0530 > Archit Taneja wrote: > >> Hi, >> >> When pushing to drm-misc-next, I got a minor merge conflict when dim tried >> to rebuild drm-tip. >> >> The reason for the conflict was because the following commit was present >> in drm-tip but not in drm-misc: >> >> https://cgit.freedesktop.org/drm-tip/commit/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c?id=6bee9b78a7a5ea257b24d93974538938c82b1169 >> >> I fixed the conflict such that drm-tip is rebuit successfully. I'd >> however like if Eric and Boris could have a look at atmel_hlcdc_output.c >> to check if things are okay. > > Where can I find the fix you made to fix this problem? +Sean, I missed adding him in the original message. The fix is a part of the commit that merged drm-misc-next into drm-tip: https://cgit.freedesktop.org/drm-tip/commit/?id=62a258c9c517c7c97bc4545f77af21ee03e23e1a The commit "drm/atmel-hlcdc: Fix output initialization" was a part of 4.12-rc2. drm-misc-next is still based off 4.12-rc1, so this commit wasn't present. Sean will observe some minor merge conflicts when he rebases drm-misc-next onto a more recent tag from Linus. Thanks, Archit > > [...] > >>> if (panel) { >>> - output->connector.dpms = DRM_MODE_DPMS_OFF; >>> - output->connector.polled = DRM_CONNECTOR_POLL_CONNECT; >>> - drm_connector_helper_add(&output->connector, >>> - &atmel_hlcdc_panel_connector_helper_funcs); >>> - ret = drm_connector_init(dev, &output->connector, >>> - &atmel_hlcdc_panel_connector_funcs, >>> - DRM_MODE_CONNECTOR_Unknown); >>> - if (ret) >>> - goto err_encoder_cleanup; >>> - >>> - drm_mode_connector_attach_encoder(&output->connector, >>> - &output->encoder); >>> - >>> - ret = drm_panel_attach(panel, &output->connector); >>> - if (ret) { >>> - drm_connector_cleanup(&output->connector); >>> - goto err_encoder_cleanup; >>> - } >>> - >>> - output->panel = panel; >>> + bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_Unknown); >>> + if (IS_ERR(bridge)) >>> + return PTR_ERR(bridge); >>> >>> return 0; > > Just noticed that this is wrong. We should not return here, otherwise > the panel bridge is never attached to the encoder. > >>> } >>> >>> if (bridge) { >>> - ret = drm_bridge_attach(&output->encoder, bridge, NULL); >>> + ret = drm_bridge_attach(encoder, bridge, NULL); >>> if (!ret) >>> return 0; >>> + >>> + if (panel) >>> + drm_panel_bridge_remove(bridge); >>> } >>> >>> -err_encoder_cleanup: >>> - drm_encoder_cleanup(&output->encoder); >>> + drm_encoder_cleanup(encoder); >>> >>> return ret; >>> } >>> >> > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project