All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Assert guc->stage_desc_pool is allocated
@ 2017-11-06 11:48 Chris Wilson
  2017-11-06 12:38 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2017-11-06 11:48 UTC (permalink / raw)
  To: intel-gfx

Silence smatch by demonstrating that guc->stage_desc_pool is allocated
following a successful guc_stage_desc_pool_create()

drivers/gpu/drm/i915/i915_guc_submission.c:1293 i915_guc_submission_init() error: we previously assumed 'guc->stage_desc_pool' could be null (see line 1261

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index d14c1342f09d..6f2548114bd2 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1265,10 +1265,18 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
 	if (ret)
 		return ret;
 
+	/*
+	 * Keep static analysers happy, let them know that we allocated the
+	 * vma after testing that it didn't exist earlier.
+	 */
+	GEM_BUG_ON(!guc->stage_desc_pool);
+
 	ret = guc_shared_data_create(guc);
 	if (ret)
 		goto err_stage_desc_pool;
 
+	GEM_BUG_ON(!guc->shared_data);
+
 	ret = intel_guc_log_create(guc);
 	if (ret < 0)
 		goto err_shared_data;
@@ -1277,10 +1285,14 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
 	if (ret)
 		goto err_log;
 
+	GEM_BUG_ON(!guc->preempt_wq);
+
 	ret = guc_ads_create(guc);
 	if (ret < 0)
 		goto err_wq;
 
+	GEM_BUG_ON(!guc->ads_vma);
+
 	return 0;
 
 err_wq:
-- 
2.15.0

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Assert guc->stage_desc_pool is allocated
  2017-11-06 11:48 [PATCH] drm/i915: Assert guc->stage_desc_pool is allocated Chris Wilson
@ 2017-11-06 12:38 ` Patchwork
  2017-11-06 13:36 ` [PATCH] " Michal Wajdeczko
  2017-11-06 13:40 ` ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-06 12:38 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert guc->stage_desc_pool is allocated
URL   : https://patchwork.freedesktop.org/series/33248/
State : success

== Summary ==

Series 33248v1 drm/i915: Assert guc->stage_desc_pool is allocated
https://patchwork.freedesktop.org/api/1.0/series/33248/revisions/1/mbox/

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:443s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:458s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:380s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:551s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:275s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:503s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:505s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:504s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:502s
fi-cfl-s         total:289  pass:254  dwarn:3   dfail:0   fail:0   skip:32  time:559s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:604s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:426s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:259s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:590s
fi-glk-dsi       total:289  pass:258  dwarn:0   dfail:0   fail:1   skip:30  time:493s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:431s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:428s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:427s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:502s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:463s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:575s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:481s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:588s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:565s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:452s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:601s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:656s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:515s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:506s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:468s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:574s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:421s

9cc9686b44e192d2561a513f84d5ac95518cad73 drm-tip: 2017y-11m-06d-10h-10m-17s UTC integration manifest
b00a7e7864a7 drm/i915: Assert guc->stage_desc_pool is allocated

== Logs ==

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

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

* Re: [PATCH] drm/i915: Assert guc->stage_desc_pool is allocated
  2017-11-06 11:48 [PATCH] drm/i915: Assert guc->stage_desc_pool is allocated Chris Wilson
  2017-11-06 12:38 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-11-06 13:36 ` Michal Wajdeczko
  2017-11-06 13:40 ` ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Wajdeczko @ 2017-11-06 13:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Mon, Nov 06, 2017 at 11:48:33AM +0000, Chris Wilson wrote:
> Silence smatch by demonstrating that guc->stage_desc_pool is allocated
> following a successful guc_stage_desc_pool_create()
> 
> drivers/gpu/drm/i915/i915_guc_submission.c:1293 i915_guc_submission_init() error: we previously assumed 'guc->stage_desc_pool' could be null (see line 1261
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_guc_submission.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
> index d14c1342f09d..6f2548114bd2 100644
> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
> @@ -1265,10 +1265,18 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
>  	if (ret)
>  		return ret;
>  
> +	/*
> +	 * Keep static analysers happy, let them know that we allocated the
> +	 * vma after testing that it didn't exist earlier.
> +	 */
> +	GEM_BUG_ON(!guc->stage_desc_pool);
> +
>  	ret = guc_shared_data_create(guc);
>  	if (ret)
>  		goto err_stage_desc_pool;
>  
> +	GEM_BUG_ON(!guc->shared_data);
> +
>  	ret = intel_guc_log_create(guc);
>  	if (ret < 0)
>  		goto err_shared_data;
> @@ -1277,10 +1285,14 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
>  	if (ret)
>  		goto err_log;
>  
> +	GEM_BUG_ON(!guc->preempt_wq);
> +
>  	ret = guc_ads_create(guc);
>  	if (ret < 0)
>  		goto err_wq;
>  
> +	GEM_BUG_ON(!guc->ads_vma);
> +
>  	return 0;
>  

Nitpick: I would place GEM_BUG_ONs right after "if(ret)" without
any separation line to emphase that those statements are related.

Also I hope that one day we will call submission_init just once and
than early check of stage_desc_pool will not be needed any more.

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915: Assert guc->stage_desc_pool is allocated
  2017-11-06 11:48 [PATCH] drm/i915: Assert guc->stage_desc_pool is allocated Chris Wilson
  2017-11-06 12:38 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-11-06 13:36 ` [PATCH] " Michal Wajdeczko
@ 2017-11-06 13:40 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-06 13:40 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert guc->stage_desc_pool is allocated
URL   : https://patchwork.freedesktop.org/series/33248/
State : success

== Summary ==

Test kms_setmode:
        Subgroup basic:
                pass       -> FAIL       (shard-hsw) fdo#99912
Test kms_flip:
        Subgroup wf_vblank-vs-dpms-interruptible:
                incomplete -> PASS       (shard-hsw) fdo#102614
Test perf:
        Subgroup oa-exponents:
                pass       -> FAIL       (shard-hsw) fdo#102254

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254

shard-hsw        total:2539 pass:1432 dwarn:0   dfail:0   fail:10  skip:1097 time:9155s

== Logs ==

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

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

end of thread, other threads:[~2017-11-06 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 11:48 [PATCH] drm/i915: Assert guc->stage_desc_pool is allocated Chris Wilson
2017-11-06 12:38 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-06 13:36 ` [PATCH] " Michal Wajdeczko
2017-11-06 13:40 ` ✓ Fi.CI.IGT: success for " 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.