diff mbox

[4/4] drm/exynos/decon5433: signal frame done interrupt at VSYNC

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

Commit Message

Andrzej Hajda Feb. 22, 2017, 4:05 p.m. UTC
DECON in case of video mode generates interrupt by default at start
of vertical back porch. As this interrupt is used to generate VBLANK
events more optimal point is start of vertical front porch.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +-
 include/video/exynos5433_decon.h              | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Inki Dae March 7, 2017, 9:14 a.m. UTC | #1
2017년 02월 23일 01:05에 Andrzej Hajda 이(가) 쓴 글:
> DECON in case of video mode generates interrupt by default at start
> of vertical back porch. As this interrupt is used to generate VBLANK
> events more optimal point is start of vertical front porch.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +-
>  include/video/exynos5433_decon.h              | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> index bfa9396..2694b32 100644
> --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> @@ -105,7 +105,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
>  		if (ctx->out_type & IFTYPE_I80)
>  			val |= VIDINTCON0_FRAMEDONE;
>  		else
> -			val |= VIDINTCON0_INTFRMEN;
> +			val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP;
>  
>  		writel(val, ctx->addr + DECON_VIDINTCON0);
>  	}
> diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h
> index beefc62..2391b03 100644
> --- a/include/video/exynos5433_decon.h
> +++ b/include/video/exynos5433_decon.h
> @@ -128,6 +128,10 @@
>  
>  /* VIDINTCON0 */
>  #define VIDINTCON0_FRAMEDONE		(1 << 17)
> +#define VIDINTCON0_FRAMESEL_BP		(0 << 15)
> +#define VIDINTCON0_FRAMESEL_VS		(1 << 15)
> +#define VIDINTCON0_FRAMESEL_AC		(2 << 15)

Above definitions are not used.

Thanks.

> +#define VIDINTCON0_FRAMESEL_FP		(3 << 15)
>  #define VIDINTCON0_INTFRMEN		(1 << 12)
>  #define VIDINTCON0_INTEN		(1 << 0)
>  
> 
--
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 March 8, 2017, 10:47 a.m. UTC | #2
On 07.03.2017 10:14, Inki Dae wrote:
>
> 2017년 02월 23일 01:05에 Andrzej Hajda 이(가) 쓴 글:
>> DECON in case of video mode generates interrupt by default at start
>> of vertical back porch. As this interrupt is used to generate VBLANK
>> events more optimal point is start of vertical front porch.
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +-
>>  include/video/exynos5433_decon.h              | 4 ++++
>>  2 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
>> index bfa9396..2694b32 100644
>> --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
>> +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
>> @@ -105,7 +105,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
>>  		if (ctx->out_type & IFTYPE_I80)
>>  			val |= VIDINTCON0_FRAMEDONE;
>>  		else
>> -			val |= VIDINTCON0_INTFRMEN;
>> +			val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP;
>>  
>>  		writel(val, ctx->addr + DECON_VIDINTCON0);
>>  	}
>> diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h
>> index beefc62..2391b03 100644
>> --- a/include/video/exynos5433_decon.h
>> +++ b/include/video/exynos5433_decon.h
>> @@ -128,6 +128,10 @@
>>  
>>  /* VIDINTCON0 */
>>  #define VIDINTCON0_FRAMEDONE		(1 << 17)
>> +#define VIDINTCON0_FRAMESEL_BP		(0 << 15)
>> +#define VIDINTCON0_FRAMESEL_VS		(1 << 15)
>> +#define VIDINTCON0_FRAMESEL_AC		(2 << 15)
> Above definitions are not used.

Yes, similarly to multiple other definitions in this file and as in many
other files with HW registers related definitions. I can remove it if
you prefer, but maybe it would be better to leave it as it documents the
hardware.

Regards
Andrzej

>
> Thanks.
>
>> +#define VIDINTCON0_FRAMESEL_FP		(3 << 15)
>>  #define VIDINTCON0_INTFRMEN		(1 << 12)
>>  #define VIDINTCON0_INTEN		(1 << 0)
>>  
>>
>

--
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/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index bfa9396..2694b32 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -105,7 +105,7 @@  static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
 		if (ctx->out_type & IFTYPE_I80)
 			val |= VIDINTCON0_FRAMEDONE;
 		else
-			val |= VIDINTCON0_INTFRMEN;
+			val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP;
 
 		writel(val, ctx->addr + DECON_VIDINTCON0);
 	}
diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h
index beefc62..2391b03 100644
--- a/include/video/exynos5433_decon.h
+++ b/include/video/exynos5433_decon.h
@@ -128,6 +128,10 @@ 
 
 /* VIDINTCON0 */
 #define VIDINTCON0_FRAMEDONE		(1 << 17)
+#define VIDINTCON0_FRAMESEL_BP		(0 << 15)
+#define VIDINTCON0_FRAMESEL_VS		(1 << 15)
+#define VIDINTCON0_FRAMESEL_AC		(2 << 15)
+#define VIDINTCON0_FRAMESEL_FP		(3 << 15)
 #define VIDINTCON0_INTFRMEN		(1 << 12)
 #define VIDINTCON0_INTEN		(1 << 0)