drm/i915: Introduce execlist_port_* accessors
Subsystems (2)
PATCH 1/2 drm/i915: Introduce execlist_port_* accessors
From: Mika Kuoppala <[email protected]>
Instead of trusting that first available port is at index 0, use accessor to hide this. This is a preparation for a following patches where head can be at arbitrary location in the port array.
v2: improved commit message, elsp_ready readability (Chris)
v3: s/execlist_port_index/execlist_port (Chris)
v4: rebase to new naming
v5: fix port_next indexing
v6: adapt to preempt
--- drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 50 ++++++++++++++++++------------ drivers/gpu/drm/i915/intel_engine_cs.c | 18 ++++++----- drivers/gpu/drm/i915/intel_lrc.c | 49 ++++++++++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 44 ++++++++++++++++++++++++-- 5 files changed, 119 insertions(+), 48 deletions(-)
drivers/gpu/drm/i915/i915_gpu_error.c +4 -2
@@ -1333,11 +1333,13 @@ static void engine_record_requests(struct intel_engine_cs *engine,static void error_record_engine_execlists (struct intel_engine_cs *engine,struct drm_i915_error_engine *ee) { -const struct intel_engine_execlists *const execlists = &engine->execlists; +struct intel_engine_execlists *const execlists = &engine->execlists;unsigned int n;for (n =0 ; n <execlists_num_ports (execlists); n++) { -struct drm_i915_gem_request *rq =port_request (&execlists->port[n]); +struct drm_i915_gem_request *rq; + + rq =port_request (execlists_port (execlists, n));if (!rq)break ;
drivers/gpu/drm/i915/i915_guc_submission.c +31 -19
101 lines not on this page · raw message
drivers/gpu/drm/i915/intel_engine_cs.c +11 -7
@@ -1673,7 +1673,7 @@ static void print_request(struct drm_printer *m,void intel_engine_dump (struct intel_engine_cs *engine,struct drm_printer *m) {struct intel_breadcrumbs *const b = &engine->breadcrumbs; -const struct intel_engine_execlists *const execlists = &engine->execlists; +struct intel_engine_execlists *const execlists = &engine->execlists;struct i915_gpu_error *const error = &engine->i915->gpu_error;struct drm_i915_private *dev_priv = engine->i915;struct drm_i915_gem_request *rq;
@@ -1777,16 +1777,20 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)rcu_read_lock ();for (idx =0 ; idx <execlists_num_ports (execlists); idx++) { -unsigned int count; +struct execlist_port *port; +unsigned int count, idx_abs; + + port =execlists_port (execlists, idx); + idx_abs =port_index (port, execlists); - rq =port_unpack (&execlists->port[idx], &count); + rq =port_unpack (port, &count);if (rq) { -drm_printf (m,"\t\tELSP[%d] count=%d, " , - idx, count); +drm_printf (m,"\t\tELSP[%d:%d] count=%d, " , + idx, idx_abs, count);print_request (m, rq,"rq: " ); }else { -drm_printf (m,"\t\tELSP[%d] idle\n" , - idx); +drm_printf (m,"\t\tELSP[%d:%d] idle\n" , + idx, idx_abs); } }drm_printf (m,"\t\tHW active? 0x%x\n" , execlists->active);
drivers/gpu/drm/i915/intel_lrc.c +31 -18
154 lines not on this page · raw message
drivers/gpu/drm/i915/intel_ringbuffer.h +42 -2
62 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915: Introduce execlist_port_* accessors
From: Mika Kuoppala <[email protected]>
Instead of trusting that first available port is at index 0, use accessor to hide this. This is a preparation for a following patches where head can be at arbitrary location in the port array.
v2: improved commit message, elsp_ready readability (Chris)
v3: s/execlist_port_index/execlist_port (Chris)
v4: rebase to new naming
v5: fix port_next indexing
v6: adapt to preempt
v7: improved _port_next (Chris)
--- drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 50 ++++++++++++++++++------------ drivers/gpu/drm/i915/intel_engine_cs.c | 18 ++++++----- drivers/gpu/drm/i915/intel_lrc.c | 49 ++++++++++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 44 ++++++++++++++++++++++++-- 5 files changed, 119 insertions(+), 48 deletions(-)
drivers/gpu/drm/i915/i915_gpu_error.c +4 -2
@@ -1333,11 +1333,13 @@ static void engine_record_requests(struct intel_engine_cs *engine,static void error_record_engine_execlists (struct intel_engine_cs *engine,struct drm_i915_error_engine *ee) { -const struct intel_engine_execlists *const execlists = &engine->execlists; +struct intel_engine_execlists *const execlists = &engine->execlists;unsigned int n;for (n =0 ; n <execlists_num_ports (execlists); n++) { -struct drm_i915_gem_request *rq =port_request (&execlists->port[n]); +struct drm_i915_gem_request *rq; + + rq =port_request (execlists_port (execlists, n));if (!rq)break ;
drivers/gpu/drm/i915/i915_guc_submission.c +31 -19
101 lines not on this page · raw message
drivers/gpu/drm/i915/intel_engine_cs.c +11 -7
@@ -1687,7 +1687,7 @@ static void print_request(struct drm_printer *m,void intel_engine_dump (struct intel_engine_cs *engine,struct drm_printer *m) {struct intel_breadcrumbs *const b = &engine->breadcrumbs; -const struct intel_engine_execlists *const execlists = &engine->execlists; +struct intel_engine_execlists *const execlists = &engine->execlists;struct i915_gpu_error *const error = &engine->i915->gpu_error;struct drm_i915_private *dev_priv = engine->i915;struct drm_i915_gem_request *rq;
@@ -1791,16 +1791,20 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)rcu_read_lock ();for (idx =0 ; idx <execlists_num_ports (execlists); idx++) { -unsigned int count; +struct execlist_port *port; +unsigned int count, idx_abs; + + port =execlists_port (execlists, idx); + idx_abs =port_index (port, execlists); - rq =port_unpack (&execlists->port[idx], &count); + rq =port_unpack (port, &count);if (rq) { -drm_printf (m,"\t\tELSP[%d] count=%d, " , - idx, count); +drm_printf (m,"\t\tELSP[%d:%d] count=%d, " , + idx, idx_abs, count);print_request (m, rq,"rq: " ); }else { -drm_printf (m,"\t\tELSP[%d] idle\n" , - idx); +drm_printf (m,"\t\tELSP[%d:%d] idle\n" , + idx, idx_abs); } }drm_printf (m,"\t\tHW active? 0x%x\n" , execlists->active);
drivers/gpu/drm/i915/intel_lrc.c +31 -18
154 lines not on this page · raw message
drivers/gpu/drm/i915/intel_ringbuffer.h +42 -2
62 lines not on this page · raw message
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2017-11-02 14:32:38)
Quoted 34 lines
From: Mika Kuoppala <[email protected]>
Instead of trusting that first available port is at index 0, use accessor to hide this. This is a preparation for a following patches where head can be at arbitrary location in the port array.
v2: improved commit message,
elsp_readyreadability (Chris)
v3: s/execlist_port_index/execlist_port (Chris)
v4: rebase to new naming
v5: fixport_nextindexing
v6: adapt to preempt
v7: improved_port_next(Chris)Cc Michał Winiarski <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 50 ++++++++++++++++++------------ drivers/gpu/drm/i915/intel_engine_cs.c | 18 ++++++----- drivers/gpu/drm/i915/intel_lrc.c | 49 ++++++++++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 44 ++++++++++++++++++++++++-- 5 files changed, 119 insertions(+), 48 deletions(-)drivers/gpu/drm/i915/i915_gpu_error.c +0
-0@@ -1333,11 +1333,13 @@ static void engine_record_requests(struct intel_engine_cs *engine,static void error_record_engine_execlists (struct intel_engine_cs *engine,struct drm_i915_error_engine *ee) {
drivers/gpu/drm/i915/i915_gpu_error.c static void engine_record_requests(struct intel_engine_cs *engine, · line 1343
Quoted 10 lines
drivers/gpu/drm/i915/i915_gpu_error.c +4
-2-const struct intel_engine_execlists *const execlists = &engine->execlists; +struct intel_engine_execlists *const execlists = &engine->execlists;unsigned int n;for (n =0 ; n <execlists_num_ports (execlists); n++) { -struct drm_i915_gem_request *rq =port_request (&execlists->port[n]); +struct drm_i915_gem_request *rq; + + rq =port_request (execlists_port (execlists, n));
This newline isn't as interesting as the others. No one will shed a tear if it is removed.
drivers/gpu/drm/i915/i915_gpu_error.c static void execlists_dequeue(struct intel_engine_cs *engine) · line 675
Quoted 11 lines
drivers/gpu/drm/i915/i915_gpu_error.c +2
-1if (!rq)break ;@@ -665,7 +670,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine)if (submit)port_assign (port, last); - port++; + + port =execlists_port_next (execlists, port);
Spare us this newline as well. Let's have the advance and BUG() tightly coupled.
drivers/gpu/drm/i915/i915_gpu_error.c static void execlists_dequeue(struct intel_engine_cs *engine) · line 713
Quoted 13 lines
drivers/gpu/drm/i915/i915_gpu_error.c +3
-1GEM_BUG_ON (port_isset (port)); }@@ -699,8 +705,10 @@ static void execlists_dequeue(struct intel_engine_cs *engine)void execlists_cancel_port_requests (struct intel_engine_execlists *const execlists) { -struct execlist_port *port = execlists->port;unsigned int num_ports =execlists_num_ports (execlists); +struct execlist_port *port; + + port =execlists_port_head (execlists);while (num_ports-- &&port_isset (port)) {
for (port = execlists_port_head(execlists);
num_ports-- && port_isset(port);
port = execlists_head_complete(execlists, port)) {Might as well complete the transformation to more normal code ;)
drivers/gpu/drm/i915/i915_gpu_error.c execlists_port_complete(struct intel_engine_execlists * const execlists, · line 622
Quoted 11 lines
drivers/gpu/drm/i915/i915_gpu_error.c +4
-0+static inline struct execlist_port * +execlists_head_complete (struct intel_engine_execlists *const execlists,struct execlist_port *const port) {const unsigned int m = execlists->port_mask;@@ -580,6 +618,8 @@ execlists_port_complete(struct intel_engine_execlists * const execlists,memmove (port, port +1 , m *sizeof (struct execlist_port ));memset (port + m,0 ,sizeof (struct execlist_port )); + +return execlists_port_head (execlists);
Hang on a sec, isn't port->head itself meant to advance here? Oh, that'll be the next patch and this is just prep.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2017-10-31 15:27:33)
drivers/gpu/drm/i915/intel_ringbuffer.h execlists_num_ports(const struct intel_engine_execlists * const execlists) · line 606
Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +7
-0+static inline struct execlist_port * +execlists_port_next (struct intel_engine_execlists *const execlists, +const struct execlist_port *const port) +{ +const unsigned int n =__port_add (port_index (port, execlists), +1 , + execlists->port_mask);
How does this compare to
if (port++ == execlists->port + execlists->port_mask) port = execlists->port; return port;
?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Chris Wilson (2017-10-31 15:41:52)
Quoted 11 lines
Quoting Mika Kuoppala (2017-10-31 15:27:33)
drivers/gpu/drm/i915/intel_ringbuffer.h execlists_num_ports(const struct intel_engine_execlists * const execlists) · line 606
Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +7
-0+static inline struct execlist_port * +execlists_port_next (struct intel_engine_execlists *const execlists, +const struct execlist_port *const port) +{ +const unsigned int n =__port_add (port_index (port, execlists), +1 , + execlists->port_mask);How does this compare to
Quoted 5 lines
if (port++ == execlists->port + execlists->port_mask) port = execlists->port; return port;?
Rough estimate from bloat-o-meter
patch:
intel_lrc_irq_handler 1734 1926 +192 i915_guc_irq_handler 1522 1620 +98 execlists_cancel_port_requests 81 129 +48 intel_engine_dump 2030 2077 +47 intel_engine_init_cmd_parser 1132 1136 +4 capture 5633 5620 -13
delta:
i915_guc_irq_handler 1620 1617 -3 intel_lrc_irq_handler 1926 1790 -136
overall:
i915_guc_irq_handler 1522 1617 +95 intel_lrc_irq_handler 1734 1790 +56 execlists_cancel_port_requests 81 129 +48 intel_engine_dump 2030 2077 +47 intel_engine_init_cmd_parser 1132 1136 +4 capture 5633 5620 -13
But still +56 in irq_handler, that's mostly dequeue I guess. Can we do better?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Chris Wilson
Quoting Mika Kuoppala (2017-10-31 15:27:33)
drivers/gpu/drm/i915/intel_ringbuffer.h execlists_num_ports(const struct intel_engine_execlists * const execlists) · line 606
Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +7
-0+static inline struct execlist_port * +execlists_port_next (struct intel_engine_execlists *const execlists, +const struct execlist_port *const port) +{ +const unsigned int n =__port_add (port_index (port, execlists), +1 , + execlists->port_mask);How does this compare to
Quoted 5 lines
if (port++ == execlists->port + execlists->port_mask) port = execlists->port; return port;?
add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-29 (0)
function old new delta
i915_guc_irq_handler 2584 2613 +29 intel_lrc_irq_handler 2963 2934 -29
Total: Before=1123627, After=1123627, chg +0.00%
:)
-Mika
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2017-11-02 10:38:30)
Quoted 16 lines
Quoted 14 lines · Chris Wilson
Quoting Mika Kuoppala (2017-10-31 15:27:33)
drivers/gpu/drm/i915/intel_ringbuffer.h execlists_num_ports(const struct intel_engine_execlists * const execlists) · line 606
Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +7
-0+static inline struct execlist_port * +execlists_port_next (struct intel_engine_execlists *const execlists, +const struct execlist_port *const port) +{ +const unsigned int n =__port_add (port_index (port, execlists), +1 , + execlists->port_mask);How does this compare to
if (port++ == execlists->port + execlists->port_mask) port = execlists->port;
Quoted 8 lines
Quoted 2 lines
return port;?
add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-29 (0)
function old new deltai915_guc_irq_handler 2584 2613 +29 intel_lrc_irq_handler 2963 2934 -29Total: Before=1123627, After=1123627, chg +0.00%
Hmm, your functions saw little difference and are twice as big as mine... Weird.
I used gcc version 6.3.0 20170516 (Debian 6.3.0-18) with defconfig. Yourself?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 26 lines · Chris Wilson
Quoting Mika Kuoppala (2017-11-02 10:38:30)
Quoted 16 lines
Quoted 14 lines · Chris Wilson
Quoting Mika Kuoppala (2017-10-31 15:27:33)
drivers/gpu/drm/i915/intel_ringbuffer.h execlists_num_ports(const struct intel_engine_execlists * const execlists) · line 606
Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +7
-0+static inline struct execlist_port * +execlists_port_next (struct intel_engine_execlists *const execlists, +const struct execlist_port *const port) +{ +const unsigned int n =__port_add (port_index (port, execlists), +1 , + execlists->port_mask);How does this compare to
if (port++ == execlists->port + execlists->port_mask) port = execlists->port;Quoted 8 lines
Quoted 2 lines
return port;?
add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-29 (0)
function old new deltai915_guc_irq_handler 2584 2613 +29 intel_lrc_irq_handler 2963 2934 -29Total: Before=1123627, After=1123627, chg +0.00%
Quoted 5 lines
Hmm, your functions saw little difference and are twice as big as mine... Weird.
I used gcc version 6.3.0 20170516 (Debian 6.3.0-18) with defconfig. Yourself?
I had debugs on, sigh...
Now with the defconfig and gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406:
add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-139 (-139)
function old new delta
i915_guc_irq_handler 1620 1617 -3 intel_lrc_irq_handler 1926 1790 -136
So we have a clear winner.
-Mika
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 36 lines · Mika Kuoppala
Quoted 26 lines · Chris Wilson
Quoting Mika Kuoppala (2017-11-02 10:38:30)
Quoted 16 lines
Quoted 14 lines · Chris Wilson
Quoting Mika Kuoppala (2017-10-31 15:27:33)
Review
Quoted 7 lines
(quoted diff) +7
-0+static inline struct execlist_port * +execlists_port_next(struct intel_engine_execlists * const execlists, + const struct execlist_port * const port) +{ + const unsigned int n = __port_add(port_index(port, execlists), + 1, + execlists->port_mask);How does this compare to
if (port++ == execlists->port + execlists->port_mask) port = execlists->port;Quoted 8 lines
Quoted 2 lines
return port;?
add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-29 (0)
function old new deltai915_guc_irq_handler 2584 2613 +29 intel_lrc_irq_handler 2963 2934 -29Total: Before=1123627, After=1123627, chg +0.00%
Quoted 5 lines
Hmm, your functions saw little difference and are twice as big as mine... Weird.
I used gcc version 6.3.0 20170516 (Debian 6.3.0-18) with defconfig. Yourself?
I had debugs on, sigh...
Quoted 9 lines
Now with the defconfig and gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406:
add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-139 (-139)
function old new deltai915_guc_irq_handler 1620 1617 -3 intel_lrc_irq_handler 1926 1790 -136So we have a clear winner.
And to be precise on what diff lead to above:
drivers/gpu/drm/i915/intel_ringbuffer.h +5 -5
@@ -599,12 +599,12 @@ execlists_port_tail(struct intel_engine_execlists * const execlists)static inline struct execlist_port *execlists_port_next (struct intel_engine_execlists *const execlists, -const struct execlist_port *const port) +struct execlist_port *port) { -const unsigned int n =__port_add (port_index (port, execlists), -1 , - execlists->port_mask); -return &execlists->port[n]; +if (port++ == execlists->port + execlists->port_mask) + port = execlists->port; + +return port; }
Quoted 1 line
-Mika
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Introduce execlist_port_* accessors
In reply to Mika Kuoppala== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Introduce execlist_port_* accessors
URL : https://patchwork.freedesktop.org/series/32909/
State : failure
== Summary ==
Series 32909v1 series starting with [1/2] drm/i915: Introduce execlist_port_* accessors
https://patchwork.freedesktop.org/api/1.0/series/32909/revisions/1/mbox/
Test chamelium:
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#102514
Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass -> INCOMPLETE (fi-cnl-y)
Test kms_frontbuffer_tracking:
Subgroup basic:
pass -> FAIL (fi-glk-dsi) fdo#103167fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:438s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:450s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:376s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:517s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:264s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:495s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:497s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:496s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:472s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:553s fi-cnl-y total:217 pass:196 dwarn:0 dfail:0 fail:0 skip:20 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:423s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:247s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:577s fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:488s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:431s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:427s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:418s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:496s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:463s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:491s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:568s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:472s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:583s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:551s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:595s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:648s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:517s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:501s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:455s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:554s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:421s
8bc65f660b9856c176d26032b1cc1230d984b1a3 drm-tip: 2017y-10m-31d-10h-44m-16s UTC integration manifest 0ed38f271ffc drm/i915: Move execlists port head instead of memmoving array 64100dcc99f0 drm/i915: Introduce execlist_port_* accessors
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6280/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Move execlists port head instead of memmoving array
In reply to Mika KuoppalaFrom: Mika Kuoppala <[email protected]>
As all our access to execlist ports are through head and tail helpers, we can now move the head instead of memmoving the array.
v2: use memset (Chris)
--- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.h +5 -5
@@ -611,13 +611,13 @@ static inline struct execlist_port * execlists_head_complete(struct intel_engine_execlists * const execlists, struct execlist_port * const port) { -const unsigned int m = execlists->port_mask; - -GEM_BUG_ON (port_index (port, execlists) !=0 ); + GEM_BUG_ON(port_index(port, execlists) != execlists->port_head); +GEM_BUG_ON (!port_isset (port));GEM_BUG_ON (!execlists_is_active (execlists,EXECLISTS_ACTIVE_USER )); -memmove (port, port +1 , m *sizeof (struct execlist_port )); -memset (port + m,0 ,sizeof (struct execlist_port )); +memset (port,0 ,sizeof (*port)); + + execlists->port_head =port_head_add (execlists,1 );return execlists_port_head (execlists); }
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array
Quoting Mika Kuoppala (2017-10-31 15:27:34)
Quoted 11 lines
From: Mika Kuoppala <[email protected]>
As all our access to execlist ports are through head and tail helpers, we can now move the head instead of memmoving the array.
v2: use memset (Chris)
Cc Michał Winiarski <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>
Still waiting for patch 3 to kill the memset ;)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array
In reply to Mika KuoppalaQuoting Mika Kuoppala (2017-10-31 15:27:34)
Quoted 25 lines
From: Mika Kuoppala <[email protected]>
As all our access to execlist ports are through head and tail helpers, we can now move the head instead of memmoving the array.
v2: use memset (Chris)
Cc Michał Winiarski <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.h +0
-2@@ -611,13 +611,13 @@ static inline struct execlist_port * execlists_head_complete(struct intel_engine_execlists * const execlists, struct execlist_port * const port) { -const unsigned int m = execlists->port_mask; -
drivers/gpu/drm/i915/intel_ringbuffer.h static inline struct execlist_port * · line 620
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +5
-3-GEM_BUG_ON (port_index (port, execlists) !=0 ); +GEM_BUG_ON (port_index (port, execlists) != execlists->port_head); +GEM_BUG_ON (!port_isset (port));GEM_BUG_ON (!execlists_is_active (execlists,EXECLISTS_ACTIVE_USER )); -memmove (port, port +1 , m *sizeof (struct execlist_port )); -memset (port + m,0 ,sizeof (struct execlist_port )); +memset (port,0 ,sizeof (*port)); + + execlists->port_head =port_head_add (execlists,1 );
Ok, I would have gone for
port = port_next(port);execlists->port_head = port - execlists->port;
return port;
That to me looks more natural advance of port as we complete the requests, and matches the loop in the irq handler.
Care to crunch the numbers and see which gcc favours? -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array
Quoted 39 lines · Chris Wilson
Quoting Mika Kuoppala (2017-10-31 15:27:34)
Quoted 25 lines
From: Mika Kuoppala <[email protected]>
As all our access to execlist ports are through head and tail helpers, we can now move the head instead of memmoving the array.
v2: use memset (Chris)
Cc Michał Winiarski <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.h +0
-2@@ -611,13 +611,13 @@ static inline struct execlist_port * execlists_head_complete(struct intel_engine_execlists * const execlists, struct execlist_port * const port) { -const unsigned int m = execlists->port_mask; -drivers/gpu/drm/i915/intel_ringbuffer.h static inline struct execlist_port * · line 620
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +5
-3-GEM_BUG_ON (port_index (port, execlists) !=0 ); +GEM_BUG_ON (port_index (port, execlists) != execlists->port_head); +GEM_BUG_ON (!port_isset (port));GEM_BUG_ON (!execlists_is_active (execlists,EXECLISTS_ACTIVE_USER )); -memmove (port, port +1 , m *sizeof (struct execlist_port )); -memset (port + m,0 ,sizeof (struct execlist_port )); +memset (port,0 ,sizeof (*port)); + + execlists->port_head =port_head_add (execlists,1 );Ok, I would have gone for
Quoted 8 lines
port =
port_next(port);execlists->port_head= port -execlists->port;
return port;That to me looks more natural advance of port as we complete the requests, and matches the loop in the irq handler.
Care to crunch the numbers and see which gcc favours?
gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406:
add/remove: 0/0 grow/shrink: 3/0 up/down: 219/0 (219)
function old new deltaexeclists_submission_tasklet 2405 2525 +120execlists_cancel_port_requests 315 376 +61guc_submission_tasklet 1643 1681 +38
Total: Before=1168854, After=1169073, chg +0.02%
gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0:
add/remove: 0/0 grow/shrink: 3/0 up/down: 158/0 (158)
function old new delta
execlists_submission_tasklet 2383 2460 +77 execlists_cancel_port_requests 344 401 +57 guc_submission_tasklet 1684 1708 +24
Total: Before=1164662, After=1164820, chg +0.01%
where new:
execlists_head_complete(struct intel_engine_execlists * const execlists,
- struct execlist_port * const port)
+ struct execlist_port *port)
{
GEM_BUG_ON(port_index(port, execlists) != execlists->port_head);
GEM_BUG_ON(!port_isset(port));@@ -677,9 +677,10 @@ execlists_head_complete(struct intel_engine_execlists * const execlists,
memset(port, 0, sizeof(*port));
- execlists->port_head = port_head_add(execlists, 1); + port = execlists_port_next(execlists, port); + execlists->port_head = port - execlists->port;
- return execlists_port_head(execlists);
+ return port;
-Mika
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson
Reviewed-byRe: [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array
Quoting Mika Kuoppala (2017-11-22 13:52:09)
Quoted 59 lines
Quoted 39 lines · Chris Wilson
Quoting Mika Kuoppala (2017-10-31 15:27:34)
Quoted 25 lines
From: Mika Kuoppala <[email protected]>
As all our access to execlist ports are through head and tail helpers, we can now move the head instead of memmoving the array.
v2: use memset (Chris)
Cc Michał Winiarski <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.h +0
-2@@ -611,13 +611,13 @@ static inline struct execlist_port * execlists_head_complete(struct intel_engine_execlists * const execlists, struct execlist_port * const port) { -const unsigned int m = execlists->port_mask; -drivers/gpu/drm/i915/intel_ringbuffer.h static inline struct execlist_port * · line 620
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.h +5
-3-GEM_BUG_ON (port_index (port, execlists) !=0 ); +GEM_BUG_ON (port_index (port, execlists) != execlists->port_head); +GEM_BUG_ON (!port_isset (port));GEM_BUG_ON (!execlists_is_active (execlists,EXECLISTS_ACTIVE_USER )); -memmove (port, port +1 , m *sizeof (struct execlist_port )); -memset (port + m,0 ,sizeof (struct execlist_port )); +memset (port,0 ,sizeof (*port)); + + execlists->port_head =port_head_add (execlists,1 );Ok, I would have gone for
Quoted 8 lines
port =
port_next(port);execlists->port_head= port -execlists->port;
return port;That to me looks more natural advance of port as we complete the requests, and matches the loop in the irq handler.
Care to crunch the numbers and see which gcc favours?
gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406:
add/remove: 0/0 grow/shrink: 3/0 up/down: 219/0 (219)
function old new deltaexeclists_submission_tasklet2405 2525 +120execlists_cancel_port_requests315 376 +61guc_submission_tasklet1643 1681 +38
Total: Before=1168854, After=1169073, chg +0.02%
Quoted 8 lines
gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0:
add/remove: 0/0 grow/shrink: 3/0 up/down: 158/0 (158)
function old new deltaexeclists_submission_tasklet 2383 2460 +77 execlists_cancel_port_requests 344 401 +57 guc_submission_tasklet 1684 1708 +24Total: Before=1164662, After=1164820, chg +0.01%
Ok, have a
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx