[Intel-gfx] [PATCH 18/19] drm/i915: Store LRC hardware id in the request

2016-04-21 Thread Chris Wilson
From: Tvrtko Ursulin 

This way in the following patch we can disconnect requests
from contexts.

Signed-off-by: Tvrtko Ursulin 
Reviewed-by: Chris Wilson 
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_drv.h  | 2 ++
 drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 515b8badce61..0efbe6c4634f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2349,6 +2349,8 @@ struct drm_i915_gem_request {
/** Execlists no. of times this request has been sent to the ELSP */
int elsp_submitted;
 
+   /** Execlists context hardware id. */
+   unsigned ctx_hw_id;
 };
 
 struct drm_i915_gem_request * __must_check
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 3293dd29e274..0c46a5cf4be0 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -477,7 +477,7 @@ execlists_check_remove_request(struct intel_engine_cs 
*engine, u32 request_id)
if (!head_req)
return 0;
 
-   if (unlikely(head_req->ctx->hw_id != request_id))
+   if (unlikely(head_req->ctx_hw_id != request_id))
return 0;
 
WARN(head_req->elsp_submitted == 0, "Never submitted head request\n");
@@ -615,6 +615,7 @@ static void execlists_context_queue(struct 
drm_i915_gem_request *request)
}
 
list_add_tail(>execlist_link, >execlist_queue);
+   request->ctx_hw_id = request->ctx->hw_id;
if (num_elements == 0)
execlists_context_unqueue(engine);
 
-- 
2.8.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 18/19] drm/i915: Store LRC hardware id in the request

2016-04-21 Thread Chris Wilson
On Thu, Apr 21, 2016 at 08:58:20AM +0100, Tvrtko Ursulin wrote:
> 
> On 20/04/16 19:42, Chris Wilson wrote:
> >From: Tvrtko Ursulin 
> >
> >This way in the following patch we can disconnect requests
> >from contexts.
> >
> >Signed-off-by: Tvrtko Ursulin 
> >Reviewed-by: Tvrtko Ursulin 
> 
> Surely I didn't review my own patch? :)

I hope you at least read it once!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 18/19] drm/i915: Store LRC hardware id in the request

2016-04-21 Thread Chris Wilson
From: Tvrtko Ursulin 

This way in the following patch we can disconnect requests
from contexts.

Signed-off-by: Tvrtko Ursulin 
Reviewed-by: Tvrtko Ursulin 
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_drv.h  | 2 ++
 drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 515b8badce61..0efbe6c4634f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2349,6 +2349,8 @@ struct drm_i915_gem_request {
/** Execlists no. of times this request has been sent to the ELSP */
int elsp_submitted;
 
+   /** Execlists context hardware id. */
+   unsigned ctx_hw_id;
 };
 
 struct drm_i915_gem_request * __must_check
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 3293dd29e274..0c46a5cf4be0 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -477,7 +477,7 @@ execlists_check_remove_request(struct intel_engine_cs 
*engine, u32 request_id)
if (!head_req)
return 0;
 
-   if (unlikely(head_req->ctx->hw_id != request_id))
+   if (unlikely(head_req->ctx_hw_id != request_id))
return 0;
 
WARN(head_req->elsp_submitted == 0, "Never submitted head request\n");
@@ -615,6 +615,7 @@ static void execlists_context_queue(struct 
drm_i915_gem_request *request)
}
 
list_add_tail(>execlist_link, >execlist_queue);
+   request->ctx_hw_id = request->ctx->hw_id;
if (num_elements == 0)
execlists_context_unqueue(engine);
 
-- 
2.8.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 18/19] drm/i915: Store LRC hardware id in the request

2016-04-21 Thread Tvrtko Ursulin


On 20/04/16 19:42, Chris Wilson wrote:

From: Tvrtko Ursulin 

This way in the following patch we can disconnect requests
from contexts.

Signed-off-by: Tvrtko Ursulin 
Reviewed-by: Tvrtko Ursulin 


Surely I didn't review my own patch? :)

Regards,

Tvrtko


Signed-off-by: Chris Wilson 
---
  drivers/gpu/drm/i915/i915_drv.h  | 2 ++
  drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
  2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 515b8badce61..0efbe6c4634f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2349,6 +2349,8 @@ struct drm_i915_gem_request {
/** Execlists no. of times this request has been sent to the ELSP */
int elsp_submitted;

+   /** Execlists context hardware id. */
+   unsigned ctx_hw_id;
  };

  struct drm_i915_gem_request * __must_check
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 67c369ae649b..833d8fd3343f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -477,7 +477,7 @@ execlists_check_remove_request(struct intel_engine_cs 
*engine, u32 request_id)
if (!head_req)
return 0;

-   if (unlikely(head_req->ctx->hw_id != request_id))
+   if (unlikely(head_req->ctx_hw_id != request_id))
return 0;

WARN(head_req->elsp_submitted == 0, "Never submitted head request\n");
@@ -615,6 +615,7 @@ static void execlists_context_queue(struct 
drm_i915_gem_request *request)
}

list_add_tail(>execlist_link, >execlist_queue);
+   request->ctx_hw_id = request->ctx->hw_id;
if (num_elements == 0)
execlists_context_unqueue(engine);



___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 18/19] drm/i915: Store LRC hardware id in the request

2016-04-20 Thread Chris Wilson
From: Tvrtko Ursulin 

This way in the following patch we can disconnect requests
from contexts.

Signed-off-by: Tvrtko Ursulin 
Reviewed-by: Tvrtko Ursulin 
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_drv.h  | 2 ++
 drivers/gpu/drm/i915/intel_lrc.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 515b8badce61..0efbe6c4634f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2349,6 +2349,8 @@ struct drm_i915_gem_request {
/** Execlists no. of times this request has been sent to the ELSP */
int elsp_submitted;
 
+   /** Execlists context hardware id. */
+   unsigned ctx_hw_id;
 };
 
 struct drm_i915_gem_request * __must_check
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 67c369ae649b..833d8fd3343f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -477,7 +477,7 @@ execlists_check_remove_request(struct intel_engine_cs 
*engine, u32 request_id)
if (!head_req)
return 0;
 
-   if (unlikely(head_req->ctx->hw_id != request_id))
+   if (unlikely(head_req->ctx_hw_id != request_id))
return 0;
 
WARN(head_req->elsp_submitted == 0, "Never submitted head request\n");
@@ -615,6 +615,7 @@ static void execlists_context_queue(struct 
drm_i915_gem_request *request)
}
 
list_add_tail(>execlist_link, >execlist_queue);
+   request->ctx_hw_id = request->ctx->hw_id;
if (num_elements == 0)
execlists_context_unqueue(engine);
 
-- 
2.8.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx