drm/i915: don't update the dri1 breadcrumb with modesetting
Subsystems (2)
PATCH 1/1 drm/i915: don't update the dri1 breadcrumb with modesetting
The update is horribly racy since it doesn't protect at all against concurrent closing of the master fd. And it can't really since that requires us to grab a mutex.
Instead of jumping through hoops and offloading this to a worker thread just block this bit of code for the modesetting driver.
--- drivers/gpu/drm/i915/i915_dma.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_dma.c +3 -0
@@ -83,6 +83,9 @@ void i915_update_dri1_breadcrumb(struct drm_device *dev)drm_i915_private_t *dev_priv = dev->dev_private;struct drm_i915_master_private *master_priv; +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return ; +if (dev->primary->master) { master_priv = dev->primary->master->driver_priv;if (master_priv->sarea_priv)
Signature · 1 line
1.8.4.3
Quoted 11 lines · Daniel Vetter
The update is horribly racy since it doesn't protect at all against concurrent closing of the master fd. And it can't really since that requires us to grab a mutex.
Instead of jumping through hoops and offloading this to a worker thread just block this bit of code for the modesetting driver.
Reported-by Eugene Shatokhin <[email protected]>Cc Eugene Shatokhin <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
We should also not be calling update_dri1_breadcrumb unless we have a USER_INTERRUPT. The other updates to the breadcrumb hws index do not appear to be serialised by anything other than polling. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 8 lines · Chris Wilson
Quoted 7 lines · Daniel Vetter
The update is horribly racy since it doesn't protect at all against concurrent closing of the master fd. And it can't really since that requires us to grab a mutex.
Instead of jumping through hoops and offloading this to a worker thread just block this bit of code for the modesetting driver.
Quoted 8 lines
Quoted 4 lines
Reported-by Eugene Shatokhin <[email protected]>Cc Eugene Shatokhin <[email protected]>Signed-off-by Daniel Vetter <[email protected]>We should also not be calling
update_dri1_breadcrumbunless we have aUSER_INTERRUPT. The other updates to the breadcrumb hws index do not appear to be serialised by anything other than polling.
Well, this is what's been there before and I don't really want to touch dri1/ums code at all. So I think we'll just keep this here until we'll all put it on the big pyre ;-)
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 14 lines · Daniel Vetter
Quoted 13 lines · Chris Wilson
Quoted 11 lines · Daniel Vetter
The update is horribly racy since it doesn't protect at all against concurrent closing of the master fd. And it can't really since that requires us to grab a mutex.
Instead of jumping through hoops and offloading this to a worker thread just block this bit of code for the modesetting driver.
Reported-by Eugene Shatokhin <[email protected]>Cc Eugene Shatokhin <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 7 lines
Quoted 3 lines
We should also not be calling
update_dri1_breadcrumbunless we have aUSER_INTERRUPT. The other updates to the breadcrumb hws index do not appear to be serialised by anything other than polling.Well, this is what's been there before and I don't really want to touch dri1/ums code at all. So I think we'll just keep this here until we'll all put it on the big pyre ;-)
Chris and I discusssed the commit message a bit on irc and now the hack also spurts a code comment. Merged to -fixes for now, but I'd still like to get a tested by from Eugene before sending off the pull request. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Eugene Shatokhin
Tested-byQuoted 19 lines · Daniel Vetter
Quoted 18 lines · Daniel Vetter
Quoted 16 lines · Chris Wilson
Quoted 11 lines · Daniel Vetter
The update is horribly racy since it doesn't protect at all against concurrent closing of the master fd. And it can't really since that requires us to grab a mutex.
Instead of jumping through hoops and offloading this to a worker thread just block this bit of code for the modesetting driver.
Reported-by Eugene Shatokhin <[email protected]>Cc Eugene Shatokhin <[email protected]>Signed-off-by Daniel Vetter <[email protected]>We should also not be calling
update_dri1_breadcrumbunless we have aUSER_INTERRUPT. The other updates to the breadcrumb hws index do not appear to be serialised by anything other than polling.
Quoted 9 lines
Quoted 3 lines
Well, this is what's been there before and I don't really want to touch dri1/ums code at all. So I think we'll just keep this here until we'll all put it on the big pyre ;-)
Chris and I discusssed the commit message a bit on irc and now the hack also spurts a code comment. Merged to -fixes for now, but I'd still like to get a tested by from Eugene before sending off the pull request. -Daniel
Built 3.10.23 with the fix, tested today. The problem has not shown up so far.
Signature · 2 lines
Eugene Shatokhin, ROSA Laboratory. www.rosalab.com