From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58DF6C54EED for ; Wed, 25 Jan 2023 21:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235442AbjAYVxN (ORCPT ); Wed, 25 Jan 2023 16:53:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235443AbjAYVxM (ORCPT ); Wed, 25 Jan 2023 16:53:12 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8243C3A87 for ; Wed, 25 Jan 2023 13:53:10 -0800 (PST) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D86B185666; Wed, 25 Jan 2023 22:53:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1674683588; bh=cDj0qNJmpBxszzzfzQeDa9hoXH6ASKfJgUV396KDoi4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=yMYppRbEmxuVlCk2I+6gewu8P4WRG05+Af/RIB+8WcOlNsMMF3KBHAgT0Ct1Nga7J Q6j+KwRQiThlcV4Ir/d9/McGjdjbnNH120c0mbKudmAXOJqQUX8LvKd3vFTfjwtRPH nv8SaGeIg+bhY3b01CV0zQuliqrh/gpLz18+fwnxEKhKek8oxCqU97VeGHnwyBXFFC wvt9cu7FbJIi8cSSKReQefPOo4vcRQBeSjmXIs4rOIJfd0Pq8BQkUcULB9qLxUa0zm Uhzei/E8FhLLlvqGt36dCLvVaTkH+GjlTW6pixHsf3iDMmpCqeNW99qdg8GMqzIJxV lpKprB7/2oWfg== Message-ID: <0a318675-8a9f-58da-ad3f-9eda6a701626@denx.de> Date: Wed, 25 Jan 2023 22:53:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [RESEND PATCH v11 13/18] drm: exynos: dsi: Add Exynos based host irq hooks Content-Language: en-US To: Jagan Teki Cc: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Robert Foss , Laurent Pinchart , Tommaso Merciai , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula References: <20230123151212.269082-1-jagan@amarulasolutions.com> <20230123151212.269082-14-jagan@amarulasolutions.com> <43f4a7dc-a4cc-7552-1a6d-a2a49fae6020@denx.de> <94f847b0-769d-e28b-11c0-b817b30c704f@denx.de> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org On 1/25/23 20:24, Jagan Teki wrote: > On Wed, Jan 25, 2023 at 11:33 PM Marek Vasut wrote: >> >> On 1/25/23 18:35, Jagan Teki wrote: >> >> [...] >> >>>>> exynos_dsi_register_te_irq is done after the bridge attach is done in >>>>> Exynos, here bridge attach is triggered in the component ops bind >>>>> call, since samsung-dsim is a pure bridge w/o any component ops. >>>>> https://github.com/openedev/kernel/blob/imx8mm-dsi-v12/drivers/gpu/drm/bridge/samsung-dsim.c#L1527 >>>>> https://github.com/openedev/kernel/blob/imx8mm-dsi-v12/drivers/gpu/drm/exynos/exynos_drm_dsi.c#L112 >>>>> >>>>> Any suggestion on how to handle this? >>>> >>>> Why isn't the generic code calling drm_bridge_attach() in >>>> samsung_dsim_host_attach(), like the exynos one ? >>> >>> Exynos drm drivers follow component ops and generic dsim is a pure drm >>> bridge whose downstream bridge will attach in bridge ops attach and >>> the component-based drivers require an initial bridge attach (whose >>> previous is NULL) call in the component bind hook for establishing the >>> bridge chain. >> >> Well in that case, call the exynos optional host_attach and register the >> TE IRQ handler at the end, that should work just fine too, right ? If >> so, then you can also move the IRQ handler registration into the generic >> part of the driver. > > Something like this? > > samsung_dsim_host_attach() > { > drm_bridge_add(&dsi->bridge); > > if (pdata->host_ops && pdata->host_ops->attach) > pdata->host_ops->attach(dsi, device); > > exynos_dsi_register_te_irq > > dsi->lanes = device->lanes; > dsi->format = device->format; > dsi->mode_flags = device->mode_flags; > } Yes, I think that should work . From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CDDEC54E94 for ; Wed, 25 Jan 2023 21:54:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TL0JxDKQeeVoM2O//cArsCrvtYX4C28/NWsOiNNyovI=; b=P4N5ZjSyY0Iavs TPnvC8CfAx2FMDsJrkLJQX5MI9ZMlAyM5kkAjc1V+Dsl0Pg+9AxsAeNMwVVOSLnYMkESCqpcfnqQj zmfV49EtP//E724gFKI1q4iDLfFc+0Y98F/A53kD/AytoOewjWpMIyiBZLSeuxISZymxK+0rQyfe8 aI/npWT/MeKEZsRrjxlWBoXI4vk2mbMdxwzTcbSe5DyiSw6tsWhKD64cujnwes5BPA3c0oPBRc5hJ zZa1yaSbBSclm/bzWcD3rpRXWKZj2XkfxMQ3UgPIlVzzkO3zz6P5qTGPNu3qPIM6pGPUCEtocUOAj egoXd6/PS3ctpjB1HtBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKni4-008uri-0Y; Wed, 25 Jan 2023 21:53:36 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKnhj-008und-Bm for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 21:53:17 +0000 Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D86B185666; Wed, 25 Jan 2023 22:53:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1674683588; bh=cDj0qNJmpBxszzzfzQeDa9hoXH6ASKfJgUV396KDoi4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=yMYppRbEmxuVlCk2I+6gewu8P4WRG05+Af/RIB+8WcOlNsMMF3KBHAgT0Ct1Nga7J Q6j+KwRQiThlcV4Ir/d9/McGjdjbnNH120c0mbKudmAXOJqQUX8LvKd3vFTfjwtRPH nv8SaGeIg+bhY3b01CV0zQuliqrh/gpLz18+fwnxEKhKek8oxCqU97VeGHnwyBXFFC wvt9cu7FbJIi8cSSKReQefPOo4vcRQBeSjmXIs4rOIJfd0Pq8BQkUcULB9qLxUa0zm Uhzei/E8FhLLlvqGt36dCLvVaTkH+GjlTW6pixHsf3iDMmpCqeNW99qdg8GMqzIJxV lpKprB7/2oWfg== Message-ID: <0a318675-8a9f-58da-ad3f-9eda6a701626@denx.de> Date: Wed, 25 Jan 2023 22:53:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [RESEND PATCH v11 13/18] drm: exynos: dsi: Add Exynos based host irq hooks Content-Language: en-US To: Jagan Teki Cc: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Robert Foss , Laurent Pinchart , Tommaso Merciai , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula References: <20230123151212.269082-1-jagan@amarulasolutions.com> <20230123151212.269082-14-jagan@amarulasolutions.com> <43f4a7dc-a4cc-7552-1a6d-a2a49fae6020@denx.de> <94f847b0-769d-e28b-11c0-b817b30c704f@denx.de> From: Marek Vasut In-Reply-To: X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_135315_812166_215CA279 X-CRM114-Status: GOOD ( 16.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/25/23 20:24, Jagan Teki wrote: > On Wed, Jan 25, 2023 at 11:33 PM Marek Vasut wrote: >> >> On 1/25/23 18:35, Jagan Teki wrote: >> >> [...] >> >>>>> exynos_dsi_register_te_irq is done after the bridge attach is done in >>>>> Exynos, here bridge attach is triggered in the component ops bind >>>>> call, since samsung-dsim is a pure bridge w/o any component ops. >>>>> https://github.com/openedev/kernel/blob/imx8mm-dsi-v12/drivers/gpu/drm/bridge/samsung-dsim.c#L1527 >>>>> https://github.com/openedev/kernel/blob/imx8mm-dsi-v12/drivers/gpu/drm/exynos/exynos_drm_dsi.c#L112 >>>>> >>>>> Any suggestion on how to handle this? >>>> >>>> Why isn't the generic code calling drm_bridge_attach() in >>>> samsung_dsim_host_attach(), like the exynos one ? >>> >>> Exynos drm drivers follow component ops and generic dsim is a pure drm >>> bridge whose downstream bridge will attach in bridge ops attach and >>> the component-based drivers require an initial bridge attach (whose >>> previous is NULL) call in the component bind hook for establishing the >>> bridge chain. >> >> Well in that case, call the exynos optional host_attach and register the >> TE IRQ handler at the end, that should work just fine too, right ? If >> so, then you can also move the IRQ handler registration into the generic >> part of the driver. > > Something like this? > > samsung_dsim_host_attach() > { > drm_bridge_add(&dsi->bridge); > > if (pdata->host_ops && pdata->host_ops->attach) > pdata->host_ops->attach(dsi, device); > > exynos_dsi_register_te_irq > > dsi->lanes = device->lanes; > dsi->format = device->format; > dsi->mode_flags = device->mode_flags; > } Yes, I think that should work . _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BF20C27C76 for ; Wed, 25 Jan 2023 21:53:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4353110E1B6; Wed, 25 Jan 2023 21:53:12 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0EC5D10E1B6 for ; Wed, 25 Jan 2023 21:53:10 +0000 (UTC) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D86B185666; Wed, 25 Jan 2023 22:53:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1674683588; bh=cDj0qNJmpBxszzzfzQeDa9hoXH6ASKfJgUV396KDoi4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=yMYppRbEmxuVlCk2I+6gewu8P4WRG05+Af/RIB+8WcOlNsMMF3KBHAgT0Ct1Nga7J Q6j+KwRQiThlcV4Ir/d9/McGjdjbnNH120c0mbKudmAXOJqQUX8LvKd3vFTfjwtRPH nv8SaGeIg+bhY3b01CV0zQuliqrh/gpLz18+fwnxEKhKek8oxCqU97VeGHnwyBXFFC wvt9cu7FbJIi8cSSKReQefPOo4vcRQBeSjmXIs4rOIJfd0Pq8BQkUcULB9qLxUa0zm Uhzei/E8FhLLlvqGt36dCLvVaTkH+GjlTW6pixHsf3iDMmpCqeNW99qdg8GMqzIJxV lpKprB7/2oWfg== Message-ID: <0a318675-8a9f-58da-ad3f-9eda6a701626@denx.de> Date: Wed, 25 Jan 2023 22:53:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [RESEND PATCH v11 13/18] drm: exynos: dsi: Add Exynos based host irq hooks Content-Language: en-US To: Jagan Teki References: <20230123151212.269082-1-jagan@amarulasolutions.com> <20230123151212.269082-14-jagan@amarulasolutions.com> <43f4a7dc-a4cc-7552-1a6d-a2a49fae6020@denx.de> <94f847b0-769d-e28b-11c0-b817b30c704f@denx.de> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, Laurent Pinchart , Joonyoung Shim , linux-amarula , Seung-Woo Kim , Tommaso Merciai , Frieder Schrempf , Kyungmin Park , Matteo Lisi , Robert Foss , Andrzej Hajda , NXP Linux Team , Michael Nazzareno Trimarchi , Adam Ford , linux-arm-kernel@lists.infradead.org, Marek Szyprowski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 1/25/23 20:24, Jagan Teki wrote: > On Wed, Jan 25, 2023 at 11:33 PM Marek Vasut wrote: >> >> On 1/25/23 18:35, Jagan Teki wrote: >> >> [...] >> >>>>> exynos_dsi_register_te_irq is done after the bridge attach is done in >>>>> Exynos, here bridge attach is triggered in the component ops bind >>>>> call, since samsung-dsim is a pure bridge w/o any component ops. >>>>> https://github.com/openedev/kernel/blob/imx8mm-dsi-v12/drivers/gpu/drm/bridge/samsung-dsim.c#L1527 >>>>> https://github.com/openedev/kernel/blob/imx8mm-dsi-v12/drivers/gpu/drm/exynos/exynos_drm_dsi.c#L112 >>>>> >>>>> Any suggestion on how to handle this? >>>> >>>> Why isn't the generic code calling drm_bridge_attach() in >>>> samsung_dsim_host_attach(), like the exynos one ? >>> >>> Exynos drm drivers follow component ops and generic dsim is a pure drm >>> bridge whose downstream bridge will attach in bridge ops attach and >>> the component-based drivers require an initial bridge attach (whose >>> previous is NULL) call in the component bind hook for establishing the >>> bridge chain. >> >> Well in that case, call the exynos optional host_attach and register the >> TE IRQ handler at the end, that should work just fine too, right ? If >> so, then you can also move the IRQ handler registration into the generic >> part of the driver. > > Something like this? > > samsung_dsim_host_attach() > { > drm_bridge_add(&dsi->bridge); > > if (pdata->host_ops && pdata->host_ops->attach) > pdata->host_ops->attach(dsi, device); > > exynos_dsi_register_te_irq > > dsi->lanes = device->lanes; > dsi->format = device->format; > dsi->mode_flags = device->mode_flags; > } Yes, I think that should work .