drm/i915: Stop hand rolling drm_crtc_mask()

Use drm_crtc_mask() instead of hand rolling it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210609085632.22026-2-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Ville Syrjälä 2021-06-09 11:56:27 +03:00
parent 46b2c40e0a
commit f07d7400ec
1 changed files with 2 additions and 3 deletions

View File

@ -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);