public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Emil Velikov <emil.velikov@collabora.com>
Subject: Re: [PATCH v2 4/6] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp
Date: Mon, 13 May 2019 16:11:32 +0300	[thread overview]
Message-ID: <20190513131132.GN24299@intel.com> (raw)
In-Reply-To: <20190512173054.uj3thuvkgmllsy2n@flea>

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

  reply	other threads:[~2019-05-13 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 11:08 [PATCH v2 1/6] drm/rockchip: Change the scl_vop_cal_scl_fac to pass drm_format_info Maxime Ripard
2019-05-10 11:08 ` [PATCH v2 2/6] drm: Remove users of drm_format_num_planes Maxime Ripard
2019-05-10 11:08 ` [PATCH v2 3/6] drm: Remove users of drm_format_(horz|vert)_chroma_subsampling Maxime Ripard
2019-05-10 11:08 ` [PATCH v2 4/6] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp Maxime Ripard
2019-05-10 16:00   ` Ville Syrjälä
2019-05-12 17:30     ` Maxime Ripard
2019-05-13 13:11       ` Ville Syrjälä [this message]
2019-05-10 11:08 ` [PATCH v2 5/6] drm/fourcc: Pass the format_info pointer to drm_format_plane_width/height Maxime Ripard
2019-05-10 11:08 ` [PATCH v2 6/6] drm: Replace instances of drm_format_info by drm_get_format_info Maxime Ripard
2019-05-13 14:41 ` [PATCH v2 1/6] drm/rockchip: Change the scl_vop_cal_scl_fac to pass drm_format_info Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190513131132.GN24299@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox