* [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests
@ 2018-07-12 14:07 Jakub Bartmiński
2018-07-12 14:07 ` [PATCH 2/2] HAX enable GuC for CI Jakub Bartmiński
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jakub Bartmiński @ 2018-07-12 14:07 UTC (permalink / raw)
To: intel-gfx; +Cc: Jakub Bartmiński
Some functions used within mock selftests may expect platform-dependent
automatic modparams parameters to have already been resolved, resulting
in failed assertions.
Backing up the modparams before mock selftests and manually setting
offending parameters inside the affected selftests should fix the issue.
Signed-off-by: Jakub Bartmiński <jakub.bartminski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
---
drivers/gpu/drm/i915/i915_pci.c | 10 ++++++++++
drivers/gpu/drm/i915/selftests/i915_gem_context.c | 6 ++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 55543f1b0236..9e41851f5ca2 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -733,11 +733,21 @@ static int __init i915_init(void)
{
bool use_kms = true;
int err;
+ struct i915_params *backup_modparams;
+
+ backup_modparams = kmalloc(sizeof(*backup_modparams), GFP_KERNEL);
+ if (!backup_modparams)
+ return -ENOMEM;
+ memcpy(backup_modparams, &i915_modparams, sizeof(*backup_modparams));
err = i915_mock_selftests();
if (err)
return err > 0 ? 0 : err;
+ /* Revert any modparams modifications made inside mock selftests */
+ memcpy(&i915_modparams, backup_modparams, sizeof(*backup_modparams));
+ kfree(backup_modparams);
+
/*
* Enable KMS by default, unless explicitly overriden by
* either the i915.modeset prarameter or by the
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index ab2590242033..de6aad832ac9 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -597,6 +597,12 @@ int i915_gem_context_mock_selftests(void)
if (!i915)
return -ENOMEM;
+ /*
+ * Platform defaults have not been resolved yet, so we need to prevent
+ * assertion failure on an unresolved enable_guc.
+ */
+ i915_modparams.enable_guc = 0;
+
err = i915_subtests(tests, i915);
drm_dev_put(&i915->drm);
--
2.17.1
_______________________________________________
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
* [PATCH 2/2] HAX enable GuC for CI
2018-07-12 14:07 [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Jakub Bartmiński
@ 2018-07-12 14:07 ` Jakub Bartmiński
2018-07-12 14:26 ` [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Chris Wilson
2018-07-12 14:48 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Jakub Bartmiński @ 2018-07-12 14:07 UTC (permalink / raw)
To: intel-gfx
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
drivers/gpu/drm/i915/i915_params.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index aebe0469ddaa..3e4e128237ac 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -47,7 +47,7 @@ struct drm_printer;
param(int, disable_power_well, -1) \
param(int, enable_ips, 1) \
param(int, invert_brightness, 0) \
- param(int, enable_guc, 0) \
+ param(int, enable_guc, -1) \
param(int, guc_log_level, -1) \
param(char *, guc_firmware_path, NULL) \
param(char *, huc_firmware_path, NULL) \
--
2.17.1
_______________________________________________
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 1/2] drm/i915: Keep local modparams copy for mock selftests
2018-07-12 14:07 [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Jakub Bartmiński
2018-07-12 14:07 ` [PATCH 2/2] HAX enable GuC for CI Jakub Bartmiński
@ 2018-07-12 14:26 ` Chris Wilson
2018-07-12 14:49 ` Daniel Vetter
2018-07-12 14:48 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-07-12 14:26 UTC (permalink / raw)
To: intel-gfx; +Cc: Jakub Bartmiński
Quoting Jakub Bartmiński (2018-07-12 15:07:18)
> Some functions used within mock selftests may expect platform-dependent
> automatic modparams parameters to have already been resolved, resulting
> in failed assertions.
> Backing up the modparams before mock selftests and manually setting
> offending parameters inside the affected selftests should fix the issue.
I think hiding under a rock until it's weened off the modparam abuse and
can use a mock device is my favourite strategy here.
-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: success for series starting with [1/2] drm/i915: Keep local modparams copy for mock selftests
2018-07-12 14:07 [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Jakub Bartmiński
2018-07-12 14:07 ` [PATCH 2/2] HAX enable GuC for CI Jakub Bartmiński
2018-07-12 14:26 ` [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Chris Wilson
@ 2018-07-12 14:48 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-07-12 14:48 UTC (permalink / raw)
To: Jakub Bartmiński; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Keep local modparams copy for mock selftests
URL : https://patchwork.freedesktop.org/series/46398/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4475 -> Patchwork_9633 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46398/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9633:
=== IGT changes ===
==== Possible regressions ====
igt@core_auth@basic-auth:
{fi-skl-iommu}: PASS -> INCOMPLETE
== Known issues ==
Here are the changes found in Patchwork_9633 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
== Participating hosts (45 -> 42) ==
Additional (1): fi-elk-e7500
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4475 -> Patchwork_9633
CI_DRM_4475: 1b6f049d73237a170919604538e747b0282b0109 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4551: 93cf6931b33e2c0f5b89c89b65817fe245ecc391 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9633: 42e5990d61ded7af327247b74976c52a206e12d0 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
42e5990d61de HAX enable GuC for CI
ce9387fc7344 drm/i915: Keep local modparams copy for mock selftests
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9633/issues.html
_______________________________________________
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 1/2] drm/i915: Keep local modparams copy for mock selftests
2018-07-12 14:26 ` [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Chris Wilson
@ 2018-07-12 14:49 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2018-07-12 14:49 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Jakub Bartmiński
On Thu, Jul 12, 2018 at 03:26:41PM +0100, Chris Wilson wrote:
> Quoting Jakub Bartmiński (2018-07-12 15:07:18)
> > Some functions used within mock selftests may expect platform-dependent
> > automatic modparams parameters to have already been resolved, resulting
> > in failed assertions.
> > Backing up the modparams before mock selftests and manually setting
> > offending parameters inside the affected selftests should fix the issue.
>
> I think hiding under a rock until it's weened off the modparam abuse and
> can use a mock device is my favourite strategy here.
I think for reasons we want a local copy of the modparams in i915_dev.
Then we could sanitize/mock them at well in per-instances mocks even.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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
end of thread, other threads:[~2018-07-12 14:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-12 14:07 [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Jakub Bartmiński
2018-07-12 14:07 ` [PATCH 2/2] HAX enable GuC for CI Jakub Bartmiński
2018-07-12 14:26 ` [PATCH 1/2] drm/i915: Keep local modparams copy for mock selftests Chris Wilson
2018-07-12 14:49 ` Daniel Vetter
2018-07-12 14:48 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox