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 D57C5C27C76 for ; Wed, 25 Jan 2023 17:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235513AbjAYRf7 (ORCPT ); Wed, 25 Jan 2023 12:35:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235476AbjAYRf6 (ORCPT ); Wed, 25 Jan 2023 12:35:58 -0500 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5429E18B1D for ; Wed, 25 Jan 2023 09:35:57 -0800 (PST) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-4c131bede4bso273934737b3.5 for ; Wed, 25 Jan 2023 09:35:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sLdv2Pq53a6vZyVVcX2zLb9TAy6HzzMK+y+dx6JC+Lk=; b=dbmRy/zYnZU/M5INdVitjh85ZSEKWF1DQvm+OSMTwpP8/J7nXfaKdncz7Snr8+smLi 7Xi/hsMp+w+prUmQQU409wp9ax/6qQ6lzuwrpyWRtwA03xm3lFryNM6vA0L0jNAv6O6I cMGzJnlaz6waMXOl5o+Yyvj1Pgm+a7toTM8dw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sLdv2Pq53a6vZyVVcX2zLb9TAy6HzzMK+y+dx6JC+Lk=; b=I1wta4+iELRO90slaMd2tLJzr3apx0Kt3a5gXy8W97d12K5DFxjq0eKNTHLGcuyFgi efHc/+b3fUql5TtmfPCpXux9NXEq8B0Zcm27n65MSYliHtBRRzb91JGIWVB254XjAbUU sUAI7Xv/2hBWjXJ0mVI7ZN7nWpyF2ASkpZHxSBnuvXHhc0pAUjAFU+USzLmVmAy+KbCy WzdeOKOih5X9/J4ULDhhBHpy+ISTmo765SdGPMi00zap5Gj8UPV0MFy2hoVtY1Nd60o0 mtdlqJ+1iyTIjHYn4F39ASGABBQAbOuotC+YbkZw3X01vRzcoFrziXHrzeUNN2pb7s9O AjpA== X-Gm-Message-State: AO0yUKWq2l3fbgg76UIZBbLT4FboWFfLCBgDwZmHN85ulAx73tz1jR+6 TH29mbiZsl/KSs994G7egjLNGnQSscSYKurNRU+LBw== X-Google-Smtp-Source: AK7set8dZvYXO9O3Yo3GqCYBfsHOcPW61gmf10CtU9i82U6qwqanae2Yypwvvel3B9n8cSWxBRjp/LOAB4yZWl5d3EA= X-Received: by 2002:a81:ae61:0:b0:506:6364:fda3 with SMTP id g33-20020a81ae61000000b005066364fda3mr503445ywk.72.1674668156462; Wed, 25 Jan 2023 09:35:56 -0800 (PST) MIME-Version: 1.0 References: <20230123151212.269082-1-jagan@amarulasolutions.com> <20230123151212.269082-14-jagan@amarulasolutions.com> <43f4a7dc-a4cc-7552-1a6d-a2a49fae6020@denx.de> In-Reply-To: From: Jagan Teki Date: Wed, 25 Jan 2023 23:05:44 +0530 Message-ID: Subject: Re: [RESEND PATCH v11 13/18] drm: exynos: dsi: Add Exynos based host irq hooks To: Marek Vasut 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org On Wed, Jan 25, 2023 at 10:57 PM Marek Vasut wrote: > > On 1/25/23 18:12, Jagan Teki wrote: > > On Wed, Jan 25, 2023 at 10:16 PM Marek Vasut wrote: > >> > >> On 1/25/23 15:04, Jagan Teki wrote: > >>> On Wed, Jan 25, 2023 at 7:23 PM Marek Vasut wrote: > >>>> > >>>> On 1/25/23 07:54, Jagan Teki wrote: > >>>>> On Wed, Jan 25, 2023 at 2:54 AM Jagan Teki wrote: > >>>>>> > >>>>>> On Wed, Jan 25, 2023 at 2:54 AM Jagan Teki wrote: > >>>>>>> > >>>>>>> On Wed, Jan 25, 2023 at 2:42 AM Marek Vasut wrote: > >>>>>>>> > >>>>>>>> On 1/24/23 22:01, Jagan Teki wrote: > >>>>>>>>> On Wed, Jan 25, 2023 at 2:18 AM Marek Vasut wrote: > >>>>>>>>>> > >>>>>>>>>> On 1/23/23 16:12, Jagan Teki wrote: > >>>>>>>>>>> Enable and disable of te_gpio's are Exynos platform specific > >>>>>>>>>>> irq handling, so add the exynos based irq operations and hook > >>>>>>>>>>> them for exynos plat_data. > >>>>>>>>>> > >>>>>>>>>> If this is just an optional generic GPIO IRQ, why not keep it in the > >>>>>>>>>> core code ? TE (tearing enable?) should be available on MX8M too. > >>>>>>>>> > >>>>>>>>> So far the discussion (since from initial versions) with Marek > >>>>>>>>> Szyprowski, seems to be available in Exynos. So, I keep it separate > >>>>>>>>> from the DSIM core. > >>>>>>>> > >>>>>>>> Isn't TE a generic GPIO IRQ ? If so, it is available also on i.MX8M . > >>>>>> > >>>>>> I will check this. > >>>>> > >>>>> In order to use TE_GPIO we need te handler implementation, right now > >>>>> Exynos CRTC DRM drivers have implementation for this. That is the main > >>>>> reason to keep the TE_GPIO handling in exynos, maybe if we handle that > >>>>> generically then it is a viable option to move TE_GPIO to the DSIM > >>>>> core. > >>>> > >>>> I think you can do this exactly the same way exynos does it -- check > >>>> whether te_handler() callback is implemented by the glue code (the one > >>>> you already have for various exynos and imx8mm/imx8mm SoCs) and if so, > >>>> call it. If it is not implemented, do not call anything in the TE IRQ > >>>> handler. > >>> > >>> I need to understand how i.MX8MM handles this on TE IRQ in the DSIM > >>> host side, Can I do this in future patch set as it might involve > >>> bindings changes as well if it's part of DSIM? > >> > >> Why not leave an empty te_handler implementation on MX8M for now ? > >> You can fill that implementation in future patchset, but the generic > >> part of the code would be in place . > > > > Look like we have one issue to move regster te_irq into samsung-dsim. > > > > 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. Jagan. 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 1470AC27C76 for ; Wed, 25 Jan 2023 17:36:57 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=paoevXj8UtUptJOSjJE+vao4CQkylVGbU2RMsMSaH+Y=; b=pCSiVZx581pwP0 f+5vXTtx79XoTWlfrX96KUcr54it4ZWAxTQ9g4Czw85gGvop2crHFXAzsZ5pf32XdLgkUOGXqCAvL KXHUnG2D+3ifdgk8f62evIOzhw47oxisXxIudhCgCTKY86T106IIen4rSd/eszdUVQEQARzRl01Z6 KNQHghboZ8pg/mUZjy89r53Z7Dx1HVRMr9G4nCmfhttlJ9SK/OchKJzVIVaqfhife5q7kryy8LZo9 l6SlLmlbMdJXuW0U/XK82w8mM7pYNtt6KDPckVSnfhTfOfGU5ww/tsi4JzzdIr1Uul62s2mKebVmA 3XtOTojemDRU21mTOiHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKjgn-008EKX-4m; Wed, 25 Jan 2023 17:36:01 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKjgj-008EJr-Kt for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 17:35:59 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-4fd37a1551cso249316747b3.13 for ; Wed, 25 Jan 2023 09:35:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sLdv2Pq53a6vZyVVcX2zLb9TAy6HzzMK+y+dx6JC+Lk=; b=dbmRy/zYnZU/M5INdVitjh85ZSEKWF1DQvm+OSMTwpP8/J7nXfaKdncz7Snr8+smLi 7Xi/hsMp+w+prUmQQU409wp9ax/6qQ6lzuwrpyWRtwA03xm3lFryNM6vA0L0jNAv6O6I cMGzJnlaz6waMXOl5o+Yyvj1Pgm+a7toTM8dw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sLdv2Pq53a6vZyVVcX2zLb9TAy6HzzMK+y+dx6JC+Lk=; b=6tbLy/6PuLxpJ29FoH79UM6VfP7IUS7938PynxW5m9loJVelZPJc1sE2+f4Ahnkmhb tp0VArfZnwx5UWhNJIk6VB6xr4CzVxp7NoHP75RQ1IACqzDbVavGhJ/UgfmhR6t9Yxap 0ifNRtQdYjjFROTtbAobehm2ACacMx/mEXr+CgDhO2uZUP/jVMdR/b/ehMDvt8rGrB/t jj3Z9rXs3Q/qOEQKoaOnBN+4R1DXtVXU92D+v4syluQrlzLnCwtfUDifUR6LigRI5rKk CWzYiLOwmJwCDYkt/1+L4WL77QtKxZF0fB0hMYYj8E7bWWtPoODqh87NK3UI5oXqaV55 HGeQ== X-Gm-Message-State: AO0yUKXywVAvStra0mLXsKToD4XqZtjG/q7lsxqd7k2jyA6P0uZRmLst p1qYDhMOhOiLT6Y8OXqn5uy9V7ZD6XbzynMPJsva7w== X-Google-Smtp-Source: AK7set8dZvYXO9O3Yo3GqCYBfsHOcPW61gmf10CtU9i82U6qwqanae2Yypwvvel3B9n8cSWxBRjp/LOAB4yZWl5d3EA= X-Received: by 2002:a81:ae61:0:b0:506:6364:fda3 with SMTP id g33-20020a81ae61000000b005066364fda3mr503445ywk.72.1674668156462; Wed, 25 Jan 2023 09:35:56 -0800 (PST) MIME-Version: 1.0 References: <20230123151212.269082-1-jagan@amarulasolutions.com> <20230123151212.269082-14-jagan@amarulasolutions.com> <43f4a7dc-a4cc-7552-1a6d-a2a49fae6020@denx.de> In-Reply-To: From: Jagan Teki Date: Wed, 25 Jan 2023 23:05:44 +0530 Message-ID: Subject: Re: [RESEND PATCH v11 13/18] drm: exynos: dsi: Add Exynos based host irq hooks To: Marek Vasut 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_093557_709989_0FE40C59 X-CRM114-Status: GOOD ( 30.35 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 25, 2023 at 10:57 PM Marek Vasut wrote: > > On 1/25/23 18:12, Jagan Teki wrote: > > On Wed, Jan 25, 2023 at 10:16 PM Marek Vasut wrote: > >> > >> On 1/25/23 15:04, Jagan Teki wrote: > >>> On Wed, Jan 25, 2023 at 7:23 PM Marek Vasut wrote: > >>>> > >>>> On 1/25/23 07:54, Jagan Teki wrote: > >>>>> On Wed, Jan 25, 2023 at 2:54 AM Jagan Teki wrote: > >>>>>> > >>>>>> On Wed, Jan 25, 2023 at 2:54 AM Jagan Teki wrote: > >>>>>>> > >>>>>>> On Wed, Jan 25, 2023 at 2:42 AM Marek Vasut wrote: > >>>>>>>> > >>>>>>>> On 1/24/23 22:01, Jagan Teki wrote: > >>>>>>>>> On Wed, Jan 25, 2023 at 2:18 AM Marek Vasut wrote: > >>>>>>>>>> > >>>>>>>>>> On 1/23/23 16:12, Jagan Teki wrote: > >>>>>>>>>>> Enable and disable of te_gpio's are Exynos platform specific > >>>>>>>>>>> irq handling, so add the exynos based irq operations and hook > >>>>>>>>>>> them for exynos plat_data. > >>>>>>>>>> > >>>>>>>>>> If this is just an optional generic GPIO IRQ, why not keep it in the > >>>>>>>>>> core code ? TE (tearing enable?) should be available on MX8M too. > >>>>>>>>> > >>>>>>>>> So far the discussion (since from initial versions) with Marek > >>>>>>>>> Szyprowski, seems to be available in Exynos. So, I keep it separate > >>>>>>>>> from the DSIM core. > >>>>>>>> > >>>>>>>> Isn't TE a generic GPIO IRQ ? If so, it is available also on i.MX8M . > >>>>>> > >>>>>> I will check this. > >>>>> > >>>>> In order to use TE_GPIO we need te handler implementation, right now > >>>>> Exynos CRTC DRM drivers have implementation for this. That is the main > >>>>> reason to keep the TE_GPIO handling in exynos, maybe if we handle that > >>>>> generically then it is a viable option to move TE_GPIO to the DSIM > >>>>> core. > >>>> > >>>> I think you can do this exactly the same way exynos does it -- check > >>>> whether te_handler() callback is implemented by the glue code (the one > >>>> you already have for various exynos and imx8mm/imx8mm SoCs) and if so, > >>>> call it. If it is not implemented, do not call anything in the TE IRQ > >>>> handler. > >>> > >>> I need to understand how i.MX8MM handles this on TE IRQ in the DSIM > >>> host side, Can I do this in future patch set as it might involve > >>> bindings changes as well if it's part of DSIM? > >> > >> Why not leave an empty te_handler implementation on MX8M for now ? > >> You can fill that implementation in future patchset, but the generic > >> part of the code would be in place . > > > > Look like we have one issue to move regster te_irq into samsung-dsim. > > > > 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. Jagan. _______________________________________________ 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 9B607C54E94 for ; Wed, 25 Jan 2023 17:36:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC95310E0C3; Wed, 25 Jan 2023 17:35:59 +0000 (UTC) Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64E5210E0C3 for ; Wed, 25 Jan 2023 17:35:57 +0000 (UTC) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-506609635cbso59473667b3.4 for ; Wed, 25 Jan 2023 09:35:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sLdv2Pq53a6vZyVVcX2zLb9TAy6HzzMK+y+dx6JC+Lk=; b=dbmRy/zYnZU/M5INdVitjh85ZSEKWF1DQvm+OSMTwpP8/J7nXfaKdncz7Snr8+smLi 7Xi/hsMp+w+prUmQQU409wp9ax/6qQ6lzuwrpyWRtwA03xm3lFryNM6vA0L0jNAv6O6I cMGzJnlaz6waMXOl5o+Yyvj1Pgm+a7toTM8dw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sLdv2Pq53a6vZyVVcX2zLb9TAy6HzzMK+y+dx6JC+Lk=; b=3YDfWJBap9w9soyVd265OpZ6uf+F+9YcvnH0bR2enZU4bZj+JhXsUmqBu2SBau8yuB 66GVBimwEt4hfGPKngW5IE2PM5Pdm/flnltWPyeTUcucTvecjxNaHMZVAykByfmC8Uhe AK5z2qJbPvadNDGBoTropnBllPoomXbiOYTmaF73cfCprj0NplTWFMVKEvzCzqyJCg7F BUpP1xmOZoMWPDhEXTI1l9ZmnAHSMoB54OSnliCX4zF+CE0vzhpx5FfPOaNkHXZzY6N9 N2Q4N4vaCVqOmbX1Cec1MydE1S24SHoFxE5nxBRhdbFi+oZ04Y8tNYh+YHmDplMaG6Fg BYjA== X-Gm-Message-State: AO0yUKW820BczFM/iSqj/vysiiH5Puh1cRsB9oFDRif1cfW6AcwNet9d Q9vCr9oIUIdDIkBlQqgU8jQkl1QdBbKAcZ4z2ZRubw== X-Google-Smtp-Source: AK7set8dZvYXO9O3Yo3GqCYBfsHOcPW61gmf10CtU9i82U6qwqanae2Yypwvvel3B9n8cSWxBRjp/LOAB4yZWl5d3EA= X-Received: by 2002:a81:ae61:0:b0:506:6364:fda3 with SMTP id g33-20020a81ae61000000b005066364fda3mr503445ywk.72.1674668156462; Wed, 25 Jan 2023 09:35:56 -0800 (PST) MIME-Version: 1.0 References: <20230123151212.269082-1-jagan@amarulasolutions.com> <20230123151212.269082-14-jagan@amarulasolutions.com> <43f4a7dc-a4cc-7552-1a6d-a2a49fae6020@denx.de> In-Reply-To: From: Jagan Teki Date: Wed, 25 Jan 2023 23:05:44 +0530 Message-ID: Subject: Re: [RESEND PATCH v11 13/18] drm: exynos: dsi: Add Exynos based host irq hooks To: Marek Vasut Content-Type: text/plain; charset="UTF-8" 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 Wed, Jan 25, 2023 at 10:57 PM Marek Vasut wrote: > > On 1/25/23 18:12, Jagan Teki wrote: > > On Wed, Jan 25, 2023 at 10:16 PM Marek Vasut wrote: > >> > >> On 1/25/23 15:04, Jagan Teki wrote: > >>> On Wed, Jan 25, 2023 at 7:23 PM Marek Vasut wrote: > >>>> > >>>> On 1/25/23 07:54, Jagan Teki wrote: > >>>>> On Wed, Jan 25, 2023 at 2:54 AM Jagan Teki wrote: > >>>>>> > >>>>>> On Wed, Jan 25, 2023 at 2:54 AM Jagan Teki wrote: > >>>>>>> > >>>>>>> On Wed, Jan 25, 2023 at 2:42 AM Marek Vasut wrote: > >>>>>>>> > >>>>>>>> On 1/24/23 22:01, Jagan Teki wrote: > >>>>>>>>> On Wed, Jan 25, 2023 at 2:18 AM Marek Vasut wrote: > >>>>>>>>>> > >>>>>>>>>> On 1/23/23 16:12, Jagan Teki wrote: > >>>>>>>>>>> Enable and disable of te_gpio's are Exynos platform specific > >>>>>>>>>>> irq handling, so add the exynos based irq operations and hook > >>>>>>>>>>> them for exynos plat_data. > >>>>>>>>>> > >>>>>>>>>> If this is just an optional generic GPIO IRQ, why not keep it in the > >>>>>>>>>> core code ? TE (tearing enable?) should be available on MX8M too. > >>>>>>>>> > >>>>>>>>> So far the discussion (since from initial versions) with Marek > >>>>>>>>> Szyprowski, seems to be available in Exynos. So, I keep it separate > >>>>>>>>> from the DSIM core. > >>>>>>>> > >>>>>>>> Isn't TE a generic GPIO IRQ ? If so, it is available also on i.MX8M . > >>>>>> > >>>>>> I will check this. > >>>>> > >>>>> In order to use TE_GPIO we need te handler implementation, right now > >>>>> Exynos CRTC DRM drivers have implementation for this. That is the main > >>>>> reason to keep the TE_GPIO handling in exynos, maybe if we handle that > >>>>> generically then it is a viable option to move TE_GPIO to the DSIM > >>>>> core. > >>>> > >>>> I think you can do this exactly the same way exynos does it -- check > >>>> whether te_handler() callback is implemented by the glue code (the one > >>>> you already have for various exynos and imx8mm/imx8mm SoCs) and if so, > >>>> call it. If it is not implemented, do not call anything in the TE IRQ > >>>> handler. > >>> > >>> I need to understand how i.MX8MM handles this on TE IRQ in the DSIM > >>> host side, Can I do this in future patch set as it might involve > >>> bindings changes as well if it's part of DSIM? > >> > >> Why not leave an empty te_handler implementation on MX8M for now ? > >> You can fill that implementation in future patchset, but the generic > >> part of the code would be in place . > > > > Look like we have one issue to move regster te_irq into samsung-dsim. > > > > 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. Jagan.