dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Decouple max_pclk check from constant display feats
@ 2025-08-19 19:21 Swamil Jain
  2025-08-19 19:21 ` [PATCH v5 1/3] drm/tidss: oldi: Add property to identify OLDI supported VP Swamil Jain
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Swamil Jain @ 2025-08-19 19:21 UTC (permalink / raw)
  To: jyri.sarha, tomi.valkeinen, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, aradhya.bhatia
  Cc: h-shenoy, devarsht, vigneshr, praneeth, u-kumar1, dri-devel,
	linux-kernel, s-jain1

In an effort to make the existing compatibles more usable, we are
removing the max_pclk_khz form dispc_features structure and doing the
supported pixel clock checks using "max_successful_rate[]" and
"max_attempted_rate[]".

Changes are fully backwards compatible.

After integration of OLDI support[0], we need additional patches in
OLDI to identify the VP that has OLDI. We have to do this since
OLDI driver owns the VP clock (its serial clock) and we cannot perform
clock operations on those VP clock from tidss driver. This issue was
also reported upstream when DSI fixes[1] had some clock related calls
in tidss driver. When "clk_round_rate()" is called, ideally it should
have gone to "sci_clk_determine_rate()" to query DM but it doesn't since
clock is owned by OLDI not tidss.

So add a member is_ext_vp_clk[] in tidss_device structure to identify
this and avoid performing clock operations for VP if it has OLDI panel.
For the same checks in OLDI driver, atomic_check() hook is added to its
bridge_funcs.
In the atomic_check() chain, first the bridge_atomic_check() is called
and then crtc_atomic_check() is called. So mode clock is first checked
in oldi driver and then skipped in tidss driver.

Had the tidss_oldi structure been exposed to tidss_dispc.c, we could
have directly checked VP type in dispc but since the structure is defined
in tidss_oldi.c , we have to add additional member to tidss_device
structure.

[0]: https://lore.kernel.org/all/20250528122544.817829-1-aradhya.bhatia@linux.dev/
[1]: https://lore.kernel.org/all/DA6TT575Z82D.3MPK8HG5GRL8U@kernel.org/

Changelog v4->v5
- Rename is_oldi_vp[] to is_ext_vp_clk[]
- Store both pixel clock round_rate and attempted_rate to reduce
  clk_round_rate() calls while validating modes
- Code changes suggested by Tomi[2]
- Minor fixes in comments and commit message

[2]: https://lore.kernel.org/all/8cd9d1c4-2e9f-4766-b224-21925c4f991d@ideasonboard.com/

v4 patch link:
https://lore.kernel.org/all/20250704094851.182131-1-j-choudhary@ti.com/

Changelog v3->v4:
- Minor cosmetic fixes in code, comments and commit message
- Pick up R-by and add Fixes tag

v3 patch link:
https://lore.kernel.org/all/20250701095541.190422-1-j-choudhary@ti.com/

Changelog v2->v3:
- Add changes for OLDI
- Rename max_pclk as it is misleading
- Change commit message to make it more appropriate
- Drop unnecessary zero initialization

v2 patch link:
https://lore.kernel.org/all/20250618100509.20386-1-j-choudhary@ti.com/

Changelog v1->v2:
- Rebase it on linux-next after OLDI support series as all of its
  patches are reviewed and tested and it touches one of the functions
  used.
  
v1 patch link:
https://lore.kernel.org/all/20250618075804.139844-1-j-choudhary@ti.com/

Jayesh Choudhary (3):
  drm/tidss: oldi: Add property to identify OLDI supported VP
  drm/tidss: Remove max_pclk_khz from tidss display features
  drm/tidss: oldi: Add atomic_check hook for oldi bridge

 drivers/gpu/drm/tidss/tidss_dispc.c | 85 +++++++++++++----------------
 drivers/gpu/drm/tidss/tidss_dispc.h |  1 -
 drivers/gpu/drm/tidss/tidss_drv.h   | 11 ++++
 drivers/gpu/drm/tidss/tidss_oldi.c  | 27 +++++++++
 4 files changed, 75 insertions(+), 49 deletions(-)


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-09-03  9:44 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 19:21 [PATCH v5 0/3] Decouple max_pclk check from constant display feats Swamil Jain
2025-08-19 19:21 ` [PATCH v5 1/3] drm/tidss: oldi: Add property to identify OLDI supported VP Swamil Jain
2025-08-19 19:21 ` [PATCH v5 2/3] drm/tidss: Remove max_pclk_khz from tidss display features Swamil Jain
2025-08-27  8:49   ` Tomi Valkeinen
2025-08-27  9:27     ` Maxime Ripard
2025-08-27  9:49       ` Tomi Valkeinen
2025-08-27 10:34         ` Maxime Ripard
2025-08-27 10:39           ` Tomi Valkeinen
2025-08-27 11:25             ` Maxime Ripard
2025-08-29  3:37         ` Swamil Jain
2025-09-03  8:38         ` Swamil Jain
2025-09-03  9:31           ` Tomi Valkeinen
2025-09-03  9:43             ` Swamil Jain
2025-08-29  3:35       ` Swamil Jain
2025-08-28 16:44     ` Swamil Jain
2025-08-19 19:21 ` [PATCH v5 3/3] drm/tidss: oldi: Add atomic_check hook for oldi bridge Swamil Jain
2025-08-27  9:05   ` Tomi Valkeinen
2025-08-29  3:50     ` Swamil Jain
2025-09-01  8:52       ` Tomi Valkeinen
2025-09-01  8:59         ` Swamil Jain
2025-08-21 12:09 ` [PATCH v5 0/3] Decouple max_pclk check from constant display feats Michael Walle
2025-08-28 15:59   ` Swamil Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).