All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Prepare GEM for suspend earlier
@ 2018-05-22 14:51 Chris Wilson
  2018-05-22 14:51 ` [PATCH 2/3] drm/i915: Special case kernel_context switch request Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-22 14:51 UTC (permalink / raw)
  To: intel-gfx

In order to prepare the GPU for sleeping, we may want to submit commands
to it. This is a complicated process that may even require some swapping
in from shmemfs, if the GPU was in the wrong state. As such, we need to
do this preparation step synchronously before the rest of the system has
started to turn off (e.g. swapin fails if scsi is suspended).
Fortunately, we are provided with a such a hook, pm_ops.prepare().

v2: Compile cleanup

Testcase: igt/drv_suspend after igt/gem_tiled_swapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_drv.c | 47 ++++++++++++++++++++++++++-------
 1 file changed, 37 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9c449b8d8eab..a0beabd49f62 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1553,12 +1553,30 @@ static bool suspend_to_idle(struct drm_i915_private *dev_priv)
 	return false;
 }
 
+static int i915_drm_prepare(struct drm_device *dev)
+{
+	struct drm_i915_private *i915 = to_i915(dev);
+	int err;
+
+	disable_rpm_wakeref_asserts(i915);
+
+	err = i915_gem_suspend(i915);
+	if (err) {
+		dev_err(&i915->drm.pdev->dev,
+			"GEM idle failed, suspend/resume might fail\n");
+		goto out;
+	}
+out:
+	enable_rpm_wakeref_asserts(i915);
+
+	return err;
+}
+
 static int i915_drm_suspend(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 	pci_power_t opregion_target_state;
-	int error;
 
 	/* ignore lid events during suspend */
 	mutex_lock(&dev_priv->modeset_restore_lock);
@@ -1575,13 +1593,6 @@ static int i915_drm_suspend(struct drm_device *dev)
 
 	pci_save_state(pdev);
 
-	error = i915_gem_suspend(dev_priv);
-	if (error) {
-		dev_err(&pdev->dev,
-			"GEM idle failed, resume might fail\n");
-		goto out;
-	}
-
 	intel_display_suspend(dev);
 
 	intel_dp_mst_suspend(dev);
@@ -1609,10 +1620,9 @@ static int i915_drm_suspend(struct drm_device *dev)
 
 	intel_csr_ucode_suspend(dev_priv);
 
-out:
 	enable_rpm_wakeref_asserts(dev_priv);
 
-	return error;
+	return 0;
 }
 
 static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
@@ -2081,6 +2091,22 @@ int i915_reset_engine(struct intel_engine_cs *engine, const char *msg)
 	return ret;
 }
 
+static int i915_pm_prepare(struct device *kdev)
+{
+	struct pci_dev *pdev = to_pci_dev(kdev);
+	struct drm_device *dev = pci_get_drvdata(pdev);
+
+	if (!dev) {
+		dev_err(kdev, "DRM not initialized, aborting suspend.\n");
+		return -ENODEV;
+	}
+
+	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+		return 0;
+
+	return i915_drm_prepare(dev);
+}
+
 static int i915_pm_suspend(struct device *kdev)
 {
 	struct pci_dev *pdev = to_pci_dev(kdev);
@@ -2731,6 +2757,7 @@ const struct dev_pm_ops i915_pm_ops = {
 	 * S0ix (via system suspend) and S3 event handlers [PMSG_SUSPEND,
 	 * PMSG_RESUME]
 	 */
+	.prepare = i915_pm_prepare,
 	.suspend = i915_pm_suspend,
 	.suspend_late = i915_pm_suspend_late,
 	.resume_early = i915_pm_resume_early,
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] drm/i915: Special case kernel_context switch request
  2018-05-22 14:51 [PATCH 1/3] drm/i915: Prepare GEM for suspend earlier Chris Wilson
@ 2018-05-22 14:51 ` Chris Wilson
  2018-05-24 14:16   ` kbuild test robot
  2018-05-24 14:22   ` kbuild test robot
  2018-05-22 14:51 ` [PATCH 3/3] RFC drm/i915: Switch to kernel context before idling at runtime Chris Wilson
  2018-05-22 15:41 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Prepare GEM for suspend earlier Patchwork
  2 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-22 14:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

From: Mika Kuoppala <mika.kuoppala@intel.com>

When checking if engine is idling on a kernel context,
the last request emitted to it could have been the exact
request to switch into kernel context.

Do not bail out early even if engine has requests,
if the last request was for kernel context.

Fixes: a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index b69b18ef8120..3fe1212b0f7e 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -595,7 +595,10 @@ static bool engine_has_idle_kernel_context(struct intel_engine_cs *engine)
 	lockdep_assert_held(&engine->i915->drm.struct_mutex);
 
 	list_for_each_entry(ring, active_rings, active_link) {
-		if (last_request_on_engine(ring->timeline, engine))
+		struct i915_request *rq =
+			last_request_on_engine(ring->timeline, engine);
+
+		if (rq && rq->gem_context != engine->i915->kernel_context)
 			return false;
 	}
 
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] RFC drm/i915: Switch to kernel context before idling at runtime
  2018-05-22 14:51 [PATCH 1/3] drm/i915: Prepare GEM for suspend earlier Chris Wilson
  2018-05-22 14:51 ` [PATCH 2/3] drm/i915: Special case kernel_context switch request Chris Wilson
@ 2018-05-22 14:51 ` Chris Wilson
  2018-05-22 15:41 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Prepare GEM for suspend earlier Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-22 14:51 UTC (permalink / raw)
  To: intel-gfx

We can reduce our exposure to random neutrinos by resting on the kernel
context having flushed out the user contexts to system memory and
beyond. The corollary is that we then we require two passes through the
idle handler to go to sleep, which on a truly idle system involves an
extra pass through the slow and irregular retire work handler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 03874b50ada9..a81aa124af26 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3504,6 +3504,18 @@ i915_gem_idle_work_handler(struct work_struct *work)
 	if (!READ_ONCE(dev_priv->gt.awake))
 		return;
 
+	/*
+	 * Flush out the last user context, leaving only the pinned
+	 * kernel context resident. When we are idling on the kernel_context,
+	 * no more new requests (with a context switch) are emitted and we
+	 * can finally rest. A consequence is that the idle work handler is
+	 * always called at least twice before idling (and if the system is
+	 * idle that implies a round trip through the retire worker).
+	 */
+	mutex_lock(&dev_priv->drm.struct_mutex);
+	i915_gem_switch_to_kernel_context(dev_priv);
+	mutex_unlock(&dev_priv->drm.struct_mutex);
+
 	/*
 	 * Wait for last execlists context complete, but bail out in case a
 	 * new request is submitted. As we don't trust the hardware, we
@@ -4958,7 +4970,6 @@ int i915_gem_suspend(struct drm_i915_private *dev_priv)
 
 		assert_kernel_context_is_current(dev_priv);
 	}
-	i915_gem_contexts_lost(dev_priv);
 	mutex_unlock(&dev->struct_mutex);
 
 	intel_uc_suspend(dev_priv);
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Prepare GEM for suspend earlier
  2018-05-22 14:51 [PATCH 1/3] drm/i915: Prepare GEM for suspend earlier Chris Wilson
  2018-05-22 14:51 ` [PATCH 2/3] drm/i915: Special case kernel_context switch request Chris Wilson
  2018-05-22 14:51 ` [PATCH 3/3] RFC drm/i915: Switch to kernel context before idling at runtime Chris Wilson
@ 2018-05-22 15:41 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-05-22 15:41 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] drm/i915: Prepare GEM for suspend earlier
URL   : https://patchwork.freedesktop.org/series/43576/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4221 -> Patchwork_9085 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9085 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9085, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/43576/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_9085:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_module_reload@basic-no-display:
      fi-elk-e7500:       PASS -> FAIL
      fi-cfl-8700k:       PASS -> FAIL +1
      fi-ivb-3520m:       PASS -> FAIL
      fi-bdw-gvtdvm:      PASS -> FAIL
      fi-pnv-d510:        PASS -> FAIL
      fi-hsw-4200u:       PASS -> FAIL +1
      fi-bwr-2160:        PASS -> FAIL
      fi-bdw-5557u:       PASS -> FAIL +1
      fi-skl-6260u:       PASS -> FAIL +1
      fi-snb-2600:        PASS -> FAIL
      fi-bsw-n3050:       PASS -> FAIL +1
      fi-ivb-3770:        PASS -> FAIL
      {fi-kbl-guc}:       PASS -> FAIL
      fi-kbl-7500u:       PASS -> FAIL +1
      fi-blb-e6850:       PASS -> FAIL
      fi-cfl-u:           PASS -> FAIL +1
      fi-gdg-551:         PASS -> FAIL
      fi-skl-gvtdvm:      PASS -> FAIL
      fi-ilk-650:         PASS -> FAIL

    igt@drv_module_reload@basic-reload:
      fi-skl-guc:         PASS -> DMESG-FAIL +1
      fi-bdw-gvtdvm:      PASS -> DMESG-FAIL
      fi-kbl-r:           PASS -> DMESG-FAIL +1
      fi-gdg-551:         PASS -> DMESG-FAIL
      fi-cfl-8700k:       PASS -> DMESG-FAIL +1
      fi-bxt-dsi:         NOTRUN -> DMESG-FAIL +1
      fi-ivb-3520m:       PASS -> DMESG-FAIL
      fi-hsw-4770:        PASS -> DMESG-FAIL +1
      {fi-cfl-guc}:       PASS -> DMESG-FAIL +1
      fi-ilk-650:         PASS -> DMESG-FAIL
      fi-bsw-n3050:       PASS -> DMESG-FAIL +1
      fi-ivb-3770:        PASS -> DMESG-FAIL
      fi-cnl-y3:          PASS -> DMESG-FAIL +1
      fi-cfl-s3:          PASS -> DMESG-FAIL +1
      fi-hsw-4770r:       PASS -> DMESG-FAIL +1
      fi-cfl-u:           PASS -> DMESG-FAIL +1
      fi-kbl-7500u:       PASS -> DMESG-FAIL +1
      fi-bdw-5557u:       PASS -> DMESG-FAIL +1
      fi-kbl-7567u:       PASS -> DMESG-FAIL +1
      {fi-kbl-guc}:       PASS -> DMESG-FAIL
      fi-hsw-4200u:       PASS -> DMESG-FAIL +1
      fi-blb-e6850:       PASS -> DMESG-FAIL
      fi-glk-j4005:       PASS -> DMESG-FAIL +1
      fi-pnv-d510:        PASS -> DMESG-FAIL
      fi-elk-e7500:       PASS -> DMESG-FAIL
      fi-skl-gvtdvm:      PASS -> DMESG-FAIL
      fi-snb-2600:        PASS -> DMESG-FAIL
      fi-bwr-2160:        PASS -> DMESG-FAIL

    igt@drv_module_reload@basic-reload-inject:
      fi-skl-6260u:       PASS -> INCOMPLETE
      fi-snb-2600:        PASS -> INCOMPLETE
      fi-kbl-7560u:       PASS -> INCOMPLETE
      {fi-kbl-guc}:       PASS -> INCOMPLETE
      fi-hsw-4200u:       PASS -> INCOMPLETE
      fi-skl-6770hq:      PASS -> INCOMPLETE
      fi-kbl-r:           PASS -> INCOMPLETE
      fi-cfl-s3:          PASS -> INCOMPLETE
      fi-gdg-551:         PASS -> INCOMPLETE
      fi-ilk-650:         PASS -> INCOMPLETE
      fi-bsw-n3050:       PASS -> INCOMPLETE
      fi-kbl-7567u:       PASS -> INCOMPLETE
      fi-ivb-3770:        PASS -> INCOMPLETE
      fi-kbl-7500u:       PASS -> INCOMPLETE
      fi-ivb-3520m:       PASS -> INCOMPLETE
      fi-hsw-4770:        PASS -> INCOMPLETE
      fi-bdw-5557u:       PASS -> INCOMPLETE
      fi-cfl-8700k:       PASS -> INCOMPLETE
      fi-hsw-peppy:       PASS -> INCOMPLETE
      fi-skl-6600u:       PASS -> INCOMPLETE
      fi-pnv-d510:        PASS -> INCOMPLETE
      fi-hsw-4770r:       PASS -> INCOMPLETE
      fi-skl-guc:         PASS -> INCOMPLETE
      {fi-cfl-guc}:       PASS -> INCOMPLETE
      fi-blb-e6850:       PASS -> INCOMPLETE
      fi-skl-6700k2:      PASS -> INCOMPLETE
      fi-cfl-u:           PASS -> INCOMPLETE

    igt@pm_rpm@basic-pci-d3-state:
      fi-skl-6600u:       PASS -> DMESG-FAIL +1
      fi-kbl-7560u:       PASS -> DMESG-FAIL +1
      fi-byt-j1900:       PASS -> DMESG-FAIL +1
      fi-byt-n2820:       PASS -> DMESG-FAIL +1
      fi-skl-6770hq:      PASS -> DMESG-FAIL +1
      fi-skl-6700k2:      PASS -> DMESG-FAIL +1
      fi-cnl-psr:         PASS -> DMESG-FAIL
      fi-bxt-j4205:       PASS -> DMESG-FAIL +1
      fi-skl-6260u:       PASS -> DMESG-FAIL +1
      fi-hsw-peppy:       PASS -> DMESG-FAIL +1

    igt@pm_rpm@basic-rte:
      fi-glk-j4005:       PASS -> FAIL +1
      {fi-cfl-guc}:       PASS -> FAIL +1
      fi-skl-guc:         PASS -> FAIL +1
      fi-kbl-7567u:       PASS -> FAIL +1
      fi-hsw-peppy:       PASS -> FAIL +1
      fi-kbl-r:           PASS -> FAIL +1
      fi-hsw-4770r:       PASS -> FAIL +1
      fi-byt-n2820:       PASS -> FAIL +1
      fi-cfl-s3:          PASS -> FAIL +1
      fi-kbl-7560u:       PASS -> FAIL +1
      fi-skl-6770hq:      PASS -> FAIL +1
      fi-skl-6700k2:      PASS -> FAIL +1
      fi-hsw-4770:        PASS -> FAIL +1
      fi-byt-j1900:       PASS -> FAIL +1
      fi-bxt-dsi:         NOTRUN -> FAIL +1
      fi-skl-6600u:       PASS -> FAIL +1
      fi-cnl-psr:         PASS -> FAIL
      fi-cnl-y3:          PASS -> FAIL +1
      fi-bxt-j4205:       PASS -> FAIL +1

    
    ==== Warnings ====

    igt@drv_module_reload@basic-no-display:
      fi-cnl-psr:         DMESG-WARN (fdo#105395) -> FAIL

    igt@drv_module_reload@basic-reload:
      fi-cnl-psr:         DMESG-WARN (fdo#105395) -> DMESG-FAIL

    igt@gem_exec_gttfill@basic:
      fi-pnv-d510:        SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_9085 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@debugfs_test@read_all_entries:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    igt@drv_module_reload@basic-reload-inject:
      fi-byt-j1900:       PASS -> INCOMPLETE (fdo#102657)
      fi-cnl-y3:          PASS -> INCOMPLETE (fdo#105086)
      fi-byt-n2820:       PASS -> INCOMPLETE (fdo#102657)
      fi-bxt-j4205:       PASS -> INCOMPLETE (fdo#103927)
      fi-bwr-2160:        PASS -> INCOMPLETE (fdo#105268)
      fi-bdw-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)
      fi-glk-j4005:       PASS -> INCOMPLETE (fdo#103359, k.org#198133)
      fi-bxt-dsi:         NOTRUN -> INCOMPLETE (fdo#103927)
      fi-skl-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)
      fi-elk-e7500:       PASS -> INCOMPLETE (fdo#103989)

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-dpms:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c-frame-sequence:
      fi-cfl-s3:          FAIL (fdo#103481) -> PASS

    
    ==== Warnings ====

    igt@drv_module_reload@basic-reload-inject:
      fi-cnl-psr:         DMESG-WARN (fdo#105395) -> INCOMPLETE (fdo#105086)

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086
  fdo#105268 https://bugs.freedesktop.org/show_bug.cgi?id=105268
  fdo#105395 https://bugs.freedesktop.org/show_bug.cgi?id=105395
  fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (44 -> 39) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_4221 -> Patchwork_9085

  CI_DRM_4221: d83aef98e4f2e35440222c69ef80a68daf1abb4e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4490: 0b381c7d1067a4fe520b72d4d391d4920834cbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9085: 6904136ea7bcae856534609021067a948781ade5 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4490: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit


== Kernel 32bit build ==

Warning: Kernel 32bit buildtest failed:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9085/build_32bit.log

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC [M]  drivers/gpu/drm/i915/i915_query.o
In file included from ./include/asm-generic/barrier.h:20:0,
                 from ./arch/x86/include/asm/barrier.h:86,
                 from ./include/linux/nospec.h:8,
                 from drivers/gpu/drm/i915/i915_query.c:7:
drivers/gpu/drm/i915/i915_query.c: In function ‘i915_query_ioctl’:
./include/linux/compiler.h:339:38: error: call to ‘__compiletime_assert_119’ declared with attribute error: BUILD_BUG_ON failed: sizeof(_s) > sizeof(long)
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:319:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:339:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:45:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:69:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
./include/linux/nospec.h:53:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(sizeof(_i) > sizeof(long));   \
  ^~~~~~~~~~~~
drivers/gpu/drm/i915/i915_query.c:118:15: note: in expansion of macro ‘array_index_nospec’
    func_idx = array_index_nospec(func_idx,
               ^~~~~~~~~~~~~~~~~~
scripts/Makefile.build:312: recipe for target 'drivers/gpu/drm/i915/i915_query.o' failed
make[4]: *** [drivers/gpu/drm/i915/i915_query.o] Error 1
scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:559: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1060: recipe for target 'drivers' failed
make: *** [drivers] Error 2


== Linux commits ==

6904136ea7bc RFC drm/i915: Switch to kernel context before idling at runtime
be49d7c9c868 drm/i915: Special case kernel_context switch request
abed622dd309 drm/i915: Prepare GEM for suspend earlier

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9085/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] drm/i915: Special case kernel_context switch request
  2018-05-22 14:51 ` [PATCH 2/3] drm/i915: Special case kernel_context switch request Chris Wilson
@ 2018-05-24 14:16   ` kbuild test robot
  2018-05-24 14:22   ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-05-24 14:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, kbuild-all, Mika Kuoppala

[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]

Hi Mika,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180517]
[cannot apply to drm-intel/for-linux-next v4.17-rc6 v4.17-rc5 v4.17-rc4 v4.17-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-Prepare-GEM-for-suspend-earlier/20180524-214128
config: x86_64-randconfig-x015-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/i915_gem_context.c: In function 'engine_has_idle_kernel_context':
>> drivers/gpu//drm/i915/i915_gem_context.c:608:15: error: 'struct i915_request' has no member named 'gem_context'
      if (rq && rq->gem_context != engine->i915->kernel_context)
                  ^~

vim +608 drivers/gpu//drm/i915/i915_gem_context.c

   596	
   597	static bool engine_has_idle_kernel_context(struct intel_engine_cs *engine)
   598	{
   599		struct list_head * const active_rings = &engine->i915->gt.active_rings;
   600		struct intel_ring *ring;
   601	
   602		lockdep_assert_held(&engine->i915->drm.struct_mutex);
   603	
   604		list_for_each_entry(ring, active_rings, active_link) {
   605			struct i915_request *rq =
   606				last_request_on_engine(ring->timeline, engine);
   607	
 > 608			if (rq && rq->gem_context != engine->i915->kernel_context)
   609				return false;
   610		}
   611	
   612		return intel_engine_has_kernel_context(engine);
   613	}
   614	

---
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: 32148 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] drm/i915: Special case kernel_context switch request
  2018-05-22 14:51 ` [PATCH 2/3] drm/i915: Special case kernel_context switch request Chris Wilson
  2018-05-24 14:16   ` kbuild test robot
@ 2018-05-24 14:22   ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-05-24 14:22 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, kbuild-all, Mika Kuoppala

[-- Attachment #1: Type: text/plain, Size: 3384 bytes --]

Hi Mika,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20180517]
[cannot apply to drm-intel/for-linux-next v4.17-rc6 v4.17-rc5 v4.17-rc4 v4.17-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-Prepare-GEM-for-suspend-earlier/20180524-214128
config: i386-randconfig-x071-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from arch/x86/include/asm/bitops.h:16:0,
                    from include/linux/bitops.h:38,
                    from include/linux/log2.h:16,
                    from drivers/gpu//drm/i915/i915_gem_context.c:88:
   drivers/gpu//drm/i915/i915_gem_context.c: In function 'engine_has_idle_kernel_context':
   drivers/gpu//drm/i915/i915_gem_context.c:608:15: error: 'struct i915_request' has no member named 'gem_context'
      if (rq && rq->gem_context != engine->i915->kernel_context)
                  ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu//drm/i915/i915_gem_context.c:608:3: note: in expansion of macro 'if'
      if (rq && rq->gem_context != engine->i915->kernel_context)
      ^~
   drivers/gpu//drm/i915/i915_gem_context.c:608:15: error: 'struct i915_request' has no member named 'gem_context'
      if (rq && rq->gem_context != engine->i915->kernel_context)
                  ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/gpu//drm/i915/i915_gem_context.c:608:3: note: in expansion of macro 'if'
      if (rq && rq->gem_context != engine->i915->kernel_context)
      ^~
   drivers/gpu//drm/i915/i915_gem_context.c:608:15: error: 'struct i915_request' has no member named 'gem_context'
      if (rq && rq->gem_context != engine->i915->kernel_context)
                  ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/gpu//drm/i915/i915_gem_context.c:608:3: note: in expansion of macro 'if'
      if (rq && rq->gem_context != engine->i915->kernel_context)
      ^~

vim +/if +608 drivers/gpu//drm/i915/i915_gem_context.c

   596	
   597	static bool engine_has_idle_kernel_context(struct intel_engine_cs *engine)
   598	{
   599		struct list_head * const active_rings = &engine->i915->gt.active_rings;
   600		struct intel_ring *ring;
   601	
   602		lockdep_assert_held(&engine->i915->drm.struct_mutex);
   603	
   604		list_for_each_entry(ring, active_rings, active_link) {
   605			struct i915_request *rq =
   606				last_request_on_engine(ring->timeline, engine);
   607	
 > 608			if (rq && rq->gem_context != engine->i915->kernel_context)
   609				return false;
   610		}
   611	
   612		return intel_engine_has_kernel_context(engine);
   613	}
   614	

---
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: 33394 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-24 14:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-22 14:51 [PATCH 1/3] drm/i915: Prepare GEM for suspend earlier Chris Wilson
2018-05-22 14:51 ` [PATCH 2/3] drm/i915: Special case kernel_context switch request Chris Wilson
2018-05-24 14:16   ` kbuild test robot
2018-05-24 14:22   ` kbuild test robot
2018-05-22 14:51 ` [PATCH 3/3] RFC drm/i915: Switch to kernel context before idling at runtime Chris Wilson
2018-05-22 15:41 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Prepare GEM for suspend earlier Patchwork

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.