drm/i915: Remove two sloppy inline functions from .h
Subsystems (2)
Joonas Lahtinen
maintainerPATCH 1/1 drm/i915: Remove two sloppy inline functions from .h
Get rid of sloppy inline functions now that we don't have more users:
i915_gem_request_get_seqnoi915_gem_request_get_engine
--- 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(-)
drivers/gpu/drm/i915/i915_debugfs.c +2 -2
@@ -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));
drivers/gpu/drm/i915/i915_gem_request.h +0 -12
@@ -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) {
drivers/gpu/drm/i915/i915_gpu_error.c +7 -4
@@ -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,
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 69 lines · Joonas Lahtinen
Get rid of sloppy inline functions now that we don't have more users:
i915_gem_request_get_seqnoi915_gem_request_get_engineCc Chris Wilson <[email protected]>Signed-off-by Joonas Lahtinen <[email protected]>--- 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(-)drivers/gpu/drm/i915/i915_debugfs.c +2
-2@@ -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));drivers/gpu/drm/i915/i915_gem_request.h +0
-12@@ -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) {drivers/gpu/drm/i915/i915_gpu_error.c +4
-1@@ -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 ; }
drivers/gpu/drm/i915/i915_gpu_error.c i915_error_object_create(struct drm_i915_private *i915, · line 876
Quoted 10 lines
drivers/gpu/drm/i915/i915_gpu_error.c +3
-3static 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;
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
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerPATCH v2 1/1 drm/i915: Remove two sloppy inline functions from .h
Get rid of sloppy inline functions now that we don't have more users:
i915_gem_request_get_seqnoi915_gem_request_get_engine
v2:
- request->engine is always non-NULL (Chris)
--- 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(-)
drivers/gpu/drm/i915/i915_debugfs.c +2 -2
@@ -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));
drivers/gpu/drm/i915/i915_gem_request.h +0 -12
@@ -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) {
drivers/gpu/drm/i915/i915_gpu_error.c +7 -4
@@ -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,
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h
In reply to Joonas Lahtinen== Series Details ==
== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2)
In reply to Joonas Lahtinen== Series Details ==
== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerRe: ✓ Fi.CI.BAT: success for drm/i915: Remove two sloppy inline functions from .h (rev2)
Quoted 6 lines · Patchwork
== 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
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx