@@ -8723,21 +8723,7 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
static bool intel_encoder_crtc_ok(struct drm_encoder *encoder,
struct drm_crtc *crtc)
{
- struct drm_device *dev;
- struct drm_crtc *tmp;
- int crtc_mask = 1;
-
- WARN(!crtc, "checking null crtc?\n");
-
- dev = crtc->dev;
-
- list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) {
- if (tmp == crtc)
- break;
- crtc_mask <<= 1;
- }
-
- if (encoder->possible_crtcs & crtc_mask)
+ if (encoder->possible_crtcs & drm_crtc_mask(crtc))
return true;
return false;
}
Replace an open-coded occurrence by a call to the new drm_crtc_mask() helper. Signed-off-by: Thierry Reding <treding@nvidia.com> --- drivers/gpu/drm/i915/intel_display.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-)