Message ID | 1437051471-15397-2-git-send-email-maarten.lankhorst@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jul 16, 2015 at 02:57:47PM +0200, Maarten Lankhorst wrote: > -EDEADLK has special meaning in atomic, but get_fence may call > i915_find_fence_reg which can return -EDEADLK. > > This has special meaning in the atomic world, so convert the error > to -EBUSY for this case. > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > --- > drivers/gpu/drm/i915/intel_display.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index ede652867596..786018eaf393 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -2395,8 +2395,11 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane, > * a fence as the cost is not that onerous. > */ > ret = i915_gem_object_get_fence(obj); > - if (ret) > + if (ret) { /* A quick explanation here would be delightful */ > + if (ret == -EDEADLK) > + ret = -EBUSY; > goto err_unpin; -Chris
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ede652867596..786018eaf393 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2395,8 +2395,11 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane, * a fence as the cost is not that onerous. */ ret = i915_gem_object_get_fence(obj); - if (ret) + if (ret) { + if (ret == -EDEADLK) + ret = -EBUSY; goto err_unpin; + } i915_gem_object_pin_fence(obj);
-EDEADLK has special meaning in atomic, but get_fence may call i915_find_fence_reg which can return -EDEADLK. This has special meaning in the atomic world, so convert the error to -EBUSY for this case. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/i915/intel_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)