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 ...
|
8c30eecc | 01-Aug-2022 |
Danilo Krummrich <dakr@redhat.com> |
drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}
The field paddr of struct drm_gem_dma_object holds a DMA address, which might actually be a physical address. However, depending on the
drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}
The field paddr of struct drm_gem_dma_object holds a DMA address, which might actually be a physical address. However, depending on the platform, it can also be a bus address or a virtual address managed by an IOMMU.
Hence, rename the field to dma_addr, which is more applicable.
In order to do this renaming the following coccinelle script was used:
``` @@ struct drm_gem_dma_object *gem; @@
- gem->paddr + gem->dma_addr
@@ struct drm_gem_dma_object gem; @@
- gem.paddr + gem.dma_addr
@exists@ typedef dma_addr_t; symbol paddr; @@
dma_addr_t paddr; <... - paddr + dma_addr ...>
@@ symbol paddr; @@ dma_addr_t - paddr + dma_addr ;
```
This patch is compile-time tested with:
``` make ARCH={x86_64,arm,arm64} allyesconfig make ARCH={x86_64,arm,arm64} drivers/gpu/drm` ```
Acked-by: Sam Ravnborg <sam@ravnborg.org> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220802000405.949236-5-dakr@redhat.com
show more ...
|