diff mbox

[4/7] drm/exynos: propagate info about command mode from panel

Message ID 1492519203-23537-5-git-send-email-a.hajda@samsung.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Andrzej Hajda April 18, 2017, 12:40 p.m. UTC
mipi_dsi framework provides information about panel's mode of work.
This info should be propagated upstream to configure all elements of
the pipeline. As CRTC is the common nominator of the pipeline we can put
such info into its structures.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 +
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 ++
 2 files changed, 3 insertions(+)

Comments

Inki Dae Aug. 1, 2017, 9:49 a.m. UTC | #1
2017년 04월 18일 21:40에 Andrzej Hajda 이(가) 쓴 글:
> mipi_dsi framework provides information about panel's mode of work.
> This info should be propagated upstream to configure all elements of
> the pipeline. As CRTC is the common nominator of the pipeline we can put
> such info into its structures.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 +
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> index 527bf1d..96b9d49 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> @@ -165,6 +165,7 @@ struct exynos_drm_crtc {
>  	const struct exynos_drm_crtc_ops	*ops;
>  	void				*ctx;
>  	struct exynos_drm_clk		*pipe_clk;
> +	bool				i80_mode : 1;
>  };
>  
>  static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc,
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 515090f..79df1c9 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1545,6 +1545,8 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
>  		drm_panel_attach(dsi->panel, &dsi->connector);
>  		dsi->connector.status = connector_status_connected;
>  	}
> +	exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode =
> +			!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO);

No place to use i80_mode in this patch. Seems this patch, patch 5 and portion of using i80_mode in patch 6 should become one patch. 

Thanks,
Inki Dae

>  
>  	mutex_unlock(&drm->mode_config.mutex);
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrzej Hajda Aug. 14, 2017, 7:14 a.m. UTC | #2
On 01.08.2017 11:49, Inki Dae wrote:
>
> 2017년 04월 18일 21:40에 Andrzej Hajda 이(가) 쓴 글:
>> mipi_dsi framework provides information about panel's mode of work.
>> This info should be propagated upstream to configure all elements of
>> the pipeline. As CRTC is the common nominator of the pipeline we can put
>> such info into its structures.
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 +
>>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 ++
>>  2 files changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
>> index 527bf1d..96b9d49 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
>> @@ -165,6 +165,7 @@ struct exynos_drm_crtc {
>>  	const struct exynos_drm_crtc_ops	*ops;
>>  	void				*ctx;
>>  	struct exynos_drm_clk		*pipe_clk;
>> +	bool				i80_mode : 1;
>>  };
>>  
>>  static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc,
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> index 515090f..79df1c9 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>> @@ -1545,6 +1545,8 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
>>  		drm_panel_attach(dsi->panel, &dsi->connector);
>>  		dsi->connector.status = connector_status_connected;
>>  	}
>> +	exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode =
>> +			!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO);
> No place to use i80_mode in this patch. Seems this patch, patch 5 and portion of using i80_mode in patch 6 should become one patch. 

I have tried to separate propagation of panel mode of work (in DSI
driver) from using this info in upstream drivers (MIC, DECON).
But if you prefer I can combine it into one patch.

Regards
Andrzej

>
> Thanks,
> Inki Dae
>
>>  
>>  	mutex_unlock(&drm->mode_config.mutex);
>>  
>>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 527bf1d..96b9d49 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -165,6 +165,7 @@  struct exynos_drm_crtc {
 	const struct exynos_drm_crtc_ops	*ops;
 	void				*ctx;
 	struct exynos_drm_clk		*pipe_clk;
+	bool				i80_mode : 1;
 };
 
 static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 515090f..79df1c9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1545,6 +1545,8 @@  static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
 		drm_panel_attach(dsi->panel, &dsi->connector);
 		dsi->connector.status = connector_status_connected;
 	}
+	exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode =
+			!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO);
 
 	mutex_unlock(&drm->mode_config.mutex);