Skip to content

Commit 1934bf5

Browse files
nikhildevshatwarmartinezjavier
authored andcommitted
drm/bridge: mhdp8546: Set input_bus_flags from atomic_check
input_bus_flags are specified in drm_bridge_timings (legacy) as well as drm_bridge_state->input_bus_cfg.flags The flags from the timings will be deprecated. Bridges are supposed to validate and set the bridge state flags from atomic_check. Signed-off-by: Nikhil Devshatwar <[email protected]> [a-bhatia1: replace timings in cdns_mhdp_platform_info by input_bus_flags] Signed-off-by: Aradhya Bhatia <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0db3cef commit 1934bf5

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,13 @@ static int cdns_mhdp_atomic_check(struct drm_bridge *bridge,
21862186
return -EINVAL;
21872187
}
21882188

2189+
/*
2190+
* There might be flags negotiation supported in future.
2191+
* Set the bus flags in atomic_check statically for now.
2192+
*/
2193+
if (mhdp->info)
2194+
bridge_state->input_bus_cfg.flags = *mhdp->info->input_bus_flags;
2195+
21892196
mutex_unlock(&mhdp->link_mutex);
21902197
return 0;
21912198
}
@@ -2551,8 +2558,6 @@ static int cdns_mhdp_probe(struct platform_device *pdev)
25512558
mhdp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
25522559
DRM_BRIDGE_OP_HPD;
25532560
mhdp->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
2554-
if (mhdp->info)
2555-
mhdp->bridge.timings = mhdp->info->timings;
25562561

25572562
ret = phy_init(mhdp->phy);
25582563
if (ret) {
@@ -2639,7 +2644,7 @@ static const struct of_device_id mhdp_ids[] = {
26392644
#ifdef CONFIG_DRM_CDNS_MHDP8546_J721E
26402645
{ .compatible = "ti,j721e-mhdp8546",
26412646
.data = &(const struct cdns_mhdp_platform_info) {
2642-
.timings = &mhdp_ti_j721e_bridge_timings,
2647+
.input_bus_flags = &mhdp_ti_j721e_bridge_input_bus_flags,
26432648
.ops = &mhdp_ti_j721e_ops,
26442649
},
26452650
},

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ struct cdns_mhdp_bridge_state {
336336
};
337337

338338
struct cdns_mhdp_platform_info {
339-
const struct drm_bridge_timings *timings;
339+
const u32 *input_bus_flags;
340340
const struct mhdp_platform_ops *ops;
341341
};
342342

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ const struct mhdp_platform_ops mhdp_ti_j721e_ops = {
7171
.disable = cdns_mhdp_j721e_disable,
7272
};
7373

74-
const struct drm_bridge_timings mhdp_ti_j721e_bridge_timings = {
75-
.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
76-
DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE |
77-
DRM_BUS_FLAG_DE_HIGH,
78-
};
74+
const u32
75+
mhdp_ti_j721e_bridge_input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
76+
DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE |
77+
DRM_BUS_FLAG_DE_HIGH;

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
struct mhdp_platform_ops;
1515

1616
extern const struct mhdp_platform_ops mhdp_ti_j721e_ops;
17-
extern const struct drm_bridge_timings mhdp_ti_j721e_bridge_timings;
17+
extern const u32 mhdp_ti_j721e_bridge_input_bus_flags;
1818

1919
#endif /* !CDNS_MHDP8546_J721E_H */

0 commit comments

Comments
 (0)