All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Report command parser version 0 if disabled
@ 2016-05-04 13:25 Chris Wilson
  2016-05-04 15:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2016-05-04 16:08 ` [PATCH] " Joonas Lahtinen
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2016-05-04 13:25 UTC (permalink / raw)
  To: intel-gfx

If the command parser is not active, then it is appropriate to report it
as operating at version 0 as no higher mode is supported. This greatly
simplifies userspace querying for the command parser as we then do not
need to second guess when it will be active (a mixture of module
parameters and generational support, which may change over time).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_cmd_parser.c | 15 ++++++++++++++-
 drivers/gpu/drm/i915/i915_dma.c        |  2 +-
 drivers/gpu/drm/i915/i915_drv.h        |  2 +-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index a337f33bec5b..17831fac49f5 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -1275,8 +1275,21 @@ int i915_parse_cmds(struct intel_engine_cs *engine,
  *
  * Return: the current version number of the cmd parser
  */
-int i915_cmd_parser_get_version(void)
+int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv)
 {
+	struct intel_engine_cs *engine;
+	bool active = false;
+
+	/* If the comand parser is not enabled, report 0 - unsupported */
+	for_each_engine(engine, dev_priv) {
+		if (i915_needs_cmd_parser(engine)) {
+			active = true;
+			break;
+		}
+	}
+	if (!active)
+		return 0;
+
 	/*
 	 * Command parser version history
 	 *
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index c91387f1aedd..ad7abe517700 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -204,7 +204,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
 		value = 1;
 		break;
 	case I915_PARAM_CMD_PARSER_VERSION:
-		value = i915_cmd_parser_get_version();
+		value = i915_cmd_parser_get_version(dev_priv);
 		break;
 	case I915_PARAM_HAS_COHERENT_PHYS_GTT:
 		value = 1;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 75a1675ea6ce..d5496aba1cd5 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3442,7 +3442,7 @@ void i915_get_extra_instdone(struct drm_device *dev, uint32_t *instdone);
 const char *i915_cache_level_str(struct drm_i915_private *i915, int type);
 
 /* i915_cmd_parser.c */
-int i915_cmd_parser_get_version(void);
+int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv);
 int i915_cmd_parser_init_ring(struct intel_engine_cs *engine);
 void i915_cmd_parser_fini_ring(struct intel_engine_cs *engine);
 bool i915_needs_cmd_parser(struct intel_engine_cs *engine);
-- 
2.8.1

_______________________________________________
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: failure for drm/i915: Report command parser version 0 if disabled
  2016-05-04 13:25 [PATCH] drm/i915: Report command parser version 0 if disabled Chris Wilson
@ 2016-05-04 15:22 ` Patchwork
  2016-05-05  7:44   ` Chris Wilson
  2016-05-04 16:08 ` [PATCH] " Joonas Lahtinen
  1 sibling, 1 reply; 4+ messages in thread
From: Patchwork @ 2016-05-04 15:22 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Report command parser version 0 if disabled
URL   : https://patchwork.freedesktop.org/series/6736/
State : failure

== Summary ==

Series 6736v1 drm/i915: Report command parser version 0 if disabled
http://patchwork.freedesktop.org/api/1.0/series/6736/revisions/1/mbox/

Test drv_getparams_basic:
        Subgroup basic-eu-total:
                pass       -> DMESG-WARN (snb-x220t)
        Subgroup basic-subslice-total:
                pass       -> DMESG-WARN (snb-x220t)
Test drv_hangman:
        Subgroup error-state-basic:
                pass       -> INCOMPLETE (snb-dellxps)
Test drv_module_reload_basic:
                pass       -> DMESG-WARN (snb-x220t)
Test gem_exec_flush:
        Subgroup basic-uc-pro-default:
                fail       -> PASS       (byt-nuc)
        Subgroup basic-uc-pro-default-interruptible:
                pass       -> FAIL       (byt-nuc)
        Subgroup basic-uc-prw-default:
                pass       -> FAIL       (bsw-nuc-2)
        Subgroup basic-uc-prw-default-interruptible:
                pass       -> FAIL       (bsw-nuc-2)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                dmesg-warn -> PASS       (bdw-ultra)

bdw-nuci7-2      total:231  pass:219  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:231  pass:206  dwarn:0   dfail:0   fail:0   skip:25 
bsw-nuc-2        total:230  pass:186  dwarn:0   dfail:0   fail:3   skip:41 
byt-nuc          total:230  pass:186  dwarn:0   dfail:0   fail:3   skip:41 
hsw-brixbox      total:231  pass:205  dwarn:0   dfail:0   fail:0   skip:26 
hsw-gt2          total:231  pass:209  dwarn:0   dfail:0   fail:1   skip:21 
ilk-hp8440p      total:231  pass:168  dwarn:0   dfail:0   fail:2   skip:61 
ivb-t430s        total:231  pass:200  dwarn:0   dfail:0   fail:0   skip:31 
skl-i7k-2        total:231  pass:204  dwarn:0   dfail:0   fail:0   skip:27 
skl-nuci5        total:231  pass:220  dwarn:0   dfail:0   fail:0   skip:11 
snb-dellxps      total:36   pass:26   dwarn:0   dfail:0   fail:0   skip:9  
snb-x220t        total:231  pass:186  dwarn:3   dfail:0   fail:1   skip:41 

Results at /archive/results/CI_IGT_test/Patchwork_2138/

d7dd7d628c990b920968254275121539808d1a94 drm-intel-nightly: 2016y-05m-04d-14h-15m-05s UTC integration manifest
4e7d309 drm/i915: Report command parser version 0 if disabled

_______________________________________________
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: Report command parser version 0 if disabled
  2016-05-04 13:25 [PATCH] drm/i915: Report command parser version 0 if disabled Chris Wilson
  2016-05-04 15:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2016-05-04 16:08 ` Joonas Lahtinen
  1 sibling, 0 replies; 4+ messages in thread
From: Joonas Lahtinen @ 2016-05-04 16:08 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On ke, 2016-05-04 at 14:25 +0100, Chris Wilson wrote:
> If the command parser is not active, then it is appropriate to report it
> as operating at version 0 as no higher mode is supported. This greatly
> simplifies userspace querying for the command parser as we then do not
> need to second guess when it will be active (a mixture of module
> parameters and generational support, which may change over time).
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Assuming zero was previously unused.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_cmd_parser.c | 15 ++++++++++++++-
>  drivers/gpu/drm/i915/i915_dma.c        |  2 +-
>  drivers/gpu/drm/i915/i915_drv.h        |  2 +-
>  3 files changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index a337f33bec5b..17831fac49f5 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -1275,8 +1275,21 @@ int i915_parse_cmds(struct intel_engine_cs *engine,
>   *
>   * Return: the current version number of the cmd parser
>   */
> -int i915_cmd_parser_get_version(void)
> +int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv)
>  {
> +	struct intel_engine_cs *engine;
> +	bool active = false;
> +
> +	/* If the comand parser is not enabled, report 0 - unsupported */
> +	for_each_engine(engine, dev_priv) {
> +		if (i915_needs_cmd_parser(engine)) {
> +			active = true;
> +			break;
> +		}
> +	}
> +	if (!active)
> +		return 0;
> +
>  	/*
>  	 * Command parser version history
>  	 *
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index c91387f1aedd..ad7abe517700 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -204,7 +204,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
>  		value = 1;
>  		break;
>  	case I915_PARAM_CMD_PARSER_VERSION:
> -		value = i915_cmd_parser_get_version();
> +		value = i915_cmd_parser_get_version(dev_priv);
>  		break;
>  	case I915_PARAM_HAS_COHERENT_PHYS_GTT:
>  		value = 1;
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 75a1675ea6ce..d5496aba1cd5 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -3442,7 +3442,7 @@ void i915_get_extra_instdone(struct drm_device *dev, uint32_t *instdone);
>  const char *i915_cache_level_str(struct drm_i915_private *i915, int type);
>  
>  /* i915_cmd_parser.c */
> -int i915_cmd_parser_get_version(void);
> +int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv);
>  int i915_cmd_parser_init_ring(struct intel_engine_cs *engine);
>  void i915_cmd_parser_fini_ring(struct intel_engine_cs *engine);
>  bool i915_needs_cmd_parser(struct intel_engine_cs *engine);
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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: ✗ Fi.CI.BAT: failure for drm/i915: Report command parser version 0 if disabled
  2016-05-04 15:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2016-05-05  7:44   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2016-05-05  7:44 UTC (permalink / raw)
  To: intel-gfx

On Wed, May 04, 2016 at 03:22:51PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Report command parser version 0 if disabled
> URL   : https://patchwork.freedesktop.org/series/6736/
> State : failure
> 
> == Summary ==
> 
> Series 6736v1 drm/i915: Report command parser version 0 if disabled
> http://patchwork.freedesktop.org/api/1.0/series/6736/revisions/1/mbox/
> 
> Test drv_getparams_basic:
>         Subgroup basic-eu-total:
>                 pass       -> DMESG-WARN (snb-x220t)
>         Subgroup basic-subslice-total:
>                 pass       -> DMESG-WARN (snb-x220t)
> Test drv_hangman:
>         Subgroup error-state-basic:
>                 pass       -> INCOMPLETE (snb-dellxps)
> Test drv_module_reload_basic:
>                 pass       -> DMESG-WARN (snb-x220t)
> Test gem_exec_flush:
>         Subgroup basic-uc-pro-default:
>                 fail       -> PASS       (byt-nuc)
>         Subgroup basic-uc-pro-default-interruptible:
>                 pass       -> FAIL       (byt-nuc)
>         Subgroup basic-uc-prw-default:
>                 pass       -> FAIL       (bsw-nuc-2)
>         Subgroup basic-uc-prw-default-interruptible:
>                 pass       -> FAIL       (bsw-nuc-2)

I've updated BAT to hopefully make these FAIL more reliably (not an
issue with this patch, just a really nasty latent bug that's been ignored
for too long).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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:[~2016-05-05  7:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 13:25 [PATCH] drm/i915: Report command parser version 0 if disabled Chris Wilson
2016-05-04 15:22 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-05-05  7:44   ` Chris Wilson
2016-05-04 16:08 ` [PATCH] " Joonas Lahtinen

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.