Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2169895pxf; Sat, 27 Mar 2021 04:25:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBcFcc6hG29fuv2AywXs7IGN696ukX1lhnh2gRPYbRi80Ls9Cv6BI0693RffcQuLW5Daee X-Received: by 2002:a50:e80c:: with SMTP id e12mr20003439edn.229.1616844320635; Sat, 27 Mar 2021 04:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616844320; cv=none; d=google.com; s=arc-20160816; b=hHo5yFGx9f8hmvcj4GVbwUdypmGtpdVlVigCNRja4ak4LgAYckIiKqVkMCP4B3oAGP WeoohtQlpNbt25up59K+nW4/2k0m4rX8jnP3BGkfZXjJ/YfREWqwlyLw+nI6+Dy/SqpW SANqgjcI2m8xFxAadtexV6GHeQad/jc4pC9uol4sdH+MD6cngFRMZK+FqgMBsd2m8uuY XdefEOK8mGPXnnXsqZDQ43e69J5aTZJBkEWEmLC20h3T6v6h8kXPfdozCFceQnpiey4H M/ceaertN2J4Fo0fv7wWBJuPiaeFwEre/qeYizycw69hTL3oqfmRaWrDoqu0onyCOx7h wQ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TldR4cGi/RRtCHjz3pUHeh/5SLSgzt2XBNOmHMgEBb4=; b=AcLPCe3YPaX8Ujc5JoGJaeeB1bwcrzp8ozk4Y1tjzyYxUTLzyt3DkJDpfHaW4vsl9k tXBtC9XhApdvWBqFAFPKASndBuahZsCnxZ7EPej4Hlx9zwE1gZTWDA8pkIO9wUmJbu1t m+c2m5mekKn6Os+jG0mFtV4MU7u9P4AxBSou2PuT3TzuEB214KE4xqvDQ+lDYDjBW85q 4lK4nHYyfWgVDcVD3N/Hc8lH8l2ccvhUhRQUh+fvpdHzw/bIr4G9HIV89tm8+wSQ/2HS lUGKSiUvFQ1twSDXEluHEYMg8Mi3yB94qyn6+lIdJyBSfJl2o4Q3vsyBMQaVoOLtYv43 l6RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go39si8413106ejc.260.2021.03.27.04.24.58; Sat, 27 Mar 2021 04:25:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230420AbhC0LWj (ORCPT + 99 others); Sat, 27 Mar 2021 07:22:39 -0400 Received: from aposti.net ([89.234.176.197]:55408 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbhC0LWi (ORCPT ); Sat, 27 Mar 2021 07:22:38 -0400 From: Paul Cercueil To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Simon Ser Cc: od@zcrc.me, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Paul Cercueil , stable@vger.kernel.org Subject: [PATCH] drm: DON'T require each CRTC to have a unique primary plane Date: Sat, 27 Mar 2021 11:22:14 +0000 Message-Id: <20210327112214.10252-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ingenic-drm driver has two mutually exclusive primary planes already; so the fact that a CRTC must have one and only one primary plane is an invalid assumption. Fixes: 96962e3de725 ("drm: require each CRTC to have a unique primary plane") Cc: # 5.11 Signed-off-by: Paul Cercueil --- drivers/gpu/drm/drm_mode_config.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 37b4b9f0e468..d86621c41047 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -626,9 +626,7 @@ void drm_mode_config_validate(struct drm_device *dev) { struct drm_encoder *encoder; struct drm_crtc *crtc; - struct drm_plane *plane; u32 primary_with_crtc = 0, cursor_with_crtc = 0; - unsigned int num_primary = 0; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return; @@ -676,13 +674,4 @@ void drm_mode_config_validate(struct drm_device *dev) cursor_with_crtc |= drm_plane_mask(crtc->cursor); } } - - drm_for_each_plane(plane, dev) { - if (plane->type == DRM_PLANE_TYPE_PRIMARY) - num_primary++; - } - - WARN(num_primary != dev->mode_config.num_crtc, - "Must have as many primary planes as there are CRTCs, but have %u primary planes and %u CRTCs", - num_primary, dev->mode_config.num_crtc); } -- 2.30.2