diff mbox

[v2] drm/radeon: Remove deprecated create_singlethread_workqueue

Message ID 20160716113044.GA18061@Karyakshetra (mailing list archive)
State New, archived
Headers show

Commit Message

Bhaktipriya Shridhar July 16, 2016, 11:30 a.m. UTC
alloc_workqueue replaces deprecated create_singlethread_workqueue().

Each hardware CRTC has a single flip work queue.
When a radeon_flip_work_func item is queued, it needs to be executed
ASAP because even a slight delay may cause the flip to be delayed by
one refresh cycle.

Hence, a dedicated workqueue with WQ_HIGHPRI set, has been used here
since a delay can cause the outcome to miss the refresh cycle.

Since there are only a fixed number of work items, explicit concurrency
limit is unnecessary here.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 Changes in v2:
	-Used a dedicated work queue with WQ_HIGHPRI

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

--
2.1.4

Comments

Christian König July 18, 2016, 1:21 p.m. UTC | #1
Am 16.07.2016 um 13:30 schrieb Bhaktipriya Shridhar:
> alloc_workqueue replaces deprecated create_singlethread_workqueue().
>
> Each hardware CRTC has a single flip work queue.
> When a radeon_flip_work_func item is queued, it needs to be executed
> ASAP because even a slight delay may cause the flip to be delayed by
> one refresh cycle.
>
> Hence, a dedicated workqueue with WQ_HIGHPRI set, has been used here
> since a delay can cause the outcome to miss the refresh cycle.
>
> Since there are only a fixed number of work items, explicit concurrency
> limit is unnecessary here.
>
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   Changes in v2:
> 	-Used a dedicated work queue with WQ_HIGHPRI
>
>   drivers/gpu/drm/radeon/radeon_display.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index 6a41b49..64b246e 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -711,7 +711,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
>
>   	drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
>   	radeon_crtc->crtc_id = index;
> -	radeon_crtc->flip_queue = create_singlethread_workqueue("radeon-crtc");
> +	radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI, 0);
>   	rdev->mode_info.crtcs[index] = radeon_crtc;
>
>   	if (rdev->family >= CHIP_BONAIRE) {
> --
> 2.1.4
>
Tejun Heo July 19, 2016, 12:48 a.m. UTC | #2
On Sat, Jul 16, 2016 at 05:00:44PM +0530, Bhaktipriya Shridhar wrote:
> 
> alloc_workqueue replaces deprecated create_singlethread_workqueue().
> 
> Each hardware CRTC has a single flip work queue.
> When a radeon_flip_work_func item is queued, it needs to be executed
> ASAP because even a slight delay may cause the flip to be delayed by
> one refresh cycle.
> 
> Hence, a dedicated workqueue with WQ_HIGHPRI set, has been used here
> since a delay can cause the outcome to miss the refresh cycle.
> 
> Since there are only a fixed number of work items, explicit concurrency
> limit is unnecessary here.
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.
Alex Deucher July 28, 2016, 4:14 p.m. UTC | #3
On Mon, Jul 18, 2016 at 8:48 PM, Tejun Heo <tj@kernel.org> wrote:
> On Sat, Jul 16, 2016 at 05:00:44PM +0530, Bhaktipriya Shridhar wrote:
>>
>> alloc_workqueue replaces deprecated create_singlethread_workqueue().
>>
>> Each hardware CRTC has a single flip work queue.
>> When a radeon_flip_work_func item is queued, it needs to be executed
>> ASAP because even a slight delay may cause the flip to be delayed by
>> one refresh cycle.
>>
>> Hence, a dedicated workqueue with WQ_HIGHPRI set, has been used here
>> since a delay can cause the outcome to miss the refresh cycle.
>>
>> Since there are only a fixed number of work items, explicit concurrency
>> limit is unnecessary here.
>>
>> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
>
> Acked-by: Tejun Heo <tj@kernel.org>
>

Applied.  thanks!

Alex

> Thanks.
>
> --
> tejun
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 6a41b49..64b246e 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -711,7 +711,7 @@  static void radeon_crtc_init(struct drm_device *dev, int index)

 	drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
 	radeon_crtc->crtc_id = index;
-	radeon_crtc->flip_queue = create_singlethread_workqueue("radeon-crtc");
+	radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI, 0);
 	rdev->mode_info.crtcs[index] = radeon_crtc;

 	if (rdev->family >= CHIP_BONAIRE) {