Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5198804yba; Mon, 13 May 2019 07:03:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw73WCm8ZT3qvYVQDFyfCpuCq082rsw9siiVosf3YaLJF6xXceyRrRfTTR860yBJd21KhFT X-Received: by 2002:a63:18e:: with SMTP id 136mr2672777pgb.277.1557756205279; Mon, 13 May 2019 07:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557756205; cv=none; d=google.com; s=arc-20160816; b=0iJjS4Amcoqe8H5hkrag+RGeiL16ir2B1FsH3W0iUgEduUFa/n2c1RN4iL/LI834hN 2ebM96WJQ3DE3w3tuOjXid+NSBRyk9ZAhUT0rJ+EhKpuj1+rfv3/CfoiYUpQmlP3JnFd VUs3mfJ6zpUHhcSR0R+dDUb99fTB0jURlDODvN1tjNvw8hFNVw/pamMz+zmqIKAHUFU0 /KeddP+T+5BZFxsAGexh8kkQXJJks3p5QnrU0d6SOiFTlVg8tBmKhDLyull9raCH0Eky m6Cagp+xo+mztfQjqBl2dmFasiP4H10rmUfuP5EDEiKET5l3wxvZ6OV49syc5Lnr2erL wEQw== 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=bdlBmNIOnBBL0u66lwS66pFL1yxZ6SOoNCvSQGXek98=; b=wlURuZNsrRKmdNGuCWGETyUGpXgrAFx7+2yQxdYiRJoIF2vTqcFCkMBv+bV7HMQqse k8iFa7t8Os93wZoK6NcX8iSqEUfWn1Fmot1it0aJMxfAhoZnbAqX+9VgMZoPc5fGCGWT bEzcK2NBj7vG4J7BQI3X0SsR0bCx0mbj9YvVQ20UfSRicEsTXjiF62gS1bUK7NJng6Tl C4vFuCe9ZgBs0PD5GdZaS0su0Np0yKbi3zCZsWZ+lr1XD036nKT8vO0FwiHU0MO+DJ+u gaGHBOpg1rv/0NASDWlfErE9a3GVwzsYgwWaVVsVDpWtiJUO3VdKjdlEMxQl11hYspYy IS7w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si2667962pgk.431.2019.05.13.07.03.06; Mon, 13 May 2019 07:03:25 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729999AbfEMNLn (ORCPT + 99 others); Mon, 13 May 2019 09:11:43 -0400 Received: from mga18.intel.com ([134.134.136.126]:35713 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728713AbfEMNLm (ORCPT ); Mon, 13 May 2019 09:11:42 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 06:11:36 -0700 X-ExtLoop1: 1 Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga006.jf.intel.com with SMTP; 13 May 2019 06:11:33 -0700 Received: by stinkbox (sSMTP sendmail emulation); Mon, 13 May 2019 16:11:32 +0300 Date: Mon, 13 May 2019 16:11:32 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Maxime Ripard 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: <20190513131132.GN24299@intel.com> References: <27b0041c7977402df4a087c78d2849ffe51c9f1c.1557486447.git-series.maxime.ripard@bootlin.com> <32aa13e53dbc98a90207fd290aa8e79f785fb11e.1557486447.git-series.maxime.ripard@bootlin.com> <20190510160031.GM24299@intel.com> <20190512173054.uj3thuvkgmllsy2n@flea> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190512173054.uj3thuvkgmllsy2n@flea> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 12, 2019 at 07:30:54PM +0200, Maxime Ripard wrote: > 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? I don't mind either way. -- Ville Syrj?l? Intel