Patchwork [U-Boot,RESEND,2/4] video: Fix compilation dependency of exynos_dp and exynos_mipi on exynos_fb

login
register
mail settings
Submitter Ajay Kumar
Date Dec. 13, 2012, 11:29 a.m.
Message ID <1355398167-24845-3-git-send-email-ajaykumar.rs@samsung.com>
Download mbox | patch
Permalink /patch/205811/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Ajay Kumar - Dec. 13, 2012, 11:29 a.m.
When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM.
Similarly, when only MIPI is used, we need not enable CONFIG_EXYNOS_DP.
But the current structuring of code forces us to enable both
CONFIG_EXYNOS_MIPI_DSIM and CONFIG_EXYNOS_DP.
This patch adds conditional compilation check to remove the dependency.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
 drivers/video/exynos_fb.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Minkyu Kang - Dec. 15, 2012, 5:25 a.m.
Dear Ajay,

On 13/12/12 20:29, Ajay Kumar wrote:
> When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM.
> Similarly, when only MIPI is used, we need not enable CONFIG_EXYNOS_DP.
> But the current structuring of code forces us to enable both
> CONFIG_EXYNOS_MIPI_DSIM and CONFIG_EXYNOS_DP.
> This patch adds conditional compilation check to remove the dependency.
> 
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>  drivers/video/exynos_fb.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
> index d9a3f9a..39d3b74 100644
> --- a/drivers/video/exynos_fb.c
> +++ b/drivers/video/exynos_fb.c
> @@ -103,8 +103,10 @@ static void lcd_panel_on(vidinfo_t *vid)
>  
>  	udelay(vid->power_on_delay);
>  
> +#ifdef CONFIG_EXYNOS_DP
>  	if (vid->dp_enabled)
>  		exynos_init_dp();
> +#endif

Unnecessary.
please see arch/arm/include/asm/arch-exynos/dp_info.h

#ifdef CONFIG_EXYNOS_DP
unsigned int exynos_init_dp(void);
#else
unsigned int exynos_init_dp(void)
{
	return 0;
}
#endif

>  
>  	if (vid->reset_lcd) {
>  		vid->reset_lcd();
> @@ -120,8 +122,10 @@ static void lcd_panel_on(vidinfo_t *vid)
>  	if (vid->enable_ldo)
>  		vid->enable_ldo(1);
>  
> +#ifdef CONFIG_EXYNOS_MIPI_DSIM
>  	if (vid->mipi_enabled)
>  		exynos_mipi_dsi_init();
> +#endif

This should be modified like exynos_init_dp?

Donghwa, how you think?

>  }
>  
>  void lcd_ctrl_init(void *lcdbase)
> 

Thanks.
Minkyu Kang.
Donghwa Lee - Dec. 17, 2012, 12:53 a.m.
On 2012년 12월 15일 14:25, Minkyu Kang wrote:
> Dear Ajay,
>
> On 13/12/12 20:29, Ajay Kumar wrote:
>> When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM.
>> Similarly, when only MIPI is used, we need not enable CONFIG_EXYNOS_DP.
>> But the current structuring of code forces us to enable both
>> CONFIG_EXYNOS_MIPI_DSIM and CONFIG_EXYNOS_DP.
>> This patch adds conditional compilation check to remove the dependency.
>>
>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
>> Acked-by: Simon Glass <sjg@chromium.org>
>> ---
>>   drivers/video/exynos_fb.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
>> index d9a3f9a..39d3b74 100644
>> --- a/drivers/video/exynos_fb.c
>> +++ b/drivers/video/exynos_fb.c
>> @@ -103,8 +103,10 @@ static void lcd_panel_on(vidinfo_t *vid)
>>   
>>   	udelay(vid->power_on_delay);
>>   
>> +#ifdef CONFIG_EXYNOS_DP
>>   	if (vid->dp_enabled)
>>   		exynos_init_dp();
>> +#endif
> Unnecessary.
> please see arch/arm/include/asm/arch-exynos/dp_info.h
>
> #ifdef CONFIG_EXYNOS_DP
> unsigned int exynos_init_dp(void);
> #else
> unsigned int exynos_init_dp(void)
> {
> 	return 0;
> }
> #endif
>
>>   
>>   	if (vid->reset_lcd) {
>>   		vid->reset_lcd();
>> @@ -120,8 +122,10 @@ static void lcd_panel_on(vidinfo_t *vid)
>>   	if (vid->enable_ldo)
>>   		vid->enable_ldo(1);
>>   
>> +#ifdef CONFIG_EXYNOS_MIPI_DSIM
>>   	if (vid->mipi_enabled)
>>   		exynos_mipi_dsi_init();
>> +#endif
> This should be modified like exynos_init_dp?
>
> Donghwa, how you think?

I agree with you. It looks better than using #ifdef.

Thank you,
Donghwa Lee

Patch

diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index d9a3f9a..39d3b74 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -103,8 +103,10 @@  static void lcd_panel_on(vidinfo_t *vid)
 
 	udelay(vid->power_on_delay);
 
+#ifdef CONFIG_EXYNOS_DP
 	if (vid->dp_enabled)
 		exynos_init_dp();
+#endif
 
 	if (vid->reset_lcd) {
 		vid->reset_lcd();
@@ -120,8 +122,10 @@  static void lcd_panel_on(vidinfo_t *vid)
 	if (vid->enable_ldo)
 		vid->enable_ldo(1);
 
+#ifdef CONFIG_EXYNOS_MIPI_DSIM
 	if (vid->mipi_enabled)
 		exynos_mipi_dsi_init();
+#endif
 }
 
 void lcd_ctrl_init(void *lcdbase)