[PATCH v4 00/12] drm/bridge: tc358768: Fixes and timings improvements

2023-09-06 Thread Tomi Valkeinen
e DSI HSW, HFP and VSDly calculations. Tomi Signed-off-by: Tomi Valkeinen --- Changes in v4: - Add Tested-by tags - Fix a typo in a comment - Link to v3: https://lore.kernel.org/r/20230822-tc358768-v3-0-c82405dac...@ideasonboard.com Changes in v3: - Add Peter's reviewed-bys - Move "Default t

Re: [PATCH v3 12/12] drm/bridge: tc358768: Attempt to fix DSI horizontal timings

2023-09-05 Thread Tomi Valkeinen
On 04/09/2023 21:46, Marcel Ziswiler wrote: Hi Tomi Looks good. Thanks! Tested both on Verdin AM62 as well as on Verdin iMX8M Mini. Just a minor nit-pick in your code comment further below. On Tue, 2023-08-22 at 19:19 +0300, Tomi Valkeinen wrote: The DSI horizontal timing calculations done

Re: [PATCH 3/4] drm/bridge: lt8912b: Manually disable HPD only if it was enabled

2023-09-05 Thread Tomi Valkeinen
On 04/09/2023 21:08, Marcel Ziswiler wrote: Hi Tomi Looks good. Thanks! Tested both on Verdin AM62 as well as on Verdin iMX8M Mini. Just a minor nit-pick in your commit message. On Fri, 2023-08-04 at 13:48 +0300, Tomi Valkeinen wrote: lt8912b only calls drm_bridge_hpd_enable() if it creates

Re: [PATCH v3 00/12] drm/bridge: tc358768: Fixes and timings improvements

2023-08-29 Thread Tomi Valkeinen
Hi Maxim, On 22/08/2023 19:19, Tomi Valkeinen wrote: This series contains various fixes and cleanups for TC358768. The target of this work is to get TC358768 working on Toradex's AM62 based board, which has the following display pipeline: AM62 DPI -> TC358768 -> LT8912B -> HDMI

[PATCH v3 09/12] drm/bridge: tc358768: Rename dsibclk to hsbyteclk

2023-08-22 Thread Tomi Valkeinen
with the documentation, change the 'dsibclk' variable to 'hsbyteclk'. This also make it easier to visually separate 'dsibclk' and 'dsiclk' variables. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 48 +++ 1 file changed

[PATCH v3 07/12] drm/bridge: tc358768: Print logical values, not raw register values

2023-08-22 Thread Tomi Valkeinen
in a more human consumable form. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc3587

[PATCH v3 06/12] drm/bridge: tc358768: Use struct videomode

2023-08-22 Thread Tomi Valkeinen
uses. This makes it much easier to work on the code when using the TC358768 documentation as a reference. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 45 +-- 1 file changed, 24 insertions(+), 21 deletions

[PATCH v3 11/12] drm/bridge: tc358768: Fix tc358768_ns_to_cnt()

2023-08-22 Thread Tomi Valkeinen
The tc358768_ns_to_cnt() is, most likely, supposed to do a div-round-up operation, but it misses subtracting one from the dividend. Fix this by just using DIV_ROUND_UP(). Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi

[PATCH v3 08/12] drm/bridge: tc358768: Use dev for dbg prints, not priv->dev

2023-08-22 Thread Tomi Valkeinen
Simplify the code by capturing the priv->dev value to dev variable, and use it. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 41 --- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/driv

[PATCH v3 10/12] drm/bridge: tc358768: Clean up clock period code

2023-08-22 Thread Tomi Valkeinen
is up by just saying the periods are in picoseconds. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 60 +++ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/dr

[PATCH v3 12/12] drm/bridge: tc358768: Attempt to fix DSI horizontal timings

2023-08-22 Thread Tomi Valkeinen
ion. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 211 +- 1 file changed, 183 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index f41bf56b7

[PATCH v3 01/12] drm/tegra: rgb: Parameterize V- and H-sync polarities

2023-08-22 Thread Tomi Valkeinen
] Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tegra/rgb.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index 79566c9ea8ff..fc66bbd913b2 100644 --- a/drivers/gpu/drm

[PATCH v3 05/12] drm/bridge: tc358768: Cleanup PLL calculations

2023-08-22 Thread Tomi Valkeinen
, as it simplifies the PLL code. Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index

[PATCH v3 03/12] drm/bridge: tc358768: Default to positive h/v syncs

2023-08-22 Thread Tomi Valkeinen
Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index bc97a837955b..963ac550509b 100644 --- a/drivers/gpu/drm/bridge/tc358768.c

[PATCH v3 04/12] drm/bridge: tc358768: Fix bit updates

2023-08-22 Thread Tomi Valkeinen
: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Reviewed-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc3587

[PATCH v3 02/12] drm/bridge: tc358768: Fix use of uninitialized variable

2023-08-22 Thread Tomi Valkeinen
r Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index 819a4b6ec2a0..bc97a837955b 100644 --- a/drivers/gpu/drm/bridge/tc358768.c +++ b/drive

[PATCH v3 00/12] drm/bridge: tc358768: Fixes and timings improvements

2023-08-22 Thread Tomi Valkeinen
e DSI HSW, HFP and VSDly calculations. Tomi Signed-off-by: Tomi Valkeinen --- Changes in v3: - Add Peter's reviewed-bys - Move "Default to positive h/v syncs" earlier in the series to avoid regression in the middle of the series - Link to v2: https://lore.kernel.org/r/20230816-tc35

Re: [PATCH v2 03/12] drm/bridge: tc358768: Fix bit updates

2023-08-22 Thread Tomi Valkeinen
On 22/08/2023 01:22, Maxim Schwalm wrote: Hi Tomi, On 16.08.23 13:25, Tomi Valkeinen wrote: The driver has a few places where it does: if (thing_is_enabled_in_config) update_thing_bit_in_hw() This means that if the thing is _not_ enabled, the bit never gets cleared. This affects

Re: [PATCH v2 00/12] drm/bridge: tc358768: Fixes and timings improvements

2023-08-16 Thread Tomi Valkeinen
On 16/08/2023 14:25, Tomi Valkeinen wrote: This series contains various fixes and cleanups for TC358768. The target of this work is to get TC358768 working on Toradex's AM62 based board, which has the following display pipeline: AM62 DPI -> TC358768 -> LT8912B -> HDMI connector The m

[PATCH v2 10/12] drm/bridge: tc358768: Fix tc358768_ns_to_cnt()

2023-08-16 Thread Tomi Valkeinen
The tc358768_ns_to_cnt() is, most likely, supposed to do a div-round-up operation, but it misses subtracting one from the dividend. Fix this by just using DIV_ROUND_UP(). Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/

[PATCH v2 09/12] drm/bridge: tc358768: Clean up clock period code

2023-08-16 Thread Tomi Valkeinen
is up by just saying the periods are in picoseconds. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 60 +++ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.

[PATCH v2 12/12] drm/bridge: tc358768: Default to positive h/v syncs

2023-08-16 Thread Tomi Valkeinen
As the TC358768 is a DPI to DSI bridge, the DSI side does not need to define h/v sync polarities. This means that sometimes we have a mode without defined sync polarities, which does not work on the DPI side. Add a mode_fixup hook to default to positive sync polarities. Signed-off-by: Tomi

[PATCH v2 11/12] drm/bridge: tc358768: Attempt to fix DSI horizontal timings

2023-08-16 Thread Tomi Valkeinen
ion. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 211 +- 1 file changed, 183 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index dc2241c18dde..ea19de5509ed 100

[PATCH v2 05/12] drm/bridge: tc358768: Use struct videomode

2023-08-16 Thread Tomi Valkeinen
uses. This makes it much easier to work on the code when using the TC358768 documentation as a reference. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 45 +-- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/gpu

[PATCH v2 08/12] drm/bridge: tc358768: Rename dsibclk to hsbyteclk

2023-08-16 Thread Tomi Valkeinen
with the documentation, change the 'dsibclk' variable to 'hsbyteclk'. This also make it easier to visually separate 'dsibclk' and 'dsiclk' variables. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 48 +++ 1 file changed, 24 insertions(+), 24

[PATCH v2 04/12] drm/bridge: tc358768: Cleanup PLL calculations

2023-08-16 Thread Tomi Valkeinen
, as it simplifies the PLL code. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index b668f77673c3..d5831a1236e9 100644

[PATCH v2 06/12] drm/bridge: tc358768: Print logical values, not raw register values

2023-08-16 Thread Tomi Valkeinen
in a more human consumable form. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index 9b633038af33..0ef51d04b

[PATCH v2 07/12] drm/bridge: tc358768: Use dev for dbg prints, not priv->dev

2023-08-16 Thread Tomi Valkeinen
Simplify the code by capturing the priv->dev value to dev variable, and use it. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 41 --- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c

[PATCH v2 03/12] drm/bridge: tc358768: Fix bit updates

2023-08-16 Thread Tomi Valkeinen
: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index bc97a837955b..b6

[PATCH v2 02/12] drm/bridge: tc358768: Fix use of uninitialized variable

2023-08-16 Thread Tomi Valkeinen
smatch reports: drivers/gpu/drm/bridge/tc358768.c:223 tc358768_update_bits() error: uninitialized symbol 'orig'. Fix this by bailing out from tc358768_update_bits() if the tc358768_read() produces an error. Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Tomi

[PATCH v2 01/12] drm/tegra: rgb: Parameterize V- and H-sync polarities

2023-08-16 Thread Tomi Valkeinen
] Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tegra/rgb.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index 79566c9ea8ff..fc66bbd913b2 100644 --- a/drivers/gpu/drm/tegra/rgb.c +++ b/drivers/gpu

[PATCH v2 00/12] drm/bridge: tc358768: Fixes and timings improvements

2023-08-16 Thread Tomi Valkeinen
e DSI HSW, HFP and VSDly calculations. Tomi Signed-off-by: Tomi Valkeinen --- Changes in v2: - Add "drm/tegra: rgb: Parameterize V- and H-sync polarities" so that Tegra can configure the polarities correctly. - Add "drm/bridge: tc358768: Default to positive h/v syncs" as

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-16 Thread Tomi Valkeinen
On 15/08/2023 20:21, Maxim Schwalm wrote: On 14.08.23 08:34, Tomi Valkeinen wrote: On 13/08/2023 03:23, Maxim Schwalm wrote: Hi, On 11.08.23 19:02, Tomi Valkeinen wrote: On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver has a few places

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-16 Thread Tomi Valkeinen
On 15/08/2023 20:21, Maxim Schwalm wrote: On 14.08.23 08:34, Tomi Valkeinen wrote: On 13/08/2023 03:23, Maxim Schwalm wrote: Hi, On 11.08.23 19:02, Tomi Valkeinen wrote: On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver has a few places

Re: [PATCH 11/11] drm/bridge: tc358768: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support

2023-08-14 Thread Tomi Valkeinen
Hi Sam, On 14/08/2023 13:10, Sam Ravnborg wrote: Hi Tomi, From c13c691bd8826b978325575be9a87f577b83b86b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 14 Aug 2023 13:02:23 +0300 Subject: [PATCH] drm/bridge: tc358768: fix 'Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support' Signed-off

Re: [PATCH 11/11] drm/bridge: tc358768: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support

2023-08-14 Thread Tomi Valkeinen
On 13/08/2023 20:11, Maxim Schwalm wrote: On 04.08.23 12:44, Tomi Valkeinen wrote: Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 64 +++ 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/bridge

Re: [PATCH 11/11] drm/bridge: tc358768: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support

2023-08-14 Thread Tomi Valkeinen
On 13/08/2023 20:11, Maxim Schwalm wrote: On 04.08.23 12:44, Tomi Valkeinen wrote: Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 64 +++ 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/bridge

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-14 Thread Tomi Valkeinen
On 13/08/2023 03:23, Maxim Schwalm wrote: Hi, On 11.08.23 19:02, Tomi Valkeinen wrote: On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver has a few places where it does: if (thing_is_enabled_in_config) update_thing_bit_in_hw

Re: [PATCH 05/11] drm/bridge: tc358768: Print logical values, not raw register values

2023-08-11 Thread Tomi Valkeinen
On 11/08/2023 19:31, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver debug prints DSI related timings as raw register values in hex. It is much more useful to see the "logical" value of the timing, not the register value. I'm a bit confused by the ter

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-11 Thread Tomi Valkeinen
On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver has a few places where it does: if (thing_is_enabled_in_config) update_thing_bit_in_hw() This means that if the thing is _not_ enabled, the bit never gets cleared. This affects the h

Re: [PATCH 11/11] drm/bridge: tc358768: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support

2023-08-11 Thread Tomi Valkeinen
On 11/08/2023 19:44, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: I would rather have a commit message than a blank one. Oops... Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 64 +++ 1 file changed, 45

[PATCH 2/2] drm/framebuffer: Fix use of uninitialized variable

2023-08-04 Thread Tomi Valkeinen
' to 0. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index aff3746dedfb..1955eaeba0ab 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b

[PATCH 1/2] drm/drm_file: fix use of uninitialized variable

2023-08-04 Thread Tomi Valkeinen
think it is good to initialize 'supported_status' to 0 to silence the warning (and possibly fix a bug). Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index

[PATCH 0/2] drm: Fix errors about uninitialized variables

2023-08-04 Thread Tomi Valkeinen
Fix two cases where smatch reports a use of an uninitialized variable. Tomi Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (2): drm/drm_file: fix use of uninitialized variable drm/framebuffer: Fix use of uninitialized variable drivers/gpu/drm/drm_file.c| 2 +- drivers

[PATCH 3/4] drm/bridge: lt8912b: Manually disable HPD only if it was enabled

2023-08-04 Thread Tomi Valkeinen
causing by this wrong call, though. Add the check to avoid wrongly calling drm_bridge_hpd_disable(). Fixes: 3b0a01a6a522 ("drm/bridge: lt8912b: Add hot plug detection") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 2/4] drm/bridge: lt8912b: Fix crash on bridge detach

2023-08-04 Thread Tomi Valkeinen
ridge") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c index 0e581f6e3c88..2d752e083433 100644 --- a/drivers/gpu/drm/bridge/lontium

[PATCH 4/4] drm/bridge: lt8912b: Add missing drm_bridge_attach call

2023-08-04 Thread Tomi Valkeinen
HDMI bridge") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c index 9ee639e75a1c..03532efb893b 100644 --- a/drivers/gpu/

[PATCH 1/4] drm/bridge: lt8912b: Fix bridge_detach

2023-08-04 Thread Tomi Valkeinen
Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c index 4eaea67fb71c..0e581f6e3c88 100644 --- a/drive

[PATCH 0/4] drm/bridge: lt8912b: Init & remove related fixes

2023-08-04 Thread Tomi Valkeinen
Fix various issues in lt8912b driver. Tomi Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (4): drm/bridge: lt8912b: Fix bridge_detach drm/bridge: lt8912b: Fix crash on bridge detach drm/bridge: lt8912b: Manually disable HPD only if it was enabled drm/bridge: lt8912b

[PATCH 10/11] drm/bridge: tc358768: Attempt to fix DSI horizontal timings

2023-08-04 Thread Tomi Valkeinen
ion. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 211 +- 1 file changed, 183 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index dc2241c18dde..ea19de5509ed 100

[PATCH 04/11] drm/bridge: tc358768: Use struct videomode

2023-08-04 Thread Tomi Valkeinen
uses. This makes it much easier to work on the code when using the TC358768 documentation as a reference. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 45 +-- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/gpu

[PATCH 08/11] drm/bridge: tc358768: Clean up clock period code

2023-08-04 Thread Tomi Valkeinen
is up by just saying the periods are in picoseconds. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 60 +++ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.

[PATCH 09/11] drm/bridge: tc358768: Fix tc358768_ns_to_cnt()

2023-08-04 Thread Tomi Valkeinen
The tc358768_ns_to_cnt() is, most likely, supposed to do a div-round-up operation, but it misses subtracting one from the dividend. Fix this by just using DIV_ROUND_UP(). Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/

[PATCH 11/11] drm/bridge: tc358768: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support

2023-08-04 Thread Tomi Valkeinen
Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 64 +++ 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index ea19de5509ed..a567f136ddc7 100644

[PATCH 05/11] drm/bridge: tc358768: Print logical values, not raw register values

2023-08-04 Thread Tomi Valkeinen
in a more human consumable form. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index 9b633038af33..0ef51d04b

[PATCH 07/11] drm/bridge: tc358768: Rename dsibclk to hsbyteclk

2023-08-04 Thread Tomi Valkeinen
with the documentation, change the 'dsibclk' variable to 'hsbyteclk'. This also make it easier to visually separate 'dsibclk' and 'dsiclk' variables. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 48 +++ 1 file changed, 24 insertions(+), 24

[PATCH 06/11] drm/bridge: tc358768: Use dev for dbg prints, not priv->dev

2023-08-04 Thread Tomi Valkeinen
Simplify the code by capturing the priv->dev value to dev variable, and use it. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 41 --- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c

[PATCH 03/11] drm/bridge: tc358768: Cleanup PLL calculations

2023-08-04 Thread Tomi Valkeinen
, as it simplifies the PLL code. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index b668f77673c3..d5831a1236e9 100644

[PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-04 Thread Tomi Valkeinen
: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index bc97a837955b..b6

[PATCH 01/11] drm/bridge: tc358768: Fix use of uninitialized variable

2023-08-04 Thread Tomi Valkeinen
smatch reports: drivers/gpu/drm/bridge/tc358768.c:223 tc358768_update_bits() error: uninitialized symbol 'orig'. Fix this by bailing out from tc358768_update_bits() if the tc358768_read() produces an error. Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Tomi

[PATCH 00/11] drm/bridge: tc358768: Fixes and timings improvements

2023-08-04 Thread Tomi Valkeinen
HSW, HFP and VSDly calculations - Adds DRM_BRIDGE_ATTACH_NO_CONNECTOR support Tomi Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (11): drm/bridge: tc358768: Fix use of uninitialized variable drm/bridge: tc358768: Fix bit updates drm/bridge: tc358768: Cleanup PLL cal

[PATCH v4] drm/bridge: Add debugfs print for bridge chains

2023-08-02 Thread Tomi Valkeinen
t i2c_adapter; @@ -949,4 +950,6 @@ static inline struct drm_bridge *drmm_of_get_bridge(struct drm_device *drm, } #endif +void drm_bridge_debugfs_init(struct drm_minor *minor); + #endif --- base-commit: a0c64d153d687756c8719b8d10e609d62e1cb6fd change-id: 20230721-drm-bridge-chain-debugfs-0bbc1522f57a Best regards, -- Tomi Valkeinen

[PATCH v3] drm/bridge: Add debugfs print for bridge chains

2023-07-31 Thread Tomi Valkeinen
: 0x0, OF: /bus@f/i2c@2000/dsi@e:toshiba,tc358778 bridge[2] type: 0, ops: 0x3, OF: /bus@f/i2c@2001/hdmi@48:lontium,lt8912b bridge[3] type: 11, ops: 0x7, OF: /hdmi-connector:hdmi-connector Signed-off-by: Tomi Valkeinen --- Changes in v3: - Use

Re: [PATCH v2] drm/bridge: Add debugfs print for bridge chains

2023-07-31 Thread Tomi Valkeinen
On 25/07/2023 14:37, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Fri, Jul 21, 2023 at 06:01:39PM +0300, Tomi Valkeinen wrote: DRM bridges are not visible to the userspace and it may not be immediately clear if the chain is somehow constructed incorrectly. I have had two

[PATCH v2] drm/bridge: Add debugfs print for bridge chains

2023-07-21 Thread Tomi Valkeinen
: 0x0, OF: /bus@f/i2c@2000/dsi@e:toshiba,tc358778 bridge[2] type: 0, ops: 0x3, OF: /bus@f/i2c@2001/hdmi@48:lontium,lt8912b bridge[3] type: 11, ops: 0x7, OF: /hdmi-connector:hdmi-connector Signed-off-by: Tomi Valkeinen --- Changes in v2: - Fixed compilation issue

[PATCH] drm/bridge: Add debugfs print for bridge chains

2023-07-21 Thread Tomi Valkeinen
: 0x0, OF: /bus@f/i2c@2000/dsi@e:toshiba,tc358778 bridge[2] type: 0, ops: 0x3, OF: /bus@f/i2c@2001/hdmi@48:lontium,lt8912b bridge[3] type: 11, ops: 0x7, OF: /hdmi-connector:hdmi-connector Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_bridge.c | 48

Re: [PATCH v9 0/2] Add DSS support for AM625 SoC

2023-06-19 Thread Tomi Valkeinen
On 16/06/2023 18:08, Aradhya Bhatia wrote: This patch series adds a new compatible for the Display SubSystem (DSS) controller on TI's AM625 SoC. It further adds the required support for the same in the tidss driver. The AM625-DSS is a newer version of the DSS from the AM65X version with the

[PATCH] MAINTAINERS: Update info for TI display drivers

2023-06-19 Thread Tomi Valkeinen
Add drm-misc as the git tree for tilcdc and omapdrm. Change Tomi's email to point to ideasonboard.com instead of kernel.org. Signed-off-by: Tomi Valkeinen --- MAINTAINERS | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index aa0aa6c31772

Re: [PATCH v8 1/2] dt-bindings: display: ti, am65x-dss: Add am625 dss compatible

2023-06-16 Thread Tomi Valkeinen
the required OLDI clock output. The second video port is same from AM65x DSS and it outputs DPI video data. It can support 2K resolutions @ 60fps, independently. Add the new controller's compatible and update descriptions. Signed-off-by: Aradhya Bhatia Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH v8 2/2] drm/tidss: Add support for AM625 DSS

2023-06-16 Thread Tomi Valkeinen
ock output. I think it should be explained that OLDI is not supported in this version, but will be added later. Other than that: Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 00/53] drm: Convert to platform remove callback returning void

2023-06-09 Thread Tomi Valkeinen
On 08/06/2023 19:26, Laurent Pinchart wrote: Hi Doug, On Thu, Jun 08, 2023 at 09:08:15AM -0700, Doug Anderson wrote: On Thu, Jun 1, 2023 at 8:40 AM Uwe Kleine-König wrote: On Sun, May 07, 2023 at 06:25:23PM +0200, Uwe Kleine-König wrote: this patch series adapts the platform drivers below

Re: [PATCH v7 0/8] drm/tidss: Use new connector model for tidss

2023-06-08 Thread Tomi Valkeinen
ss. Would it be possible for you to pick all the patches together once Tomi acks the tidss patch? Sure I think this looks fine. For the series: Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH] drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask

2023-06-07 Thread Tomi Valkeinen
BIT)); + ret = dma_set_mask(dpsub->dev, DMA_BIT_MASK(ZYNQMP_DISP_MAX_DMA_BIT)); + if (ret) + return ret; This seems reasonable. Reviewed-by: Laurent Pinchart Tomi, would you be able to quickly test this ? Works for me. Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH v5 08/13] drm/omapdrm: Use regular fbdev I/O helpers

2023-05-31 Thread Tomi Valkeinen
eventually remove DRM's wrapper functions entirely. v4: * use initializer macros for struct fb_ops v2: * use FB_SYS_HELPERS option Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm

Re: [PATCH v6 3/8] drm/bridge: mhdp8546: Add minimal format negotiation

2023-05-29 Thread Tomi Valkeinen
On 29/05/2023 08:37, Aradhya Bhatia wrote: Btw, we seem to be missing get-output-fmt from the mdhp driver. Yes, we are. With the drm_bridge_attach call added, the display-connector bridge will assign MEDIA_BUS_FMT_FIXED as the default output format. And most bridges support only their primary

Re: [PATCH v6 3/8] drm/bridge: mhdp8546: Add minimal format negotiation

2023-05-26 Thread Tomi Valkeinen
On 16/05/2023 17:25, Aradhya Bhatia wrote: Hi Neil, Thank you for reviewing the patch. On 16-May-23 12:51, Neil Armstrong wrote: On 15/05/2023 17:59, Aradhya Bhatia wrote: Hi Tomi, On 12-May-23 14:45, Tomi Valkeinen wrote: On 09/05/2023 12:30, Aradhya Bhatia wrote: From: Nikhil Devshatwar

Re: [PATCH v6 0/8] drm/tidss: Use new connector model for tidss

2023-05-12 Thread Tomi Valkeinen
On 09/05/2023 12:30, Aradhya Bhatia wrote: Hi all, I have picked up this long standing series from Nikhil Devshatwar[1]. This series moves the tidss to using new connectoe model, where the SoC driver (tidss) creates the connector and all the bridges are attached with the flag

Re: [PATCH v6 3/8] drm/bridge: mhdp8546: Add minimal format negotiation

2023-05-12 Thread Tomi Valkeinen
negotiation can be added based on EDID data. This patch adds the minimal required support to avoid failure after moving to new connector model. Signed-off-by: Nikhil Devshatwar Reviewed-by: Tomi Valkeinen You need to add your SoB to this and the other patches. --- Notes: changes from

Re: [PATCH 46/53] drm/tidss: Convert to platform remove callback returning void

2023-05-09 Thread Tomi Valkeinen
. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/tidss/tidss_drv.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Tomi Valkeinen Tomi diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index 2dac8727d2f4..13177d58c8f9 100644

Re: [PATCH v2 2/2] drm: bridge: cdns-mhdp8546: Add support for no-hpd

2023-04-17 Thread Tomi Valkeinen
On 14/04/2023 18:10, Jayesh Choudhary wrote: On 06/04/23 07:22, Laurent Pinchart wrote: Hi Jayesh, Thank you for the patch. On Wed, Apr 05, 2023 at 07:54:40PM +0530, Jayesh Choudhary wrote: From: Rahul T R In J721S2 EVMs DP0 hpd is not connected to correct hpd pin on SOC, to handle such

Re: [PATCH v2 0/2] "no-hpd" support in CDNS DP bridge driver

2023-04-17 Thread Tomi Valkeinen
On 05/04/2023 17:24, Jayesh Choudhary wrote: In J721s2 EVM, DP0 HPD is not connected to correct HPD pin on SOC which results in HPD detect as always connnected, so when display is not connected driver continuously retries to read EDID and DPCD registers. Where is the DP0 HPD connected to?

Re: [PATCH] drm/omap: dsi: Fix deferred probe warnings

2023-04-12 Thread Tomi Valkeinen
On 12/04/2023 11:50, Laurent Pinchart wrote: Hi Tony, Thank you for the patch. On Wed, Apr 12, 2023 at 10:39:53AM +0300, Tony Lindgren wrote: We may not have dsi->dsidev initialized during probe, and that can lead into various dsi related warnings as omap_dsi_host_detach() gets called with

Re: [PATCH v2 0/5] drm/omapdrm: Convert fbdev to DRM client

2023-04-06 Thread Tomi Valkeinen
Hi Thomas, On 03/04/2023 13:40, Thomas Zimmermann wrote: Convert omapdrm's fbdev code to struct drm_client. Replaces the current ad-hoc integration. The conversion includes a number of cleanups. As with most other drivers' fbdev emulation, fbdev in omapdrm is now just another DRM client that

Re: [PATCH 6/6] drm/omapdrm: Implement fbdev emulation as in-kernel client

2023-04-03 Thread Tomi Valkeinen
Hi Thomas, On 03/04/2023 11:24, Thomas Zimmermann wrote: That's my only real comment. Kernel test bot had one comment too. But other than that: Reviewed-by: Tomi Valkeinen I tested this series on TI DRA76 EVM, and worked fine for me. That you so much. I'm going to send out an update

Re: [PATCH 6/6] drm/omapdrm: Implement fbdev emulation as in-kernel client

2023-03-30 Thread Tomi Valkeinen
t = drm_fb_helper_init(dev, fb_helper); + if (ret) + goto err_drm_err; + + if (!drm_drv_uses_atomic_modeset(dev)) Why do we need this? omapdrm supports atomic. That's my only real comment. Kernel test bot had one comment too. But other than that: Reviewed-by: Tomi Valkein

Re: [PATCH 5/6] drm/omapdrm: Initialize fbdev DRM client

2023-03-30 Thread Tomi Valkeinen
this could be as well merged to the next patch, as this is such a short one. Reviewed-by: Tomi Valkeinen Tomi Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/omapdrm/omap_fbdev.c | 33 +++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

Re: [PATCH 4/6] drm/omapdrm: Remove fbdev from struct omap_drm_private

2023-03-30 Thread Tomi Valkeinen
d anymore? As you dropped the priv->fbdev assignment in omap_fbdev_init(), it would look symmetrical to also drop this one. I'm sure it doesn't hurt, just wondering if this is something drivers are supposed to do, or is this just an extra line in the driver. In either case: Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 3/6] drm/omapdrm: Remove bo from struct omap_fbdev

2023-03-30 Thread Tomi Valkeinen
On 30/03/2023 11:32, Thomas Zimmermann wrote: Fbdev's framebuffer stores a pointer to the GEM object. Remove struct omap_fbdev.exynos_gem, which contains the same value. No Copy paste error? =) Reviewed-by: Tomi Valkeinen Tomi functional changes. Signed-off-by: Thomas Zimmermann

Re: [PATCH 2/6] drm/omapdrm: Remove fb from struct omap_fbdev

2023-03-30 Thread Tomi Valkeinen
if (fb) + drm_framebuffer_remove(fb); drm_fb_helper_unprepare(helper); kfree(fbdev); Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 1/6] drm/omapdrm: Include

2023-03-30 Thread Tomi Valkeinen
/omapdrm/omap_drv.c index 699ed814e021..fb403b44769c 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -6,6 +6,7 @@ #include #include +#include #include #include Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH] drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init()

2023-02-27 Thread Tomi Valkeinen
Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH] media: Fix building pdfdocs

2023-02-27 Thread Tomi Valkeinen
On 27/02/2023 14:06, Akira Yokosawa wrote: Hi Mauro, On Sun, 26 Feb 2023 11:47:44 +0100, Mauro Carvalho Chehab wrote: Em Sun, 26 Feb 2023 08:39:32 +0900 Akira Yokosawa escreveu: [+CC: Jon, linux-doc] On Wed, 8 Feb 2023 10:29:16 +0200, Tomi Valkeinen wrote: Commit 8d0e3fc61abd ("

Re: [PATCH v2 2/2] drm: rcar-du: Write correct values in DORCR reserved fields

2023-02-23 Thread Tomi Valkeinen
to 0 temporarily before starting the hardware, make sure that the registers are always set to valid values. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_group.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH v2 1/2] drm: rcar-du: Rename DORCR fields to make them 0-based

2023-02-23 Thread Tomi Valkeinen
thought I already did this... And I see I did, but never sent the patch as I couldn't figure the part 2 =). Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH v3 2/7] media: Add Y210, Y212 and Y216 formats

2023-02-23 Thread Tomi Valkeinen
Hi, On 22/02/2023 17:28, Nicolas Dufresne wrote: Hi Tomi, Le mercredi 21 décembre 2022 à 11:24 +0200, Tomi Valkeinen a écrit : Add Y210, Y212 and Y216 formats. Signed-off-by: Tomi Valkeinen --- .../media/v4l/pixfmt-packed-yuv.rst | 49 ++- drivers/media/v4l2

Re: [PATCH 1/2] drm: rcar-du: Don't write unimplemented ESCR and OTAR registers on Gen3

2023-02-22 Thread Tomi Valkeinen
es[RCAR_DU_OUTPUT_DPAD1].possible_crtcs) & + BIT(rcrtc->index)) rcar_du_crtc_write(rcrtc, rcrtc->index % 2 ? OTAR13 : OTAR02, 0); - } /* Signal polarities */ dsmr = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0) Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 2/2] drm: rcar-du: Disable alpha blending for DU planes used with VSP

2023-02-21 Thread Tomi Valkeinen
.format = rcar_du_format_info(DRM_FORMAT_XRGB), .source = RCAR_DU_PLANE_VSPD1, .colorkey = 0, }; Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 6/6] drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable

2023-02-17 Thread Tomi Valkeinen
enable = tidss_plane_atomic_enable, .atomic_disable = tidss_plane_atomic_disable, }; I haven't tested this, but looks fine to me. Reviewed-by: Tomi Valkeinen One thought, though, is that we still do dispc_plane_enable(false) in tidss_plane_atomic_update() when the plane is not visible. No

Re: [PATCH 5/6] drm/tidss: Remove return values from dispc_plane_{setup,enable}()

2023-02-17 Thread Tomi Valkeinen
/gpu/drm/tidss/tidss_plane.c | 11 +-- 3 files changed, 9 insertions(+), 22 deletions(-) Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 3/3] drm: rcar-du: lvds: Fix LVDS PLL disable on D3/E3

2023-02-14 Thread Tomi Valkeinen
a minor comment below, other than that: Reviewed-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 18 ++-- drivers/gpu/drm/rcar-du/rcar_lvds.c| 114 +++-- drivers/gpu/drm/rcar-du/rcar_lvds.h| 12 ++- 3 files

<    1   2   3   4   5   6   7   8   9   10   >