From patchwork Fri Dec 27 11:01:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 182480 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp2827612ild; Fri, 27 Dec 2019 03:02:20 -0800 (PST) X-Google-Smtp-Source: APXvYqw3PS+fkFuREN04g6dqnWQpN3a1R2kGkAVsz7O5OPizLY7m50bHQwv3A83Qg7RyA3YvKKQc X-Received: by 2002:a9d:5786:: with SMTP id q6mr37624119oth.164.1577444540862; Fri, 27 Dec 2019 03:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577444540; cv=none; d=google.com; s=arc-20160816; b=JH68B/2VONf6+MX/jVitcNIkFnIX2tlDpjRJgo8OXr+iTFbLyK0CynoeIIFq70G/FY a9FdBu1RWvrk3gKi381VQeqOYd0SmWFnt+ZqU9sOraBD4W0Pi5CZRtSz3kZQYRk7qRxX ywL9MJYfNMYJB/seGg/QB5FXzm7DQZSkg/yOqXvrKROr+ihcXqYrGZp1KFHB44VdVpFS iTmgUowyv7lNG8RaxzyUs4r5f+wCcT32tk2mtzs64W5fB9pdhBgYFQX4VtRys8amluF9 iVCtYc16HE6rYIQ+Wlz+Y3ck5Yqw0FZP/cduOuAuAY0dz1URkvSUZzvFnWWKlfKX+gAt P7dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=7IW5udX+iI/ujHDqlQbniwM2i8DuaCoh2oKCz0vZc9k=; b=qZt2jFn+nxcXicKJEOmAr3MojrnjQJGH9ZQ28OoAGWS1Vi7HSiV8SFivlfSQs29oWu MR26/yeVuElGuUGgLLNKH6tVxtkpApeCDfF4NpjsRrDieXl9yu8l3R7LdEmqNmfH/GHj q/jYHdOcopq2CtBhuG/amuadfC1BWwUVWyxGqmbUzkZSRlO5jayMg0c/TOkcuqw1CHAX 0vovV5jlXWOQ3pLPN68xnY/S91hF1MrtIFKKEOB4ujf7GUVbMQyU4goOCePvNmW+xgEI /jT1nE8kIFRnSs5l8PlAR4sQE/kPqqB6RyPbOApqBFJLmOw2UYtaXOl2Qcv7bQY+4LkL acyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=h43HceZ8; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si16680554ote.187.2019.12.27.03.02.20; Fri, 27 Dec 2019 03:02:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=h43HceZ8; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726053AbfL0LCT (ORCPT + 3 others); Fri, 27 Dec 2019 06:02:19 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:58813 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbfL0LCT (ORCPT ); Fri, 27 Dec 2019 06:02:19 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20191227110217euoutp02384741b86cb05952ebcd0e27da1a8651~kNXMVDUqG0349503495euoutp02o for ; Fri, 27 Dec 2019 11:02:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20191227110217euoutp02384741b86cb05952ebcd0e27da1a8651~kNXMVDUqG0349503495euoutp02o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1577444537; bh=7IW5udX+iI/ujHDqlQbniwM2i8DuaCoh2oKCz0vZc9k=; h=From:To:Cc:Subject:Date:References:From; b=h43HceZ8a0ekUwJA+9LDMrPqT8NlDG8hiJuOb+8HYTJKegZu6ECEN/vZoyo7Qtr4Z vyKRYpl3X2N276x2h9sSu7Hr783Qw2RcpoUyw3pUEiH3HbOJMKtTgGPVuwDVByfDfF O2RfpJ4TFC2c2t2ZzSoHfKZH9KWd2SdAbTzJiBwU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20191227110217eucas1p19cfaba571a02e6c727e24ba92a23a1b2~kNXMAgTp11154011540eucas1p1V; Fri, 27 Dec 2019 11:02:17 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B9.C9.60698.9B4E50E5; Fri, 27 Dec 2019 11:02:17 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20191227110216eucas1p17cbf91afa905852d3c0b1efeec0f6f8d~kNXLfY-sA1605716057eucas1p1F; Fri, 27 Dec 2019 11:02:16 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20191227110216eusmtrp244914cb7ffdf08dd563e85d7c09fa281~kNXLermgo1574115741eusmtrp2_; Fri, 27 Dec 2019 11:02:16 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-d4-5e05e4b91c39 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id ED.F0.07950.8B4E50E5; Fri, 27 Dec 2019 11:02:16 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20191227110216eusmtip2251225f2b120d14565874ed25c5b00ff~kNXKuphzW1996819968eusmtip2b; Fri, 27 Dec 2019 11:02:16 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Andrzej Hajda , Boris Brezillon , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Laurent Pinchart , Neil Armstrong , Sam Ravnborg , Thierry Reding Subject: [PATCH] drm/bridge: Fix Exynos DSI after making bridge chain a double-linked list Date: Fri, 27 Dec 2019 12:01:35 +0100 Message-Id: <20191227110135.4961-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTYRjG+c7d4eQ0JT+8wqKgSG1ocSQLBaFjSPRnlJdmO3lJp2xOsyBE UXQzr5VzilksFc3bUNNlYstcaGmpgYlLEo00L6VJTiTbdrT++73P+zzv+/LxUahIj3tQifJ0 TiGXJosJAdY9ZB3z653HY05Y572Z6dZRnOnQtuHMyNthhJncXCOY8tlSjBkbayeZwjI9yUwY awhGO9aPMC2DFpIxFV9hGq1dgNFWLBKM1ViLhbqwa1N5JNtj0QO2V2ch2eqCKpw1NBUS7KzG jLD6Bx8JtrizCbAbBp+LTpcFITIuOTGDUwScvSpIqOn6jKdpvG4aJ7eQbJAL1cCJgnQQXH7a iKiBgBLRjQAWr75G+eIXgJahdZwvNgDsn5nE9iMTw4V7rgYAFwcXHA1HZHecsTNBS6B6RU2o AUm50dfhE4cdpRdQm6PDYXelo6Bh6wdpZ4w+DAeqN3A7C+kQOPWzD/C7fGFz+4A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LK3EOMEhzMSiK8eemscUK8 KYmVValF+fFFpTmpxYcYTYGWT2SWEk3OB8ZjXkm8oamhuYWlobmxubGZhZI4b4fAwRghgfTE ktTs1NSC1CKYPiYOTqkGRol7hw/1rVv5cYXY0gChF7eT+yc5Pcj2mxWWfoshzbFOPWJysKnH H813h6OfctQd6wkxsrF02rFF/mhB9T1Gw5Z5Stal76rcrs9+ysneETclsGKRyb5lxzi3XN5T y1B39tQkAwHG2h+xetu05i2p//at9uXcbsV3BtV9q1KqL0wU5ItXW5t9W4mlOCPRUIu5qDgR ANFAaRaPAgAA X-CMS-MailID: 20191227110216eucas1p17cbf91afa905852d3c0b1efeec0f6f8d X-Msg-Generator: CA X-RootMTR: 20191227110216eucas1p17cbf91afa905852d3c0b1efeec0f6f8d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20191227110216eucas1p17cbf91afa905852d3c0b1efeec0f6f8d References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Exynos DSI DRM driver uses private calls to out bridge to force certain order of operations during init/exit sequences. This no longer works after conversion of bridge chain to a double-linked list. To fix the regression call bridge related operations manually instead of the generic drm_bridge_chain_*() operations. Signed-off-by: Marek Szyprowski Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") --- This patch is a result of the following discussion: https://www.spinics.net/lists/dri-devel/msg239256.html --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 3955f84dc893..f5905c239a86 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -255,7 +255,6 @@ struct exynos_dsi { struct mipi_dsi_host dsi_host; struct drm_connector connector; struct drm_panel *panel; - struct list_head bridge_chain; struct drm_bridge *out_bridge; struct device *dev; @@ -1391,7 +1390,8 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) if (ret < 0) goto err_put_sync; } else { - drm_bridge_chain_pre_enable(dsi->out_bridge); + if (dsi->out_bridge->funcs->pre_enable) + dsi->out_bridge->funcs->pre_enable(dsi->out_bridge); } exynos_dsi_set_display_mode(dsi); @@ -1402,7 +1402,8 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) if (ret < 0) goto err_display_disable; } else { - drm_bridge_chain_enable(dsi->out_bridge); + if (dsi->out_bridge->funcs->enable) + dsi->out_bridge->funcs->enable(dsi->out_bridge); } dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; @@ -1427,10 +1428,12 @@ static void exynos_dsi_disable(struct drm_encoder *encoder) dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; drm_panel_disable(dsi->panel); - drm_bridge_chain_disable(dsi->out_bridge); + if (dsi->out_bridge->funcs->disable) + dsi->out_bridge->funcs->disable(dsi->out_bridge); exynos_dsi_set_display_enable(dsi, false); drm_panel_unprepare(dsi->panel); - drm_bridge_chain_post_disable(dsi->out_bridge); + if (dsi->out_bridge->funcs->post_disable) + dsi->out_bridge->funcs->post_disable(dsi->out_bridge); dsi->state &= ~DSIM_STATE_ENABLED; pm_runtime_put_sync(dsi->dev); } @@ -1521,9 +1524,11 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, out_bridge = of_drm_find_bridge(device->dev.of_node); if (out_bridge) { - drm_bridge_attach(encoder, out_bridge, NULL); + out_bridge->dev = drm; + out_bridge->encoder = encoder; + if (out_bridge->funcs->attach) + out_bridge->funcs->attach(out_bridge); dsi->out_bridge = out_bridge; - list_splice(&encoder->bridge_chain, &dsi->bridge_chain); } else { int ret = exynos_dsi_create_connector(encoder); @@ -1589,7 +1594,6 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, if (dsi->out_bridge->funcs->detach) dsi->out_bridge->funcs->detach(dsi->out_bridge); dsi->out_bridge = NULL; - INIT_LIST_HEAD(&dsi->bridge_chain); } if (drm->mode_config.poll_enabled) @@ -1737,7 +1741,6 @@ static int exynos_dsi_probe(struct platform_device *pdev) init_completion(&dsi->completed); spin_lock_init(&dsi->transfer_lock); INIT_LIST_HEAD(&dsi->transfer_list); - INIT_LIST_HEAD(&dsi->bridge_chain); dsi->dsi_host.ops = &exynos_dsi_ops; dsi->dsi_host.dev = dev;