Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4344054yba; Sun, 12 May 2019 10:33:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPYLpWJh7vYw99tLaKLCV9aRf9aiI6xcwLiuAInNtYFGLB6kU5ZuWeQc4ugOHHdmtX0fim X-Received: by 2002:a63:e50c:: with SMTP id r12mr12262902pgh.284.1557682396360; Sun, 12 May 2019 10:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557682396; cv=none; d=google.com; s=arc-20160816; b=zTJioT1jF+Ln6r5a7kqw4bnLxLu30aGPOa4gGS8QvXkfJFyUQxK2vzBUmvndiTYNDG TYL2Qkd4US7a/P0/Lq2fOR+baU2AVZq0d/W6AmO7J/uFLP5pOt8uw++Ld/OE+B69YkOI BxBorXmUUFgtXcO81WqkwvS5DNzn8xMfEPI6vBcZIDNhdWw75dqoYc6ZplO8TIj7BD5e b490rvKpsv31CwIqJx9Fp6+/0BiCveCOt0BEa90OW4DnTJKMha4h+pKw1YvhetF5VPJg Ot60a23pCac2wHylGUMlkQEFbQRAZ4nN7/oRy2Zq9IKcBsSh5kkRbJcRooXNgksIvEUX CItg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=K+ek9wx5wLa/62kCO5DvxtbaGVDNnBjn5s/zOX9gBwM=; b=hWCBEvUWZa6Sq8K9ATh++y+YECY8mWYbqBvkAyQ8TE/kX9l9vmwkbl5pBJw4QUjx7m BSeBouHWDlmREndfVjgSWyBEKc4RrKGeqCcliNz1KA6qplXD58EQYII1e0TJ/Gt+cRMJ jigV1Bg6NDi9I3ElFzGlYvHzlsZ7WMksvKGVBArEQAqN0X7Hy/ZcmLKo7l8goUIZvJNA y+4JBp2ApE0t1PSwIkwNMgwkn/mt1Qa+MOOmiSJovFNJ3QBAj/YAsbvI8sU6c7DNSJd/ QY6X2suuj3w9YxJyQVGYPaldQDYievxln+nhxd6K43RR89S59UseSE5g5qrtawvPimEJ tDwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d40si14173117pla.87.2019.05.12.10.33.00; Sun, 12 May 2019 10:33:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbfELRa6 (ORCPT + 99 others); Sun, 12 May 2019 13:30:58 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:48057 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726478AbfELRa6 (ORCPT ); Sun, 12 May 2019 13:30:58 -0400 X-Originating-IP: 46.193.9.130 Received: from localhost (cust-west-pareq2-46-193-9-130.wb.wifirst.net [46.193.9.130]) (Authenticated sender: maxime.ripard@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2BB1B1C0004; Sun, 12 May 2019 17:30:54 +0000 (UTC) Date: Sun, 12 May 2019 19:30:54 +0200 From: Maxime Ripard To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Emil Velikov Subject: Re: [PATCH v2 4/6] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp Message-ID: <20190512173054.uj3thuvkgmllsy2n@flea> References: <27b0041c7977402df4a087c78d2849ffe51c9f1c.1557486447.git-series.maxime.ripard@bootlin.com> <32aa13e53dbc98a90207fd290aa8e79f785fb11e.1557486447.git-series.maxime.ripard@bootlin.com> <20190510160031.GM24299@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190510160031.GM24299@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ville, On Fri, May 10, 2019 at 07:00:31PM +0300, Ville Syrj?l? wrote: > On Fri, May 10, 2019 at 01:08:49PM +0200, Maxime Ripard wrote: > > So far, the drm_format_plane_cpp function was operating on the format's > > fourcc and was doing a lookup to retrieve the drm_format_info structure and > > return the cpp. > > > > However, this is inefficient since in most cases, we will have the > > drm_format_info pointer already available so we shouldn't have to perform a > > new lookup. Some drm_fourcc functions also already operate on the > > drm_format_info pointer for that reason, so the API is quite inconsistent > > there. > > > > Let's follow the latter pattern and remove the extra lookup while being a > > bit more consistent. In order to be extra consistent, also rename that > > function to drm_format_info_plane_cpp and to a static function in the > > header to match the current policy. > > Is there any point keeping the function at all? > It's just info->cpp[i] no? You're right, we can remove it. Do you want this to be done in that patch or a subsequent one? Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com