From patchwork Wed Jul 20 15:51:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2188 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CE83D3F03E for ; Wed, 20 Jul 2022 17:52:38 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id 134-20020a63018c000000b0040cf04213a1sf8595797pgb.6 for ; Wed, 20 Jul 2022 08:52:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658332357; cv=pass; d=google.com; s=arc-20160816; b=xqza9XIRlesoLf6LcWU+fC/Xl/indIzz903ZxVQZHRlBX8QkU5PBu6XUUrh04sTM4F zWenwQo5gQv+/AsF0s1XDLuRUkIFn+AqQgIwhD5Yvx9moh+2USuGx+BFjoLiWz43QP7a sHxxishoHbQCbKp54wRr0lgl4N1DrdNrVkWp6KHoY1b5ApDnN94iUac4Xz46S941bGlt 15CFeGWRfx8d5Xduclv9OxjH5R1VTCO2NSX2T+qheE8R+sXnP/lqEUSPTvblwb0qGyD6 O2Miv6KR6iq09WiX12DDLxXcl8p1HSPonLe/xkWB3Z+ivKgtmx6Web9nxN11DRVXqm+1 ayrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=CAXIU04Rf5XUduslywZLGlM17dKxU71dhAtRO2Gn7rk=; b=XanzJo6MU8TVIkG6/8Ddw1qItyxEcKEXqbWM7VYoA/Nc6TPYXrITWXkAZGDaZ5klUN 9KzxQjY9LGtghcwNfCQrPhHSN02PTHTQKBWpOHrxBN0SzGQDtchZ0hAXmeayL/zC/h06 tQY4IW31ne/yWKJmcHu2IqZSeCS0BgC3DUjy8HrluiwT6xiY3P96xYoCtHQFM3ZBgLp1 1bwsElTOxAMZfQVG/6mRzrVDQh84+d0phJMjLACPDGIPZTLPWxOzAmtdlo/4KNWoKc4A TWWP0ddy45eBTV+uvseg0J/Zg7GxhpME0juH5/pEOupIuGWkF4HiSMH0obAsH25IjK3T njXQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AR1YQry5; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=CAXIU04Rf5XUduslywZLGlM17dKxU71dhAtRO2Gn7rk=; b=ncQKavhv038DBJ7vnFSdRD+4tXCQIqZrysXhqSxdh04+Gv9YZwtbbaK8t3jWD9RmjW zAWXn/HiCCdw1iXdvyMB7D3jZp+Jy1c7QDzZ8ACYnAtlF55qr9zhocKcn5F/Sw1+zoGq Ae74OOQORe3IphPZmEJLQ+KOYIuKNV08fPxH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=CAXIU04Rf5XUduslywZLGlM17dKxU71dhAtRO2Gn7rk=; b=hEmK6+xLSBaMk4Z0qZVPVgJGYg+8o5gSyaomdSnkKIeDYTLG0RfeKj6TpGwQTa5P4y +mmHoX4zCWywG961hbxvJreNzakYAmmAGudfouKkRYGY6972rAgQH9zxwSMr9nBHRaFZ yIly/Y9Dn/1Vlwl4LvbfLI8Vor6/TghgugQkj4pxG+godc3SSC9333OnIYHjeGfljxQ7 RTVMe0BgLR6pVvN9gUsq/IG/yrIchIAqs47YfHi0RyElLffVBGcnfYPmJ+J3krXs5UtH J5B1xiSwS42RIhRGGNKiwcSVPwnFEfgXb4aYf5CYfImejNdE71+C8oX7stmJiX/gUpwQ lG6Q== X-Gm-Message-State: AJIora+HV5F6aUr7EWw3W1QAi60S5Rm8JgC4ioHAQAOcp30zR3f9bW4l ihV9fjR1X8n/pZZ7UMU7IijQtiuv X-Google-Smtp-Source: AGRyM1u4zYRSkv9ueuqzim60e/Rn8NcN9xKMc0qaRpMmr123XI6NsbGzKYz3YXLujehQko50joI5Xg== X-Received: by 2002:a17:902:db03:b0:16c:3eff:b503 with SMTP id m3-20020a170902db0300b0016c3effb503mr38931251plx.151.1658332357573; Wed, 20 Jul 2022 08:52:37 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:d382:b0:16b:ea78:4ed8 with SMTP id e2-20020a170902d38200b0016bea784ed8ls1623338pld.6.-pod-prod-gmail; Wed, 20 Jul 2022 08:52:37 -0700 (PDT) X-Received: by 2002:a17:902:cccf:b0:168:e13c:5cd9 with SMTP id z15-20020a170902cccf00b00168e13c5cd9mr39969609ple.53.1658332356740; Wed, 20 Jul 2022 08:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658332356; cv=none; d=google.com; s=arc-20160816; b=yPR91Wa8t0x+CLYuvkUUEikHPa4ignTJU6A47DeBs3BV243Cj0iTZr+P3+WLpeadRT OysZ76O9QDhFhWmYtLLlQMiHSRCMXUrFo2O007alhxryuHb1IAp+YHhJVzKaIBJ+T/Wi Husys65fFGK6DPsQZRXUYzZfMt6MPWjKo1DhtNOJGk/U8v7XekzqKInCMvpMzMLYVduS 8m3Mt+yj8v21sIEB2KIJaEjzKFch+Y1b1tXkM+C44Mhn1JRXEgWShdkC3vJsutk/8oDu gFkVcam5H6nBCegIicvRpxZ1o03zt079zYzcpWtAEbHqNNy8LM3Grxb+40IKD97sD1oy gmmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=2R5fsiZtZGlt+FobiR6W0jXlK1PNk4NpdanB+YrtTj4=; b=IMJLrSEpdpqYeSPjClCwtatut7BHplZJxzaHw6PVO1bQ19mRitSg4/yQywkytlGdpU DDd687m+VLV/biy232biiUqeX64KI37M8elL8ksPl9OLlOdFMZ4pTE2tLM/ivq39IFhy nl3WwvelcCMkWAvwn3hDqUOwqIbFItkCoJtGX01+HL4GlQ0CGSf44qaLbSZgcviiRa9X 9aECOaqh/GfdQgNz5ymexLPLCm5zsQwMPzZ9DugIHmpJiWZbmjy1WiA1eq+310TMGYbu NalTTUGfB2yCmRsHULc04gnJS8czw3G7RI6qW3oBK+ww9ZDkbrVbeISj8+PRpHT6tZob lesQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AR1YQry5; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id o18-20020a170902d4d200b0016bfcb9e572sor7389430plg.72.2022.07.20.08.52.36 for (Google Transport Security); Wed, 20 Jul 2022 08:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:7d92:b0:16c:54a4:bb2f with SMTP id a18-20020a1709027d9200b0016c54a4bb2fmr39962044plm.158.1658332356419; Wed, 20 Jul 2022 08:52:36 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:d177:d5:aee:4f03]) by smtp.gmail.com with ESMTPSA id a8-20020a170902710800b0015e8d4eb1d7sm13919198pll.33.2022.07.20.08.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:52:36 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v3 01/13] drm: exynos: dsi: Restore proper bridge chain order Date: Wed, 20 Jul 2022 21:21:58 +0530 Message-Id: <20220720155210.365977-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220720155210.365977-1-jagan@amarulasolutions.com> References: <20220720155210.365977-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AR1YQry5; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. v3: * new patch Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- 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. From patchwork Wed Jul 20 15:51:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2189 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4A5DA3F03E for ; Wed, 20 Jul 2022 17:52:47 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id b11-20020aa7810b000000b0052aeb125cb3sf5925231pfi.11 for ; Wed, 20 Jul 2022 08:52:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658332366; cv=pass; d=google.com; s=arc-20160816; b=UXpwRJHpvHZM07QqQ+qmjkWqjU05xpe5wPzpqdKQ4Zb9pWrvA7Ip/+0IzmRc0ROUAz RQ3hQAH8pzqIEYZko2EujTDbkGoP8KWwCLCpyYyOz3tfMH4Rro+/I43PWVbQGp9SZHKi kcLa5iyJLth660fiIQhr4zXDhVo03loB45NWv3+bufNeCZggHWsEIwh+PqY4YiDqFsX+ 9cXBC2rOZylRK2v66BzfgN8sFNf7+3YmBM8s1vTAM/q7kxpFUMAN1z/30I04CV2e0OBp EBYsaNWp66ieX2rxOZ1eqZAZ0ah4V/M5zPFSwucgdXrS7vTQqYWDsdCnDtamPDwi2jFe yWyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fhTe6UJpmDA724ITGLyQnIg9QX9CYYTiQAItDV+xgko=; b=FnuldsOCLbeL4AXw3i1SJ2SfVeGc87niQOblQVrSjYY+Nd7IecKng/3JOODFlE2LNW K4iNBe7YAPdP2JmEzwCIRUCtAngPJf1jkZDhn12S5etKATFDGqL/c1n0Ov8SSeyxI4dD 9uZTNTodobfMJxsrpCvAbtMLmk+LLK3WBF534rtf3ryE3LaODiZG8cmMcErV6xmU9BMR g/ViuNJGWNHBU6uqGetnK3DeAfVxGtA053lqYhihHGQyxD7htnVVfiWml5v+ebQfZKmb yPQvJ1enzlC8ZPrQONK3758OmrXv53SX36GhPbQL6ea1/nasHLYrRW29ej/AYJDiTcWE 88VQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rwV0qSFS; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=fhTe6UJpmDA724ITGLyQnIg9QX9CYYTiQAItDV+xgko=; b=CL3htoW/ZlnbnVWNq6mhX2VZkYeNsKEOL5XASxjf9J0zvYGVJNDdLgrHtC1xJkXq0U i7/FuYzleKmaTPEJovauImH/0zaZxkpEnBYGqklfWsgEmpOjqhp0L6JYj+Z0cY9XTGGc y4yqOXTwLGbyWknwQ6fSYZJn/UGQg11vP6zd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=fhTe6UJpmDA724ITGLyQnIg9QX9CYYTiQAItDV+xgko=; b=bRYNe/7LqrSFjxDxn1qFA8nBcS2G/P4wNBr1uHa2WzPBlScIEN0/Ug2yFGUOkVvKK9 XRSCPEipETdfkWz+ThHG82jRFwjAyN3s+yHNff1KQpRVspnjWskhaCDg6nsvXQUpwLao Ij97H11sHryVCkkod8qb+4Z18U0YToC5Y1dG0VoPUw1f6HeyAG5N9GRraw2jqpVl/r/l vHUb2OCdZhid58jyTbl25tqaVwUZm1zLgduvoPwgT6kaWJibDyc7VbdyD+3t0USRfVLX 0vYO06dghCz6Y2Glg4ustuI4v93+NguBGj1IMPRJ4JjJefp1RMOIZyxji9YEtEj3NW4r 2hgQ== X-Gm-Message-State: AJIora8Kytyw/N9su/jygeE/woja0k8/Bcr4LgvD6MnIxLb+PhcOlvUS 4Th2Uqh00QBocYSxXcRYiWcan7Zn X-Google-Smtp-Source: AGRyM1sHFWYsiDScS7pUqZBPBIlCJjBZ4wAiah0FDBNgt5T9B8PPK9zLk54iKwelSRV3wtv13x4Kxg== X-Received: by 2002:a17:902:e94c:b0:16b:fe90:2f65 with SMTP id b12-20020a170902e94c00b0016bfe902f65mr41234822pll.111.1658332365957; Wed, 20 Jul 2022 08:52:45 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:c4:0:b0:408:ddc7:1218 with SMTP id 187-20020a6300c4000000b00408ddc71218ls176627pga.1.-pod-prod-gmail; Wed, 20 Jul 2022 08:52:45 -0700 (PDT) X-Received: by 2002:a05:6a00:1812:b0:52a:c171:7cc5 with SMTP id y18-20020a056a00181200b0052ac1717cc5mr39398730pfa.81.1658332364908; Wed, 20 Jul 2022 08:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658332364; cv=none; d=google.com; s=arc-20160816; b=dViuW23eJ+M2kMwx8l7yoFL8SWP5BksZXf89BwM3wXXDXBJog46nHJhM2cCAFP5hEQ h1xkKcejjrf4+oCFEqwYQivyPFPWenVYOLrnWLBL4VVOtPG1/Bl5NV8zA5QDB9CAQBHY LFyNgPj/CF5SXYjL/7k9ttK/zPY1l28tTSUQLUGYXmh1Oyik1uq7v5v4+tqgcf+vZCMI yYBpBVJNzUkRP4btC4Wa3ZazV0DIh50e1g/uChodbksWI0xcItG6Fuh+EsE1st7Ppi9w 7tDCCYhrcP19T2iswrYuq5T5qfC8zvuSyz7EEaNqEdF1Iigs4+fPi8MVcbjLWo7y5AdD YsSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=yHF81PEpXpqvbG10EFqoxIVhj70ZmXWcS3NoKOLu1gc=; b=hCRFQ3TNBCMCeUF2w3zmpKuNk1JaRYi22jMVxMc5gmDB/7PGNgY6ctlPEi5z6TVNzc RzISlGozPdN1tzTTANf6zPSj2npSpUzHkGmr6KVdYXxQXpmdz2d4Ag4tUU6SwNv8QE/Q 5ftc38Uv65x2t0P0DgDroUwkIKcbqmeU/1eNhJyJR0AZWZbOsanUOHoJg21OpPcpxlj3 4CGL0qnl2Un4pGstwaowGAP8jwK033jU9bZ67N4Pl+osuajyV5w9vmhSPPJVe+gBHh1N MDC+3/zHiq6Ajq3fJwwgFA13kQ5dTw+pSuyiCqEpBWbm6dbkGZXLs5IIygvJm7BFkgWz UDJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rwV0qSFS; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id n2-20020a62e502000000b0052b4896c2b0sor7060894pff.66.2022.07.20.08.52.44 for (Google Transport Security); Wed, 20 Jul 2022 08:52:44 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6a00:150d:b0:52b:1ffb:503c with SMTP id q13-20020a056a00150d00b0052b1ffb503cmr33493448pfu.44.1658332363801; Wed, 20 Jul 2022 08:52:43 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:d177:d5:aee:4f03]) by smtp.gmail.com with ESMTPSA id a8-20020a170902710800b0015e8d4eb1d7sm13919198pll.33.2022.07.20.08.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:52:43 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v3 02/13] drm: bridge: Add Samsung DSIM bridge driver Date: Wed, 20 Jul 2022 21:21:59 +0530 Message-Id: <20220720155210.365977-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220720155210.365977-1-jagan@amarulasolutions.com> References: <20220720155210.365977-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rwV0qSFS; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Samsung MIPI DSIM controller is common DSI IP that can be used in various SoCs like Exynos, i.MX8M Mini/Nano. In order to access this DSI controller between various platform SoCs, the ideal way to incorporate this in the drm stack is via the drm bridge driver. This patch is trying to differentiate platform-specific and bridge driver code and keep maintaining the exynos_drm_dsi.c code as platform-specific glue code and samsung-dsim.c as a common bridge driver code. - Exynos specific glue code is exynos specific te_irq, host_attach, and detach code along with conventional component_ops. - Samsung DSIM is a bridge driver which is common across all platforms and the respective platform-specific glue will initialize at the end of the probe. The platform-specific operations and other glue calls will invoke on associate code areas. v3: * restore gpio related fixes * restore proper bridge chain * rework initialization issue * fix header includes in proper way v2: * fixed exynos dsi driver conversion (Marek Szyprowski) * updated commit message * updated MAINTAINERS file v1: * Don't maintain component_ops in bridge driver * Don't maintain platform glue code in bridge driver * Add platform-specific glue code and make a common bridge Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- MAINTAINERS | 8 + drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 1684 ++++++++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1715 +---------------------- include/drm/bridge/samsung-dsim.h | 99 ++ 7 files changed, 1865 insertions(+), 1655 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h diff --git a/MAINTAINERS b/MAINTAINERS index 0f9366144d31..d796fa8c7be0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6546,6 +6546,14 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml F: drivers/gpu/drm/panel/panel-samsung-db7430.c +DRM DRIVER FOR SAMSUNG MIPI DSIM BRIDGE +M: Jagan Teki +M: Marek Szyprowski +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: drivers/gpu/drm/bridge/samsung-dsim.c +F: include/drm/bridge/samsung-dsim.h + DRM DRIVER FOR SAMSUNG S6D27A1 PANELS M: Markuss Broks S: Maintained diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 57946d80b02d..8e85dac9f53e 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -231,6 +231,18 @@ config DRM_PARADE_PS8640 The PS8640 is a high-performance and low-power MIPI DSI to eDP converter +config DRM_SAMSUNG_DSIM + tristate "Samsung MIPI DSIM bridge driver" + depends on COMMON_CLK + depends on OF && HAS_IOMEM + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL_BRIDGE + help + The Samsung MIPI DSIM bridge controller driver. + This MIPI DSIM bridge can be found it on Exynos SoCs and + NXP's i.MX8M Mini/Nano. + config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 1884803c6860..dae843723991 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o +obj-$(CONFIG_DRM_SAMSUNG_DSIM) += samsung-dsim.o obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o obj-$(CONFIG_DRM_SII9234) += sii9234.o diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c new file mode 100644 index 000000000000..21975ed513bd --- /dev/null +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -0,0 +1,1684 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung MIPI DSIM bridge driver. + * + * Copyright (C) 2021 Amarula Solutions(India) + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * Author: Jagan Teki + * + * Based on exynos_drm_dsi from + * Tomasz Figa + */ + +#include + +#include +#include +#include +#include +#include + +#include