drm/bridge: synopsys: dw-mipi-dsi: Force input bus flags
authorLiu Ying <victor.liu@nxp.com>
Mon, 21 Aug 2023 03:40:02 +0000 (11:40 +0800)
committerRobert Foss <rfoss@kernel.org>
Mon, 16 Oct 2023 09:38:41 +0000 (11:38 +0200)
commitd5116fb29dc09bd4b9d9175f4f571e6eac539c93
tree38edb6148ac99062ff92d24444b69e8ff163defc
parent0de852d4c23a39d3ebff73d0c0c1b488eac6c5a8
drm/bridge: synopsys: dw-mipi-dsi: Force input bus flags

The DATAEN_ACTIVE_LOW bit in DSI_DPI_CFG_POL register is set to zero,
so set the DRM_BUS_FLAG_DE_HIGH flag in input_bus_cfg.flags.  It appears
that the DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE flag also makes sense, so
set it in input_bus_cfg.flags too.  With this patch, the flags set by
drm_atomic_bridge_propagate_bus_flags() are overridden (see comment in
that function) in case any downstream bridges propagates invalid flags
to this bridge.  A real problematic case is to connect a RM67191 MIPI
DSI panel whose driver sets DRM_BUS_FLAG_DE_LOW and
DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE bus flags.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230821034008.3876938-4-victor.liu@nxp.com
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c