From patchwork Thu Nov 10 18:38:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2466 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D67CF3F039 for ; Thu, 10 Nov 2022 19:40:21 +0100 (CET) Received: by mail-pj1-f72.google.com with SMTP id m2-20020a17090a730200b0021020cce6adsf3905378pjk.3 for ; Thu, 10 Nov 2022 10:40:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668105620; cv=pass; d=google.com; s=arc-20160816; b=cQY4JSsMkc5vnzb5YwGgoFiKwNBvtqlTWVHuL3iKI8vV+qbLZW7majPSg35FBGs0/1 jhPbhND0mfJUGsXQkiksLYY6AXRrMixerosg4giW5xcAkXhRewvu4KM5qs1NuQwqO9te ZUPZCtxLLAf6NMw1wtYaVWXsnee4QS2DWQ86FEq+snZH5R1PrgBJxL0MUfcPeMqECeyW hddk1u0KK4dwcuEJPkUWLb9KYT3KyHOyg4YD1Qw02hxJJiWJD9CI9VynEStBN47xO273 lj1jtCCcfIUgw0eQ4lnzWXkua+WJAvcYdCSQ9AOO3c4IuNk2F5yPXQ0GZes5JXEKHfpH NCbQ== 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=3YRQzIdR8pYoCooTr6M7fDKPNUffypdrApdlRQZWAhs=; b=WQ+lRtHuyEXhQIx3KsL7cXKJxRv+yRHvqnoapLjhABgudHERFTBx7wqYEErk2TQk7a 0M4wp4gTmVEeb1ouwRZ9d+xfyyQGYjjy8aWTogY1MwHp3bHkVbqoU2BKCZs+cw4VqhUy Qg2QPJVjtKgmsZEgYWcIjuF+MI2E9fW7+JBrFJbftfiW+fugHi2B9uwG+Ro8Vxt56EFN GRX0xg/AjMO1NnWDPMr1zi6kcmcgD6gmzrPizo0zqGkye0V5J8s7x8SufukS4hLFiYLY yZGl3Bi6p93V/NOG2ZnYSQ4JKlnsJ4YxZM735eqN45QPDr8FjS0xJfUY3YbRZXXKKQAm 9HCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=l5FjXvkq; 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:subject :date:message-id:reply-to; bh=3YRQzIdR8pYoCooTr6M7fDKPNUffypdrApdlRQZWAhs=; b=SDD+SDMD681NOH082xrIuVBMKOcZMct80JxsAxad35C8bEu0Dxd5y4sy1vVLuDtCjO QWrGbTsaoOqaIabW62zkfoH4gVXBKMJADcVy0YZ9GGcgBmy+sdrkXtUVslnrPJTx5Rnn FlXwVrFVWJzMsWxhyeSSAwtXyEoKdAIqRrDQA= 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 :subject:date:message-id:reply-to; bh=3YRQzIdR8pYoCooTr6M7fDKPNUffypdrApdlRQZWAhs=; b=K83KtKnRqnDcYMgiX7KHiwRMHCmJfkhCvlDHby3IDipYMVEKHTBMm302secx1mFK9A KcQCRVRIHxM4Tgc7W40VX5nNQgZ7Uv43ktkJ6Bwd0LD35s12706YosZJFz8is5pRkyzc t+zMQ+y5kokbUZYMXY8fSDOhVIxQgOEMc9By9Gnbq2NKxIZ/BkOIP31Kiw5KiPCUTwcY kQr7gkORaFfn+QS8ncrB0HbxfE+2a8eQpBce9t+Ie2Ql6vDd9sHeoxFWdMN0eu9/w5vH hx3EevrPZXLbHmq0s3bn5pVihGBaXtvBKvWfX7DvtHCchCrSV+gRVEuf8L/KRdUXSUld +IEQ== X-Gm-Message-State: ACrzQf27vLBD3ht666JzlZatFkWO9kEE+kvPodxHYGFOGaR7EfEKQmXx PMAEcJApOvrBXebPrjnk3v2NsGjG X-Google-Smtp-Source: AMsMyM5sy6TG9Qabn+tYDnRA63lpBQyNsdlkks3wwPXeTwPBmPmUq6JriCWCshU4BivN2lWpwK7BIg== X-Received: by 2002:a17:90a:f198:b0:212:c3cf:b8f4 with SMTP id bv24-20020a17090af19800b00212c3cfb8f4mr68173941pjb.49.1668105620498; Thu, 10 Nov 2022 10:40:20 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:1f48:b0:213:e:b27 with SMTP id y8-20020a17090a1f4800b00213000e0b27ls4164220pjy.0.-pod-canary-gmail; Thu, 10 Nov 2022 10:40:19 -0800 (PST) X-Received: by 2002:a17:902:c412:b0:186:a279:717f with SMTP id k18-20020a170902c41200b00186a279717fmr66228522plk.29.1668105619607; Thu, 10 Nov 2022 10:40:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668105619; cv=none; d=google.com; s=arc-20160816; b=f/ji8lJiSJTaoI03Bcm4z4CJCQ2jvd8sWGtf7+mST8hFnXKMbI3UIKSneg4YzX8jUb XRerkha07AuHMvP3DvkmkWT3Z5aUB/Wf8PIL2v5C6DUyEJgeH36QBV3oGS0Mh2nY8sfr 3dVH077UVCQFc8smxORci2d8IWy0CKTdGUh0nKAVAQ9WoEX/AW63SXMJtK+VAA6EYV5r 67H+0HG1cZFGpnU/grHkH7Qz/CvjpXCjIFN6ZsD6+vrQRL32dgoKDIPULyfEQQ0EpBFx QSzB7LZWtn1/yF2VnWcnP+xJTz4R1YD0DwbWQXdoiYQDodSQEIjfJd7s1C8puWLqsf1K m0Bw== 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=pI9nmADqBaRgKnAq2H3CdzUb+UwaNTPrY74SU7vfqFU=; b=YjUqMPO4jAdzmkqzE+0NSndJodWmNTP/EBgf1AYuRNZwpZbHfp9VezQZZP2R+tCrOW 181r7tSDuhcDrqPTlHV0UEnarqHbb3OLfL2CGkz+gx+Axrl6QEqPvrowBDs31eRmN5cN MzZWIH8DMWspPgdTLpz6zgulHfu9SjxwUoZYu1OP06Q67CAzZcYvlXgEcThomF5loOyB adcR1uM3vQiMx0vz7r5WBJCbvq0vkwnZC9mrNdCAvN5lbqF3JqcYlqXP9nAm97yhG+Vm JCawkyP+a0JBZucIiAKKlPXxxuBCMstYcG8A449V1crCqvAc2knvBdJrl8Vb6G+RcrJ2 GR+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=l5FjXvkq; 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 s7-20020a17090a764700b00202e89816c3sor2186720pjl.8.2022.11.10.10.40.19 for (Google Transport Security); Thu, 10 Nov 2022 10:40:19 -0800 (PST) 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:90a:d814:b0:20a:b98f:b839 with SMTP id a20-20020a17090ad81400b0020ab98fb839mr1674598pjv.23.1668105619201; Thu, 10 Nov 2022 10:40:19 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:b5a4:486a:f07:f67e]) by smtp.gmail.com with ESMTPSA id c2-20020a170903234200b001869efb722csm11635627plh.215.2022.11.10.10.40.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 10:40:18 -0800 (PST) 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 , Nicolas Boichat , =?utf-8?q?S=C3=A9bastien_Szy?= =?utf-8?q?manski?= Subject: [PATCH v8 01/14] drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags Date: Fri, 11 Nov 2022 00:08:40 +0530 Message-Id: <20221110183853.3678209-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221110183853.3678209-1-jagan@amarulasolutions.com> References: <20221110183853.3678209-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=l5FjXvkq; 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: , HFP/HBP/HSA/EOT_PACKET modes in Exynos DSI host specifies 0 = Enable and 1 = Disable. The logic for checking these mode flags was correct before the MIPI_DSI*_NO_* mode flag conversion. Fix the MIPI_DSI*_NO_* mode flags handling. Fixes: 0f3b68b66a6d ("drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features") Cc: Nicolas Boichat Reported-by: Sébastien Szymanski Signed-off-by: Jagan Teki Reviewed-by: Nicolas Boichat Reviewed-By: Frieder Schrempf --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index ec673223d6b7..b5305b145ddb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -805,15 +805,15 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi) reg |= DSIM_AUTO_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSE) reg |= DSIM_HSE_MODE; - if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP)) + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP) reg |= DSIM_HFP_MODE; - if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP)) + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP) reg |= DSIM_HBP_MODE; - if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA)) + if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA) reg |= DSIM_HSA_MODE; } - if (!(dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)) + if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET) reg |= DSIM_EOT_DISABLE; switch (dsi->format) { From patchwork Thu Nov 10 18:38:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2467 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C1ABB3F039 for ; Thu, 10 Nov 2022 19:40:33 +0100 (CET) Received: by mail-pf1-f200.google.com with SMTP id f19-20020a056a001ad300b0056dd07cebfcsf1439081pfv.3 for ; Thu, 10 Nov 2022 10:40:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668105632; cv=pass; d=google.com; s=arc-20160816; b=mF1YCP59kApTxVujO0nLGP/cvhf1NJ4QDEp8AaA/kV162/qhMJezQ/ERwfkoZmTbLO PAzk3Zk9aRgME245koYFcOUN+xSgh7DL/F6fSv/6aLUKaBeBPL13ogGngp/FnE7m3gMX bq/ovlejpcF05xiX/+u+rkPdjk5HJKnVR+Y5ZtxlNLXlE5mBBg3Xvi4BHXiUz6GIy+4Q Y45MbFr2I52tbSAI7KvAj7tniJRWtTO2B5xmO3zbY846cw6WpPtKQRcGJqg+bexrw6S/ /Dwl5ys2Xw09oX/KIgOelr1cQ0KsSmula8AQCqNrkguJe++Bozy5IMNQpHOVaCKIC2yg YYQQ== 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=QankY38FS1DSWnqbP8oHia3Mfw09PPJk6I98hyxXWbY=; b=fcKnL+KYdioB/BYzMgs1w855ULuADZoRMKSnjIAxEM85LcM61g33kawSJPKqeyUiG2 JPngJxAKJwuyxCYFGP5w0cTW9fc5JL2jw/7EdYQz5cQNS6uYsAn+v6Tj18+mg23Gyakk W6PPlzHXyAjX7E/AqgalUKLPcRDidcu7wwnEQC25SgBDrEt4MhoOVpUvohQoCNxQsciS El7Untyd6odAPPMvDk2O/XPjHy8/QC3551bFZRC0OlGX87RB9wwpfqwCHQqDdR8+8YIx JHoEzltU3aDYptWg/cV5LtOQlv4AaIo93+GXNMddK2JNjyZ1AN2t4tn0OGr2tLZMJiJi tMIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=goQ7p8zP; 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:subject:date:message-id:reply-to; bh=QankY38FS1DSWnqbP8oHia3Mfw09PPJk6I98hyxXWbY=; b=OhQJLa3zL3SXiNrr6SYs6EBTqseTajJ58XX0/1YgMaeKtE8luCmRqOQuMSFPY2J3Wb IgHeOeB6gkLdrTjiOKGV90RgwCiSAlkYTmMoV1hEKDEJjxuci1gxLTx/rf4bfnOc2epD t2S8Npq45d0+9ZjGSjeKHY4XJpH7gbvvknaKQ= 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:subject:date:message-id:reply-to; bh=QankY38FS1DSWnqbP8oHia3Mfw09PPJk6I98hyxXWbY=; b=baAfCF9ySrMzfmF8fdAUzm9O3juZFpHB4Vyj0LFy3FQTkD8rNRuWtKUIkOcnDVtrVG 1n5SkcsCOmg8opHD4nPOVjBMb/Ig5UHaiHUaEBcQ73BURIrkq3kS7lFsdZoyfWRG7Sti M6bujyXbY453WbYMHcxE9VPmsa1rR0D8slp8LKG9+CIGTJX19dPurmJaY8hK/Q9R11/F 28+/sqGtoS5cgTob1lt9g0X8AtcHTLJpcMk/95kAmjVTMa9MK0TDOOpV7bmAOssyThGm Flh+qTQRF0e0ldS0PoKQQLhv/bOS54vriUC/DZVeaaiqTBXIN1wlrixOgM3PFNyJWqUr 5Tvg== X-Gm-Message-State: ACrzQf09bDP0CCPLRl9lF6fUH8E8hLFHTm8INkc27l6Ujtm4DbShmN3g yV+W0UWEWvwCBsSYgGGVsQ+sPV0i X-Google-Smtp-Source: AMsMyM6yJu41nigNEbjjafa56G1zPNdKHoS1GBPeU2BRKg7C49MuxGDqHNIj+g8gY+3J8vVdQDZvXg== X-Received: by 2002:a63:4a1e:0:b0:43c:6412:994f with SMTP id x30-20020a634a1e000000b0043c6412994fmr2946914pga.421.1668105632338; Thu, 10 Nov 2022 10:40:32 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:ab06:b0:187:a99:41ab with SMTP id ik6-20020a170902ab0600b001870a9941abls1690667plb.0.-pod-prod-gmail; Thu, 10 Nov 2022 10:40:31 -0800 (PST) X-Received: by 2002:a17:902:db04:b0:186:8518:6c79 with SMTP id m4-20020a170902db0400b0018685186c79mr1695854plx.146.1668105631512; Thu, 10 Nov 2022 10:40:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668105631; cv=none; d=google.com; s=arc-20160816; b=WwMlxHjh+mNLr97wTw7jkcgCTvCrOHb8w2prms06WAb5ZwMjZLukbzKFMeJJqoiLWm 0JGsUEnBc8wrIZwVUwzHcHaG+fM+Sggf6TXO1tekZxRoxUkEfPtrauY3/iHR0UEVtEdU 4lyVr5yzqbWrXM1AulaheWhGKI56bCjPt4hh+QYpu66gkRfvy3KByPXYopIQwt4yVwUm GVf5caQq4XJEBhvPkyEebv/5Wf0nyFz0syHgbWlTQZRckR8HZqS4MXUp6EU/ZVxQhvXi bFYtZfYKuOiOAG5EQ+HMpcii8MMpPaZGfVQXGzsw3U0e2J/3M6kIF5leWP3v/zH6hD/L aiOg== 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=dWQPw8kMGq61u2i3C2KyyYluiC9el7Rd/PLrQ+mO7W0=; b=HfWXZ/etB+L2DQqx1jZ04vruLV7Dwimq0nAjBGfZ8+BJc06ymsrTQG546ZsQdG+gBt ajJezbUSiE2loDf2lzJF3v8vVEk5KpC+83+KpbFyKOGGZAQy/cdLPOWFnXHc7xuZSWeN wbB+wDLvfOVMeavy5LKXiLBwiO0wUnXhQ73hmA+eM0bcWLUVciGanYWFH6i/YgeAEYEP 2SJR1alet7fo/oyGV/2rIck6cbgVH78l3ztx1lSJu5R0Ygyn/vSPEyGSIbfT5yHOYVDL sShVy40uSLKqxXGdJznYQ4H9RjJZMMsJeuS9BUgRww8APUemkPIeWDAqtIJXmnIdX5gd OTAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=goQ7p8zP; 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 m7-20020a170902768700b00186a1a56f29sor8663pll.135.2022.11.10.10.40.31 for (Google Transport Security); Thu, 10 Nov 2022 10:40:31 -0800 (PST) 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:c3d1:b0:188:758f:f473 with SMTP id j17-20020a170902c3d100b00188758ff473mr25672647plj.113.1668105631202; Thu, 10 Nov 2022 10:40:31 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:b5a4:486a:f07:f67e]) by smtp.gmail.com with ESMTPSA id c2-20020a170903234200b001869efb722csm11635627plh.215.2022.11.10.10.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 10:40:29 -0800 (PST) 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 v8 02/14] drm: exynos: dsi: Properly name HSA/HBP/HFP/HSE bits Date: Fri, 11 Nov 2022 00:08:41 +0530 Message-Id: <20221110183853.3678209-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221110183853.3678209-1-jagan@amarulasolutions.com> References: <20221110183853.3678209-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=goQ7p8zP; 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: , HSA/HBP/HFP/HSE mode bits in Exynos DSI host specify a naming conversion as 'disable mode bit' due to its bit definition, 0 = Enable and 1 = Disable. Fix the naming convention of the mode bits. Signed-off-by: Jagan Teki --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index b5305b145ddb..fce7f0a7e4ee 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -75,10 +75,10 @@ #define DSIM_MAIN_PIX_FORMAT_RGB565 (0x4 << 12) #define DSIM_SUB_VC (((x) & 0x3) << 16) #define DSIM_MAIN_VC (((x) & 0x3) << 18) -#define DSIM_HSA_MODE (1 << 20) -#define DSIM_HBP_MODE (1 << 21) -#define DSIM_HFP_MODE (1 << 22) -#define DSIM_HSE_MODE (1 << 23) +#define DSIM_HSA_DISABLE (1 << 20) +#define DSIM_HBP_DISABLE (1 << 21) +#define DSIM_HFP_DISABLE (1 << 22) +#define DSIM_HSE_DISABLE (1 << 23) #define DSIM_AUTO_MODE (1 << 24) #define DSIM_VIDEO_MODE (1 << 25) #define DSIM_BURST_MODE (1 << 26) @@ -804,13 +804,13 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi) if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_AUTO_VERT) reg |= DSIM_AUTO_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSE) - reg |= DSIM_HSE_MODE; + reg |= DSIM_HSE_DISABLE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP) - reg |= DSIM_HFP_MODE; + reg |= DSIM_HFP_DISABLE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP) - reg |= DSIM_HBP_MODE; + reg |= DSIM_HBP_DISABLE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA) - reg |= DSIM_HSA_MODE; + reg |= DSIM_HSA_DISABLE; } if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET) From patchwork Thu Nov 10 18:38:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2468 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E16393F039 for ; Thu, 10 Nov 2022 19:40:41 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id b18-20020a170903229200b00186e357f3b9sf1892889plh.6 for ; Thu, 10 Nov 2022 10:40:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668105640; cv=pass; d=google.com; s=arc-20160816; b=pU6g3qz91E3b3/NtF2kdhvpyyhbon7UGOL1GQlQgaCdt9oHCHdHM7sMb9X+82xZ+ym GA4nlTxQHs7d098waOKLizsk39NGPTzGl5/AcEPw8mEvhrMm90WAs8Z1P4QjCVDWqoe3 IpOQLfxycDiZEZBcUgfP4kIooCUbWVNW6/Y0CZrdKbT3Nul3gtL7Wpr8+UgRBpv9h7BC KWkogF4xZp11VAS4VWxPbvYEt6Yk/Try7CjIQe7zi6xzwTSvlfSDxVnVmGBo8OnKvSWP XNLo1uY05Z8v1fJKQ7R0OwgH42+LzvPohurD2s6yhaEUSjTLvFr/ty+gAJizcBxvlNqw qJeg== 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=+cNhu7e8hAphKYfZlkgwMQwV3AFsRHhqNgucyuXYP+M=; b=Rv9FlMANM76P5z7R2tcU51VrIYlazNU6BgNP0KptotVSm2KevrcMkxSGhKmtp5runr pFwDtwfeoZlustiuBe0nc9/7fhK+newcp8pD8TQvHXqkDZqpdCNFBmCSEL9oiZnlKRer 5raO4QcRsJjN5h9JuMYoELsBIxTK5rdtgMcEuxA82Oze/l3PX+mVXgnJAyzSBG3VRvTw qNOmcsW38anFvhnsGmlqQuQNt2X7fQhCm9EZvxMdIvL38OYBhCOrIyg4GNsDAY78H2mD tK/8KwGVXaUqMUHEDtdgRSht2cm6lIwrRU0r6kUPCUvqL1DGjssAOfzjmfxH83klJMFu fKCg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ctMH8PwA; 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:subject :date:message-id:reply-to; bh=+cNhu7e8hAphKYfZlkgwMQwV3AFsRHhqNgucyuXYP+M=; b=Tng+Q/9NVzFCFbvDb48uhnoZCu7LhzmBZsQb4RuyX+SxWElbcFxLB1pCFMETZPdand jur1o1eGGuUH9WprowKi7qZg4p9bTlX/BCmXOjcbjXDHbzk9Vnqd4vApZU63qq6RyP3c ClAfIIAA8/ou9oaGOm4AucCa3k0OwTTCVxi7w= 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 :subject:date:message-id:reply-to; bh=+cNhu7e8hAphKYfZlkgwMQwV3AFsRHhqNgucyuXYP+M=; b=qiMbrFER9bcGj7yo+v5PSqVWB5O6ANTTOts/pC51HisLps4CNHL5ufI90QXiopQLr0 QoJu5GxcgC7BPhLh0te2/NCNzugLd4fOpF1MPl20Nm4hk678dan1Kso+rbS7tzbA+Dfd 340r/iFXQmhfOaVejT/uAHpZktLqiK7NegOx6rmAs5W3kIgTSfpWKzS5SB8ukB6TLevl 6RiK+6MkDNQyEZlcJYWard8ngbCZqBX805UH5+4T9qRIkOk4kzBQDCIN2aNp+RnSh8z1 wCfJKzA7KYkV5VH/GdrxUhF24i3Bi0o06G52A/caY8BMaulNKqRDk/aqD8FwT92mE7vT mC4Q== X-Gm-Message-State: ACrzQf2mjSo2yNOlVOQg/DV1EItolfO7B9i2efv1fhZo1MiBysMNEM9l b7y0Mfekenr1kfCDnJc6hFYQGXsH X-Google-Smtp-Source: AMsMyM6TEHOE+rxYmU/+x1xCKQHttl4grphTK6BA5sLjMnniVIWK1Sn173OEMYkuMDDyIjoAaikaxw== X-Received: by 2002:a17:902:e48b:b0:187:16d8:4428 with SMTP id i11-20020a170902e48b00b0018716d84428mr61445386ple.127.1668105640603; Thu, 10 Nov 2022 10:40:40 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:1f48:b0:213:e:b27 with SMTP id y8-20020a17090a1f4800b00213000e0b27ls4164914pjy.0.-pod-canary-gmail; Thu, 10 Nov 2022 10:40:40 -0800 (PST) X-Received: by 2002:a17:903:2596:b0:186:a395:c4bd with SMTP id jb22-20020a170903259600b00186a395c4bdmr66981634plb.60.1668105639510; Thu, 10 Nov 2022 10:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668105639; cv=none; d=google.com; s=arc-20160816; b=DyKvWZZx9PHhMZ6R0YFfdGBJ1mBSlXCtVjhfwWiUMEM19Nlj5lL/PcQACmkw6K2nys /ezYDMEdFnSIQvuPqtTZuWFSZbrupmKCfLMK4+cVG9VDpRfsIqtd30BXw4b6KI0VIBb3 qnWg1LpPQQrZpOhcrzeAWQurn31Y3aLzkePgfc10sgBqxcndm0rXFYCDCoZhs+czcJL4 rKTK9PcNAeJYVSU0HcjBxgXLDdQSTe+et0ys3+fIWeWqMm5XT37OucCrP4oPFPnR2WBu 6o/oqbDDtp363MoW0CbcjxfqenP7dxkshphTg9a+ZaoPVSylR2a8rf8HhY4uGirmBlWk mO8g== 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=tmESCtVC27C9vnN0s5z1wOetiJMTONRB6nBBrY79QZo=; b=fOE99k4NDPoNm2FXDX2aHpPqIV1hJ5lS7MVd5sz6se8vfPdZp19z7xL3VcvzgQChyF JmwyZS5sjAbpqvSqURMG3GBx8/aBxurkpmjS+aJSi/8dc2XU/KTmyk4vdNmJ9JwVsgQx vO9+XR1AuiUBWIIbISqGkTbnTdXhiw4I09WbdxJ84JCJHnZCvVmnXIdh3K0csOz8Q1k2 gDpN6sUF9LPW/yorAWxVKJ+sSKmKwEtHdLq7bl6yW3qcci/rsiLG5QRc12nbv9JCUzRF bRVBSyaU5oIxTMcYgXlkV2pQARrna9mnaNaRplcX1jdfY+GSNDz+tF1ShLJjfmb7Nskf tajA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ctMH8PwA; 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 q15-20020a17090a304f00b00207d436adefsor2049073pjl.35.2022.11.10.10.40.39 for (Google Transport Security); Thu, 10 Nov 2022 10:40:39 -0800 (PST) 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:90b:374a:b0:212:8f7:acf with SMTP id ne10-20020a17090b374a00b0021208f70acfmr1645298pjb.13.1668105638440; Thu, 10 Nov 2022 10:40:38 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:b5a4:486a:f07:f67e]) by smtp.gmail.com with ESMTPSA id c2-20020a170903234200b001869efb722csm11635627plh.215.2022.11.10.10.40.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 10:40:37 -0800 (PST) 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 v8 03/14] drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge Date: Fri, 11 Nov 2022 00:08:42 +0530 Message-Id: <20221110183853.3678209-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221110183853.3678209-1-jagan@amarulasolutions.com> References: <20221110183853.3678209-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=ctMH8PwA; 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 by maintaining exynos platform glue code in exynos_drm_dsi.c driver and common bridge driver code in samsung-dsim.c providing that the new platform-specific glue should be supported in the bridge driver, unlike exynos platform drm drivers. - Add samsung_dsim_plat_data for keeping platform-specific attributes like host_ops, irq_ops, and hw_type. - Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c. - samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and samsung-dsim.c. - plat_data hooks like host_ops and irq_ops are invoked during the respective bridge call chains. v8: * update the commit message head v7: * fix the drm bridge attach chain for exynos drm dsi driver * fix the hw_type checking logic v6: * handle previous bridge pointer for exynos dsi v5: * [mszyprow] reworked driver initialization using the same approach as in drivers/gpu/drm/{exynos/exynos_dp.c, bridge/analogix/analogix_dp_core.c}, removed weak functions, moved exynos_dsi_driver back to exynos_drm_dsi.c and restored integration with exynos_drm custom initialization. * updated the commit message [Jagan] 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 | 1703 ++++++++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1766 ++--------------------- include/drm/bridge/samsung-dsim.h | 113 ++ 7 files changed, 1952 insertions(+), 1653 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 9ae989b32ebb..ba7a6721443c 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..b63e0479e71d --- /dev/null +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -0,0 +1,1703 @@ +// 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