From patchwork Mon Dec 12 18:29:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13071352 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 2FC5DC4332F for ; Mon, 12 Dec 2022 18:29:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46B1810E27D; Mon, 12 Dec 2022 18:29:41 +0000 (UTC) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 357F510E27D for ; Mon, 12 Dec 2022 18:29:37 +0000 (UTC) Received: by mail-pj1-x102a.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so761802pje.5 for ; Mon, 12 Dec 2022 10:29:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R+Av/2b/ycy/RF3odcL3zI/UzS7FDZGXbIff6fnk4N0=; b=BnDGNHVrwFfXAnM9SyZeC9QH9o6KivMSPD1A8n6oPm6t8kdRpWWFIfq14tbtVxieWz Qd723axcn8ltXjluGv/NZ9rPBedPFTN0XSwPp5OOdMkHzagWOXC6AnEJC5kUqJQxFkqr RJB4Iqe6+yNzfy6qElEhLaGzuElsUeplD426M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R+Av/2b/ycy/RF3odcL3zI/UzS7FDZGXbIff6fnk4N0=; b=ZAfomCflVtVF1XfkkMA+d3pcQiWxJ1HIlvghsPJHM5GMaW8Ca+kVaSi+Znvo/wnFdQ 87o1VbfeUtaVDbBDsEjgqBGmgZYSH6FGB3I/awsS3/tkIA8KfVx77QR9Gq71bV5vBJ5p DrcVpnob6jpgSNa/elUmAn56swoUJlc0d5rKcr7bOhYbuT9igg+9/Y0L+lUwhzJLgsO8 WnXAyXb/NqPGPwwZk9B8OMxURRlB9ix7YSG/WRw7wp3hLbcCnZNg0jYVg8r1PTI5Hehx Ihv4tEvEXIZl4g6tNhKblmKSB1rcll/4obUR990wgudkoV/aws1QKwJIF+SfASg5s4nK +P2Q== X-Gm-Message-State: ANoB5plowQ60NEECGa9xhRfYPUngHlMKtQRAOoBaaxeiX8wQIHaiWxqD zrDdnHq22p2hFf2NbLSOKKI+dA== X-Google-Smtp-Source: AA0mqf5hsCFAcHLuL+AKUeephHjjqJ2dqqQyzD8sLhqo13HfDb8qhj+/6xrx4HNXqbUYYXrCRXyb1g== X-Received: by 2002:a05:6a20:69a0:b0:9d:efbe:52ae with SMTP id t32-20020a056a2069a000b0009defbe52aemr27929032pzk.30.1670869776804; Mon, 12 Dec 2022 10:29:36 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:c713:dc69:f2de:e52f]) by smtp.gmail.com with ESMTPSA id n28-20020a634d5c000000b0046fefb18a09sm5357998pgl.91.2022.12.12.10.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 10:29:36 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Kyungmin Park , Neil Armstrong , Robert Foss , Andrzej Hajda , Sam Ravnborg Subject: [PATCH v11 1/3] drm: panel: Enable prepare_prev_first flag for samsung-s6e panels Date: Mon, 12 Dec 2022 23:59:21 +0530 Message-Id: <20221212182923.29155-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221212182923.29155-1-jagan@amarulasolutions.com> References: <20221212182923.29155-1-jagan@amarulasolutions.com> MIME-Version: 1.0 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: Marek Vasut , linux-samsung-soc@vger.kernel.org, linux-amarula , Jagan Teki , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Enable the drm panel prepare_prev_first flag so-that the previous controller should be prepared first before the prepare for the panel is called.     samsung-s6e3ha2, samsung-s6e63j0x03 and samsung-s6e8aa0 are the effected samsung-s6e panels for this change.     This makes sure that the previous controller, likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf --- Changes for v11, v10: - none drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 1 + drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 1 + drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c index 5c621b15e84c..1355b2c27932 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -731,6 +731,7 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &s6e3ha2_drm_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; drm_panel_add(&ctx->panel); diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index e06fd35de814..3223a9d06a50 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -462,6 +462,7 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &s6e63j0x03_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; ctx->bl_dev = backlight_device_register("s6e63j0x03", dev, ctx, &s6e63j0x03_bl_ops, NULL); diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c index 54213beafaf5..362eb10f10ce 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -1018,6 +1018,7 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &s6e8aa0_drm_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; drm_panel_add(&ctx->panel); From patchwork Mon Dec 12 18:29:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13071353 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 C4BA1C4332F for ; Mon, 12 Dec 2022 18:29:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25AD010E280; Mon, 12 Dec 2022 18:29:48 +0000 (UTC) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9DF9C10E27F for ; Mon, 12 Dec 2022 18:29:42 +0000 (UTC) Received: by mail-pj1-x102a.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso843643pjt.0 for ; Mon, 12 Dec 2022 10:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jCpxaDaTA56dGN7NJsLyTmoxT4H5IRGMLzpnnHDD7q8=; b=JAKFVzLSt6JrfK8yqkhUbmYOpa1Y9+ZNYOuxyxXCaFrCIAUel9DmnllQ/4Hk5LAZ+u IlDRmlR+oSXuMh8zDRIVgTsNf/PhmxB9noJpyenzwoRA1AMhfwJzL5lqLriHzWYY4WM+ CVvuyH0YIvntyN2LP+xQo/c44isBdvOb5mHBw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jCpxaDaTA56dGN7NJsLyTmoxT4H5IRGMLzpnnHDD7q8=; b=zXClhIboXfzNw2H9BMmSR9/2WCwBc9sP2Rsrkdk71uI7GTcT2Hhg9/C5FxotYqQljk fIkxorQX5rxbLITqAKmEImh1tLE8ijrfd9P2P9Fj9tWSo8yrfyAxbUourtGBl4Vw6vrj s9nJ/Cb+KWfTSo2RqjqTdx3M+jihCQTaSR1w/6lwXCSyxWRdV+7OGXAovfWZdlNEn+p4 yMWcR074tOt36UJrPvAHcAMU4KjrSCVrsTvQ50mT2wDPoFmjBzKdI9/ulNMojXO/cNq8 vYbaBVEzsLaDt/vDhCBQtadVMgEHeXheJKuIPfQvPJmgDgB5SdLjpKW0bp8yJW4nvzD4 5wsA== X-Gm-Message-State: ANoB5pnWmrLrzhdQ965UFyaUSMJP4lPgYdTPk6mXGRM2BkEQIkGJHWpU AQBOsFCywswtjFAHTUWpyVC3+Q== X-Google-Smtp-Source: AA0mqf4vOfrYyokqDVGgCKowSzgdtJOiyIYxXHZ18VsSCqYqdWLFwhStg78i7SpL2dTrPHIglv3wVw== X-Received: by 2002:a17:903:1d1:b0:189:c47b:af27 with SMTP id e17-20020a17090301d100b00189c47baf27mr23141709plh.10.1670869781961; Mon, 12 Dec 2022 10:29:41 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:c713:dc69:f2de:e52f]) by smtp.gmail.com with ESMTPSA id n28-20020a634d5c000000b0046fefb18a09sm5357998pgl.91.2022.12.12.10.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 10:29:41 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Kyungmin Park , Neil Armstrong , Robert Foss , Andrzej Hajda , Sam Ravnborg Subject: [PATCH v11 2/3] drm/bridge: tc358764: Enable pre_enable_prev_first flag Date: Mon, 12 Dec 2022 23:59:22 +0530 Message-Id: <20221212182923.29155-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221212182923.29155-1-jagan@amarulasolutions.com> References: <20221212182923.29155-1-jagan@amarulasolutions.com> MIME-Version: 1.0 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: Marek Vasut , linux-samsung-soc@vger.kernel.org, linux-amarula , Jagan Teki , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Marek Szyprowski Enable the drm bridge pre_enable_prev_first flag so that the previous bridge pre_enable should be called first before the pre_enable for the tc358764 bridge is called. This makes sure that the previous bridge should be initialized properly before the tc358764 bridge is powered up. Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf --- Changes for v11, v10: - none drivers/gpu/drm/bridge/tc358764.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c index 53259c12d777..f85654f1b104 100644 --- a/drivers/gpu/drm/bridge/tc358764.c +++ b/drivers/gpu/drm/bridge/tc358764.c @@ -369,6 +369,7 @@ static int tc358764_probe(struct mipi_dsi_device *dsi) ctx->bridge.funcs = &tc358764_bridge_funcs; ctx->bridge.of_node = dev->of_node; + ctx->bridge.pre_enable_prev_first = true; drm_bridge_add(&ctx->bridge); From patchwork Mon Dec 12 18:29:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13071354 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 EAFE6C4332F for ; Mon, 12 Dec 2022 18:29:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 167CF10E27F; Mon, 12 Dec 2022 18:29:54 +0000 (UTC) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B86810E27F for ; Mon, 12 Dec 2022 18:29:47 +0000 (UTC) Received: by mail-pl1-x62a.google.com with SMTP id jn7so12931403plb.13 for ; Mon, 12 Dec 2022 10:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+3thu+TFV75UQnUKi5H5iMkprh+mVb/ueAKw6cINH6Y=; b=Gh4sGxHl66CkePx1uPOJ9+QfVzVDgI4LtnOjg6S3enaAA8amtaSKxIc/AxDLV1zq9A G1R37KCSbqBH6KzjCaqAdxMJVO/MzdncBEqy4ILe3rt5FJizcEaXuswSKND97NTFSUCa oonxwo7+nQS6+1kiVnJHvW6chzKruYpkqdr7k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+3thu+TFV75UQnUKi5H5iMkprh+mVb/ueAKw6cINH6Y=; b=to3a01uC8T6eGEfA2tNESTZqVbMDO53VRsfamvFa/ntls7bxMV/PG3AMAg19jYToMJ TYagMUhFXBGbEY13VNIFp5Xk3DFDtGLCl2aTxpXuJ+UxnnDHS2gfZzezP3D/9BiQg2UL ODxYkVGM8E3WZahy29ThexVhn50Xbc5qyT9UvJlWkNcCEy4B0Jr6CD2IRiM28HyxUA+K xvQT5CNLYQWWuVQtW2KZ9fwNAukm7pdCUeLtx1ewzifn4n1ZycMDkvSQuUpmgFT80lRr 3inhlK0D225i7BZolyX0PV1wrXNuYE9CkNsZNBS/mBwZ4uTM0O9VpvygbqzNhP9SRjwD UKGA== X-Gm-Message-State: ANoB5pmyRcS1B3tns/jQgwnJE/9bJKSzRwhaN/2R1eg2iABZNVcwTSM0 Bx+xztt/XuC+ZwKF75UiuQHcqA== X-Google-Smtp-Source: AA0mqf59dINh/5fm38yRqrF5Y6rB+ErCZKmj7qHXjh5d283hE7csggHWbwm7onwdkzkqk9T/WefmpA== X-Received: by 2002:a05:6a21:3996:b0:a7:345a:1024 with SMTP id ad22-20020a056a21399600b000a7345a1024mr22612382pzc.50.1670869787169; Mon, 12 Dec 2022 10:29:47 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:c713:dc69:f2de:e52f]) by smtp.gmail.com with ESMTPSA id n28-20020a634d5c000000b0046fefb18a09sm5357998pgl.91.2022.12.12.10.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 10:29:46 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Kyungmin Park , Neil Armstrong , Robert Foss , Andrzej Hajda , Sam Ravnborg Subject: [PATCH v11 3/3] drm: exynos: dsi: Restore proper bridge chain order Date: Mon, 12 Dec 2022 23:59:23 +0530 Message-Id: <20221212182923.29155-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221212182923.29155-1-jagan@amarulasolutions.com> References: <20221212182923.29155-1-jagan@amarulasolutions.com> MIME-Version: 1.0 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: Marek Vasut , linux-samsung-soc@vger.kernel.org, linux-amarula , Jagan Teki , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Restore the proper bridge chain by finding the previous bridge in the chain instead of passing NULL. This establishes a proper bridge chain while attaching downstream bridges. Reviewed-by: Marek Vasut Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf --- Changes for v11: - add bridge.pre_enable_prev_first Changes for v10: - collect Marek review tag drivers/gpu/drm/exynos/exynos_drm_dsi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index ec673223d6b7..9d10a89d28f1 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1428,7 +1428,8 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, { struct exynos_dsi *dsi = bridge_to_dsi(bridge); - return drm_bridge_attach(bridge->encoder, dsi->out_bridge, NULL, flags); + return drm_bridge_attach(bridge->encoder, dsi->out_bridge, bridge, + flags); } static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { @@ -1474,7 +1475,10 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, drm_bridge_add(&dsi->bridge); - drm_bridge_attach(encoder, &dsi->bridge, NULL, 0); + drm_bridge_attach(encoder, &dsi->bridge, + list_first_entry_or_null(&encoder->bridge_chain, + struct drm_bridge, + chain_node), 0); /* * This is a temporary solution and should be made by more generic way. @@ -1709,6 +1713,7 @@ static int exynos_dsi_probe(struct platform_device *pdev) dsi->bridge.funcs = &exynos_dsi_bridge_funcs; dsi->bridge.of_node = dev->of_node; dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + dsi->bridge.pre_enable_prev_first = true; ret = component_add(dev, &exynos_dsi_component_ops); if (ret)