Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <nikhil.nd@ti.com>
[a-bhatia1: replace timings in cdns_mhdp_platform_info by input_bus_flags]
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230606082142.23760-5-a-bhatia1@ti.com

authored by

Nikhil Devshatwar and committed by
Javier Martinez Canillas
1934bf53 0db3cef1

+14 -10
+8 -3
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
··· 2186 2186 return -EINVAL; 2187 2187 } 2188 2188 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 + 2189 2196 mutex_unlock(&mhdp->link_mutex); 2190 2197 return 0; 2191 2198 } ··· 2558 2551 mhdp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | 2559 2552 DRM_BRIDGE_OP_HPD; 2560 2553 mhdp->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; 2561 - if (mhdp->info) 2562 - mhdp->bridge.timings = mhdp->info->timings; 2563 2554 2564 2555 ret = phy_init(mhdp->phy); 2565 2556 if (ret) { ··· 2644 2639 #ifdef CONFIG_DRM_CDNS_MHDP8546_J721E 2645 2640 { .compatible = "ti,j721e-mhdp8546", 2646 2641 .data = &(const struct cdns_mhdp_platform_info) { 2647 - .timings = &mhdp_ti_j721e_bridge_timings, 2642 + .input_bus_flags = &mhdp_ti_j721e_bridge_input_bus_flags, 2648 2643 .ops = &mhdp_ti_j721e_ops, 2649 2644 }, 2650 2645 },
+1 -1
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h
··· 336 336 }; 337 337 338 338 struct cdns_mhdp_platform_info { 339 - const struct drm_bridge_timings *timings; 339 + const u32 *input_bus_flags; 340 340 const struct mhdp_platform_ops *ops; 341 341 }; 342 342
+4 -5
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c
··· 71 71 .disable = cdns_mhdp_j721e_disable, 72 72 }; 73 73 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;
+1 -1
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h
··· 14 14 struct mhdp_platform_ops; 15 15 16 16 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; 18 18 19 19 #endif /* !CDNS_MHDP8546_J721E_H */