From patchwork Mon Dec 12 14:55:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 633853 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 500A6C4332F for ; Mon, 12 Dec 2022 14:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232019AbiLLOz2 (ORCPT ); Mon, 12 Dec 2022 09:55:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbiLLOz0 (ORCPT ); Mon, 12 Dec 2022 09:55:26 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B8F337 for ; Mon, 12 Dec 2022 06:55:26 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so15991238pje.5 for ; Mon, 12 Dec 2022 06:55:26 -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=NlSuQTrbVzaxIlmPuxUKvQXXdzde89nREfoms55D9Qs=; b=gXnyqjcrXkKChetQW4gPuaaZ5gL80mQe2td6N26dwHtUpHnhmNx0jPQwqPR7Q0hi1h eiLSoKyrcj+h7xzat0FbErzx4Kay80BbRL081ETmKV4ZFSdMBoQ4bomqb9WZ3p1EiAET /uDo9UYiKTXHcftbiD3rn36JUu0DFWagzsxas= 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=NlSuQTrbVzaxIlmPuxUKvQXXdzde89nREfoms55D9Qs=; b=43UUm0FBXl8u3NGvDpfRsJ7YDi2L0PpB/SGTpmTIQy7f/Vt826QYJY4yiwHsgS1oL+ VtB0kjEpugy7WaM+BDgbdMhT3D07tNMic+vqaVz1OACoWKeVwF1HOQ3nGxMwzZwHUffA Er+BVSfY5X/Wl68AJ9FJpMR7wKYAtclikS7QK0wMtlCt21CDRx4MyJJZP6XRsKySGiI1 42OzcJEcTE2cIW4KGDLZJLhvkeGMXbZCG1eO+pCB/vgKj+Ag9vxvTF3moJgPfsl7tX4w BijYPN8WJg88x8f/vik31EmgFpFRUTlmAgPQhLmf1KE1emHSML7icz1wi1cy8I789jER UYCA== X-Gm-Message-State: ANoB5plVPbnarBJmHppRW+L8MeTsG37OwSYK6lODkM/IXP+t1Lmu0EpC 0gmkzwcZQoLFCZCaHYWDVvpLOA== X-Google-Smtp-Source: AA0mqf4R6zWBHRqWR1AUnRnYGnPWvwKljqQzjysHJohx0NVSjERBAgNOcXOyL6/rTnkESipNLon5Ew== X-Received: by 2002:a17:902:e811:b0:189:d8fb:152d with SMTP id u17-20020a170902e81100b00189d8fb152dmr23302674plg.25.1670856925633; Mon, 12 Dec 2022 06:55:25 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:c713:dc69:f2de:e52f]) by smtp.gmail.com with ESMTPSA id e11-20020a170902784b00b001782aab6318sm6463272pln.68.2022.12.12.06.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 06:55:25 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Kyungmin Park , Neil Armstrong , Robert Foss , Andrzej Hajda , Sam Ravnborg Cc: Marek Vasut , linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amarula , Jagan Teki Subject: [PATCH v10 1/3] drm: panel: Enable prepare_prev_first flag for samsung-s6e panels Date: Mon, 12 Dec 2022 20:25:06 +0530 Message-Id: <20221212145508.15096-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221212145508.15096-1-jagan@amarulasolutions.com> References: <20221212145508.15096-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 --- Changes for 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 14:55:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 633450 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 567E3C4332F for ; Mon, 12 Dec 2022 14:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbiLLOzc (ORCPT ); Mon, 12 Dec 2022 09:55:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbiLLOzb (ORCPT ); Mon, 12 Dec 2022 09:55:31 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3257B1D for ; Mon, 12 Dec 2022 06:55:30 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d7so12318580pll.9 for ; Mon, 12 Dec 2022 06:55:30 -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=v4ea8rvmGnrS/8sRSsoYglrzM9FWA5fUizBf/l/CVMc=; b=nt1qHxoUkFtSYDEH24MU3Zr1sZ5imgK/FR3091m9lCKlCS0zN1OR0Hr9JPZ3dJJ9eP +UO+hGhO3DZRXmDDg8PBN7K8JXncFazWDw2OnuuR3MyCA1GHgf0jF2Yv71bVONV3pVte qAiY+6HitJTUUlXQcYl4v46tWCuWvi9A8EEp8= 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=v4ea8rvmGnrS/8sRSsoYglrzM9FWA5fUizBf/l/CVMc=; b=SNgh91eKae5oKt3OMfwzhze0RA49A0+N+3+4ix+kZDUo2KC4nIzYHPAsgKXCxw7MS5 jmepPU2vzxsJK4oG2L4Iv3gc9Rlo35X0dEnOkzhCTm2jiy4wQIIFAhb5pfwV3pRBj+c+ 7izIbYy1FbzVwk/cASb83JZMedqlNrF+fQZuN0TD+hWzg8djYOaIlWio6F3uaYga06Rl cA/OBjH8e0o7gFwYiWcTr7wbygN4FWn4vtzz8m9lpxslbo59Q5oCWWjiFfVW11Hpc+JF amQD5Bu6NNRfRzY1dUJ3mOa46UVXBosoyXizWKmIEle/K2SFX9QQXffqe07KMUeHeJ3A CzNQ== X-Gm-Message-State: ANoB5pkQ5f7ytfXzagTurDGZohe2kgVzbgBh+yRHZ8x+F5yS0KvLQ1IW a41ha4Vw6YqCvtsriWp7RGmzHg== X-Google-Smtp-Source: AA0mqf6WJEW3banWVF1AHkY7665xfeS0AMVZwAlise4jZmkDo1Cpd3nFYLOJGi6TID6YpovqBoQXgA== X-Received: by 2002:a17:902:6b05:b0:186:b063:32e with SMTP id o5-20020a1709026b0500b00186b063032emr17616981plk.62.1670856930519; Mon, 12 Dec 2022 06:55:30 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:c713:dc69:f2de:e52f]) by smtp.gmail.com with ESMTPSA id e11-20020a170902784b00b001782aab6318sm6463272pln.68.2022.12.12.06.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 06:55:29 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Kyungmin Park , Neil Armstrong , Robert Foss , Andrzej Hajda , Sam Ravnborg Cc: Marek Vasut , linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amarula , Jagan Teki Subject: [PATCH v10 2/3] drm/bridge: tc358764: Enable pre_enable_prev_first flag Date: Mon, 12 Dec 2022 20:25:07 +0530 Message-Id: <20221212145508.15096-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221212145508.15096-1-jagan@amarulasolutions.com> References: <20221212145508.15096-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 --- Changes for 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 14:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 633852 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 8EEF9C4332F for ; Mon, 12 Dec 2022 14:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232282AbiLLOzh (ORCPT ); Mon, 12 Dec 2022 09:55:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbiLLOzg (ORCPT ); Mon, 12 Dec 2022 09:55:36 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5811B1D for ; Mon, 12 Dec 2022 06:55:35 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so29061pjj.2 for ; Mon, 12 Dec 2022 06:55:35 -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=y/y5vw0u9kB/6hX1ihxQilGZuqMG9YrydhtDvt3iYOI=; b=BuTOUmaReEVhSmrY4tNdyrVDylbaCAI9zI2x/KRj7AlKYnD+crXBjLg6I7Tl/K9/vI 7QH/rUKSJ+wzvtLhF/iZXahZ0wjb/yur7gwTxnf3Qeoh059IGL2sgnZosXbPWh+9+ZlZ cLirNBdGyjHNotHKA9aW8XHZvkVPpgqMebgpM= 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=y/y5vw0u9kB/6hX1ihxQilGZuqMG9YrydhtDvt3iYOI=; b=38NpfehruPe2JYL3DXx/f6g1C4He/5QspC9IpgWGLjTTWglttDTUz56XUC5zqwKQVN 3PXT8/RTDHs3dx/N4VPnd75rUTlkzGdl2emSfZKnvipKhGOUfLtiMhnBZIFQnh2++glH qd1JBCIh5uiL603o4IOctbCjvbchFpKun5dvieSBUkIM87mMiSCHpgeN3RQFQDMmymRH lwd/NYMZwXbB0zAZVMk/T6LDr3p8uC+B5ypmzIfxLq7RN4AE0UIiRtSypDad1W+mZw// 79jJKrccilHHmTJJ3LbQ/n2aeF500Ws1kwSyMRnJeDCE6W5kScDB3Y3YfTpO3zyUTMGj kIRA== X-Gm-Message-State: ANoB5plY0wEu2Tddfkxa+RpSlmBmz7+CIvxZi/EpU/av8GcFzYFaJkaN hJomduqH8vUIRDwTlYbUemKdPw== X-Google-Smtp-Source: AA0mqf78CzP6wF4vC+jXEZ80TBSbKmyUeLFBAdMzjJ3bFN/hcrsPFs0IqmKVYOdlesA41J6QEB2Xew== X-Received: by 2002:a17:902:b494:b0:188:635d:4ca9 with SMTP id y20-20020a170902b49400b00188635d4ca9mr17072148plr.2.1670856935321; Mon, 12 Dec 2022 06:55:35 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:c713:dc69:f2de:e52f]) by smtp.gmail.com with ESMTPSA id e11-20020a170902784b00b001782aab6318sm6463272pln.68.2022.12.12.06.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 06:55:34 -0800 (PST) From: Jagan Teki To: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Kyungmin Park , Neil Armstrong , Robert Foss , Andrzej Hajda , Sam Ravnborg Cc: Marek Vasut , linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-amarula , Jagan Teki Subject: [PATCH v10 3/3] drm: exynos: dsi: Restore proper bridge chain order Date: Mon, 12 Dec 2022 20:25:08 +0530 Message-Id: <20221212145508.15096-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221212145508.15096-1-jagan@amarulasolutions.com> References: <20221212145508.15096-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Marek Szyprowski 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 --- Changes for v10: - collect Marek review tag drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++++-- 1 file changed, 6 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..e5b1540c4ae4 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.