public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Protect against HAS_GUC_* returning true values other than one
@ 2016-07-04 14:30 Tvrtko Ursulin
  2016-07-04 14:54 ` Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2016-07-04 14:30 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

At the moment HAS_GUC_UCODE == HAS_GUC == IS_GEN9 ==
(INTEL_INFO(dev)->gen_mask & BIT(8)), which is true but not one. And
module parameters are integers and not booleans so compiler will not
normalize the value for us.

Quick and easy fix for the GuC loading code and the whole area can
be evaluated afterwards.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Gordon <david.s.gordon@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index d925e2daeb24..72ea5b97e242 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -687,9 +687,9 @@ void intel_guc_init(struct drm_device *dev)
 
 	/* A negative value means "use platform default" */
 	if (i915.enable_guc_loading < 0)
-		i915.enable_guc_loading = HAS_GUC_UCODE(dev);
+		i915.enable_guc_loading = !!HAS_GUC_UCODE(dev);
 	if (i915.enable_guc_submission < 0)
-		i915.enable_guc_submission = HAS_GUC_SCHED(dev);
+		i915.enable_guc_submission = !!HAS_GUC_SCHED(dev);
 
 	if (!HAS_GUC_UCODE(dev)) {
 		fw_path = NULL;
-- 
1.9.1

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

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

end of thread, other threads:[~2016-07-14 13:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-04 14:30 [PATCH] drm/i915/guc: Protect against HAS_GUC_* returning true values other than one Tvrtko Ursulin
2016-07-04 14:54 ` Chris Wilson
2016-07-04 15:03 ` ✗ Ro.CI.BAT: warning for " Patchwork
2016-07-05 10:58 ` [PATCH] " Antoine, Peter
2016-07-05 11:50 ` Dave Gordon
2016-07-05 11:56   ` Tvrtko Ursulin
2016-07-05 12:32     ` Dave Gordon
2016-07-13 13:01       ` [PATCH] drm/i915/guc: symbolic names for user load/submission preferences Dave Gordon
2016-07-05 12:54 ` ✗ Ro.CI.BAT: failure for drm/i915/guc: Protect against HAS_GUC_* returning true values other than one (rev3) Patchwork
2016-07-13 13:38 ` ✗ Ro.CI.BAT: warning for drm/i915/guc: Protect against HAS_GUC_* returning true values other than one (rev4) Patchwork
2016-07-14 13:33   ` Dave Gordon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox