All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Remove two sloppy inline functions from .h
@ 2016-11-07 16:13 Joonas Lahtinen
  2016-11-07 16:27 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Joonas Lahtinen @ 2016-11-07 16:13 UTC (permalink / raw)
  To: Intel graphics driver community testing & development

Get rid of sloppy inline functions now that we don't have more users:

i915_gem_request_get_seqno
i915_gem_request_get_engine

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c     |  4 ++--
 drivers/gpu/drm/i915/i915_gem_request.h | 12 ------------
 drivers/gpu/drm/i915/i915_gpu_error.c   | 11 +++++++----
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index bc9c0cd..960ccea 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -547,11 +547,11 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)
 					   pipe, plane);
 			}
 			if (work->flip_queued_req) {
-				struct intel_engine_cs *engine = i915_gem_request_get_engine(work->flip_queued_req);
+				struct intel_engine_cs *engine = work->flip_queued_req->engine;
 
 				seq_printf(m, "Flip queued on %s at seqno %x, next seqno %x [current breadcrumb %x], completed? %d\n",
 					   engine->name,
-					   i915_gem_request_get_seqno(work->flip_queued_req),
+					   work->flip_queued_req->global_seqno,
 					   atomic_read(&dev_priv->gt.global_timeline.next_seqno),
 					   intel_engine_get_seqno(engine),
 					   i915_gem_request_completed(work->flip_queued_req));
diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
index 75f8360..0f69fad 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.h
+++ b/drivers/gpu/drm/i915/i915_gem_request.h
@@ -162,18 +162,6 @@ int i915_gem_request_add_to_client(struct drm_i915_gem_request *req,
 				   struct drm_file *file);
 void i915_gem_request_retire_upto(struct drm_i915_gem_request *req);
 
-static inline u32
-i915_gem_request_get_seqno(struct drm_i915_gem_request *req)
-{
-	return req ? req->global_seqno : 0;
-}
-
-static inline struct intel_engine_cs *
-i915_gem_request_get_engine(struct drm_i915_gem_request *req)
-{
-	return req ? req->engine : NULL;
-}
-
 static inline struct drm_i915_gem_request *
 to_request(struct dma_fence *fence)
 {
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 204093f..ec05c8e 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -861,16 +861,19 @@ i915_error_object_create(struct drm_i915_private *i915,
 static inline uint32_t
 __active_get_seqno(struct i915_gem_active *active)
 {
-	return i915_gem_request_get_seqno(__i915_gem_active_peek(active));
+	struct drm_i915_gem_request *request;
+
+	request = __i915_gem_active_peek(active);
+	return request ? request->global_seqno : 0;
 }
 
 static inline int
 __active_get_engine_id(struct i915_gem_active *active)
 {
-	struct intel_engine_cs *engine;
+	struct drm_i915_gem_request *request;
 
-	engine = i915_gem_request_get_engine(__i915_gem_active_peek(active));
-	return engine ? engine->id : -1;
+	request = __i915_gem_active_peek(active);
+	return request && request->engine ? request->engine->id : -1;
 }
 
 static void capture_bo(struct drm_i915_error_buffer *err,
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Remove two sloppy inline functions from .h
  2016-11-07 16:13 [PATCH] drm/i915: Remove two sloppy inline functions from .h Joonas Lahtinen
@ 2016-11-07 16:27 ` Chris Wilson
  2016-11-08  7:11   ` [PATCH v2] " Joonas Lahtinen
  2016-11-07 16:45 ` ✓ Fi.CI.BAT: success for " Patchwork
  2016-11-08  7:46 ` ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2) Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2016-11-07 16:27 UTC (permalink / raw)
  To: Joonas Lahtinen; +Cc: Intel graphics driver community testing & development

On Mon, Nov 07, 2016 at 06:13:20PM +0200, Joonas Lahtinen wrote:
> Get rid of sloppy inline functions now that we don't have more users:
> 
> i915_gem_request_get_seqno
> i915_gem_request_get_engine
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c     |  4 ++--
>  drivers/gpu/drm/i915/i915_gem_request.h | 12 ------------
>  drivers/gpu/drm/i915/i915_gpu_error.c   | 11 +++++++----
>  3 files changed, 9 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index bc9c0cd..960ccea 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -547,11 +547,11 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)
>  					   pipe, plane);
>  			}
>  			if (work->flip_queued_req) {
> -				struct intel_engine_cs *engine = i915_gem_request_get_engine(work->flip_queued_req);
> +				struct intel_engine_cs *engine = work->flip_queued_req->engine;
>  
>  				seq_printf(m, "Flip queued on %s at seqno %x, next seqno %x [current breadcrumb %x], completed? %d\n",
>  					   engine->name,
> -					   i915_gem_request_get_seqno(work->flip_queued_req),
> +					   work->flip_queued_req->global_seqno,
>  					   atomic_read(&dev_priv->gt.global_timeline.next_seqno),
>  					   intel_engine_get_seqno(engine),
>  					   i915_gem_request_completed(work->flip_queued_req));
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
> index 75f8360..0f69fad 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.h
> +++ b/drivers/gpu/drm/i915/i915_gem_request.h
> @@ -162,18 +162,6 @@ int i915_gem_request_add_to_client(struct drm_i915_gem_request *req,
>  				   struct drm_file *file);
>  void i915_gem_request_retire_upto(struct drm_i915_gem_request *req);
>  
> -static inline u32
> -i915_gem_request_get_seqno(struct drm_i915_gem_request *req)
> -{
> -	return req ? req->global_seqno : 0;
> -}
> -
> -static inline struct intel_engine_cs *
> -i915_gem_request_get_engine(struct drm_i915_gem_request *req)
> -{
> -	return req ? req->engine : NULL;
> -}
> -
>  static inline struct drm_i915_gem_request *
>  to_request(struct dma_fence *fence)
>  {
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index 204093f..ec05c8e 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -861,16 +861,19 @@ i915_error_object_create(struct drm_i915_private *i915,
>  static inline uint32_t
>  __active_get_seqno(struct i915_gem_active *active)
>  {
> -	return i915_gem_request_get_seqno(__i915_gem_active_peek(active));
> +	struct drm_i915_gem_request *request;
> +
> +	request = __i915_gem_active_peek(active);
> +	return request ? request->global_seqno : 0;
>  }
>  
>  static inline int
>  __active_get_engine_id(struct i915_gem_active *active)
>  {
> -	struct intel_engine_cs *engine;
> +	struct drm_i915_gem_request *request;
>  
> -	engine = i915_gem_request_get_engine(__i915_gem_active_peek(active));
> -	return engine ? engine->id : -1;
> +	request = __i915_gem_active_peek(active);
> +	return request && request->engine ? request->engine->id : -1;

return request ? request->engine->id : -1;

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Happy to see them go. Note how global_seqno may be meaningless... And
how unhelpful get_seqno really was. For gpu error we need to start
tracking the context:seqno of the submitter. When I see a bug with
seqno = 0, I guess I will be tempted to write the patch.
-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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h
  2016-11-07 16:13 [PATCH] drm/i915: Remove two sloppy inline functions from .h Joonas Lahtinen
  2016-11-07 16:27 ` Chris Wilson
@ 2016-11-07 16:45 ` Patchwork
  2016-11-08  7:46 ` ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2) Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2016-11-07 16:45 UTC (permalink / raw)
  To: Joonas Lahtinen; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Remove two sloppy inline functions from .h
URL   : https://patchwork.freedesktop.org/series/14931/
State : success

== Summary ==

Series 14931v1 drm/i915: Remove two sloppy inline functions from .h
https://patchwork.freedesktop.org/api/1.0/series/14931/revisions/1/mbox/


fi-bdw-5557u     total:241  pass:226  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:241  pass:201  dwarn:0   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:241  pass:213  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:241  pass:213  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:241  pass:209  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:241  pass:221  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:241  pass:221  dwarn:0   dfail:0   fail:0   skip:20 
fi-ilk-650       total:241  pass:188  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:241  pass:219  dwarn:0   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:241  pass:219  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:241  pass:219  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:241  pass:227  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:241  pass:220  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:241  pass:219  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:241  pass:227  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:241  pass:209  dwarn:0   dfail:0   fail:0   skip:32 
fi-snb-2600      total:241  pass:208  dwarn:0   dfail:0   fail:0   skip:33 

44f80301cde325b9a33e594f8bec88f84e02fffa drm-intel-nightly: 2016y-11m-07d-12h-48m-36s UTC integration manifest
6368144 drm/i915: Remove two sloppy inline functions from .h

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2923/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] drm/i915: Remove two sloppy inline functions from .h
  2016-11-07 16:27 ` Chris Wilson
@ 2016-11-08  7:11   ` Joonas Lahtinen
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Lahtinen @ 2016-11-08  7:11 UTC (permalink / raw)
  To: Intel graphics driver community testing & development

Get rid of sloppy inline functions now that we don't have more users:

i915_gem_request_get_seqno
i915_gem_request_get_engine

v2:
- request->engine is always non-NULL (Chris)

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_debugfs.c     |  4 ++--
 drivers/gpu/drm/i915/i915_gem_request.h | 12 ------------
 drivers/gpu/drm/i915/i915_gpu_error.c   | 11 +++++++----
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index bc9c0cd..960ccea 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -547,11 +547,11 @@ static int i915_gem_pageflip_info(struct seq_file *m, void *data)
 					   pipe, plane);
 			}
 			if (work->flip_queued_req) {
-				struct intel_engine_cs *engine = i915_gem_request_get_engine(work->flip_queued_req);
+				struct intel_engine_cs *engine = work->flip_queued_req->engine;
 
 				seq_printf(m, "Flip queued on %s at seqno %x, next seqno %x [current breadcrumb %x], completed? %d\n",
 					   engine->name,
-					   i915_gem_request_get_seqno(work->flip_queued_req),
+					   work->flip_queued_req->global_seqno,
 					   atomic_read(&dev_priv->gt.global_timeline.next_seqno),
 					   intel_engine_get_seqno(engine),
 					   i915_gem_request_completed(work->flip_queued_req));
diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
index 75f8360..0f69fad 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.h
+++ b/drivers/gpu/drm/i915/i915_gem_request.h
@@ -162,18 +162,6 @@ int i915_gem_request_add_to_client(struct drm_i915_gem_request *req,
 				   struct drm_file *file);
 void i915_gem_request_retire_upto(struct drm_i915_gem_request *req);
 
-static inline u32
-i915_gem_request_get_seqno(struct drm_i915_gem_request *req)
-{
-	return req ? req->global_seqno : 0;
-}
-
-static inline struct intel_engine_cs *
-i915_gem_request_get_engine(struct drm_i915_gem_request *req)
-{
-	return req ? req->engine : NULL;
-}
-
 static inline struct drm_i915_gem_request *
 to_request(struct dma_fence *fence)
 {
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 204093f..0dc5d93 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -861,16 +861,19 @@ i915_error_object_create(struct drm_i915_private *i915,
 static inline uint32_t
 __active_get_seqno(struct i915_gem_active *active)
 {
-	return i915_gem_request_get_seqno(__i915_gem_active_peek(active));
+	struct drm_i915_gem_request *request;
+
+	request = __i915_gem_active_peek(active);
+	return request ? request->global_seqno : 0;
 }
 
 static inline int
 __active_get_engine_id(struct i915_gem_active *active)
 {
-	struct intel_engine_cs *engine;
+	struct drm_i915_gem_request *request;
 
-	engine = i915_gem_request_get_engine(__i915_gem_active_peek(active));
-	return engine ? engine->id : -1;
+	request = __i915_gem_active_peek(active);
+	return request ? request->engine->id : -1;
 }
 
 static void capture_bo(struct drm_i915_error_buffer *err,
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2)
  2016-11-07 16:13 [PATCH] drm/i915: Remove two sloppy inline functions from .h Joonas Lahtinen
  2016-11-07 16:27 ` Chris Wilson
  2016-11-07 16:45 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2016-11-08  7:46 ` Patchwork
  2016-11-08 10:44   ` Joonas Lahtinen
  2 siblings, 1 reply; 6+ messages in thread
From: Patchwork @ 2016-11-08  7:46 UTC (permalink / raw)
  To: Joonas Lahtinen; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Remove two sloppy inline functions from .h (rev2)
URL   : https://patchwork.freedesktop.org/series/14931/
State : success

== Summary ==

Series 14931v2 drm/i915: Remove two sloppy inline functions from .h
https://patchwork.freedesktop.org/api/1.0/series/14931/revisions/2/mbox/


fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:204  dwarn:0   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:191  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:223  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:211  dwarn:0   dfail:0   fail:0   skip:33 

0cb521ab1e777031c1fbb5fb2b0a5b13ccb9c461 drm-intel-nightly: 2016y-11m-07d-20h-58m-10s UTC integration manifest
34d321c drm/i915: Remove two sloppy inline functions from .h

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2929/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2)
  2016-11-08  7:46 ` ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2) Patchwork
@ 2016-11-08 10:44   ` Joonas Lahtinen
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Lahtinen @ 2016-11-08 10:44 UTC (permalink / raw)
  To: intel-gfx

On ti, 2016-11-08 at 07:46 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Remove two sloppy inline functions from .h (rev2)
> URL   : https://patchwork.freedesktop.org/series/14931/
> State : success
> 

Merged the patch, thanks for the review.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-08 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 16:13 [PATCH] drm/i915: Remove two sloppy inline functions from .h Joonas Lahtinen
2016-11-07 16:27 ` Chris Wilson
2016-11-08  7:11   ` [PATCH v2] " Joonas Lahtinen
2016-11-07 16:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-08  7:46 ` ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2) Patchwork
2016-11-08 10:44   ` Joonas Lahtinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.