drm/i915/gt: convert tasklets to use new tasklet_setup() API
Subsystems (2)
PATCH 1/1 drm/i915/gt: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly.
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +6 -9
@@ -3137,9 +3137,9 @@ static bool preempt_timeout(const struct intel_engine_cs *const engine)* Check the unread Context Status Buffers and manage the submission of new * contexts to the ELSP accordingly. */ -static void execlists_submission_tasklet (unsigned long data) +static void execlists_submission_tasklet (struct tasklet_struct *t) { -struct intel_engine_cs *const engine = (struct intel_engine_cs *)data; +struct intel_engine_cs *const engine =from_tasklet (engine, t, execlists.tasklet);bool timeout =preempt_timeout (engine);process_csb (engine);
@@ -5120,8 +5120,7 @@ int intel_execlists_submission_setup(struct intel_engine_cs *engine)struct intel_uncore *uncore = engine->uncore;u32 base = engine->mmio_base; -tasklet_init (&engine->execlists.tasklet, - execlists_submission_tasklet, (unsigned long )engine); +tasklet_setup (&engine->execlists.tasklet, execlists_submission_tasklet);timer_setup (&engine->execlists.timer, execlists_timeslice,0 );timer_setup (&engine->execlists.preempt, execlists_preempt,0 );
@@ -5516,9 +5515,9 @@ static intel_engine_mask_t virtual_submission_mask(struct virtual_engine *ve)return mask; } -static void virtual_submission_tasklet (unsigned long data) +static void virtual_submission_tasklet (struct tasklet_struct *t) { -struct virtual_engine *const ve = (struct virtual_engine *)data; +struct virtual_engine *const ve =from_tasklet (ve, t, base.execlists.tasklet);const int prio =READ_ONCE (ve->base.execlists.queue_priority_hint);intel_engine_mask_t mask;unsigned int n;
@@ -5731,9 +5730,7 @@ intel_execlists_create_virtual(struct intel_engine_cs **siblings,INIT_LIST_HEAD (virtual_queue (ve)); ve->base.execlists.queue_priority_hint =INT_MIN ; -tasklet_init (&ve->base.execlists.tasklet, - virtual_submission_tasklet, - (unsigned long )ve); +tasklet_setup (&ve->base.execlists.tasklet, virtual_submission_tasklet);intel_context_init (&ve->context, &ve->base);
Signature · 6 lines
2.28.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Andy Shevchenko (2020-08-19 12:53:53)
Quoted 5 lines
In preparation for unconditionally passing the struct
tasklet_structpointer to all tasklet callbacks, switch to using the newtasklet_setup()andfrom_tasklet()to pass the tasklet pointer explicitly.Signed-off-by Andy Shevchenko <[email protected]>
-Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Jani Nikula
maintainerQuoted 8 lines · Chris Wilson
Quoting Andy Shevchenko (2020-08-19 12:53:53)
Quoted 5 lines
In preparation for unconditionally passing the struct
tasklet_structpointer to all tasklet callbacks, switch to using the newtasklet_setup()andfrom_tasklet()to pass the tasklet pointer explicitly.Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>-Chris
Uh, what?
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Chris Wilson
Reviewed-byQuoting Jani Nikula (2020-08-19 13:34:41)
Quoted 8 lines · Chris Wilson
Quoted 7 lines
Quoting Andy Shevchenko (2020-08-19 12:53:53)
Quoted 5 lines
In preparation for unconditionally passing the struct
tasklet_structpointer to all tasklet callbacks, switch to using the newtasklet_setup()andfrom_tasklet()to pass the tasklet pointer explicitly.Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>
Quoted 3 lines
Quoted 1 line
-Chris
Uh, what?
Copy-n-paste too far.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Chris Wilson
Quoting Jani Nikula (2020-08-19 13:34:41)
Quoted 8 lines · Chris Wilson
Quoted 7 lines
Quoting Andy Shevchenko (2020-08-19 12:53:53)
Quoted 5 lines
In preparation for unconditionally passing the struct
tasklet_structpointer to all tasklet callbacks, switch to using the newtasklet_setup()andfrom_tasklet()to pass the tasklet pointer explicitly.Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Reviewed-by Chris Wilson <[email protected]>
I sent too early, I will send v2 and thanks for review.
Signature · 8 lines
With Best Regards, Andy Shevchenko _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gt: convert tasklets to use new tasklet_setup() API
In reply to Andy Shevchenko== Series Details ==
== Series Details ==
Series: drm/i915/gt: convert tasklets to use new tasklet_setup() API
URL : https://patchwork.freedesktop.org/series/80801/
State : failure
== Summary ==
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/i915/gt/intel_lrc.odrivers/gpu/drm/i915/gt/intel_lrc.c: In function ‘intel_execlists_set_default_submission’:drivers/gpu/drm/i915/gt/intel_lrc.c:4994:33: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
engine->execlists.tasklet.func = execlists_submission_tasklet;
^
drivers/gpu/drm/i915/gt/intel_lrc.c: In function ‘intel_execlists_create_virtual’:
drivers/gpu/drm/i915/gt/intel_lrc.c:5763:39: error: comparison of distinct pointer types lacks a cast [-Werror]
if (sibling->execlists.tasklet.func !=
^~cc1: all warnings being treated as errorsscripts/Makefile.build:283: recipe for target 'drivers/gpu/drm/i915/gt/intel_lrc.o' failed make[4]: *** [drivers/gpu/drm/i915/gt/intel_lrc.o] Error 1 scripts/Makefile.build:500: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:500: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:500: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1789: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kernel test robot
build botI love your patch! Yet something to improve:
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v5.9-rc1 next-20200819]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/drm-i915-gt-convert-tasklets-to-use-new-tasklet_setup-API/20200819-195502 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-r024-20200818 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/i915/gt/intel_lrc.c: In function 'execlists_submission_tasklet':
drivers/gpu/drm/i915/gt/intel_lrc.c:3135:42: error: implicit declaration of function 'from_tasklet' [-Werror=implicit-function-declaration]
3135 | struct intel_engine_cs * const engine = from_tasklet(engine, t, execlists.tasklet);
| ^~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_lrc.c:3135:66: error: 'execlists' undeclared (first use in this function); did you mean 'execlists_hold'?
3135 | struct intel_engine_cs * const engine = from_tasklet(engine, t, execlists.tasklet);
| ^~~~~~~~~
| execlists_hold
drivers/gpu/drm/i915/gt/intel_lrc.c:3135:66: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/i915/gt/intel_lrc.c: In function 'intel_execlists_set_default_submission':
>> drivers/gpu/drm/i915/gt/intel_lrc.c:4989:33: error: assignment to 'void (*)(long unsigned int)' from incompatible pointer type 'void (*)(struct tasklet_struct *)' [-Werror=incompatible-pointer-types]
4989 | engine->execlists.tasklet.func = execlists_submission_tasklet;
| ^
drivers/gpu/drm/i915/gt/intel_lrc.c: In function 'intel_execlists_submission_setup':
drivers/gpu/drm/i915/gt/intel_lrc.c:5116:2: error: implicit declaration of function 'tasklet_setup' [-Werror=implicit-function-declaration]
5116 | tasklet_setup(&engine->execlists.tasklet, execlists_submission_tasklet);
| ^~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_lrc.c: In function 'virtual_submission_tasklet':
drivers/gpu/drm/i915/gt/intel_lrc.c:5513:57: error: 'base' undeclared (first use in this function)
5513 | struct virtual_engine * const ve = from_tasklet(ve, t, base.execlists.tasklet);
| ^~~~
drivers/gpu/drm/i915/gt/intel_lrc.c: In function 'intel_execlists_create_virtual':
>> drivers/gpu/drm/i915/gt/intel_lrc.c:5748:39: warning: comparison of distinct pointer types lacks a cast
5748 | if (sibling->execlists.tasklet.func !=
| ^~cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/72a087952fafa97f8e7fa8b42fee8234c2a04fd7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/drm-i915-gt-convert-tasklets-to-use-new-tasklet_setup-API/20200819-195502 git checkout 72a087952fafa97f8e7fa8b42fee8234c2a04fd7
vim +4989 drivers/gpu/drm/i915/gt/intel_lrc.c
c34c5bca331adc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-05-03 4984
209b7955e59e36 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2018-07-17 4985 void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
ddd66c5154c25d drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2016-08-02 4986 {
f4ea6bddb9988e drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2016-08-02 4987 engine->submit_request = execlists_submit_request;
e2f3496e93be32 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2018-10-01 4988 engine->schedule = i915_schedule;
c6dce8f140bc19 drivers/gpu/drm/i915/intel_lrc.c Sagar Arun Kamble 2017-11-16 @4989 engine->execlists.tasklet.func = execlists_submission_tasklet;
aba5e278586b16 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2017-10-25 4990
1329115c6c4370 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2018-05-16 4991 engine->reset.prepare = execlists_reset_prepare;
e26b6d4341476f drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-22 4992 engine->reset.rewind = execlists_reset_rewind;
e26b6d4341476f drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-22 4993 engine->reset.cancel = execlists_reset_cancel;
292ad25c22d965 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2019-04-11 4994 engine->reset.finish = execlists_reset_finish;
1329115c6c4370 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2018-05-16 4995
c34c5bca331adc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-05-03 4996 engine->park = execlists_park;
aba5e278586b16 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2017-10-25 4997 engine->unpark = NULL;
cf669b4e9fdce4 drivers/gpu/drm/i915/intel_lrc.c Tvrtko Ursulin 2017-11-29 4998
cf669b4e9fdce4 drivers/gpu/drm/i915/intel_lrc.c Tvrtko Ursulin 2017-11-29 4999 engine->flags |= I915_ENGINE_SUPPORTS_STATS;
09975b861aa0c5 drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-07-09 5000 if (!intel_vgpu_active(engine->i915)) {
a2deb87396b090 drivers/gpu/drm/i915/intel_lrc.c Zhenyu Wang 2019-03-27 5001 engine->flags |= I915_ENGINE_HAS_SEMAPHORES;
a211da9c771bf9 drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2020-05-01 5002 if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
2a694feb93556e drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2018-04-03 5003 engine->flags |= I915_ENGINE_HAS_PREEMPTION;
a211da9c771bf9 drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2020-05-01 5004 if (IS_ACTIVE(CONFIG_DRM_I915_TIMESLICE_DURATION))
a211da9c771bf9 drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2020-05-01 5005 engine->flags |= I915_ENGINE_HAS_TIMESLICES;
a211da9c771bf9 drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2020-05-01 5006 }
20311bd3506043 drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2016-11-14 5007 }
cdb736fa8b8b65 drivers/gpu/drm/i915/gt/intel_lrc.c Mika Kuoppala 2019-09-06 5008
ba2c74da52eba3 drivers/gpu/drm/i915/gt/intel_lrc.c Daniele Ceraolo Spurio 2019-10-09 5009 if (INTEL_GEN(engine->i915) >= 12)
cdb736fa8b8b65 drivers/gpu/drm/i915/gt/intel_lrc.c Mika Kuoppala 2019-09-06 5010 engine->flags |= I915_ENGINE_HAS_RELATIVE_MMIO;
a5e93b42f462fc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-13 5011
a5e93b42f462fc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-13 5012 if (intel_engine_has_preemption(engine))
a5e93b42f462fc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-13 5013 engine->emit_bb_start = gen8_emit_bb_start;
a5e93b42f462fc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-13 5014 else
a5e93b42f462fc drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-12-13 5015 engine->emit_bb_start = gen8_emit_bb_start_noarb;
09975b861aa0c5 drivers/gpu/drm/i915/gt/intel_lrc.c Chris Wilson 2019-07-09 5016 }
ddd66c5154c25d drivers/gpu/drm/i915/intel_lrc.c Chris Wilson 2016-08-02 5017 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org