diff mbox

[3/6] drm/i915: Unmark i915_seqno_passed as static

Message ID 1252853462-9236-4-git-send-email-bgamari.foss@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Ben Gamari Sept. 13, 2009, 2:50 p.m. UTC
We'll need it in i915_irq.c for checking whether there are outstanding
requests. Also, the function really ought to return a bool, not an int.
---
 drivers/gpu/drm/i915/i915_drv.h |    1 +
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

Comments

Ben Gamari Sept. 13, 2009, 2:55 p.m. UTC | #1
On Sun, Sep 13, 2009 at 10:51:01AM -0400, Ben Gamari wrote:
> This patch puts in place the machinery to attempt to reset the GPU. This
> will be used when attempting to recover from a GPU hang.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>

Oga, I suspect your SOB should be on this too considering the device
reset procedure is effectively your code. Care to add it?

- Ben
Ben Gamari Sept. 13, 2009, 4:29 p.m. UTC | #2
On Sun, Sep 13, 2009 at 10:50:59AM -0400, Ben Gamari wrote:
> We'll need it in i915_irq.c for checking whether there are outstanding
> requests. Also, the function really ought to return a bool, not an int.

Signed-Off-By: Ben Gamari <bgamari.foss@gmail.com>
Owain Ainsworth Sept. 13, 2009, 6:36 p.m. UTC | #3
On Sun, Sep 13, 2009 at 10:55:53AM -0400, Ben Gamari wrote:
> On Sun, Sep 13, 2009 at 10:51:01AM -0400, Ben Gamari wrote:
> > This patch puts in place the machinery to attempt to reset the GPU. This
> > will be used when attempting to recover from a GPU hang.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
> 
> Oga, I suspect your SOB should be on this too considering the device
> reset procedure is effectively your code. Care to add it?

Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
> 
> - Ben
>
Owain Ainsworth Sept. 13, 2009, 6:41 p.m. UTC | #4
On Sun, Sep 13, 2009 at 07:36:19PM +0100, Owain Ainsworth wrote:
> On Sun, Sep 13, 2009 at 10:55:53AM -0400, Ben Gamari wrote:
> > On Sun, Sep 13, 2009 at 10:51:01AM -0400, Ben Gamari wrote:
> > > This patch puts in place the machinery to attempt to reset the GPU. This
> > > will be used when attempting to recover from a GPU hang.
> > > 
> > > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > > Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
> > 
> > Oga, I suspect your SOB should be on this too considering the device
> > reset procedure is effectively your code. Care to add it?
> 
> Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>

I should add that this is purely that the reset logic looks right at a
glance, when it comes to linux api stuff, I won't pretend to know.

-0-
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 01b2920..933d832 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -709,6 +709,7 @@  int i915_gem_object_unbind(struct drm_gem_object *obj);
 void i915_gem_release_mmap(struct drm_gem_object *obj);
 void i915_gem_lastclose(struct drm_device *dev);
 uint32_t i915_get_gem_seqno(struct drm_device *dev);
+bool i915_seqno_passed(uint32_t seq1, uint32_t seq2);
 int i915_gem_object_get_fence_reg(struct drm_gem_object *obj);
 int i915_gem_object_put_fence_reg(struct drm_gem_object *obj);
 void i915_gem_retire_requests(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9100513..c70e91b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1671,7 +1671,7 @@  out:
 /**
  * Returns true if seq1 is later than seq2.
  */
-static int
+bool
 i915_seqno_passed(uint32_t seq1, uint32_t seq2)
 {
 	return (int32_t)(seq1 - seq2) >= 0;