| Message ID | 20221209152343.180139-5-jagan@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-amarula+bncBD7MFH7A7EEBB45GZWOAMGQEXJFXXNQ@amarulasolutions.com> 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 DA4103F039 for <linux-amarula@patchwork.amarulasolutions.com>; Fri, 9 Dec 2022 16:25:40 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id q63-20020a632a42000000b0045724b1dfb9sf3255551pgq.3 for <linux-amarula@patchwork.amarulasolutions.com>; Fri, 09 Dec 2022 07:25:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599539; cv=pass; d=google.com; s=arc-20160816; b=gRG6lJxxdAJrvfzwmxPy3VN/u9uPnWgJKECaoTIkOIuXl62HspGmD6ODX30MM5A7/L AjIdJc87/ZqnPjkyyiQYEnpH/H8tzqFkgGSPv7s0zbetPSuH07Pcd4Iiy00LPoGhdmrc 1xW5bdJFv6l6644ntOGoNzZUfVvUi+nv+WzuglUZx2J8rmG4BzVuB8EXb2w5SUPZKtDW DzcI664TvAMfAzX+ptkelrTJafZQOj3zvNuAPHCFFYKwKT0b1hxJqQClHskx/b6CFsRj ICoPbi+eaf4W4TKKFO1OF+Swn17usBVf5hXaCXT+v81LjtHtOkB7s33KbuHuI8CqobTd FHTg== 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=c6122xDSpTKOAk56I3qN5BNjdiU8R9MZVCSxSFSLsz0=; b=GbflCsp3VReIaIpMrJzg/86iW8NKhdJQFrX7vK2bn6luMsxYoqZw2tpGqD+CJGVx7G Zn9CKtft5DTq5Fw776ns5ynADJhtAZ0f0pQ3MZcjKLno6+M1pgEJmns6YqU6C23TRxJS a6TnuvgBLLaKeO3uD6GzVBb22t/6OrqSRizE3z780Czo5jmVUy8mNVPiK4ILQMgck+BH i5MUnAr7c8+UFLLb53Wn22X2+q4B2M19jLnbTr3uArVDn9N5pvPHhWbsWsoVgrDrU3OS PZCxgkmhB7Mb+OS/fwqDIbcjkHJn7ysTbRInptfws7DPtnO8WRQEmSkywekUm3ZUh1/X PGoQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BNqDuX9t; 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=c6122xDSpTKOAk56I3qN5BNjdiU8R9MZVCSxSFSLsz0=; b=ft0Mu2HWBBfBmIsXU2QvC1NZl0LgCd3iA4QWKlhFhPeY03DOLnMPpMfoHiV4bUyo/7 2fys1sA5re1SIsLXnmDNkaRaVyEP3LTiCc6qiwhHovU4u4OuUOvY1D9h1l94SqnUtk73 NjQEhusF1uBBQ9COYVfbgN0BEavXokFuAd8EA= 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=c6122xDSpTKOAk56I3qN5BNjdiU8R9MZVCSxSFSLsz0=; b=0Ii3jY2HNw08jGnG9CfIRq28YSRhxdZ2putjwMKj2JVntotLj4tdAGW8jMqw+l/JJj PbwTwhQ0qKgkmzwswBjgR94hOozrPqD6HDBd3W8fG8VRHuZIuKQyTUHIlc6M4Ts8MuXe I+kpj2cp/BiIpAgNoZ9rYm8PnCnyNlo8qko9Jg8qTT9nJMhd6ww10WCLD0Acrpi0LFNb 1TMxF3raG5xRps1lO6DAS2eNxQ78UNJDohoLWcUW4EHx58blS/ygQtDiWyqXvOwar7Ov IMi/Niv95OS464KfmtwLGfNP+U6HZLl31mKzfGd+aGK9K56+1uDoKUtgwoG0hsNR/PcZ M3sA== X-Gm-Message-State: ANoB5pnGCjfEcuuwyLJDA8WFeqr9AjkKCZj9qzlGj8BpRpm2YI6CHAD6 QHcS7tAZmqu8eJzhVoYUP9TykPBO X-Google-Smtp-Source: AA0mqf4HLc9mwjE8tn0IwTnsibp3p/dDYwSCwDrci9lyqFMDInDxSVaOzlKDpVCUvTPS7SbK4GlA6A== X-Received: by 2002:a17:90a:7896:b0:218:6fd6:b693 with SMTP id x22-20020a17090a789600b002186fd6b693mr9396522pjk.29.1670599539636; Fri, 09 Dec 2022 07:25:39 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8601:b0:189:b2b2:56d5 with SMTP id f1-20020a170902860100b00189b2b256d5ls8541939plo.0.-pod-prod-gmail; Fri, 09 Dec 2022 07:25:38 -0800 (PST) X-Received: by 2002:a05:6a21:3a86:b0:a7:9f6:b790 with SMTP id zv6-20020a056a213a8600b000a709f6b790mr8110708pzb.10.1670599538621; Fri, 09 Dec 2022 07:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599538; cv=none; d=google.com; s=arc-20160816; b=T/mOn5Ki1IIrVPirvMPkgmNG1eb4SR5sI85mU3VApjAz237gbt2fqUxYKCVytTRwv9 NoXlJq8tjoMpNzLUy0ZxSkhI3AMQ3F+yLoQr1C4G/lrvZVLAHI9dR7/QvdEIc0Tknyjd JdViMfUbCTibX5BLrl00ovo8sDbG8DostbRoKrSjuZhkwIH5n7opibP8Ow+FMX0gGgnF +9OOSKH3tNrzmC3sAzmLFBK9rIiluyM3teHhDX063WHbkCDPFw7IriAdPGZ//pnlBido FWyHM2rEtGqtQZnUchsNTd6D/hDXo9VFm+g5oxQOVi/2LWwlLoVIAa+KS0erPIktx6bt VmqA== 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=6CUJYu0PBu1wfIOC7kGOkRHJr7T1+ycl/j32CgnvDxw=; b=cJnszCvFCg+znl0yLL/nOo4PSn5f2JOpyaFZ9UmUc43fSp8Z+ft4SAr2tst7W4f7pv EDk6GRLjohMwYi7lXuJgrpclU/ltLMfIRMXzZGdtKuAFAsQLQzfs8x0IBnw2sE8rz+po aAdgx+sRclV9E/B5ARxGnv+0zNSVIAZLiixag9F4iblj7fWYWCI1nYzipu8qGM/xBV6w O1Pe7CeERSi2JGWvZXzvZl4YSQ6ntDUjYwEY5qgOHzNAI19J2nUdsCS6zDy62kRVz4o7 hE641CLQ15/RzVyfxKQe6P45MD3Rjonjf11Nj5F8LT3EBKTCzu5QzKyyfYt6o0pBZ5ww NUKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BNqDuX9t; 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 12-20020a170902ee4c00b00189680de09fsor1049490plo.183.2022.12.09.07.25.38 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Fri, 09 Dec 2022 07:25:38 -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:c745:b0:189:9519:87b6 with SMTP id q5-20020a170902c74500b00189951987b6mr5017053plq.5.1670599538323; Fri, 09 Dec 2022 07:25:38 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.25.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:25:37 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Andrzej Hajda <andrzej.hajda@intel.com>, Inki Dae <inki.dae@samsung.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Joonyoung Shim <jy0922.shim@samsung.com>, Seung-Woo Kim <sw0312.kim@samsung.com>, Kyungmin Park <kyungmin.park@samsung.com>, Frieder Schrempf <frieder.schrempf@kontron.de>, Fancy Fang <chen.fang@nxp.com>, Tim Harvey <tharvey@gateworks.com>, Michael Nazzareno Trimarchi <michael@amarulasolutions.com>, Adam Ford <aford173@gmail.com>, Neil Armstrong <narmstrong@linaro.org>, Robert Foss <robert.foss@linaro.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Tommaso Merciai <tommaso.merciai@amarulasolutions.com>, Marek Vasut <marex@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com>, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team <linux-imx@nxp.com>, linux-amarula <linux-amarula@amarulasolutions.com>, Jagan Teki <jagan@amarulasolutions.com>, Nicolas Boichat <drinkcat@chromium.org>, =?utf-8?q?S=C3=A9bastien_Szy?= =?utf-8?q?manski?= <sebastien.szymanski@armadeus.com> Subject: [PATCH v9 04/18] drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags Date: Fri, 9 Dec 2022 20:53:29 +0530 Message-Id: <20221209152343.180139-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BNqDuX9t; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
drm: bridge: Add Samsung MIPI DSIM bridge
|
|
Commit Message
Jagan Teki
Dec. 9, 2022, 3:23 p.m. UTC
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")
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v9:
- none
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On 12/9/22 16:23, Jagan Teki wrote: > 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") > Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> > Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Marek Vasut <marex@denx.de>
Hi Jagan, On 09.12.2022 16:23, Jagan Teki wrote: > 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") > Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> > Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > Changes for v9: > - none > > 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 e5b1540c4ae4..50a2a9ca88a9 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) { Huh, this changes the logic in the driver! I've spent another half of the night trying to figure out why v8 and v9 doesn't work on all my Exynos boards with DSI panels again... Please drop this patch from this series. If you want to get the Exynos DSI -> Samsung DSIM conversion merged, please focus on the core patches and don't add more random 'fixes' to each new version. This change has to be discussed separately. The values written by the Exynos DSI driver to the registers ARE CORRECT and DSI panels work fine with such configuration. So either everything is correct, or these flags are reversed both in the Exynos DSI driver AND at least tested DSI panels (s6e8aa0, s6e3ha2, s6e63j0x03). I would need to check this in panel datasheets if I manage to get them. Best regards
On Mon, Dec 12, 2022 at 2:28 PM Marek Szyprowski <m.szyprowski@samsung.com> wrote: > > Hi Jagan, > > On 09.12.2022 16:23, Jagan Teki wrote: > > 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") > > Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> > > Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > > --- > > Changes for v9: > > - none > > > > 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 e5b1540c4ae4..50a2a9ca88a9 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) { > > > Huh, this changes the logic in the driver! I've spent another half of > the night trying to figure out why v8 and v9 doesn't work on all my > Exynos boards with DSI panels again... > > Please drop this patch from this series. If you want to get the Exynos > DSI -> Samsung DSIM conversion merged, please focus on the core patches > and don't add more random 'fixes' to each new version. > > This change has to be discussed separately. The values written by the > Exynos DSI driver to the registers ARE CORRECT and DSI panels work fine > with such configuration. So either everything is correct, or these flags > are reversed both in the Exynos DSI driver AND at least tested DSI > panels (s6e8aa0, s6e3ha2, s6e63j0x03). I would need to check this in > panel datasheets if I manage to get them. This issue was reproduced as part of the series in v7 in i.MX8m platform and reported by Sébastien Szymanski [1] and TRM matches the fix as well. [1] https://lore.kernel.org/all/4c9475d0-f76f-0c59-1208-6e5395496c9e@armadeus.com/ Jagan.
On 12.12.2022 10:03, Jagan Teki wrote: > On Mon, Dec 12, 2022 at 2:28 PM Marek Szyprowski > <m.szyprowski@samsung.com> wrote: >> Hi Jagan, >> >> On 09.12.2022 16:23, Jagan Teki wrote: >>> 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") >>> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> >>> Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> >>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> >>> --- >>> Changes for v9: >>> - none >>> >>> 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 e5b1540c4ae4..50a2a9ca88a9 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) { >> >> Huh, this changes the logic in the driver! I've spent another half of >> the night trying to figure out why v8 and v9 doesn't work on all my >> Exynos boards with DSI panels again... >> >> Please drop this patch from this series. If you want to get the Exynos >> DSI -> Samsung DSIM conversion merged, please focus on the core patches >> and don't add more random 'fixes' to each new version. >> >> This change has to be discussed separately. The values written by the >> Exynos DSI driver to the registers ARE CORRECT and DSI panels work fine >> with such configuration. So either everything is correct, or these flags >> are reversed both in the Exynos DSI driver AND at least tested DSI >> panels (s6e8aa0, s6e3ha2, s6e63j0x03). I would need to check this in >> panel datasheets if I manage to get them. > This issue was reproduced as part of the series in v7 in i.MX8m > platform and reported by Sébastien Szymanski [1] and TRM matches the > fix as well. > > [1] https://lore.kernel.org/all/4c9475d0-f76f-0c59-1208-6e5395496c9e@armadeus.com/ Then please append the following changes to this patch to keep current code working: diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c index 1355b2c27932..2a33602372d9 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -692,7 +692,9 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) dsi->lanes = 4; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS; + dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS + | MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP + | MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET; ctx->supplies[0].supply = "vdd3"; ctx->supplies[1].supply = "vci"; diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index 3223a9d06a50..bb47dbfdd7ee 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -446,7 +446,8 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) dsi->lanes = 1; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET; + dsi->mode_flags = MIPI_DSI_MODE_VIDEO_NO_HFP + | MIPI_DSI_MODE_VIDEO_NO_HBP | MIPI_DSI_MODE_VIDEO_NO_HSA; ctx->supplies[0].supply = "vdd3"; ctx->supplies[1].supply = "vci"; diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c index 362eb10f10ce..c51d07ec1529 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -990,8 +990,6 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) dsi->lanes = 4; dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST - | MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP - | MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_AUTO_VERT; ret = s6e8aa0_parse_dt(ctx); Best regards
On Mon, Dec 12, 2022 at 7:51 PM Marek Szyprowski <m.szyprowski@samsung.com> wrote: > > On 12.12.2022 10:03, Jagan Teki wrote: > > On Mon, Dec 12, 2022 at 2:28 PM Marek Szyprowski > > <m.szyprowski@samsung.com> wrote: > >> Hi Jagan, > >> > >> On 09.12.2022 16:23, Jagan Teki wrote: > >>> 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") > >>> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> > >>> Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> > >>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > >>> --- > >>> Changes for v9: > >>> - none > >>> > >>> 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 e5b1540c4ae4..50a2a9ca88a9 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) { > >> > >> Huh, this changes the logic in the driver! I've spent another half of > >> the night trying to figure out why v8 and v9 doesn't work on all my > >> Exynos boards with DSI panels again... > >> > >> Please drop this patch from this series. If you want to get the Exynos > >> DSI -> Samsung DSIM conversion merged, please focus on the core patches > >> and don't add more random 'fixes' to each new version. > >> > >> This change has to be discussed separately. The values written by the > >> Exynos DSI driver to the registers ARE CORRECT and DSI panels work fine > >> with such configuration. So either everything is correct, or these flags > >> are reversed both in the Exynos DSI driver AND at least tested DSI > >> panels (s6e8aa0, s6e3ha2, s6e63j0x03). I would need to check this in > >> panel datasheets if I manage to get them. > > This issue was reproduced as part of the series in v7 in i.MX8m > > platform and reported by Sébastien Szymanski [1] and TRM matches the > > fix as well. > > > > [1] https://lore.kernel.org/all/4c9475d0-f76f-0c59-1208-6e5395496c9e@armadeus.com/ > > Then please append the following changes to this patch to keep current > code working: > > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c > b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c > index 1355b2c27932..2a33602372d9 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c > @@ -692,7 +692,9 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) > > dsi->lanes = 4; > dsi->format = MIPI_DSI_FMT_RGB888; > - dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS; > + dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS > + | MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP > + | MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET; > > ctx->supplies[0].supply = "vdd3"; > ctx->supplies[1].supply = "vci"; > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c > b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c > index 3223a9d06a50..bb47dbfdd7ee 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c > @@ -446,7 +446,8 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) > > dsi->lanes = 1; > dsi->format = MIPI_DSI_FMT_RGB888; > - dsi->mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET; > + dsi->mode_flags = MIPI_DSI_MODE_VIDEO_NO_HFP > + | MIPI_DSI_MODE_VIDEO_NO_HBP | MIPI_DSI_MODE_VIDEO_NO_HSA; > > ctx->supplies[0].supply = "vdd3"; > ctx->supplies[1].supply = "vci"; > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c > b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c > index 362eb10f10ce..c51d07ec1529 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c > @@ -990,8 +990,6 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) > dsi->lanes = 4; > dsi->format = MIPI_DSI_FMT_RGB888; > dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST > - | MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP > - | MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET > | MIPI_DSI_MODE_VSYNC_FLUSH | > MIPI_DSI_MODE_VIDEO_AUTO_VERT; Okay. I think I can send the first 5 patches separately. and then send the DSIM. Do you think it makes sense? and any chance to apply these soon? Jagan.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index e5b1540c4ae4..50a2a9ca88a9 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) {