Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp962002ybm; Wed, 27 May 2020 12:16:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcT642zqgcismdfoisFKGi0U+hZxi/SDNl8Mo+u+fFk/3ui2akHFqJdYjc/AixUaLPZzeP X-Received: by 2002:a17:907:1106:: with SMTP id qu6mr7223721ejb.321.1590606998279; Wed, 27 May 2020 12:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590606998; cv=none; d=google.com; s=arc-20160816; b=wiASh1YZOecTQLUhGQGgjQstka6t+e4P9QDnBEUsYr7nDbgdUt7xp+vaCULg0Nq686 g5SqVczSIq2i2PK2YdyENDtLxASuZlJdDyB9ECovawV5Zqma4gwDsJdhvmXK4EU6nvlD cmkjhWzH8K7S35lzpv2BrY1V9oRmhBpPer8RdSgqrSkl7mm9Aj9A+EwE6HqI2IVd/pWl SiJIho66VEUe2IzyM8vrCtUd5UxPiEsHApNeySzKSJW8r367Xjhm/zIfbM/9gG+922f8 Qny8Gl2Zslq2yBBv9Mm8eujEomnQFXNfhQxfw2BMCqDxnjPWECCrCAJrvFEPsZ+eMP0Y Kxpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3s8Z6TqgZ6rWtKMmi0vz86r9c3ZptE+7p8K+InML9XA=; b=agRl0i8jBoTxlH2cXZHreo8iOJo2L9Znava6yp1p6Ge+HLOhH0IQwjdphcFGR/VKe7 NGxN8I375JT0unJ6kPYfeRr0J6WgHXUlgYVDeA/XAKdcBuOQtGo6vAjlnV7dr2c/F5HF mIVJra3GSbSbkl/jfpbP73IoFa0g2yGiEYEYWufkUak3TNSfbHNz+LPVYDtJsN4gBgwb Jsqm71RGT63dPRiha2hlMNc+7SNLAmcM4pXRqYOeYBiHN2RdxeHUwbL2a6n5Md4H8bQF 8vM+s1mH8E+XqwWIoKifULijkaWdVYWTZwPiedIkFNQj3wb4ytABH0dJV5bcKE81jBtA 3e0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anholt-net.20150623.gappssmtp.com header.s=20150623 header.b="hheOM/T3"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt11si2527224ejb.699.2020.05.27.12.16.15; Wed, 27 May 2020 12:16:38 -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; dkim=pass header.i=@anholt-net.20150623.gappssmtp.com header.s=20150623 header.b="hheOM/T3"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731042AbgE0Qwu (ORCPT + 98 others); Wed, 27 May 2020 12:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731030AbgE0Qwr (ORCPT ); Wed, 27 May 2020 12:52:47 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59D1AC05BD1E for ; Wed, 27 May 2020 09:52:47 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id q2so29749389ljm.10 for ; Wed, 27 May 2020 09:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anholt-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3s8Z6TqgZ6rWtKMmi0vz86r9c3ZptE+7p8K+InML9XA=; b=hheOM/T3hgh3E9Yc0l9MkrAt26GKtRqNh6+lDuuRkJ/Z+uJHoSZl2dSFjgqp7BBq2L /SLxlWegH7b1a2tMbGhTqU9tk1RRu8RG6IgFKbDUfWCaHOMYtga8OzWAy6QPqhf6afE4 BPHSLALrgxXbCKxk2lUBsDW7mQzcA5W1z6ovU9gQF7mTlBL1LR3YrrkKMxwQdgJtC1Ut U7d3H4vDH+D55QCG6JckSgD+23dcS96mwHuITUzmtasl8ytZgd9iNVVwwbWAHw1fvaPE kCJTA2dYBT45FIiwBmfqzZzr0+fDKMIxtpDKto1RUd6bnbcf/FYbBHHIeQMNoFLcbZ4N gfIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3s8Z6TqgZ6rWtKMmi0vz86r9c3ZptE+7p8K+InML9XA=; b=qGyUUafAVLzG1lhiSDDsAnyTNS+bYu5PC9q5D3WNVoSTu5lweoB6SlP15iufdfQOu6 0NcjWyGuXBJShNJVUygDEtkipaaVgQbMKkfoxlaIS714/JwpnCqTrS00xx86ekgnrV/o pn3cTV9bYb2kgZOczNZ1cchEOKBfh5wXBLzANEDXWhdi/9SHCsuH0oKpGLVAfn0vReBw D0JaoGtLVAplndJYJ5lXrpvBBBjoBV8vC6hasHZXTCeCXGjML7qfnOXNtAfTe1X1IPzx kHaHoqi6Zequyya2rHzMwo/Y74kF6Os5sSxXUeVJQjO2R+l2HX2vHyoUceG3PWAN0ueB y0Ew== X-Gm-Message-State: AOAM531bRItdJWS0pFr/EVZBXg7989gq4wV6m0WX2oPBKLzkEQA0sl2H o+rq4cbNa0d8zEnvpu5VOAQbfsYi0YQeSVg18U9nCg== X-Received: by 2002:a2e:b0ec:: with SMTP id h12mr3253838ljl.269.1590598365768; Wed, 27 May 2020 09:52:45 -0700 (PDT) MIME-Version: 1.0 References: <74d84c75511974bc1ff4bc044413894a43a907a6.1590594512.git-series.maxime@cerno.tech> In-Reply-To: <74d84c75511974bc1ff4bc044413894a43a907a6.1590594512.git-series.maxime@cerno.tech> From: Eric Anholt Date: Wed, 27 May 2020 09:52:34 -0700 Message-ID: Subject: Re: [PATCH v3 020/105] drm/vc4: plane: Create overlays for any CRTC To: Maxime Ripard Cc: Nicolas Saenz Julienne , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 27, 2020 at 8:49 AM Maxime Ripard wrote: > > Now that we have everything in place, we can now register all the overlay > planes that can be assigned to all the CRTCs. > > This has two side effects: > > - The number of overlay planes is reduced from 24 to 8. This is temporary > and will be increased again in the next patch. > > - The ID of the various planes is changed again, and we will now have all > the primary planes, then all the overlay planes and finally the cursor > planes. This shouldn't cause any issue since the ordering between > primary, overlay and cursor planes is preserved. > > Signed-off-by: Maxime Ripard Honestly, I'd squash this with the previous two patches, the individual refactors don't make much sense on their own or simplify this patch I think. Either way, patch 17-29 r-b. > --- > drivers/gpu/drm/vc4/vc4_plane.c | 35 +++++++++++++++++----------------- > 1 file changed, 18 insertions(+), 17 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c > index 824c188980b0..5335123ae2a0 100644 > --- a/drivers/gpu/drm/vc4/vc4_plane.c > +++ b/drivers/gpu/drm/vc4/vc4_plane.c > @@ -1378,26 +1378,27 @@ int vc4_plane_create_additional_planes(struct drm_device *drm) > struct drm_crtc *crtc; > unsigned int i; > > - drm_for_each_crtc(crtc, drm) { > - /* Set up some arbitrary number of planes. We're not limited > - * by a set number of physical registers, just the space in > - * the HVS (16k) and how small an plane can be (28 bytes). > - * However, each plane we set up takes up some memory, and > - * increases the cost of looping over planes, which atomic > - * modesetting does quite a bit. As a result, we pick a > - * modest number of planes to expose, that should hopefully > - * still cover any sane usecase. > - */ > - for (i = 0; i < 8; i++) { > - struct drm_plane *plane = > - vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY); > + /* Set up some arbitrary number of planes. We're not limited > + * by a set number of physical registers, just the space in > + * the HVS (16k) and how small an plane can be (28 bytes). > + * However, each plane we set up takes up some memory, and > + * increases the cost of looping over planes, which atomic > + * modesetting does quite a bit. As a result, we pick a > + * modest number of planes to expose, that should hopefully > + * still cover any sane usecase. > + */ > + for (i = 0; i < 8; i++) { > + struct drm_plane *plane = > + vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY); > > - if (IS_ERR(plane)) > - continue; > + if (IS_ERR(plane)) > + continue; > > - plane->possible_crtcs = drm_crtc_mask(crtc); > - } > + plane->possible_crtcs = > + GENMASK(drm->mode_config.num_crtc - 1, 0); > + } > > + drm_for_each_crtc(crtc, drm) { > /* Set up the legacy cursor after overlay initialization, > * since we overlay planes on the CRTC in the order they were > * initialized. > -- > git-series 0.9.1