From patchwork Mon Aug 29 18:40:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2319 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1B2F640F47 for ; Mon, 29 Aug 2022 20:41:05 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id a12-20020a65604c000000b0042a8c1cc701sf4363278pgp.1 for ; Mon, 29 Aug 2022 11:41:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661798464; cv=pass; d=google.com; s=arc-20160816; b=WlHSe7JINaului6kgcv/hB88Dua0YQQiFAr92FHiAgAljm1lGDrzxW7Uv4j8hZ7Y6Q vYYhKsB7cMWlhxv9TbJPb8aP8fEm3uyVbLhg+hHiYsZ55JmFpC8unJtznXvBEfsHijOE EpmLHs8c6zQXOriSG5m8LqXkTxCOIi/ICUzyUokX9pKNBCQOfM0BT5TGMooLw5izRX6+ B1yVVTbgWcAPr0Sgnapx9ij4V8BV9AShuh444DH6ppAViO8jAFzcmjEYGt57gHRY7Gkw ZJ+68IU6wlxwKziAFb91P0fAjsGsW5SrtaiV6Ngz8K7TSWFZeMA0qnKJ3B7Es69j5Adz m4cg== 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=Ah9BpxnzN+c7JKwem5diUC1AkB7Dpa+09CYzK24cgR0=; b=U6rVv5NeHrAv/mygSB9xnyBu75sKE5BKjlMvF36tKLm94F8eaZOluquuyL/GJ9IDFG xFGms5rJscSsVfBAnt0xH7G6eJCc25fzkIf1/RcZWd0CZDmsVnjrLso9QxUnrVMjgG7i 9jmZsV1Rky9tKae/OcCkUTF4HRJEAvDKVZegJ99YU5NeF7bhLWLkGHDYDb6HX71PV/2B /Vwx/tTRvkgfJnif0Jsf9IgRVtUBzKYiK7U+T5exlwJZefNTTQklbhXg1v+a6WBClYAI oOdiWsE08HpPQNXTc049+lwNwZ6FKvJ7XWhjcoKdGWkKUbd2I+J3AGd2ahiW3Lfs/hgs ZA1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EPSFr67+; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc; bh=Ah9BpxnzN+c7JKwem5diUC1AkB7Dpa+09CYzK24cgR0=; b=NuM9Tv3M5sBOSidc+qChnFxM4zYaIAnSzfbyBrv4HwR8m1NQlS0E8RjrZ0zMiAFMxt zNVMlpiRf5MJsMsqtLFNpawMu74Pw7QGCIFb+xXGE4UQANxBx7HesZie5XGFtee4cKgo c5SavnVek9GlHHpC3mYdHPfy/LCDPpBycm8dM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=Ah9BpxnzN+c7JKwem5diUC1AkB7Dpa+09CYzK24cgR0=; b=FZMD4qNMnpzvAgj1v1vScr6+moWncVheCntmakFagHhm1X9AhYkoYrIOolHfx70IPh O7z2oWT8rkO2Yj3poN3lE8h5zaDJEL4usB8xWtybdQv+CUIrQaH+90MSQLNtyHPj/XC4 cUBcJu1V/cwN/Fm9J72+cKwS0rUBVB683o8ua2EtGizp6qW6g3y07qXyEPB+HnC3uqQO WIMKfari84xVISYVyr4Mu8E1Q/fyxPyzMTtjUdd1vJNENYgXDvFJ+/rM9uT0R/NxM4r3 HiNnkGjdhX1Iy2hxwTFIM/jxMS3pcgl6e0yxi5O3nHuTq4nSw5n1gZ46rP8fRZHDLK2O izxA== X-Gm-Message-State: ACgBeo2vMZj8s+VyF+SvJM5xRW/FCCTSry1xEpv4oQHnLZ61V9bM8MU4 fh6iEvigSPF+x/YYmwvJrzk06WCi X-Google-Smtp-Source: AA6agR4dC0SADATEVIr9Vu9PKb/lkDJQ9uN2dP+GVCdIq6R9/xLBi0Um/havAisjxgmeLx/om9xtxA== X-Received: by 2002:a63:1726:0:b0:41d:b30:46d4 with SMTP id x38-20020a631726000000b0041d0b3046d4mr14923444pgl.27.1661798463711; Mon, 29 Aug 2022 11:41:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:2351:b0:1fd:81ab:cf6b with SMTP id ms17-20020a17090b235100b001fd81abcf6bls4424592pjb.2.-pod-prod-gmail; Mon, 29 Aug 2022 11:41:03 -0700 (PDT) X-Received: by 2002:a17:90b:d81:b0:1fd:7fed:4a9c with SMTP id bg1-20020a17090b0d8100b001fd7fed4a9cmr14480049pjb.127.1661798462845; Mon, 29 Aug 2022 11:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661798462; cv=none; d=google.com; s=arc-20160816; b=peLl9A3qYkNzrWCU1iPC2INih5rBW+XYNkVrK3SYF28bkAkYYmRdb/3UI70YRmL3Qy vlRSz44/ZGwhj1FIl/UCpGeL5z25W6n10Ntt6bRvUynK8QC0GuTHQBvV5NnT4vlNdsV7 VmjI8QCp84zH9/yjmsEs+5wQoC9YOHEG+m1VvzoNNwuRXKpPNYAFH4ZljWfjvu1+Z70Y Wv/CyfbPrD5hgh9N0D0dp/t2kqfB8D5lFaVyuPj9wGqq4pfx3AvtfnrUCgsvf6N1n5Ay 6uAH96f2MQ/Egeato2ZqXEH2TUKtptyCc5xckOhQmrAbeepzHLlTy9hkzS7EZOCDk06/ gkYg== 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=P8VFeEM/BFJI467dCNlhyUmXQlADynuLsgzoWk47wCg=; b=ll7QdJOuFGUw04TzkSmYZNOXpScmNYxQALAeeU7ovJWCjW1dWct1TlaTc4TrAJEiCa 1H9ebwgqsuKpgIXjRplmMZjbE5CF8JA6ehs/HVmBRjbD2YiUk9Rc52ygcz7UlsGaanEC Pr1TPDDncCPlmTjvZMOwNB13vxaAFVXUAwXYMPW6YV4NeFLrb3JUa3ck++AQV3visY26 YZLTRgVTAitanHYvCj3fZ6F5NdOcGZo2BKPIA8l58lazl/mSKnck0bWfUuuN2XBM8OG1 kxMLL4hWfPEd0tcfhjiuGHL208nd7mhGeUkJ0k+QNUhfhqEwqaGre4KDXbj2o9GcFJwH 3iMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=EPSFr67+; 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 bi1-20020a056a02024100b0042b688ee460sor25893pgb.13.2022.08.29.11.41.02 for (Google Transport Security); Mon, 29 Aug 2022 11:41:02 -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:a63:1921:0:b0:42b:6eb3:bce5 with SMTP id z33-20020a631921000000b0042b6eb3bce5mr15304041pgl.231.1661798462536; Mon, 29 Aug 2022 11:41:02 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:43f7:1644:6259:830d]) by smtp.gmail.com with ESMTPSA id k13-20020aa7998d000000b005385e2e86eesm1619042pfh.18.2022.08.29.11.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 11:41:02 -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 v4 01/12] drm: exynos: dsi: Restore proper bridge chain order Date: Tue, 30 Aug 2022 00:10:20 +0530 Message-Id: <20220829184031.1863663-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829184031.1863663-1-jagan@amarulasolutions.com> References: <20220829184031.1863663-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=EPSFr67+; 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. v4: * none 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 Mon Aug 29 18:40: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: 2320 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1EDCD40F47 for ; Mon, 29 Aug 2022 20:41:13 +0200 (CEST) Received: by mail-pj1-f69.google.com with SMTP id rj3-20020a17090b3e8300b001fae0be4dc4sf9910706pjb.7 for ; Mon, 29 Aug 2022 11:41:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661798472; cv=pass; d=google.com; s=arc-20160816; b=gjgLu2kNuTz7OvYoJQR43/sjpviZe6FFQafiY7PZzJKgvyO7Zqj04LbrVmfU1BDCEU CMaIetdcYzK9rhAGmHTuO1E90e//9BoE0jFMjxXpLLnonjuxQzp8XFnLZ/ISle4F9Tbr 4X3jJK9xT8S0o577CfhgxtbMEY9wkUPMziGGYjYgfHsOlX3eQMv3RBwxs+FQf7tl+61b GTV3+Lk+wRhdeG5GSOClTxBeDx+Z+4arj5OBimj/Ktq982y3oJmpwYXEzYuyCUOlHGqi MkLg+sxBHv+DaAUAtf2/uCmDKjiVD1FYUtdEVCa2vZairuBqmIbVHxFI5LUPlKOTvQUb lphg== 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=LcOjJtLn6C/P16/3kBE2hML5xA8PDIeTWLXJUTNFTgE=; b=iKCS2gxxyG1p4yeNVx20fD3Rr3w3p9O25m+IE5HxDS/gHSOGdysnmTJoFXXbuKU5vf EWgOqDtFnF3L9oKiUiz+4DYoRMaNVae8vmnbgOrOtGffTVLp4WsngpGw1fCIIAAIT6n4 lbD9L7zaWpO5H1gcxQFkVBq0QjKqYmAXMljpKqLDCJalvK7Omm0yoj8HsOvv8o06wILj A6gsjbKk7rVIuTemR4oYTWIw2755dhIPe0fax19lF10OF93E/C7afa2OhOexO3el91k6 XybX3xKAEdeqAxw1Y0y+NGNn4lkT/s5SETBWEj1Br1XKRAgFfhYe4+rMGj6Ws9tud5M8 BU3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E0eGf8oP; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc; bh=LcOjJtLn6C/P16/3kBE2hML5xA8PDIeTWLXJUTNFTgE=; b=mKHu1g0LzZ7MXYlDnq81h2gGrDPBsv26rt1PeM/RTvcBwYc8JJDaiaM2zLYV0H52dc 6kcH7GYpGVnj33eLlAEN64LzN5ZBFvV/RFmvlDz+9W4zWGH4Ta6sJqBfHFxejdKVPTjG OOws4vlfubxDqaknk2G+/cjNTZRxZ35IRDUYQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=LcOjJtLn6C/P16/3kBE2hML5xA8PDIeTWLXJUTNFTgE=; b=39TQ5JB4dBS0q+ZJalYcI38nAUJUaYIq2RN4kuF5ZbUHi7PujhDIE/15G2myoytz4Z suUQhM7dE4qqEOIPmk9WDS4pNJdzsqVvu7ySGvqVE8ecCfXXy9T8Oo9PC+XW5R32GGh/ rpjclB1oQ4pBi7X/JbIGY1zKNa6nkIFnHTfLJQJn6qMR/OSyoFaham+3a840emsi3rLI YjpSHXAqtkGVApeGw9iuPY6JmQBZI4zYA5CSG2LFfYtNYrdq5NpUx0gSNaUfNru61a7S /suaj+/LCIrhXvRluPWw6GhxTbDJDQR4frvTD03soLRoGZWS5L8iJWpVvFoRew9dIbqk o2wg== X-Gm-Message-State: ACgBeo3z9B7A+NqobyNNUFyJncCwk8ORrxJQxRii7jVEI59dZmNn9jBD Rq47cFMhRDZ7chIPE4+ixbw/vp7E X-Google-Smtp-Source: AA6agR4cg/DNA98Se/HiikjOUbAZKzGGQdf4y/w4bKCjQimJcwMzvNTpS5ONtxxaFb3+ZdEIGpZWaw== X-Received: by 2002:a05:6a00:1382:b0:538:1e50:a161 with SMTP id t2-20020a056a00138200b005381e50a161mr8152916pfg.43.1661798471694; Mon, 29 Aug 2022 11:41:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2e87:b0:1f3:1fa8:829d with SMTP id r7-20020a17090a2e8700b001f31fa8829dls6565175pjd.3.-pod-control-gmail; Mon, 29 Aug 2022 11:41:11 -0700 (PDT) X-Received: by 2002:a17:902:e5c3:b0:175:534:1735 with SMTP id u3-20020a170902e5c300b0017505341735mr1849391plf.87.1661798470632; Mon, 29 Aug 2022 11:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661798470; cv=none; d=google.com; s=arc-20160816; b=dBt/4PHq4eJ5LU/IdHbV9fUygUWmnYLOgnzkDnp7DRjOiC4+xMyOYfMQW6fHnS1rc1 2lKmtVElNRkwYPbf42kDWFKNFrZqFutfXGCpAj/CYg3iKL8tna4V5jBRzxsIgTVTpKQ+ ZHbuZpUX2JZ+afhgAWwmItqaxHTgTA+FiFOSjmQmYouqdp2qtPU376oOaqia3brO1/rr wWHhdIU5wlzgC8YNjfII9S7ESyCDULksY4C7yyY9ZJ9qh6+j7R7ZJBqc21kzP8+hfX24 8iMvXA3hnnmHrmXVsbDGhQubVbvnE98aAGDoWP8D0cTI9jT+of3V6LCzmuEKGXqzpnEL /6xg== 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=kspNOPSLazs5hpv0JH2NICTBQRXcEpKsp5YV9cX8SIc=; b=OGU1V8Y7Qk3VyFsl3UaCae3A/4q3gidC2c6fevyX/KObFtLB0PoV0aNCtf3f750IFI zmkWYuEFqJ/+bRtbuTYND56y/xygBX6p9Rup8m+rF5AHZfJp4j2LkUV5zlWQ6TgW2Llk Rnf8LxNd6Rau2mXMfYssXjedyn6bTJwtx5fWvq+TrWUx4PJL/TZQy4LY6eXsjcX2In81 U3YYJQchBp+4oitrJ8Gu5bAmntINofgYHMqoazdHuw5Or2U+jZLUv2mK1/7DLrZteEDs wQdKtPnWh8ngpY7zpJAaais5iJCG7peLO8uZoQ7uvllRmKNVs1wwE0nTJbBn0YOiCK2b 9VgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E0eGf8oP; 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 u63-20020a638542000000b004293d32dcb7sor5108pgd.59.2022.08.29.11.41.10 for (Google Transport Security); Mon, 29 Aug 2022 11:41:10 -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:a63:85c2:0:b0:42b:497d:e06a with SMTP id u185-20020a6385c2000000b0042b497de06amr15174218pgd.479.1661798469621; Mon, 29 Aug 2022 11:41:09 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:43f7:1644:6259:830d]) by smtp.gmail.com with ESMTPSA id k13-20020aa7998d000000b005385e2e86eesm1619042pfh.18.2022.08.29.11.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 11:41:09 -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 v4 02/12] drm: bridge: Add Samsung DSIM bridge driver Date: Tue, 30 Aug 2022 00:10:21 +0530 Message-Id: <20220829184031.1863663-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829184031.1863663-1-jagan@amarulasolutions.com> References: <20220829184031.1863663-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=E0eGf8oP; 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. v4: * include Inki Dae in MAINTAINERS * remove dsi_driver probe in exynos_drm_drv to support multi-arch build 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 | 9 + drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 1686 ++++++++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 - drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 - drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1715 +---------------------- include/drm/bridge/samsung-dsim.h | 99 ++ 9 files changed, 1868 insertions(+), 1659 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 589517372408..301478f70b41 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6624,6 +6624,15 @@ 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 +M: Inki Dae 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..ab2fa0f42f40 --- /dev/null +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -0,0 +1,1686 @@ +// 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