All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915: Polish possible_clones setup
@ 2019-10-02 16:25 Ville Syrjala
  2019-10-02 16:25 ` [PATCH 2/6] drm/i915: Simplfy LVDS crtc_mask setup Ville Syrjala
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Ville Syrjala @ 2019-10-02 16:25 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Replace the hand rolled stuff with drm_encoder_mask() when populating
possible_clones, and rename the function to
intel_encoder_possible_clones() to make it clear what it's used for.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 20ec8a1dc5e1..d10e118b9a7c 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -15240,21 +15240,18 @@ int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
 	return 0;
 }
 
-static int intel_encoder_clones(struct intel_encoder *encoder)
+static u32 intel_encoder_possible_clones(struct intel_encoder *encoder)
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct intel_encoder *source_encoder;
-	int index_mask = 0;
-	int entry = 0;
+	u32 possible_clones = 0;
 
 	for_each_intel_encoder(dev, source_encoder) {
 		if (encoders_cloneable(encoder, source_encoder))
-			index_mask |= (1 << entry);
-
-		entry++;
+			possible_clones |= drm_encoder_mask(&source_encoder->base);
 	}
 
-	return index_mask;
+	return possible_clones;
 }
 
 static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder)
@@ -15574,7 +15571,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
 		encoder->base.possible_crtcs =
 			intel_encoder_possible_crtcs(encoder);
 		encoder->base.possible_clones =
-			intel_encoder_clones(encoder);
+			intel_encoder_possible_clones(encoder);
 	}
 
 	intel_init_pch_refclk(dev_priv);
-- 
2.21.0

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

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

end of thread, other threads:[~2019-10-31 13:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 16:25 [PATCH 1/6] drm/i915: Polish possible_clones setup Ville Syrjala
2019-10-02 16:25 ` [PATCH 2/6] drm/i915: Simplfy LVDS crtc_mask setup Ville Syrjala
2019-10-31 13:34   ` Juha-Pekka Heikkila
2019-10-31 13:34     ` [Intel-gfx] " Juha-Pekka Heikkila
2019-10-02 16:25 ` [PATCH 3/6] drm/i915: s/crtc_mask/pipe_mask/ Ville Syrjala
2019-10-02 18:00   ` Lucas De Marchi
2019-10-03 13:47     ` Ville Syrjälä
2019-10-02 16:25 ` [PATCH 4/6] drm/i915: Allow ICL+ DSI on any pipe Ville Syrjala
2019-10-02 16:35   ` Lucas De Marchi
2019-10-02 16:25 ` [PATCH 5/6] drm/i915: Simplify pipe_mask setup even further Ville Syrjala
2019-10-02 16:25 ` [PATCH 6/6] drm/i915/mst: Document the userspace fail with possible_crtcs Ville Syrjala
2019-10-03 15:28   ` Ville Syrjälä
2019-10-02 22:52 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Polish possible_clones setup Patchwork
2019-10-03  7:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-10-16 20:29 ` [PATCH 1/6] " Juha-Pekka Heikkila

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.