* [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[]
@ 2019-10-18 13:07 Chris Wilson
2019-10-18 13:22 ` Tvrtko Ursulin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2019-10-18 13:07 UTC (permalink / raw)
To: intel-gfx
Remember to include the newly created mock engine in the list of
available engines inside the gt.
Fixes: a50134b1983b ("drm/i915: Make for_each_engine_masked work on intel_gt")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/gt/mock_engine.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
index 747f7c7790eb..123db2c3f956 100644
--- a/drivers/gpu/drm/i915/gt/mock_engine.c
+++ b/drivers/gpu/drm/i915/gt/mock_engine.c
@@ -253,6 +253,7 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
snprintf(engine->base.name, sizeof(engine->base.name), "%s", name);
engine->base.id = id;
engine->base.mask = BIT(id);
+ engine->base.legacy_idx = INVALID_ENGINE;
engine->base.instance = id;
engine->base.status_page.addr = (void *)(engine + 1);
@@ -267,6 +268,9 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
engine->base.reset.finish = mock_reset_finish;
engine->base.cancel_requests = mock_cancel_requests;
+ i915->gt.engine[id] = &engine->base;
+ i915->gt.engine_class[0][id] = &engine->base;
+
/* fake hw queue */
spin_lock_init(&engine->hw_lock);
timer_setup(&engine->hw_delay, hw_delay_complete, 0);
--
2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[]
2019-10-18 13:07 [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[] Chris Wilson
@ 2019-10-18 13:22 ` Tvrtko Ursulin
2019-10-18 13:25 ` Chris Wilson
2019-10-18 16:17 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-10-21 9:15 ` [Intel-gfx] [PATCH] " kbuild test robot
2 siblings, 1 reply; 5+ messages in thread
From: Tvrtko Ursulin @ 2019-10-18 13:22 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 18/10/2019 14:07, Chris Wilson wrote:
> Remember to include the newly created mock engine in the list of
> available engines inside the gt.
>
> Fixes: a50134b1983b ("drm/i915: Make for_each_engine_masked work on intel_gt")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wi..oh wait!^W^W^W :)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> ---
> drivers/gpu/drm/i915/gt/mock_engine.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
> index 747f7c7790eb..123db2c3f956 100644
> --- a/drivers/gpu/drm/i915/gt/mock_engine.c
> +++ b/drivers/gpu/drm/i915/gt/mock_engine.c
> @@ -253,6 +253,7 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
> snprintf(engine->base.name, sizeof(engine->base.name), "%s", name);
> engine->base.id = id;
> engine->base.mask = BIT(id);
> + engine->base.legacy_idx = INVALID_ENGINE;
> engine->base.instance = id;
> engine->base.status_page.addr = (void *)(engine + 1);
>
> @@ -267,6 +268,9 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
> engine->base.reset.finish = mock_reset_finish;
> engine->base.cancel_requests = mock_cancel_requests;
>
> + i915->gt.engine[id] = &engine->base;
> + i915->gt.engine_class[0][id] = &engine->base;
> +
> /* fake hw queue */
> spin_lock_init(&engine->hw_lock);
> timer_setup(&engine->hw_delay, hw_delay_complete, 0);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[]
2019-10-18 13:22 ` Tvrtko Ursulin
@ 2019-10-18 13:25 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2019-10-18 13:25 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx
Quoting Tvrtko Ursulin (2019-10-18 14:22:39)
>
> On 18/10/2019 14:07, Chris Wilson wrote:
> > Remember to include the newly created mock engine in the list of
> > available engines inside the gt.
> >
> > Fixes: a50134b1983b ("drm/i915: Make for_each_engine_masked work on intel_gt")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
>
> Reviewed-by: Chris Wi..oh wait!^W^W^W :)
I give up. I'm taking a couple of paracetamol and going for a lie down.
Both of me.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/selftests: Add the mock engine to the gt->engine[]
2019-10-18 13:07 [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[] Chris Wilson
2019-10-18 13:22 ` Tvrtko Ursulin
@ 2019-10-18 16:17 ` Patchwork
2019-10-21 9:15 ` [Intel-gfx] [PATCH] " kbuild test robot
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-10-18 16:17 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Add the mock engine to the gt->engine[]
URL : https://patchwork.freedesktop.org/series/68201/
State : failure
== Summary ==
Applying: drm/i915/selftests: Add the mock engine to the gt->engine[]
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/gt/mock_engine.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[]
2019-10-18 13:07 [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[] Chris Wilson
2019-10-18 13:22 ` Tvrtko Ursulin
2019-10-18 16:17 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2019-10-21 9:15 ` kbuild test robot
2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2019-10-21 9:15 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3450 bytes --]
Hi Chris,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[cannot apply to v5.4-rc4 next-20191018]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-selftests-Add-the-mock-engine-to-the-gt-engine/20191021-151209
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/gt/intel_engine_cs.c:1577:0:
drivers/gpu/drm/i915/gt/mock_engine.c: In function 'mock_engine':
>> drivers/gpu/drm/i915/gt/mock_engine.c:254:28: error: 'INVALID_ENGINE' undeclared (first use in this function); did you mean 'INVALID_PIPE'?
engine->base.legacy_idx = INVALID_ENGINE;
^~~~~~~~~~~~~~
INVALID_PIPE
drivers/gpu/drm/i915/gt/mock_engine.c:254:28: note: each undeclared identifier is reported only once for each function it appears in
vim +254 drivers/gpu/drm/i915/gt/mock_engine.c
235
236 struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
237 const char *name,
238 int id)
239 {
240 struct mock_engine *engine;
241
242 GEM_BUG_ON(id >= I915_NUM_ENGINES);
243
244 engine = kzalloc(sizeof(*engine) + PAGE_SIZE, GFP_KERNEL);
245 if (!engine)
246 return NULL;
247
248 /* minimal engine setup for requests */
249 engine->base.i915 = i915;
250 engine->base.gt = &i915->gt;
251 snprintf(engine->base.name, sizeof(engine->base.name), "%s", name);
252 engine->base.id = id;
253 engine->base.mask = BIT(id);
> 254 engine->base.legacy_idx = INVALID_ENGINE;
255 engine->base.instance = id;
256 engine->base.status_page.addr = (void *)(engine + 1);
257
258 engine->base.cops = &mock_context_ops;
259 engine->base.request_alloc = mock_request_alloc;
260 engine->base.emit_flush = mock_emit_flush;
261 engine->base.emit_fini_breadcrumb = mock_emit_breadcrumb;
262 engine->base.submit_request = mock_submit_request;
263
264 engine->base.reset.prepare = mock_reset_prepare;
265 engine->base.reset.reset = mock_reset;
266 engine->base.reset.finish = mock_reset_finish;
267 engine->base.cancel_requests = mock_cancel_requests;
268
269 i915->gt.engine[id] = &engine->base;
270 i915->gt.engine_class[0][id] = &engine->base;
271
272 /* fake hw queue */
273 spin_lock_init(&engine->hw_lock);
274 timer_setup(&engine->hw_delay, hw_delay_complete, 0);
275 INIT_LIST_HEAD(&engine->hw_queue);
276
277 intel_engine_add_user(&engine->base);
278
279 return &engine->base;
280 }
281
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 69590 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-21 9:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-18 13:07 [PATCH] drm/i915/selftests: Add the mock engine to the gt->engine[] Chris Wilson
2019-10-18 13:22 ` Tvrtko Ursulin
2019-10-18 13:25 ` Chris Wilson
2019-10-18 16:17 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-10-21 9:15 ` [Intel-gfx] [PATCH] " kbuild test robot
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.