Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12907339rwd; Fri, 23 Jun 2023 12:27:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6OjhZhnARAJ1kNaHCP9g716YZzdOdYhWthsWhgFoeiMprr3VMFPSUuTaYOhdNm7OLB8jDH X-Received: by 2002:a05:6a20:9381:b0:124:eea9:668e with SMTP id x1-20020a056a20938100b00124eea9668emr5872164pzh.41.1687548440062; Fri, 23 Jun 2023 12:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687548440; cv=none; d=google.com; s=arc-20160816; b=Z/sLXahVEEbB3LMwIFXrRGMXk0d7lB6l1Z4s2WhPEEUlAjHDjF+wRXL4Ecvl3iXsjm W0SRWUDnJS0DPfzWP5tr5klHAcwmrhx+iNw+DTprcG4Uam037SsmhTygSazJC5To9yKC 1cWcYgQH+NgnPOH9RO0Xto72wVrojMAbmER+fLUKu3JBUVtzMboZHxPeL8DF0RfYunFU Su8/6by1+RBe8AjvQeIN4EJ5tQcO4cA7tQv9OQn6ZG8vD0MkF7FRWlE3pY+LMUooIOaO iMLnzGMob/VdqhRdQLOMP5WYwJnbsJw3fucoLJ/Lok1giNVbcH9E9yak0KZQ0vk1ysA/ FQuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xChQzuW5aHxopVOomfITr/EzZDE8lNc8kxHBYscAKio=; b=zEHGTalnonFjQgJik+97X52b32gKIfqn8Z3TUodo9Wg0wpSd2r5wlJ5EwEctdaS9aD dZbmF+KUqDZl/7csqujdDZl0VLpfiYhYGx643pq2+3i3NSrb/Kut0iR0EbKzKSDV1gO8 3FMx8H91/fyKSeRSywSoh5fpjpWDYf/lGjW8J52v2Z6jesA3pLXI1ko8gFLh9b5iMHgo 4PxHWVDHhADrsG19JVou7i5FlnD6Nx46OZFm95SJ6LMXmRATFdN6ZeIWNZKh7PGMHnHJ iZDD/lgPmzc0CJA2QmPdrZLF/H0i/7TcUBkMa9Kf5MuBiMY3cpsPA7AjsLAjQmUUiAkK zF1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DXXgRGrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f29-20020aa79d9d000000b0066975f3a955si8164385pfq.74.2023.06.23.12.27.06; Fri, 23 Jun 2023 12:27:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DXXgRGrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230358AbjFWSu6 (ORCPT + 99 others); Fri, 23 Jun 2023 14:50:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjFWSu5 (ORCPT ); Fri, 23 Jun 2023 14:50:57 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2292D19A1; Fri, 23 Jun 2023 11:50:56 -0700 (PDT) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2153BD5F; Fri, 23 Jun 2023 20:50:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1687546217; bh=P76feT+FVoK0nYQ6ZMQuUeAea/agovi+t1v5uPp/zVE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DXXgRGrgSc+LQPQk0jme5BeMb3EHAWejy8/mQObA+3A5QBG+JgoAqKQXyBNkgTk4f fA0KK4k4KcHQ4ATmhV1NB0+nUd+GWCuuGwr9vy/ILt/px/Zem6HIn3aG7PcxrZQhx/ mKD5f2XIe0V6xrArhMA/t1/nc1LiQziU3WB0Udlk= Date: Fri, 23 Jun 2023 21:50:52 +0300 From: Laurent Pinchart To: Geert Uytterhoeven Cc: Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 24/39] drm: renesas: shmobile: Unify plane allocation Message-ID: <20230623185052.GR2112@pendragon.ideasonboard.com> References: <95c2af42a89c65ca603126e56c0423407dfc873f.1687423204.git.geert+renesas@glider.be> <20230623165038.GB2112@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 23, 2023 at 07:55:22PM +0200, Geert Uytterhoeven wrote: > On Fri, Jun 23, 2023 at 6:50 PM Laurent Pinchart wrote: > > On Thu, Jun 22, 2023 at 11:21:36AM +0200, Geert Uytterhoeven wrote: > > > Unify primary and overlay plane allocation: > > > - Enhance shmob_drm_plane_create() so it can be used to create the > > > primary plane, too, > > > - Move overlay plane creation next to primary plane creation. > > > > > > As overlay plane index zero now means the primary plane, this requires > > > shifting all overlay plane indices by one. > > > > Do you use index zero to identify the primary plane just for > > shmob_drm_plane_create(), or somewhere else too ? If it's just to create > > the plane, you could instead pass the plane type to the function. > > Index zero is just used for the creation. > I guess this sort of goes together with my question below... > > > > Signed-off-by: Geert Uytterhoeven > > > --- > > > Perhaps it would be better to not use dynamic allocation, but store > > > "struct drm_plane primary" and "struct shmob_drm_plane planes[5]" in > > > struct drm_shmob_device instead, like is done for the crtc and encoder? > > ... as embedding separate primary and planes[] would also get rid of > the need to adjust the plane indices when converting from logical to physical > overlay plane indices. Do they need to be embedded for that, or could you simple keep the index as it is ? -- Regards, Laurent Pinchart