[Intel-gfx] [PATCH 1/5] drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Jul 27 17:27:24 UTC 2017


Op 27-07-17 om 17:19 schreef Daniel Vetter:
> On Thu, Jul 27, 2017 at 02:58:36PM +0200, Maarten Lankhorst wrote:
>> When we want to make drm_atomic_commit interruptible, there are a lot of
>> places that call the lock function, which we don't have control over.
>>
>> Rather than trying to convert every single one, it's easier to toggle
>> interruptible waiting per acquire_ctx. If drm_modeset_acquire_init is
>> called with DRM_MODESET_ACQUIRE_INTERRUPTIBLE, then we will perform
>> interruptible waits in drm_modeset_lock and drm_modeset_backoff.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> I wonder whether we should do a drm_modeset_lock_single without the
> context attribute too, for OCD. But not really needed.
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>
If it was up to me, we didn't rename drm_modeset_lock_interruptible and allowed it
to pass a ctx. Most likely it would have been NULL, but at least we'd have symmetry.

The same discussion was held ww_mutex_lock iirc, and we ended up with a single locking
function where we could pass a NULL context if needed. :)

~Maarten



More information about the Intel-gfx mailing list