mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 17:50:52 +07:00
drm: Don't block the kworker waiting for mode_config.mutex in output_poll()
If we cannot acquire the mode_config.mutex immediately, just back off and queue a new attempt after the poll interval. This is mostly to stop the hung task spam when the system is deadlocked, but it will also lessen the load (in such extreme cases). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> [danvet:s/lock/mutex/ per Eric's comment.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161206113715.30382-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
d5264ed382
commit
1fe7841d89
@ -392,7 +392,11 @@ static void output_poll_execute(struct work_struct *work)
|
||||
if (!drm_kms_helper_poll)
|
||||
goto out;
|
||||
|
||||
mutex_lock(&dev->mode_config.mutex);
|
||||
if (!mutex_trylock(&dev->mode_config.mutex)) {
|
||||
repoll = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
drm_for_each_connector(connector, dev) {
|
||||
|
||||
/* Ignore forced connectors. */
|
||||
|
Loading…
Reference in New Issue
Block a user