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:
parent
46b2c40e0a
commit
f07d7400ec
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue