diff mbox

[2/2] drm/exynos: use irq_flags instead of triggering

Message ID 1415932564-16463-3-git-send-email-jy0922.shim@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Joonyoung Shim Nov. 14, 2014, 2:36 a.m. UTC
The drm_handle_vblank should be called whenever be vsync, te interrupt
means vsync on i80 interface.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
Based on lastest exynos-drm-next branch and patch of Youngjun Cho
("drm/exynos: fimd: move handle vblank position in TE handler").

 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

YoungJun Cho Nov. 14, 2014, 5:01 a.m. UTC | #1
Hi JoonYoung,

On 11/14/2014 11:36 AM, Joonyoung Shim wrote:
> The drm_handle_vblank should be called whenever be vsync, te interrupt
> means vsync on i80 interface.

That's right.

>
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> ---
> Based on lastest exynos-drm-next branch and patch of Youngjun Cho
> ("drm/exynos: fimd: move handle vblank position in TE handler").
>
>   drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 033b18b..5cc57f7 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -984,7 +984,7 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr)
>   		wake_up(&ctx->wait_vsync_queue);
>   	}
>
> -	if (!atomic_read(&ctx->triggering))
> +	if (test_bit(0, &ctx->irq_flags))
>   		drm_handle_vblank(ctx->drm_dev, ctx->pipe);

But after triggering, "fimd_irq_handler()" is called by "lcd_sys" 
interrupt and that calls "drm_handle_vblank()".

So I think "fimd_te_handler()" calls "drm_handle_vblank()" only 
non-triggering condition.

Thank you.
Best regards YJ

>   }
>
>

--
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
Joonyoung Shim Nov. 14, 2014, 5:12 a.m. UTC | #2
Hi,

On 11/14/2014 02:01 PM, YoungJun Cho wrote:
> Hi JoonYoung,
> 
> On 11/14/2014 11:36 AM, Joonyoung Shim wrote:
>> The drm_handle_vblank should be called whenever be vsync, te interrupt
>> means vsync on i80 interface.
> 
> That's right.
> 
>>
>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>> ---
>> Based on lastest exynos-drm-next branch and patch of Youngjun Cho
>> ("drm/exynos: fimd: move handle vblank position in TE handler").
>>
>>   drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index 033b18b..5cc57f7 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -984,7 +984,7 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr)
>>           wake_up(&ctx->wait_vsync_queue);
>>       }
>>
>> -    if (!atomic_read(&ctx->triggering))
>> +    if (test_bit(0, &ctx->irq_flags))
>>           drm_handle_vblank(ctx->drm_dev, ctx->pipe);
> 
> But after triggering, "fimd_irq_handler()" is called by "lcd_sys" interrupt and that calls "drm_handle_vblank()".
> 

I missed the routine but i think drm_handle_vblank should be called by
vsync interrupt handler. As you know, fimd_irq_handler is not vsync
interrupt handler on i80 interface.

> So I think "fimd_te_handler()" calls "drm_handle_vblank()" only non-triggering condition.
> 
> Thank you.
> Best regards YJ
> 
>>   }
>>
>>
> 
> 

--
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
YoungJun Cho Nov. 14, 2014, 5:28 a.m. UTC | #3
Hi JoonYoung,

On 11/14/2014 02:12 PM, Joonyoung Shim wrote:
> Hi,
>
> On 11/14/2014 02:01 PM, YoungJun Cho wrote:
>> Hi JoonYoung,
>>
>> On 11/14/2014 11:36 AM, Joonyoung Shim wrote:
>>> The drm_handle_vblank should be called whenever be vsync, te interrupt
>>> means vsync on i80 interface.
>>
>> That's right.
>>
>>>
>>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>>> ---
>>> Based on lastest exynos-drm-next branch and patch of Youngjun Cho
>>> ("drm/exynos: fimd: move handle vblank position in TE handler").
>>>
>>>    drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> index 033b18b..5cc57f7 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>>> @@ -984,7 +984,7 @@ static void fimd_te_handler(struct exynos_drm_manager *mgr)
>>>            wake_up(&ctx->wait_vsync_queue);
>>>        }
>>>
>>> -    if (!atomic_read(&ctx->triggering))
>>> +    if (test_bit(0, &ctx->irq_flags))
>>>            drm_handle_vblank(ctx->drm_dev, ctx->pipe);
>>
>> But after triggering, "fimd_irq_handler()" is called by "lcd_sys" interrupt and that calls "drm_handle_vblank()".
>>
>
> I missed the routine but i think drm_handle_vblank should be called by
> vsync interrupt handler. As you know, fimd_irq_handler is not vsync
> interrupt handler on i80 interface.

That sounds reasonable.
For that, we should modify "fimd_irq_handler()" not to call 
"drm_handle_vblank()" in I80 interface.

Thank you.
Best regards YJ

>
>> So I think "fimd_te_handler()" calls "drm_handle_vblank()" only non-triggering condition.
>>
>> Thank you.
>> Best regards YJ
>>
>>>    }
>>>
>>>
>>
>>
>
>

--
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_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 033b18b..5cc57f7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -984,7 +984,7 @@  static void fimd_te_handler(struct exynos_drm_manager *mgr)
 		wake_up(&ctx->wait_vsync_queue);
 	}
 
-	if (!atomic_read(&ctx->triggering))
+	if (test_bit(0, &ctx->irq_flags))
 		drm_handle_vblank(ctx->drm_dev, ctx->pipe);
 }