[Intel-gfx] [PATCH 1/6] drm/i915: Stop hand rolling drm_crtc_mask()
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Jun 9 08:56:27 UTC 2021
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Use drm_crtc_mask() instead of hand rolling it.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 362bff9beb5c..62ad4cfae073 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6485,7 +6485,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector,
struct drm_atomic_state *state = NULL, *restore_state = NULL;
struct drm_connector_state *connector_state;
struct intel_crtc_state *crtc_state;
- int ret, i = -1;
+ int ret;
drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, connector->name,
@@ -6519,8 +6519,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector,
/* Find an unused one (if possible) */
for_each_crtc(dev, possible_crtc) {
- i++;
- if (!(encoder->possible_crtcs & (1 << i)))
+ if (!(encoder->possible_crtcs & drm_crtc_mask(possible_crtc)))
continue;
ret = drm_modeset_lock(&possible_crtc->mutex, ctx);
--
2.31.1
More information about the Intel-gfx
mailing list