diff mbox

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

Message ID 1529128619-7703-1-git-send-email-abhinavk@codeaurora.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Abhinav Kumar June 16, 2018, 5:56 a.m. UTC
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.

Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Archit Taneja June 19, 2018, 11:39 a.m. UTC | #1
On Saturday 16 June 2018 11:26 AM, Abhinav Kumar wrote:
> 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.

Reviewed-by: Archit Taneja <architt@codeauorora.org>

> 
> Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
>   drivers/gpu/drm/msm/dsi/dsi_manager.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index 4cb1cb6..0607ad0 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -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)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 4cb1cb6..0607ad0 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -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)