mbox series

[v4,0/2] Add mode_valid and atomic_check hooks for sii902x bridge

Message ID 20240530092930.434026-1-j-choudhary@ti.com (mailing list archive)
Headers show
Series Add mode_valid and atomic_check hooks for sii902x bridge | expand

Message

Jayesh Choudhary May 30, 2024, 9:29 a.m. UTC
Move the mode_valid hook to drm_bridge_funcs structure to take care
of the case when the encoder attaches the bridge chain with the
DRM_BRIDGE_ATTACH_NO_CONNECTOR flag in which case, the connector is not
initialized in the bridge's attach call and mode_valid is not called.

Also add this check to the atomic_check call as suggested by Maxime in
v1 patch.

Changelog v3->v4:
- Remove mode_valid hook from connector_helper_funcs as it is not needed.

v3 patch:
<https://lore.kernel.org/all/20240524093509.127189-1-j-choudhary@ti.com/>

Changelog v2->v3:
- Remove newline that was introduced in [1/2] and later deleted in [2/2]
  in v2

v2 patch:
<https://lore.kernel.org/all/20240524073305.107293-1-j-choudhary@ti.com/>

Changelog v1->v2:
- Add KHZ suffix in the macros to be more clear
- Add the hook for drm_bridge_funcs as well
- Add check in atomic_check dunction call (in a separate patch)

v1 patch:
<https://lore.kernel.org/all/20240408081435.216927-1-j-choudhary@ti.com/>

Jayesh Choudhary (2):
  drm/bridge: sii902x: Fix mode_valid hook
  drm/bridge: Add pixel clock check in atomic_check

 drivers/gpu/drm/bridge/sii902x.c | 38 ++++++++++++++++++++++++--------
 1 file changed, 29 insertions(+), 9 deletions(-)

Comments

Sui Jingfeng May 31, 2024, 12:55 p.m. UTC | #1
Hi,

On 5/30/24 17:29, Jayesh Choudhary wrote:
> Move the mode_valid hook to drm_bridge_funcs structure to take care
> of the case when the encoder attaches the bridge chain with the
> DRM_BRIDGE_ATTACH_NO_CONNECTOR flag in which case, the connector is not
> initialized in the bridge's attach call and mode_valid is not called.

Good catch, as modes being supported is actually a capability of the
bridge itself. The move make the driver reflect the hardware more.