f8d9cc33 | 21-Oct-2024 |
Devarsh Thakkar <devarsht@ti.com> |
drm/tidss: Fix race condition while handling interrupt registers
[ Upstream commit a9a73f2661e6f625d306c9b0ef082e4593f45a21 ]
The driver has a spinlock for protecting the irq_masks field and irq en
drm/tidss: Fix race condition while handling interrupt registers
[ Upstream commit a9a73f2661e6f625d306c9b0ef082e4593f45a21 ]
The driver has a spinlock for protecting the irq_masks field and irq enable registers. However, the driver misses protecting the irq status registers which can lead to races.
Take the spinlock when accessing irqstatus too.
Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org Signed-off-by: Devarsh Thakkar <devarsht@ti.com> [Tomi: updated the desc] Reviewed-by: Jonathan Cormier <jcormier@criticallink.com> Tested-by: Jonathan Cormier <jcormier@criticallink.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-6-82ddaec94e4a@ideasonboard.com Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
e85e8d48 | 21-Oct-2024 |
Devarsh Thakkar <devarsht@ti.com> |
drm/tidss: Clear the interrupt status for interrupts being disabled
commit 361a2ebb5cad211732ec3c5d962de49b21895590 upstream.
The driver does not touch the irqstatus register when it is disabling i
drm/tidss: Clear the interrupt status for interrupts being disabled
commit 361a2ebb5cad211732ec3c5d962de49b21895590 upstream.
The driver does not touch the irqstatus register when it is disabling interrupts. This might cause an interrupt to trigger for an interrupt that was just disabled.
To fix the issue, clear the irqstatus registers right after disabling the interrupts.
Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org Reported-by: Jonathan Cormier <jcormier@criticallink.com> Closes: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1394222/am625-issue-about-tidss-rcu_preempt-self-detected-stall-on-cpu/5424479#5424479 Signed-off-by: Devarsh Thakkar <devarsht@ti.com> [Tomi: mostly rewrote the patch] Reviewed-by: Jonathan Cormier <jcormier@criticallink.com> Tested-by: Jonathan Cormier <jcormier@criticallink.com> Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241021-tidss-irq-fix-v1-5-82ddaec94e4a@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
1dce1cee | 13-Feb-2024 |
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> |
drm/tidss: Fix sync-lost issue with two displays
[ Upstream commit c079e2e113f2ec2803ba859bbb442a6ab82c96bd ]
A sync lost issue can be observed with two displays, when moving a plane from one disab
drm/tidss: Fix sync-lost issue with two displays
[ Upstream commit c079e2e113f2ec2803ba859bbb442a6ab82c96bd ]
A sync lost issue can be observed with two displays, when moving a plane from one disabled display to an another disabled display, and then enabling the display to which the plane was moved to. The exact requirements for this to trigger are not clear.
It looks like the issue is that the layers are left enabled in the first display's OVR registers. Even if the corresponding VP is disabled, it still causes an issue, as if the disabled VP and its OVR would still be in use, leading to the same VID being used by two OVRs. However, this is just speculation based on testing the DSS behavior.
Experimentation shows that as a workaround, we can disable all the layers in the OVR when disabling a VP. There should be no downside to this, as the OVR is anyway effectively disabled if its VP is disabled, and it seems to solve the sync lost issue.
However, there may be a bigger issue in play here, 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.
Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240213-tidss-fixes-v1-2-d709e8dfa505@ideasonboard.com Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
417d134e | 09-Nov-2023 |
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> |
drm/tidss: Fix dss reset
[ Upstream commit bc288a927815efcf9d7f4a54d4d89c5df478c635 ]
The probe function calls dispc_softreset() before runtime PM is enabled and without enabling any of the DSS clo
drm/tidss: Fix dss reset
[ Upstream commit bc288a927815efcf9d7f4a54d4d89c5df478c635 ]
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, and we need to make sure the DSS HW is active and the fclk is enabled.
To fix the above, add a new function, dispc_init_hw(), which does:
- pm_runtime_set_active() - clk_prepare_enable(fclk) - dispc_softreset().
This ensures that the reset can be successfully accomplished.
Note that we use pm_runtime_set_active(), not the normal pm_runtime_get(). The reason for this is that at this point we haven't enabled the runtime PM yet and also we don't want the normal resume callback to be called: the dispc resume callback does some initial HW setup, and it expects that the HW was off (no video ports are streaming). If the bootloader has enabled the DSS and has set up a boot time splash-screen, the DSS would be enabled and streaming which might lead to issues with the normal resume callback.
Fixes: c9b2d923befd ("drm/tidss: Soft Reset DISPC on startup") Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com> Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-8-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
11e2dc2f | 09-Nov-2023 |
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> |
drm/tidss: Check for K2G in in dispc_softreset()
[ Upstream commit 151825150cf9c2e9fb90763d35b9dff3783628ac ]
K2G doesn't have softreset feature. Instead of having every caller of dispc_softreset()
drm/tidss: Check for K2G in in dispc_softreset()
[ Upstream commit 151825150cf9c2e9fb90763d35b9dff3783628ac ]
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com> Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-6-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Stable-dep-of: bc288a927815 ("drm/tidss: Fix dss reset") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
4fcfe757 | 09-Nov-2023 |
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> |
drm/tidss: Return error value from from softreset
[ Upstream commit aceafbb5035c4bfc75a321863ed1e393d644d2d2 ]
Return an error value from dispc_softreset() so that the caller can handle the errors.
drm/tidss: Return error value from from softreset
[ Upstream commit aceafbb5035c4bfc75a321863ed1e393d644d2d2 ]
Return an error value from dispc_softreset() so that the caller can handle the errors.
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com> Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-5-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Stable-dep-of: bc288a927815 ("drm/tidss: Fix dss reset") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
b1e286d3 | 09-Feb-2023 |
Thomas Zimmermann <tzimmermann@suse.de> |
drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable
Enable the primary plane for tidss hardware via atomic_enable. Atomic helpers invoke this callback only when the plane becomes active
drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable
Enable the primary plane for tidss hardware via atomic_enable. Atomic helpers invoke this callback only when the plane becomes active.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-7-tzimmermann@suse.de
show more ...
|
2df0433b | 01-Dec-2022 |
Randolph Sapp <rs@ti.com> |
drm: tidss: Fix pixel format definition
There was a long-standing bug from a typo that created 2 ARGB1555 and ABGR1555 pixel format entries. Weston 10 has a sanity check that alerted me to this issu
drm: tidss: Fix pixel format definition
There was a long-standing bug from a typo that created 2 ARGB1555 and ABGR1555 pixel format entries. Weston 10 has a sanity check that alerted me to this issue.
According to the Supported Pixel Data formats table we have the later entries should have been for Alpha-X instead.
Signed-off-by: Randolph Sapp <rs@ti.com> Fixes: 32a1795f57eecc ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com> Acked-by: Andrew Davis <afd@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221202001803.1765805-1-rs@ti.com
show more ...
|