Skip to contentSkip to conversation

drm/msm/dsi: set encoder mode for DRM bridge explicitly

PATCH In review Abhinav Kumar 2 participants 2 messages Jun 16, 2018 – Jun 19, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dsi: set encoder mode for DRM bridge explicitly

Currently, DRM bridge for DPU relies on the default video mode setting to set the encoder mode.

Add an explicit call to set the encoder mode for bridges.

---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/dsi/dsi_manager.c +4 -2
index 4cb1cb6..0607ad0 100644
@@ -836,6 +836,7 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags)
 	struct msm_drm_private *priv;
 	struct msm_kms *kms;
 	struct drm_encoder *encoder;
+	bool cmd_mode;
 
 	/*
 	 * drm_device pointer is assigned to msm_dsi only in the modeset_init
@@ -850,10 +851,11 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags)
 	priv = dev->dev_private;
 	kms = priv->kms;
 	encoder = msm_dsi_get_encoder(msm_dsi);
+	cmd_mode = !(device_flags &
+				 MIPI_DSI_MODE_VIDEO);
 
 	if (encoder && kms->funcs->set_encoder_mode)
-		if (!(device_flags & MIPI_DSI_MODE_VIDEO))
-			kms->funcs->set_encoder_mode(kms, encoder, true);
+		kms->funcs->set_encoder_mode(kms, encoder, cmd_mode);
 }
 
 int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
Signature · 7 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

A message that is not in the archive (sent off-list or not yet received): 1529128619-7703-1-git-send-email-abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 4 lines · Abhinav Kumar

Currently, DRM bridge for DPU relies on the default video mode setting to set the encoder mode.

Add an explicit call to set the encoder mode for bridges.

Quoted 23 lines
---
  drivers/gpu/drm/msm/dsi/dsi_manager.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/dsi/dsi_manager.c +1 -0
index 4cb1cb6..0607ad0 100644
@@ -836,6 +836,7 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags)
  	struct msm_drm_private *priv;
  	struct msm_kms *kms;
  	struct drm_encoder *encoder;
+	bool cmd_mode;
 
  	/*
  	 * drm_device pointer is assigned to msm_dsi only in the modeset_init
@@ -850,10 +851,11 @@ void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags)
  	priv = dev->dev_private;
  	kms = priv->kms;
  	encoder = msm_dsi_get_encoder(msm_dsi);

drivers/gpu/drm/msm/dsi/dsi_manager.c void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags) · line 861

Quoted 10 lines
drivers/gpu/drm/msm/dsi/dsi_manager.c +3 -2
+	cmd_mode = !(device_flags &
+				 MIPI_DSI_MODE_VIDEO);
 
  	if (encoder && kms->funcs->set_encoder_mode)
-		if (!(device_flags & MIPI_DSI_MODE_VIDEO))
-			kms->funcs->set_encoder_mode(kms, encoder, true);
+		kms->funcs->set_encoder_mode(kms, encoder, cmd_mode);
  }
 
  int msm_dsi_manager_register(struct msm_dsi *msm_dsi)

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno