drm/i915: EBUSY status handling added to i915_gem_fault().
Subsystems (3)
PATCH 1/3 drm/i915: EBUSY status handling added to i915_gem_fault().
From: Dmitry Rogozhkin <[email protected]>
Subsequent threads returning EBUSY from vm_insert_pfn() was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS.
--- drivers/gpu/drm/i915/i915_gem.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +4 -0
@@ -1158,6 +1158,10 @@ out:case 0 :case -ERESTARTSYS :case -EINTR : +case -EBUSY : +/* EBUSY is ok: this just means that another thread +already did the job. +*/ return VM_FAULT_NOPAGE ;case -ENOMEM :return VM_FAULT_OOM ;
Signature · 1 line
1.7.9.5
PATCH 2/3 drm/i915: print kernel warning if vmi915_gem_fault returns with error
From: Mika Kuoppala <[email protected]>
Be more verbose when vmi915_gem_fault returns with VM_FAULT_SIGBUS
--- drivers/gpu/drm/i915/i915_gem.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/i915_gem.c +1 -0
@@ -1166,6 +1166,7 @@ out:case -ENOMEM :return VM_FAULT_OOM ;default : +WARN_ON (ret);return VM_FAULT_SIGBUS ; } }
Signature · 1 line
1.7.9.5
PATCH 3/3 Documentation: kernel-parameters.txt Add drm_kms_helper.poll
In reply to [email protected]From: Mika Kuoppala <[email protected]>
Add description for drm_kms_helper.poll module parameter introduced by commit: e58f637bb96d5a0ae0919b9998b891d1ba7e47c9
--- Documentation/kernel-parameters.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/kernel-parameters.txt +11 -0
@@ -741,6 +741,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted. if its name and a colon are prepended to the EDID name. + drm_kms_helper.poll= + Polling for connected VGA devices on older systems + can be quite expensive, causing latencies of + several hundred milliseconds. This will cause visible + stalls, for example in video playback. If you + experience stalls in display output occurring every + 10 seconds (DRM_OUTPUT_POLL_PERIOD=(10*HZ)), disabling + polling might help. + Format: <bool> (1/Y/y=enable, 0/N/n=disable) + default: enabled + dscc4.setup= [NET] dyndbg[="val"] [KNL,DYNAMIC_DEBUG]
Signature · 1 line
1.7.9.5
PATCH v2 1/2 drm/i915: EBUSY status handling added to i915_gem_fault().
In reply to [email protected]From: Dmitry Rogozhkin <[email protected]>
Subsequent threads returning EBUSY from vm_insert_pfn() was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS.
--- drivers/gpu/drm/i915/i915_gem.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +5 -0
@@ -1158,6 +1158,11 @@ out:case 0 :case -ERESTARTSYS :case -EINTR : +case -EBUSY : +/* +* EBUSY is ok: this just means that another thread +* already did the job. +*/ return VM_FAULT_NOPAGE ;case -ENOMEM :return VM_FAULT_OOM ;
Signature · 1 line
1.7.9.5
PATCH v2 2/2 drm/i915: print warning if vmi915_gem_fault error is not handled
From: Mika Kuoppala <[email protected]>
Falling into default case in vmi915_gem_fault is a bug. Be more verbose about it.
--- drivers/gpu/drm/i915/i915_gem.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/i915_gem.c +1 -0
@@ -1167,6 +1167,7 @@ out:case -ENOMEM :return VM_FAULT_OOM ;default : +WARN_ON_ONCE (ret);return VM_FAULT_SIGBUS ; } }
Signature · 1 line
1.7.9.5
Re: [PATCH v2 2/2] drm/i915: print warning if vmi915_gem_fault error is not handled
Quoted 6 lines · On Wed, 3 Oct 2012 17:15:27 +0300, [email protected] wrote:
From: Mika Kuoppala <[email protected]>
Falling into default case in
vmi915_gem_faultis a bug. Be more verbose about it.Signed-off-by Mika Kuoppala <[email protected]>
Once? Fair enough.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 8 lines · On Wed, 3 Oct 2012 17:15:26 +0300, [email protected] wrote:
From: Dmitry Rogozhkin <[email protected]>
Subsequent threads returning EBUSY from
vm_insert_pfn()was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS.Tested-by Mika Kuoppala <[email protected]>Signed-off-by Dmitry Rogozhkin <[email protected]>
Fixes? Reported-by?
I would order the case slightly different so that the comment block comes after EIO.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 10 lines · Chris Wilson
Quoted 8 lines · On Wed, 3 Oct 2012 17:15:26 +0300, [email protected] wrote:
From: Dmitry Rogozhkin <[email protected]>
Subsequent threads returning EBUSY from
vm_insert_pfn()was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS.Tested-by Mika Kuoppala <[email protected]>Signed-off-by Dmitry Rogozhkin <[email protected]>
Quoted 6 lines
Fixes? Reported-by?
I would order the case slightly different so that the comment block comes after EIO.
Reviewed-by Chris Wilson <[email protected]>
I've added the fixes note and applied both patches to -fixes. Thanks for the patch & review.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch