Re: [PATCH 1/2] drm/tidss: Fix initial plane zpos values

2024-02-13 Thread Tomi Valkeinen
Hi, On 13/02/2024 11:04, Pekka Paalanen wrote: On Tue, 13 Feb 2024 10:16:36 +0200 Tomi Valkeinen wrote: When the driver sets up the zpos property it sets the default zpos value to the HW id of the plane. That is fine as such, but as on many DSS versions the driver arranges the DRM planes

[PATCH 2/2] drm/tidss: Fix sync-lost issue with two displays

2024-02-13 Thread Tomi Valkeinen
, related to J721e erratum i2097 ("DSS: Disabling a Layer Connected to Overlay May Result in Synclost During the Next Frame"). Experimentation also shows that the OVR's CHANNELIN field has similar issue. So we may need to revisit this when we find out more about the core issue. Signed-of

[PATCH 1/2] drm/tidss: Fix initial plane zpos values

2024-02-13 Thread Tomi Valkeinen
to zpos 0. On a two display system this would give us plane zpos values of 0, 0, 1, 2. The end result and behavior would be very similar in this option, and I'm not aware that this would actually help us in any way. So, to keep the code simple, I opted for the 0, 1, 2, 3 values. Signed-off-by: Tomi

[PATCH 0/2] drm/tidss: Fixes for zpos and multi-display

2024-02-13 Thread Tomi Valkeinen
Two fixes for tidss: The first one helps Weston deal with the planes, the second fixes a possible sync-lost issue with multiple displays. Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (2): drm/tidss: Fix initial plane zpos values drm/tidss: Fix sync-lost issue with two displays

Re: [PATCH v3 0/5] Fixing live video input in ZynqMP DPSUB

2024-02-07 Thread Tomi Valkeinen
On 24/01/2024 04:53, Anatoliy Klymenko wrote: Add few missing pieces to support ZynqMP DPSUB live video in mode. ZynqMP DPSUB supports 2 modes of operations in regard to video data input. In the first mode, DPSUB uses DMA engine to pull video data from memory buffers. To support this the

Re: [PATCH 4/4] drm: xlnx: zynqmp_dpsub: Set live video in format

2024-01-31 Thread Tomi Valkeinen
On 19/01/2024 07:54, Klymenko, Anatoliy wrote: diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h b/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h index f92a006d5070..926e07c255bb 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h +++ b/drivers/gpu/drm/xlnx/zynqmp_disp_regs.h @@ -165,10 +165,10 @@

Re: [PATCH v3 4/5] drm: xlnx: zynqmp_dpsub: Filter interrupts against mask

2024-01-31 Thread Tomi Valkeinen
(!status) return IRQ_NONE; /* dbg for diagnostic, but not much that the driver can do */ Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH v3 3/5] drm: xlnx: zynqmp_dpsub: Clear status register ASAP

2024-01-31 Thread Tomi Valkeinen
- zynqmp_dp_write(dp, ZYNQMP_DP_INT_STATUS, status); - if (status & ZYNQMP_DP_INT_VBLANK_START) zynqmp_dpsub_drm_handle_vblank(dp->dpsub); Reviewed-by: Tomi Valkeinen Tomi

Re: [RFC PATCH 3/3] arm64: dts: ti: k3-am62x: Add overlay to use DSS in display sharing mode

2024-01-23 Thread Tomi Valkeinen
Hi, On 16/01/2024 15:41, Devarsh Thakkar wrote: This overlay needs to be used with display sharing supported device manager firmware only. Remote core running this firmware has write access to "common" register space, VIDL pipeline, OVR1 overlay and VP1 videoport. The processing core running

Re: [RFC PATCH 2/3] drm/tidss: Add support for display sharing

2024-01-23 Thread Tomi Valkeinen
Hi, On 16/01/2024 15:41, Devarsh Thakkar wrote: Display subsystem present in TI Keystone family of devices supports sharing of display between multiple hosts as it provides separate register space (common* region) for each host to programming display controller and also a unique interrupt line

Re: [PATCH 4/4] drm: xlnx: zynqmp_dpsub: Set live video in format

2024-01-17 Thread Tomi Valkeinen
Hi Anatoliy, On 13/01/2024 01:42, Anatoliy Klymenko wrote: Live video input format is expected to be set as "bus-format" property in connected remote endpoint. Program live video input format DPSUB registers. Set display layer mode in layer creation context. Some comments inline below. But

Re: [PATCH 3/4] drm: xlnx: zynqmp_dpsub: Don't generate vblank in live mode

2024-01-17 Thread Tomi Valkeinen
On 13/01/2024 01:42, Anatoliy Klymenko wrote: Filter out status register against interrupts' mask. Some events are being reported via DP status register, even if corresponding interrupts have been disabled. Avoid processing of such events in interrupt handler context. The subject talks about

Re: [PATCH 2/4] drm: xlnx: zynqmp_dpsub: Fix timing for live mode

2024-01-17 Thread Tomi Valkeinen
gt;vid_clk_from_ps); zynqmp_disp_avbuf_enable_channels(disp); zynqmp_disp_avbuf_enable_audio(disp); Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 1/4] drm: xlnx: zynqmp_dpsub: Make drm bridge discoverable

2024-01-17 Thread Tomi Valkeinen
On 13/01/2024 01:42, Anatoliy Klymenko wrote: Assign device of node to bridge prior registering it. This will make said bridge discoverable by separate crtc driver. I think a few words on why this is needed (and why it wasn't needed before) would be nice. Other than that: Reviewed-by: Tomi

[PATCH 2/2] drm/bridge: sii902x: Fix audio codec unregistration

2024-01-03 Thread Tomi Valkeinen
The driver never unregisters the audio codec platform device, which can lead to a crash on module reloading, nor does it handle the return value from sii902x_audio_codec_init(). Signed-off-by: Tomi Valkeinen Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Cc:

[PATCH 1/2] drm/bridge: sii902x: Fix probing race issue

2024-01-03 Thread Tomi Valkeinen
the i2c part yet, leading to the crash. Fix this by moving the drm_bridge_add() to the end of the sii902x_init(), which is also at the very end of sii902x_probe(). Signed-off-by: Tomi Valkeinen Fixes: 21d808405fe4 ("drm/bridge/sii902x: Fix EDID readback") --- drivers/gpu/drm/bridge

[PATCH 0/2] drm/bridge: sii902x: Crash fixes

2024-01-03 Thread Tomi Valkeinen
Two small fixes to sii902x for crashes. Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (2): drm/bridge: sii902x: Fix probing race issue drm/bridge: sii902x: Fix audio codec unregistration drivers/gpu/drm/bridge/sii902x.c | 42 +++- 1 file

Re: [PATCH 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case

2023-12-19 Thread Tomi Valkeinen
On 15/12/2023 15:33, Jan Kiszka wrote: On 31.10.23 14:26, Tomi Valkeinen wrote: These two patches are needed to make tc358767 work in the DRM_BRIDGE_ATTACH_NO_CONNECTOR case, at least when using a DP connector. The first patch, "drm/bridge: tc358767: Support input format negotiation

Re: [PATCH v2 0/4] drm: Fix errors about uninitialized/wrong variables

2023-12-06 Thread Tomi Valkeinen
Hi all, On 03/11/2023 15:14, Tomi Valkeinen wrote: Fix cases where smatch reports a use of an uninitialized variable, and one where the variable is initialized but contains wrong value. Tomi Signed-off-by: Tomi Valkeinen --- Changes in v2: - Added two more fixes - Link to v1: https

Re: [PATCH] drm/mipi-dsi: Fix detach call without attach

2023-12-06 Thread Tomi Valkeinen
Hi mipi dsi maintainers (I'm not sure who that is =), On 21/09/2023 13:50, Tomi Valkeinen wrote: It's been reported that DSI host driver's detach can be called without the attach ever happening: https://lore.kernel.org/all/20230412073954.20601-1-t...@atomide.com/ After reading the code, I

Re: [PATCH v2 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case

2023-12-06 Thread Tomi Valkeinen
Hi, On 08/11/2023 14:45, Alexander Stein wrote: Hi Tomi, Am Mittwoch, 8. November 2023, 12:27:21 CET schrieb Tomi Valkeinen: These two patches are needed to make tc358767 work in the DRM_BRIDGE_ATTACH_NO_CONNECTOR case, at least when using a DP connector. I have tested this with TI AM654 EVM

Re: [PATCH v3 0/2] Add DSS support for TI AM62A7 SoC

2023-12-01 Thread Tomi Valkeinen
On 08/11/2023 19:16, Aradhya Bhatia wrote: This patch series adds a new compatible for the Display SubSystem (DSS) controller on TI's AM62A7 SoC. It further adds the required support, for the same, in the tidss driver. The DSS controller is similar to the recently added AM625 DSS, with the key

Re: [PATCH v3] drm: omapdrm: Improve check for contiguous buffers

2023-12-01 Thread Tomi Valkeinen
On 13/11/2023 22:55, Andrew Davis wrote: While a scatter-gather table having only 1 entry does imply it is contiguous, it is a logic error to assume the inverse. Tables can have more than 1 entry and still be contiguous. Use a proper check here. Signed-off-by: Andrew Davis --- Thanks, I'll

Re: [PATCH v3 0/2] Add DSS support for TI AM62A7 SoC

2023-11-27 Thread Tomi Valkeinen
idss/tidss_drv.c | 1 + 4 files changed, 77 insertions(+) base-commit: 2220f68f4504aa1ccce0fac721ccdb301e9da32f For the series: Reviewed-by: Tomi Valkeinen Tomi

[PATCH v2 05/11] drm/tidss: Return error value from from softreset

2023-11-08 Thread Tomi Valkeinen
Return an error value from dispc_softreset() so that the caller can handle the errors. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu

[PATCH v2 08/11] drm/tidss: Fix dss reset

2023-11-08 Thread Tomi Valkeinen
lead to issues with the normal resume callback. Fixes: c9b2d923befd ("drm/tidss: Soft Reset DISPC on startup") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/d

[PATCH v2 10/11] drm/tidss: Fix atomic_flush check

2023-11-08 Thread Tomi Valkeinen
nd "needs modeset" wrong way. Cc: sta...@vger.kernel.org Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_crtc.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH v2 11/11] drm/tidss: Use DRM_PLANE_COMMIT_ACTIVE_ONLY

2023-11-08 Thread Tomi Valkeinen
based). Reviewing the code related to DRM_PLANE_COMMIT_ACTIVE_ONLY does not show any issues, and testing on J7 EVM with two displays works fine. Change the driver to use DRM_PLANE_COMMIT_ACTIVE_ONLY. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_crtc.c | 4 drivers/gpu/drm

[PATCH v2 00/11] drm/tidss: Probe related fixes and cleanups

2023-11-08 Thread Tomi Valkeinen
While working on the TI BSP kernel, adding bootload splash screen support, I noticed some issues with the driver and opportunities for cleanups and improvements. Tomi Signed-off-by: Tomi Valkeinen --- Changes in v2: - Add missing pm_runtime_dont_use_autosuspend() in error path - Add simple

[PATCH v2 09/11] drm/tidss: IRQ code cleanup

2023-11-08 Thread Tomi Valkeinen
. We can also drop the HW access from the tidss_irq_uninstall(), as the driver will anyway disable and suspend the hardware at remove time. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 2 ++ drivers/gpu/drm/tidss/tidss_irq.c | 54

[PATCH v2 07/11] drm/tidss: Add simple K2G manual reset

2023-11-08 Thread Tomi Valkeinen
K2G display controller does not support soft reset, but we can do the most important steps manually: mask the IRQs and disable the VPs. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git

[PATCH v2 06/11] drm/tidss: Check for K2G in in dispc_softreset()

2023-11-08 Thread Tomi Valkeinen
K2G doesn't have softreset feature. Instead of having every caller of dispc_softreset() check for K2G, move the check into dispc_softreset(), and make dispc_softreset() return 0 in case of K2G. Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c

[PATCH v2 02/11] drm/tidss: Use PM autosuspend

2023-11-08 Thread Tomi Valkeinen
Use runtime PM autosuspend feature, with 1s timeout, to avoid unnecessary suspend-resume cycles when, e.g. the userspace temporarily turns off the crtcs when configuring the outputs. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 9 - 1 file changed, 8 insertions

[PATCH v2 04/11] drm/tidss: Move reset to the end of dispc_init()

2023-11-08 Thread Tomi Valkeinen
to the end of dispc_init(), which is a sensible place for it anyway. Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu

[PATCH v2 03/11] drm/tidss: Drop useless variable init

2023-11-08 Thread Tomi Valkeinen
No need to initialize the ret to 0 in dispc_softreset(). Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss

[PATCH v2 01/11] drm/tidss: Use pm_runtime_resume_and_get()

2023-11-08 Thread Tomi Valkeinen
Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which will handle error situations better. Also fix the return, as there should be no reason for the current complex return. Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 4

Re: [PATCH v2 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case

2023-11-08 Thread Tomi Valkeinen
On 08/11/2023 14:45, Alexander Stein wrote: Hi Tomi, Am Mittwoch, 8. November 2023, 12:27:21 CET schrieb Tomi Valkeinen: These two patches are needed to make tc358767 work in the DRM_BRIDGE_ATTACH_NO_CONNECTOR case, at least when using a DP connector. I have tested this with TI AM654 EVM

[PATCH v2 2/2] drm/bridge: tc358767: Fix link properties discovery

2023-11-08 Thread Tomi Valkeinen
: add drm_panel_bridge support") Reviewed-by: Aradhya Bhatia Tested-by: Jan Kiszka Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 89

[PATCH v2 1/2] drm/bridge: tc358767: Add format negotiation hooks for DPI/DSI to (e)DP

2023-11-08 Thread Tomi Valkeinen
/ Signed-off-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index ef2e373606ba..89a0d804270a 100644

[PATCH v2 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case

2023-11-08 Thread Tomi Valkeinen
These two patches are needed to make tc358767 work in the DRM_BRIDGE_ATTACH_NO_CONNECTOR case, at least when using a DP connector. I have tested this with TI AM654 EVM with a tc358767 add-on card connected to a DP monitor. Signed-off-by: Tomi Valkeinen --- Changes in v2: - Update the format

Re: [PATCH 04/10] drm/tidss: Move reset to the end of dispc_init()

2023-11-06 Thread Tomi Valkeinen
On 06/11/2023 00:54, Laurent Pinchart wrote: On Thu, Nov 02, 2023 at 08:40:10AM +0200, Tomi Valkeinen wrote: On 01/11/2023 15:57, Laurent Pinchart wrote: On Wed, Nov 01, 2023 at 11:17:41AM +0200, Tomi Valkeinen wrote: We do a DSS reset in the middle of the dispc_init(). While that happens

Re: [PATCH 02/10] drm/tidss: Use PM autosuspend

2023-11-05 Thread Tomi Valkeinen
On 06/11/2023 00:53, Laurent Pinchart wrote: Hi Tomi, CC'ing Sakari for his expertise on runtime PM (I think he will soon start wishing he would be ignorant in this area). On Thu, Nov 02, 2023 at 08:34:45AM +0200, Tomi Valkeinen wrote: On 01/11/2023 15:54, Laurent Pinchart wrote: On Wed, Nov

[PATCH v2 4/4] drm/bridge: tc358767: Fix return value on error case

2023-11-03 Thread Tomi Valkeinen
If the hpd_pin is invalid, the driver returns 'ret'. But 'ret' contains 0, instead of an error value. Return -EINVAL instead. Fixes: f25ee5017e4f ("drm/bridge: tc358767: add IRQ and HPD support") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file

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

2023-11-03 Thread Tomi Valkeinen
think it is good to initialize 'supported_status' to 0 to silence the warning (and possibly fix a bug). Reviewed-by: Laurent Pinchart 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

[PATCH v2 3/4] drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable

2023-11-03 Thread Tomi Valkeinen
'ret' could be uninitialized at the end of the function, although it's not clear if that can happen in practice. Fixes: 6a3608eae6d3 ("drm: bridge: cdns-mhdp8546: Enable HDCP") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 3 ++- 1 file

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

2023-11-03 Thread Tomi Valkeinen
' to 0. Reviewed-by: Laurent Pinchart 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 09e289fca5c3..3cc0ffc28e86 100644 --- a/drivers

[PATCH v2 0/4] drm: Fix errors about uninitialized/wrong variables

2023-11-03 Thread Tomi Valkeinen
Fix cases where smatch reports a use of an uninitialized variable, and one where the variable is initialized but contains wrong value. Tomi Signed-off-by: Tomi Valkeinen --- Changes in v2: - Added two more fixes - Link to v1: https://lore.kernel.org/r/20230804-uninit-fixes-v1-0-a60772c04

Re: [PATCH v3 16/16] drm/tilcdc: Convert to platform remove callback returning void

2023-11-03 Thread Tomi Valkeinen
struct platform_driver tilcdc_platform_driver = { .probe = tilcdc_pdev_probe, - .remove = tilcdc_pdev_remove, + .remove_new = tilcdc_pdev_remove, .shutdown = tilcdc_pdev_shutdown, .driver = { .name = "tilcdc", Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 10/10] drm/tidss: Fix atomic_flush check

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 16:56, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:47AM +0200, Tomi Valkeinen wrote: tidss_crtc_atomic_flush() checks if the crtc is enabled, and if not, returns immediately as there's no reason to do any register changes. However

Re: [PATCH 07/10] drm/tidss: Fix dss reset

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 16:30, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:44AM +0200, Tomi Valkeinen wrote: The probe function calls dispc_softreset() before runtime PM is enabled and without enabling any of the DSS clocks. This happens to work by luck

Re: [PATCH 08/10] drm/tidss: Add dispc_is_idle()

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 16:32, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:45AM +0200, Tomi Valkeinen wrote: Add a helper function, dispc_is_idle(), which returns whether the DSS is idle (i.e. is any video port enabled). For now we add a call

Re: [PATCH 09/10] drm/tidss: IRQ code cleanup

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 16:52, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:46AM +0200, Tomi Valkeinen wrote: The IRQ setup code is overly complex. All we really need to do is initialize the related fields in struct tidss_device, and request the IRQ. We can

Re: [PATCH 05/10] drm/tidss: Return error value from from softreset

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 15:59, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:42AM +0200, Tomi Valkeinen wrote: Return an error value from dispc_softreset() so that the caller can handle the errors. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss

Re: [PATCH 04/10] drm/tidss: Move reset to the end of dispc_init()

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 15:57, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:41AM +0200, Tomi Valkeinen wrote: We do a DSS reset in the middle of the dispc_init(). While that happens to work now, we should really make sure that e..g the fclk, which is acquired

Re: [PATCH 02/10] drm/tidss: Use PM autosuspend

2023-11-02 Thread Tomi Valkeinen
On 01/11/2023 15:54, Laurent Pinchart wrote: Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:39AM +0200, Tomi Valkeinen wrote: Use runtime PM autosuspend feature, with 1s timeout, to avoid unnecessary suspend-resume cycles when, e.g. the userspace temporarily turns off

[PATCH 10/10] drm/tidss: Fix atomic_flush check

2023-11-01 Thread Tomi Valkeinen
nd "needs modeset" wrong way. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_crtc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tidss_crtc.c index 5e5e466f35d1..4c7009a5d

[PATCH 04/10] drm/tidss: Move reset to the end of dispc_init()

2023-11-01 Thread Tomi Valkeinen
to the end of dispc_init(), which is a sensible place for it anyway. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index

[PATCH 09/10] drm/tidss: IRQ code cleanup

2023-11-01 Thread Tomi Valkeinen
. We can also drop the HW access from the tidss_irq_uninstall(), as the driver will anyway disable and suspend the hardware at remove time. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 2 ++ drivers/gpu/drm/tidss/tidss_irq.c | 54

[PATCH 08/10] drm/tidss: Add dispc_is_idle()

2023-11-01 Thread Tomi Valkeinen
had enabled the DSS, and the driver can act on that. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index 13db062892e3..a527c28c8833

[PATCH 07/10] drm/tidss: Fix dss reset

2023-11-01 Thread Tomi Valkeinen
lead to issues with the normal resume callback. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c

[PATCH 06/10] drm/tidss: Check for K2G in in dispc_softreset()

2023-11-01 Thread Tomi Valkeinen
K2G doesn't have softreset feature. Instead of having every caller of dispc_softreset() check for K2G, move the check into dispc_softreset(), and make dispc_softreset() return 0 in case of K2G. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 13 +++-- 1 file

[PATCH 05/10] drm/tidss: Return error value from from softreset

2023-11-01 Thread Tomi Valkeinen
Return an error value from dispc_softreset() so that the caller can handle the errors. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu

[PATCH 03/10] drm/tidss: Drop useless variable init

2023-11-01 Thread Tomi Valkeinen
No need to initialize the ret to 0 in dispc_softreset(). Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index 9d9dee7abaef

[PATCH 02/10] drm/tidss: Use PM autosuspend

2023-11-01 Thread Tomi Valkeinen
Use runtime PM autosuspend feature, with 1s timeout, to avoid unnecessary suspend-resume cycles when, e.g. the userspace temporarily turns off the crtcs when configuring the outputs. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 8 +++- 1 file changed, 7 insertions

[PATCH 01/10] drm/tidss: Use pm_runtime_resume_and_get()

2023-11-01 Thread Tomi Valkeinen
Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which will handle error situations better. Also fix the return, as there should be no reason for the current complex return. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 4 ++-- 1 file changed, 2

[PATCH 00/10] drm/tidss: Probe related fixes and cleanups

2023-11-01 Thread Tomi Valkeinen
While working on the TI BSP kernel, adding bootload splash screen support, I noticed some issues with the driver and opportunities for cleanups and improvements. Tomi Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (10): drm/tidss: Use pm_runtime_resume_and_get() drm/tidss: Use PM

[PATCH 1/2] drm/bridge: tc358767: Support input format negotiation hook

2023-10-31 Thread Tomi Valkeinen
-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index ef2e373606ba..0affcefdeb1c 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b

[PATCH 2/2] drm/bridge: tc358767: Fix link properties discovery

2023-10-31 Thread Tomi Valkeinen
this by adding tc_connector_get_modes() call at the beginning of get_edid(), so that we have up to date information before looking at the modes. Reported-by: Jan Kiszka Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8...@siemens.com/ Signed-off-by: Tomi Valkeinen --- drivers/gpu

[PATCH 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case

2023-10-31 Thread Tomi Valkeinen
are needed to get a working display. I have tested this with TI AM654 EVM with a tc358767 add-on card. Signed-off-by: Tomi Valkeinen --- Aradhya Bhatia (1): drm/bridge: tc358767: Support input format negotiation hook Tomi Valkeinen (1): drm/bridge: tc358767: Fix link properties

Re: [PATCH] drm/bridge: tc358767: Support input format negotiation hook

2023-10-31 Thread Tomi Valkeinen
On 31/10/2023 14:18, Jan Kiszka wrote: On 31.10.23 11:53, Tomi Valkeinen wrote: Hi Jan, On 31/10/2023 08:24, Jan Kiszka wrote: On 30.10.23 20:28, Aradhya Bhatia wrote: With new connector model, tc358767 will not create the connector, when DRM_BRIDGE_ATTACH_NO_CONNECTOR is set and display

Re: [PATCH] drm/bridge: tc358767: Support input format negotiation hook

2023-10-31 Thread Tomi Valkeinen
Hi Jan, On 31/10/2023 08:24, Jan Kiszka wrote: On 30.10.23 20:28, Aradhya Bhatia wrote: With new connector model, tc358767 will not create the connector, when DRM_BRIDGE_ATTACH_NO_CONNECTOR is set and display-controller driver will rely on format negotiation to setup the encoder format. Add

Re: [PATCH] drm: Use device_get_match_data()

2023-10-25 Thread Tomi Valkeinen
| 9 - drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 +++--- drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/dss.c | 5 +++-- 7 files changed, 28 insertions(+), 43 deletions(-) For omapdrm: Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH 2/3] drm/bridge: migrate bridge_chains to per-encoder file

2023-10-06 Thread Tomi Valkeinen
the bridge chains debugfs. Apart that it looks fine: Reviewed-by: Neil Armstrong This change does more than move the code to per-encoder debugfs file: it changes the formatting, adding textual representations for the flags, and drops the use of drm_printer. I'd prefer to have such changes separately, but as it's a small patch I guess it's fine-ish. But they should at least be mentioned in the patch description. With that addressed: Reviewed-by: Tomi Valkeinen Tomi

Re: [PATCH] omap: dsi: do not WARN on detach if dsidev was never attached

2023-09-21 Thread Tomi Valkeinen
Hi, On 19/09/2023 16:37, H. Nikolaus Schaller wrote: dsi_init_output() called by dsi_probe() may fail. In that case mipi_dsi_host_unregister() is called which may call omap_dsi_host_detach() with uninitialized dsi->dsidev because omap_dsi_host_attach() was never called before. This happens if

[PATCH] drm/mipi-dsi: Fix detach call without attach

2023-09-21 Thread Tomi Valkeinen
y or using the devm variant, leading to a crash. And probably the driver will crash if it happens, for some reason, to try to send a message via the DSI bus. But that's another topic. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_mipi_dsi.c | 17 +++-- include/drm/drm_mipi_dsi.

[PATCH 2/2] Revert "drm/omapdrm: Annotate dma-fence critical section in commit path"

2023-09-20 Thread Tomi Valkeinen
drm: Annotate dma-fence critical section in commit path") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_drv.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index afeeb7737552..

[PATCH 0/2] drm: Revert dma-fence annotations from omapdrm and tidss

2023-09-20 Thread Tomi Valkeinen
to start the diving =). Signed-off-by: Tomi Valkeinen --- Tomi Valkeinen (2): Revert "drm/tidss: Annotate dma-fence critical section in commit path" Revert "drm/omapdrm: Annotate dma-fence critical section in commit path" drivers/gpu/drm/omapdrm/omap_drv.c | 9 -

[PATCH 1/2] Revert "drm/tidss: Annotate dma-fence critical section in commit path"

2023-09-20 Thread Tomi Valkeinen
rop.0+0x40/0xe0 do_el0_svc_compat+0x1c/0x38 el0_svc_compat+0x48/0xb4 el0t_32_sync_handler+0xb0/0x138 el0t_32_sync+0x194/0x198 Fixes: 4d56a4f08391 ("drm/tidss: Annotate dma-fence critical section in commit path") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_kms.c | 4 1

Re: [PATCH -next] drm: xlnx: zynqmp_dpsub: Use devm_clk_get_enabled() helper function

2023-09-19 Thread Tomi Valkeinen
On 29/08/2023 10:55, Laurent Pinchart wrote: Hi Jinjie, (CC'ing Tomi) Thank you for the patch. On Fri, Aug 25, 2023 at 03:23:24PM +0800, Jinjie Ruan wrote: The devm_clk_get_enabled() helper: - calls devm_clk_get() - calls clk_prepare_enable() and registers what is needed in order

Re: [RFT PATCH 2/6] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers

2023-09-19 Thread Tomi Valkeinen
down() has been modified to consider a NULL drm_device as a noop in the patch ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop"). Suggested-by: Maxime Ripard Signed-off-by: Douglas Anderson For omapdrm: Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Tomi

[PATCH] drm/tilcdc: Fix irq free on unload

2023-09-19 Thread Tomi Valkeinen
14fa77 ("drm/tilcdc: Convert to Linux IRQ interfaces") Cc: Thomas Zimmermann Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/ti

Re: [RFT PATCH 5/6] drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers

2023-09-19 Thread Tomi Valkeinen
be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart and at driver remove (or unbind) time comes straight out of the kernel doc "driver instance overview" in drm_drv.c. Reviewed-by: Tomi Valkeinen

Re: [PATCH v2 2/2] drivers/tidss: Add support for AM62A7 DSS

2023-09-18 Thread Tomi Valkeinen
On 18/08/2023 17:21, Aradhya Bhatia wrote: Add support for the DSS controller on TI's AM62A7 SoC in the tidss driver. This contrller has 2 video pipelines that can render 2 video planes on "controller". over a screen, using the overlay managers. The output of the DSS comes from video port 2

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

2023-09-17 Thread Tomi Valkeinen
Hi bridge maintainers! On 06/09/2023 09:50, 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 -

Re: [RFC PATCH] drm: omapdrm: dsi: add refsel also for omap4

2023-09-13 Thread Tomi Valkeinen
On 13/09/2023 15:48, Tony Lindgren wrote: * Tomi Valkeinen [230913 12:11]: I'm somewhat sure that the upstream driver used to work on omap4 sdp, which has two DSI panels. But I can't even remember what omap4 version it had. I think those were both dsi command mode panels though, not video

Re: [RFC PATCH] drm: omapdrm: dsi: add refsel also for omap4

2023-09-13 Thread Tomi Valkeinen
On 13/09/2023 09:59, Andreas Kemnade wrote: Some 3.0 source has it set behind a if (omap4). Maybe it is helpful maybe not, at least in the omap4460 trm these bits are marked as reserved. But maybe some dsi video mode panel starts magically working. Sorry, what does this mean? That this fixes

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

2023-09-13 Thread Tomi Valkeinen
On 13/09/2023 10:37, Tony Lindgren wrote: * Laurent Pinchart [230412 11:59]: On Wed, Apr 12, 2023 at 11:55:34AM +0300, Tomi Valkeinen wrote: 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

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

2023-09-13 Thread Tomi Valkeinen
On 12/04/2023 10:39, 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 dsi->dsidev set to NULL. The warnings can be "Fixed dependency cycle(s)" followed by a WARNING: CPU: 0

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

2023-09-06 Thread Tomi Valkeinen
sus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index 9ce8d120b50c..f41bf56b7d6b 100644 --- a/drive

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

2023-09-06 Thread Tomi Valkeinen
in a more human consumable form. Reviewed-by: Peter Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drive

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

2023-09-06 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 Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge

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

2023-09-06 Thread Tomi Valkeinen
is up by just saying the periods are in picoseconds. Reviewed-by: Peter Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 60 +++ 1 file changed, 29 insertions(+), 31 dele

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

2023-09-06 Thread Tomi Valkeinen
ion. Reviewed-by: Peter Ujfalusi Tested-by: Marcel Ziswiler Tested-by: Maxim Schwalm # Asus TF700T 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/bri

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

2023-09-06 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 Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 45

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

2023-09-06 Thread Tomi Valkeinen
Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler 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

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

2023-09-06 Thread Tomi Valkeinen
Simplify the code by capturing the priv->dev value to dev variable, and use it. Reviewed-by: Peter Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 41 ---

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

2023-09-06 Thread Tomi Valkeinen
: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Reviewed-by: Peter Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358768.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

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

2023-09-06 Thread Tomi Valkeinen
] Reviewed-by: Peter Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler 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

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

2023-09-06 Thread Tomi Valkeinen
, as it simplifies the PLL code. Reviewed-by: Peter Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler 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

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

2023-09-06 Thread Tomi Valkeinen
r Ujfalusi Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Marcel Ziswiler 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..bc

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