All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Get rid of hardcoded pipes
@ 2017-10-13 10:24 Mika Kahola
  2017-10-13 10:46 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mika Kahola @ 2017-10-13 10:24 UTC (permalink / raw)
  To: intel-gfx

Favor for_each_pipe() macro when looping through pipes.

This patch is related to miscellenous fixes to reduce dependency on
I915_MAX_PIPES.

https://patchwork.freedesktop.org/series/30336/

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/intel_dp_mst.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 3c131e2..f7c7825 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -454,9 +454,10 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
 	struct intel_dp *intel_dp = container_of(mgr, struct intel_dp, mst_mgr);
 	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
 	struct drm_device *dev = intel_dig_port->base.base.dev;
+	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct intel_connector *intel_connector;
 	struct drm_connector *connector;
-	int i;
+	enum pipe pipe;
 
 	intel_connector = intel_connector_alloc();
 	if (!intel_connector)
@@ -470,9 +471,9 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
 	intel_connector->mst_port = intel_dp;
 	intel_connector->port = port;
 
-	for (i = PIPE_A; i <= PIPE_C; i++) {
+	for_each_pipe(dev_priv, pipe) {
 		drm_mode_connector_attach_encoder(&intel_connector->base,
-						  &intel_dp->mst_encoders[i]->base.base);
+						  &intel_dp->mst_encoders[pipe]->base.base);
 	}
 
 	drm_object_attach_property(&connector->base, dev->mode_config.path_property, 0);
@@ -569,11 +570,12 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum
 static bool
 intel_dp_create_fake_mst_encoders(struct intel_digital_port *intel_dig_port)
 {
-	int i;
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
+	struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
+	enum pipe pipe;
 
-	for (i = PIPE_A; i <= PIPE_C; i++)
-		intel_dp->mst_encoders[i] = intel_dp_create_fake_mst_encoder(intel_dig_port, i);
+	for_each_pipe(dev_priv, pipe)
+		intel_dp->mst_encoders[pipe] = intel_dp_create_fake_mst_encoder(intel_dig_port, pipe);
 	return true;
 }
 
-- 
2.7.4

_______________________________________________
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: Get rid of hardcoded pipes
  2017-10-13 10:24 [PATCH] drm/i915: Get rid of hardcoded pipes Mika Kahola
@ 2017-10-13 10:46 ` Patchwork
  2017-10-13 13:03 ` ✓ Fi.CI.IGT: " Patchwork
  2017-10-13 14:13 ` [PATCH] " Ville Syrjälä
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-10-13 10:46 UTC (permalink / raw)
  To: Mika Kahola; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Get rid of hardcoded pipes
URL   : https://patchwork.freedesktop.org/series/31900/
State : success

== Summary ==

Series 31900v1 drm/i915: Get rid of hardcoded pipes
https://patchwork.freedesktop.org/api/1.0/series/31900/revisions/1/mbox/

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:454s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:470s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:391s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:573s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:285s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:521s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:517s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:532s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:516s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:558s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:617s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:434s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:272s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:598s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:443s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:461s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:503s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:471s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:499s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:488s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:596s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:664s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:467s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:662s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:530s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:572s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:464s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:579s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:429s

b2c76c5c6dce7fa45b1aff5a7effb3cee5b5f707 drm-tip: 2017y-10m-13d-09h-16m-12s UTC integration manifest
96a4da8eccfa drm/i915: Get rid of hardcoded pipes

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6020/
_______________________________________________
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: Get rid of hardcoded pipes
  2017-10-13 10:24 [PATCH] drm/i915: Get rid of hardcoded pipes Mika Kahola
  2017-10-13 10:46 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-10-13 13:03 ` Patchwork
  2017-10-13 14:13 ` [PATCH] " Ville Syrjälä
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-10-13 13:03 UTC (permalink / raw)
  To: Mika Kahola; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Get rid of hardcoded pipes
URL   : https://patchwork.freedesktop.org/series/31900/
State : success

== Summary ==

Test kms_setmode:
        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912
Test kms_atomic_transition:
        Subgroup plane-toggle-modeset-transition:
                dmesg-warn -> PASS       (shard-hsw) fdo#102614

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

shard-hsw        total:2553 pass:1441 dwarn:1   dfail:0   fail:8   skip:1103 time:9610s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6020/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

* Re: [PATCH] drm/i915: Get rid of hardcoded pipes
  2017-10-13 10:24 [PATCH] drm/i915: Get rid of hardcoded pipes Mika Kahola
  2017-10-13 10:46 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-10-13 13:03 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-10-13 14:13 ` Ville Syrjälä
  2 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2017-10-13 14:13 UTC (permalink / raw)
  To: Mika Kahola; +Cc: intel-gfx

On Fri, Oct 13, 2017 at 01:24:46PM +0300, Mika Kahola wrote:
> Favor for_each_pipe() macro when looping through pipes.
> 
> This patch is related to miscellenous fixes to reduce dependency on
> I915_MAX_PIPES.
> 
> https://patchwork.freedesktop.org/series/30336/

These references to the other patches don't seem entirely relevant for
this commit message. So I just ripped them out and pushed this to dinq.
Thanks for the patch.

> 
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp_mst.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 3c131e2..f7c7825 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -454,9 +454,10 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>  	struct intel_dp *intel_dp = container_of(mgr, struct intel_dp, mst_mgr);
>  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>  	struct drm_device *dev = intel_dig_port->base.base.dev;
> +	struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct intel_connector *intel_connector;
>  	struct drm_connector *connector;
> -	int i;
> +	enum pipe pipe;
>  
>  	intel_connector = intel_connector_alloc();
>  	if (!intel_connector)
> @@ -470,9 +471,9 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>  	intel_connector->mst_port = intel_dp;
>  	intel_connector->port = port;
>  
> -	for (i = PIPE_A; i <= PIPE_C; i++) {
> +	for_each_pipe(dev_priv, pipe) {
>  		drm_mode_connector_attach_encoder(&intel_connector->base,
> -						  &intel_dp->mst_encoders[i]->base.base);
> +						  &intel_dp->mst_encoders[pipe]->base.base);
>  	}
>  
>  	drm_object_attach_property(&connector->base, dev->mode_config.path_property, 0);
> @@ -569,11 +570,12 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum
>  static bool
>  intel_dp_create_fake_mst_encoders(struct intel_digital_port *intel_dig_port)
>  {
> -	int i;
>  	struct intel_dp *intel_dp = &intel_dig_port->dp;
> +	struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
> +	enum pipe pipe;
>  
> -	for (i = PIPE_A; i <= PIPE_C; i++)
> -		intel_dp->mst_encoders[i] = intel_dp_create_fake_mst_encoder(intel_dig_port, i);
> +	for_each_pipe(dev_priv, pipe)
> +		intel_dp->mst_encoders[pipe] = intel_dp_create_fake_mst_encoder(intel_dig_port, pipe);
>  	return true;
>  }
>  
> -- 
> 2.7.4

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
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-10-13 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 10:24 [PATCH] drm/i915: Get rid of hardcoded pipes Mika Kahola
2017-10-13 10:46 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-13 13:03 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-13 14:13 ` [PATCH] " Ville Syrjälä

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.