Message ID | 1302771827-26112-8-git-send-email-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 14 Apr 2011 10:03:41 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote: > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -5360,7 +5360,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, > goto fail_locked; > } > > - ret = i915_gem_object_set_to_gtt_domain(obj, 0); > + ret = i915_gem_object_set_to_display_plane(obj, NULL); > if (ret) { > DRM_ERROR("failed to move cursor bo into the GTT\n"); > goto fail_unpin; > diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c > index a670c00..e0903c5 100644 > --- a/drivers/gpu/drm/i915/intel_overlay.c > +++ b/drivers/gpu/drm/i915/intel_overlay.c > @@ -777,7 +777,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, > if (ret != 0) > return ret; > > - ret = i915_gem_object_set_to_gtt_domain(new_bo, 0); > + ret = i915_gem_object_set_to_display_plane(new_bo, NULL); set_to_display_plane has a comment stating that it is always called from a non - interruptible context and uses a non-interruptible flush wait as a result. I think we would want these new code paths to allow for interrupting the operation?
On Wed, 04 May 2011 10:09:53 -0700, Keith Packard <keithp@keithp.com> wrote: > On Thu, 14 Apr 2011 10:03:41 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote: > > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -5360,7 +5360,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, > > goto fail_locked; > > } > > > > - ret = i915_gem_object_set_to_gtt_domain(obj, 0); > > + ret = i915_gem_object_set_to_display_plane(obj, NULL); > > if (ret) { > > DRM_ERROR("failed to move cursor bo into the GTT\n"); > > goto fail_unpin; > > diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c > > index a670c00..e0903c5 100644 > > --- a/drivers/gpu/drm/i915/intel_overlay.c > > +++ b/drivers/gpu/drm/i915/intel_overlay.c > > @@ -777,7 +777,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, > > if (ret != 0) > > return ret; > > > > - ret = i915_gem_object_set_to_gtt_domain(new_bo, 0); > > + ret = i915_gem_object_set_to_display_plane(new_bo, NULL); > > set_to_display_plane has a comment stating that it is always called from > a non - interruptible context and uses a non-interruptible flush wait as > a result. > > I think we would want these new code paths to allow for interrupting the > operation? The comment is very stale, I believe I remove it in one of the patches. There were some fun bugs when rebinding the scanout under an uninterruptible modeswitch that convinced me that we had a choice between threading the interruptible flag through the entire unbind callchain, or to simply mark the device as uninterruptible for the duration. The code now does the latter. -Chris
On Wed, 04 May 2011 19:28:35 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote: > to simply mark the device as uninterruptible for the duration. > > The code now does the latter. I'm good with that plan during modesetting, the question is whether the new users of this function should allow for interrupts.
On Wed, 04 May 2011 11:46:42 -0700, Keith Packard <keithp@keithp.com> wrote: > On Wed, 04 May 2011 19:28:35 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote: > > > to simply mark the device as uninterruptible for the duration. > > > > The code now does the latter. > > I'm good with that plan during modesetting, the question is whether the > new users of this function should allow for interrupts. The callers control whether that function is interruptible or not by setting a flag on the device. So far the only piece of code that we have allowed to run non-interruptible is the modesetting. -Chris
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c1337e4..56741c6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5360,7 +5360,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, goto fail_locked; } - ret = i915_gem_object_set_to_gtt_domain(obj, 0); + ret = i915_gem_object_set_to_display_plane(obj, NULL); if (ret) { DRM_ERROR("failed to move cursor bo into the GTT\n"); goto fail_unpin; diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index a670c00..e0903c5 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -777,7 +777,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, if (ret != 0) return ret; - ret = i915_gem_object_set_to_gtt_domain(new_bo, 0); + ret = i915_gem_object_set_to_display_plane(new_bo, NULL); if (ret != 0) goto out_unpin;