chromeos-4.14: i915_gem + clang: function 'wait_for_engine' is not needed and will not be emitted |
||||
Issue description
Build guenter's latest merge branches on kernel next for an intel target (mine's for Reef) using the options for that board (done by switching chromeos-kernel-4_4 to guenter's chroemos-4.14 test merge branch).
kernel-next/chromeos-4.14-merge-171116
Expected: Builds cleanly.
Result: Fails to build using clang.
/mnt/host/source/src/third_party/kernel/v4.4/drivers/gpu/drm/i915/i915_gem.c:3388:12: error: function 'wait_for_engine' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static int wait_for_engine(struct intel_engine_cs *engine, int timeout_ms)
^
1 error generated.
make[5]: *** [/mnt/host/source/src/third_party/kernel/v4.4/scripts/Makefile.build:314: drivers/gpu/drm/i915/i915_gem.o] Error 1
make[5]: Target '__build' not remade because of errors.
make[4]: *** [/mnt/host/source/src/third_party/kernel/v4.4/scripts/Makefile.build:573: drivers/gpu/drm/i915] Error 2
make[4]: Target '__build' not remade because of errors.
make[3]: *** [/mnt/host/source/src/third_party/kernel/v4.4/scripts/Makefile.build:573: drivers/gpu/drm] Error 2
make[3]: Target '__build' not remade because of errors.
make[2]: *** [/mnt/host/source/src/third_party/kernel/v4.4/scripts/Makefile.build:573: drivers/gpu] Error 2
make[2]: Target '__build' not remade because of errors.
make[1]: *** [/mnt/host/source/src/third_party/kernel/v4.4/Makefile:1024: drivers] Error 2
make[1]: Target '_all' not remade because of errors.
make[1]: Leaving directory '/build/reef/var/cache/portage/sys-kernel/chromeos-kernel-4_4'
make: *** [Makefile:146: sub-make] Error 2
make: Target '_all' not remade because of errors.
Issue does not occur when I build with -clang:
USE="-clang" FEATURES="noclean" cros_workon_make --board=reef --install chromeos-kernel-4_4
,
Nov 17 2017
,
Nov 17 2017
This should be fixed by the following patch (just landed upstream): commit cad9946c2a4375386062131858881cfd30fc1b8f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sat Aug 26 12:09:33 2017 +0100 drm/i915: Always sanity check engine state upon idling Officially we haven't enabled clang for v4.14 yet, but we'll probably do it soon after the rebase is finished.
,
Nov 17 2017
This upstream patch removes unused wait_for_engine: cad9946c2a43 - drm/i915: Always sanity check engine state upon idling I'm backporting it for 4.14 https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/772480 but it should also apply cleanly on kernel-next/chromeos-4.14-merge-171116 if you want to try it.
,
Dec 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/038430ca5ec8c1a9dde5221fd44633ca9e658168 commit 038430ca5ec8c1a9dde5221fd44633ca9e658168 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Dec 05 04:03:01 2017 UPSTREAM: drm/i915: Always sanity check engine state upon idling When we do a locked idle we know that afterwards all requests have been completed and the engines have been cleared of tasks. For whatever reason, this doesn't always happen and we may go into a suspend with ELSP still full, and this causes an issue upon resume as we get very, very confused. If the engines refuse to idle, mark the device as wedged. In the process we get rid of the maybe unused open-coded version of wait_for_engines reported by Nick Desaulniers and Matthias Kaehlcke. v2: Suppress the -EIO before suspend, but keep it for seqno wrap. References: https://bugs.freedesktop.org/show_bug.cgi?id=101891 References: https://bugs.freedesktop.org/show_bug.cgi?id=102456 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Matthias Kaehlcke <mka@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170826110935.10237-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> (cherry picked from commit cad9946c2a4375386062131858881cfd30fc1b8f git://anongit.freedesktop.org/drm-intel drm-intel-next-queued) Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com> BUG=chromium:783394, chromium:786277 TEST=CNL boots to graphics build v4.14 for x86 w/ clang => no warning/error about unused function 'wait_for_engine' Change-Id: I702e57ffcda7852c42cac9daf7dddbf118a2f53a Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/807360 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> [modify] https://crrev.com/038430ca5ec8c1a9dde5221fd44633ca9e658168/drivers/gpu/drm/i915/i915_gem.c
,
Feb 6 2018
See #5. |
||||
►
Sign in to add a comment |
||||
Comment 1 by bleung@chromium.org
, Nov 17 2017Labels: -Pri-3 Kernel-4.14 Pri-1