From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 339A4C433DF for ; Wed, 27 May 2020 16:52:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D13920787 for ; Wed, 27 May 2020 16:52:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=anholt-net.20150623.gappssmtp.com header.i=@anholt-net.20150623.gappssmtp.com header.b="hheOM/T3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731045AbgE0Qwv (ORCPT ); Wed, 27 May 2020 12:52:51 -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-Google-Smtp-Source: ABdhPJykPtRUbq3wuH3bc4nCEgiCAkTCt706TKmwFiZu59fzrGES6YLoGp3T1oNdU87IWiuXxpt7gGN7IYPEMgs6uZM= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C5F2C433DF for ; Wed, 27 May 2020 16:52:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27E5120787 for ; Wed, 27 May 2020 16:52:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LGYSVasr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anholt-net.20150623.gappssmtp.com header.i=@anholt-net.20150623.gappssmtp.com header.b="hheOM/T3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27E5120787 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anholt.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZEMCq2h1hMX+qqtCBPsHqutLiMK2al4hRkZK5tvtk4U=; b=LGYSVasrSQDpEs DwlabBaUqgwfk3nuZNVraF3YttMUw7+imerm3pNjBFDB7s5GnhA6YC7dAXmauJVCErBIPE0JPTgtM 4GbQz3HZeIIVhXlMst7JS+LbAoTgplQiJgocRDtegkc+K1HUct5vVUog/92Y/vkdxWikadibdwy7V BQntR8AHg/k/sujeS0mKva8diiudkKUP8g3Xtl2VaNg3CwbXvZLwXK33ntPDPPJhcBLjBktsxAnZ4 wTrIaJ2UL1YywDPkpsLFaFU+mecYKhAe9Hs7d/mTKdP1Il/7hn7Yn8YvFP2L9hnJhinEsbpznrQBQ p3FCfJ8oud7tPqNf2ZSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdzIQ-00042n-5N; Wed, 27 May 2020 16:52:50 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdzIN-000427-Fl for linux-arm-kernel@lists.infradead.org; Wed, 27 May 2020 16:52:48 +0000 Received: by mail-lj1-x242.google.com with SMTP id c11so27637169ljn.2 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=gm3VmXeMuyuW/z1/1AkrjAze5E9rpuzA092hEG4hmVw3bAS0dfRigMi0H4YaXPT7k2 xDcjtl/Wmv+wgCyJo2GLMq18bbSDkraJdwc/2001WQimFNyMpDcRrvWpbrNzlxhF42aK YvW3fXRq0jVGMT+uF6N5XVE62C9+M6wDCKLIDoVPFbwO6QuspM/MwubxXTPk7du6BZri NqoxTdg5OW/ImXpiLajaApka+OGMB7XZNaACCq++5j6XV0v+8fv+iIEadDi1zwrcyCY7 oTdhQ6DHG9gv+PnFVSxyDxEQ18qzSLAd7cpIp0GznsPvtGGALzOVkVQR8uPPBEu0tEZv 6K0Q== X-Gm-Message-State: AOAM531OdUaVVz5IkBGa2C2H5ZTSUrobW3wGF+L7wH0T/weaIlHHjauo HkSIhBeww/50NhQWDbbWWCp7clcS5VqaiFeDTpoybQ== X-Google-Smtp-Source: ABdhPJykPtRUbq3wuH3bc4nCEgiCAkTCt706TKmwFiZu59fzrGES6YLoGp3T1oNdU87IWiuXxpt7gGN7IYPEMgs6uZM= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200527_095247_524023_BDF0879B X-CRM114-Status: GOOD ( 23.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , Dave Stevenson , linux-kernel@vger.kernel.org, DRI Development , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Phil Elwell , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FFE8C433E0 for ; Wed, 27 May 2020 16:52:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF7A220899 for ; Wed, 27 May 2020 16:52:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anholt-net.20150623.gappssmtp.com header.i=@anholt-net.20150623.gappssmtp.com header.b="hheOM/T3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF7A220899 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anholt.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CA3C6E351; Wed, 27 May 2020 16:52:48 +0000 (UTC) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 868EC6E351 for ; Wed, 27 May 2020 16:52:47 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id b6so29816710ljj.1 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=ffz6x1QJ8d0gw/Cx25WrojF5ixR3VbcTdAt1ck4rBXlZ3YOEsmvC5S57w1zc05pCOG 7/sqZrzDSMFThT6Khdh5kTwqvQldYpfzj2RnSr0WV6hCieiHVUQ9SSNNsZqAx5uUeM9c ctlF1ZEDeq7fBxBxrcUR2UEUwq+MignkSXbZuKOJL/I/iiKdOhhBxZxqWy74nx02irYg VL5WopbU3J6dGa4mGxc4aD7mRYayydvRd13pjHB35ImPBPfa4n+pQzkUXdrsj578DIFA MvKPyv/5XiKHgghYZAvKe1VjoOHVqB53WiBsSXt+GNPWaK7prHnHlK79W6oa8P2cdlFW UAAw== X-Gm-Message-State: AOAM533eG40zxDfxXL0/6QSAhX8pnSLmV4XbipdqIxZeuq05rQP9Hcod 2/ti6lWeOu4KePlPVPRXz2EjGG8ch7ma6SVBbrOxBw== X-Google-Smtp-Source: ABdhPJykPtRUbq3wuH3bc4nCEgiCAkTCt706TKmwFiZu59fzrGES6YLoGp3T1oNdU87IWiuXxpt7gGN7IYPEMgs6uZM= 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , Dave Stevenson , linux-kernel@vger.kernel.org, DRI Development , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Phil Elwell , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel