nwl-dsi: fixup mode only for LCDIF input, not DCSS
Subsystems (3)
The fixup of HSYNC and VSYNC should not be done when the input source is DCSS, or internal display does not work on MNT Reform 2 (open hardware laptop based on NXP i.MX8M using DCSS->DSI->eDP for internal display).
--- drivers/gpu/drm/bridge/nwl-dsi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/nwl-dsi.c +10 -4
@@ -807,10 +807,16 @@ static bool nwl_dsi_bridge_mode_fixup(struct drm_bridge *bridge,const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { -/* At least LCDIF + NWL needs active high sync */ - adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); - adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC ); + struct device_node *remote; +struct nwl_dsi *dsi =bridge_to_dsi (bridge); + + remote =of_graph_get_remote_node (dsi->dev->of_node,0 , +NWL_DSI_ENDPOINT_LCDIF ); +if (remote) { +/* At least LCDIF + NWL needs active high sync */ + adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC |DRM_MODE_FLAG_PVSYNC ); + adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC ); + }return true; } --
2.28.0
Hi Lukas,
Quoted 20 lines · Lukas F. Hartmann
The fixup of HSYNC and VSYNC should not be done when the input source is DCSS, or internal display does not work on MNT Reform 2 (open hardware laptop based on NXP i.MX8M using
DCSS->DSI->eDPfor internal display).Signed-off-by Lukas F. Hartmann <[email protected]>--- drivers/gpu/drm/bridge/nwl-dsi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)drivers/gpu/drm/bridge/nwl-dsi.c +0
-3@@ -807,10 +807,16 @@ static bool nwl_dsi_bridge_mode_fixup(struct drm_bridge *bridge,const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { -/* At least LCDIF + NWL needs active high sync */ - adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); - adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC );
drivers/gpu/drm/bridge/nwl-dsi.c static bool nwl_dsi_bridge_mode_fixup(struct drm_bridge *bridge, · line 819
Quoted 10 lines
drivers/gpu/drm/bridge/nwl-dsi.c +10
-0+struct device_node *remote; +struct nwl_dsi *dsi =bridge_to_dsi (bridge); + + remote =of_graph_get_remote_node (dsi->dev->of_node,0 , +NWL_DSI_ENDPOINT_LCDIF ); +if (remote) { +/* At least LCDIF + NWL needs active high sync */ + adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC |DRM_MODE_FLAG_PVSYNC ); + adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_NVSYNC ); + }
When submitting the NWL driver i was told to not change properties based on the endpoint. The argument is that this breaks when putting the bridge into another chain and that there might be other bridges in between. Maybe Laurent and Andrzej have a suggetion?
I intend to respin the input mux bridge
(https://lore.kernel.org/dri-devel/[email protected]/)
at some point but even then we need to carry over the flags, so any input on how that should best be done would be welcome.
Cheers,
-- Guido
Quoted 6 lines
drivers/gpu/drm/bridge/nwl-dsi.c +0
-1return true; } --2.28.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel