Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2295774yba; Fri, 10 May 2019 09:11:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz0qg8sm1TYjQ3YxSIiPt1BoXvb5vnvkL4SmqubRPmeOpZZuBWT/YLsFWCyPzrZphb4hHA X-Received: by 2002:a63:7146:: with SMTP id b6mr8867353pgn.426.1557504676118; Fri, 10 May 2019 09:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557504676; cv=none; d=google.com; s=arc-20160816; b=XJlZRMbUdZ1No4XHPYfU4TvSjV+WXiXdkNWRr3ulS0JZNp8VAQs/TZzhjxmgEU66Zq yeLkAfZMceiRaSPQhsCNAOIhI3rUUcc0SdoDsebQpzK9cWFv5noQHF8XCaXmRngWrGWc Zdi/MfajvzF9HGmP7D46JLnO+ovicisPTc4OshM/Dl9mqebmE2WxZy8FLc0WZQamiF5J PKRGfWX6kE4XPazxB2muknBEjfjro9uyAZ4pC8ZK9OKRB986MoR2yzh8GzucWQihMH7f Tn4uM5CVGDnTwxIOpLBT0foovXFCfLzxCxNAKj8V04Rry5DoWxyw9TdyxeFfuMn6Pp3e oFTQ== 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=CTnRmVUcpc1+XjEBlyq0khDJkEkSVFXweKxUWRXVoGw=; b=HOq9K71pC7pd5KHiK9Y5ZGwrq/O31Rkf0xCAXmBT3VftVHs2C3RM+HloANjriZVVeN dIPqA9mK3klRbiM5V5XFzzCJP+83vd+tbnmOmjUPpJw2LbGg1oOxoo5WpECyaXkVwBZX SKbYa2GmjAwFETHEVQS8ZxoEIXSXJZVl5GoNbzvhWB29pp9p3M4y0vlpBTYgo5Ft6J9Y IXGvcVuQNjsfvUKYXa1J6hIVpo9sBHwX5ZvVsQxyWN9Cd6EZPeIDtRPFK7vhWvcdlXAa FmJ8Zpjn1FfC0JUiDdUwUjhWzc3rMjEWehYMrP28UU3D8Mj/zExaUGKz4LrBKITDoMIk l0hQ== 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 o33si7928546plb.230.2019.05.10.09.10.59; Fri, 10 May 2019 09:11: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727776AbfEJQAg (ORCPT + 99 others); Fri, 10 May 2019 12:00:36 -0400 Received: from mga03.intel.com ([134.134.136.65]:39568 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfEJQAg (ORCPT ); Fri, 10 May 2019 12:00:36 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2019 09:00:35 -0700 X-ExtLoop1: 1 Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga008.fm.intel.com with SMTP; 10 May 2019 09:00:32 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 10 May 2019 19:00:31 +0300 Date: Fri, 10 May 2019 19:00:31 +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: <20190510160031.GM24299@intel.com> References: <27b0041c7977402df4a087c78d2849ffe51c9f1c.1557486447.git-series.maxime.ripard@bootlin.com> <32aa13e53dbc98a90207fd290aa8e79f785fb11e.1557486447.git-series.maxime.ripard@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <32aa13e53dbc98a90207fd290aa8e79f785fb11e.1557486447.git-series.maxime.ripard@bootlin.com> 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 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? -- Ville Syrj?l? Intel