* [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
@ 2018-02-21 15:23 Maarten Lankhorst
2018-02-21 18:36 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Maarten Lankhorst @ 2018-02-21 15:23 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx
After we acquired all generic modeset locks in drm_modeset_lock_all, it's
unsafe acquire any other so just mark acquisition as done.
Atomic drivers shouldn't use drm_modeset_lock_all.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/drm_modeset_lock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
index 963e23db0fe7..8a5100685875 100644
--- a/drivers/gpu/drm/drm_modeset_lock.c
+++ b/drivers/gpu/drm/drm_modeset_lock.c
@@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
kfree(ctx);
return;
}
+ ww_acquire_done(&ctx->ww_ctx);
WARN_ON(config->acquire_ctx);
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
2018-02-21 15:23 [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all Maarten Lankhorst
@ 2018-02-21 18:36 ` Daniel Vetter
2018-02-21 19:39 ` Harry Wentland
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2018-02-21 18:36 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx, dri-devel
On Wed, Feb 21, 2018 at 04:23:31PM +0100, Maarten Lankhorst wrote:
> After we acquired all generic modeset locks in drm_modeset_lock_all, it's
> unsafe acquire any other so just mark acquisition as done.
>
> Atomic drivers shouldn't use drm_modeset_lock_all.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Also, I'm pretty much expecting to regret this like all the other
ww_acquire_done patches I've acked, but where's the fun in not trying :-)
Cheers, Daniel
> ---
> drivers/gpu/drm/drm_modeset_lock.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> index 963e23db0fe7..8a5100685875 100644
> --- a/drivers/gpu/drm/drm_modeset_lock.c
> +++ b/drivers/gpu/drm/drm_modeset_lock.c
> @@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
> kfree(ctx);
> return;
> }
> + ww_acquire_done(&ctx->ww_ctx);
>
> WARN_ON(config->acquire_ctx);
>
> --
> 2.16.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
2018-02-21 18:36 ` Daniel Vetter
@ 2018-02-21 19:39 ` Harry Wentland
2018-03-05 9:51 ` Maarten Lankhorst
0 siblings, 1 reply; 4+ messages in thread
From: Harry Wentland @ 2018-02-21 19:39 UTC (permalink / raw)
To: Daniel Vetter, Maarten Lankhorst; +Cc: intel-gfx, dri-devel
On 2018-02-21 01:36 PM, Daniel Vetter wrote:
> On Wed, Feb 21, 2018 at 04:23:31PM +0100, Maarten Lankhorst wrote:
>> After we acquired all generic modeset locks in drm_modeset_lock_all, it's
>> unsafe acquire any other so just mark acquisition as done.
>>
>> Atomic drivers shouldn't use drm_modeset_lock_all.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Also, I'm pretty much expecting to regret this like all the other
> ww_acquire_done patches I've acked, but where's the fun in not trying :-)
>
This shouldn't really hurt anything, other than throw DEBUG warnings if DEBUG_MUTEXES is on.
Acked-by: Harry Wentland <harry.wentland@amd.com>
Harry
> Cheers, Daniel
>
>> ---
>> drivers/gpu/drm/drm_modeset_lock.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
>> index 963e23db0fe7..8a5100685875 100644
>> --- a/drivers/gpu/drm/drm_modeset_lock.c
>> +++ b/drivers/gpu/drm/drm_modeset_lock.c
>> @@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
>> kfree(ctx);
>> return;
>> }
>> + ww_acquire_done(&ctx->ww_ctx);
>>
>> WARN_ON(config->acquire_ctx);
>>
>> --
>> 2.16.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all
2018-02-21 19:39 ` Harry Wentland
@ 2018-03-05 9:51 ` Maarten Lankhorst
0 siblings, 0 replies; 4+ messages in thread
From: Maarten Lankhorst @ 2018-03-05 9:51 UTC (permalink / raw)
To: Harry Wentland, Daniel Vetter; +Cc: intel-gfx, dri-devel
Op 21-02-18 om 20:39 schreef Harry Wentland:
> On 2018-02-21 01:36 PM, Daniel Vetter wrote:
>> On Wed, Feb 21, 2018 at 04:23:31PM +0100, Maarten Lankhorst wrote:
>>> After we acquired all generic modeset locks in drm_modeset_lock_all, it's
>>> unsafe acquire any other so just mark acquisition as done.
>>>
>>> Atomic drivers shouldn't use drm_modeset_lock_all.
>>>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>
>> Also, I'm pretty much expecting to regret this like all the other
>> ww_acquire_done patches I've acked, but where's the fun in not trying :-)
>>
> This shouldn't really hurt anything, other than throw DEBUG warnings if DEBUG_MUTEXES is on.
>
> Acked-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
>> Cheers, Daniel
>>
>>> ---
>>> drivers/gpu/drm/drm_modeset_lock.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
>>> index 963e23db0fe7..8a5100685875 100644
>>> --- a/drivers/gpu/drm/drm_modeset_lock.c
>>> +++ b/drivers/gpu/drm/drm_modeset_lock.c
>>> @@ -113,6 +113,7 @@ void drm_modeset_lock_all(struct drm_device *dev)
>>> kfree(ctx);
>>> return;
>>> }
>>> + ww_acquire_done(&ctx->ww_ctx);
>>>
>>> WARN_ON(config->acquire_ctx);
>>>
>>> --
>>> 2.16.1
>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thanks, pushed.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-05 9:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21 15:23 [PATCH] drm/atomic: Call ww_acquire_done after drm_modeset_lock_all Maarten Lankhorst
2018-02-21 18:36 ` Daniel Vetter
2018-02-21 19:39 ` Harry Wentland
2018-03-05 9:51 ` Maarten Lankhorst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox