Skip to content

Commit

Permalink
drm/i915: Don't disable interrupts on PREEMPT_RT during atomic updates
Browse files Browse the repository at this point in the history
Commit
   8d7849d ("drm/i915: Make sprite updates atomic")

started disabling interrupts across atomic updates. This breaks on PREEMPT_RT
because within this section the code attempt to acquire spinlock_t locks which
are sleeping locks on PREEMPT_RT.

According to the comment the interrupts are disabled to avoid random delays and
not required for protection or synchronisation.

Don't disable interrupts on PREEMPT_RT during atomic updates.

[bigeasy: drop local locks, commit message]

Signed-off-by: Mike Galbraith <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
  • Loading branch information
umgwanakikbuti authored and jserv committed Nov 27, 2024
1 parent 1c69e46 commit 9e998f0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions drivers/gpu/drm/i915/display/intel_sprite.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
"PSR idle timed out 0x%x, atomic update may fail\n",
psr_status);

local_irq_disable();
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_disable();

crtc->debug.min_vbl = min;
crtc->debug.max_vbl = max;
Expand All @@ -143,11 +144,13 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
break;
}

local_irq_enable();
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_enable();

timeout = schedule_timeout(timeout);

local_irq_disable();
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_disable();
}

finish_wait(wq, &wait);
Expand Down Expand Up @@ -180,7 +183,8 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
return;

irq_disable:
local_irq_disable();
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_disable();
}

/**
Expand Down Expand Up @@ -218,7 +222,8 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
new_crtc_state->uapi.event = NULL;
}

local_irq_enable();
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_enable();

if (intel_vgpu_active(dev_priv))
return;
Expand Down

0 comments on commit 9e998f0

Please sign in to comment.