public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915: Clarify sprite plane function names (v3)
Date: Mon, 5 Jan 2015 10:54:20 +0100	[thread overview]
Message-ID: <20150105095420.GR2711@phenom.ffwll.local> (raw)
In-Reply-To: <54993F1D.1070805@gmail.com>

On Tue, Dec 23, 2014 at 12:08:29PM +0200, Ander Conselvan de Oliveira wrote:
> On 12/16/2014 02:23 AM, Matt Roper wrote:
> >A few of the sprite-related function names in i915 are very similar
> >(e.g., intel_enable_planes() vs intel_crtc_enable_planes()) and don't
> >make it clear whether they only operate on sprite planes, or whether
> >they also apply to all universal plane types.  Rename a few functions to
> >be more consistent with our function naming for primary/cursor planes or
> >to clarify that they apply specifically to sprite planes:
> >
> >  - s/intel_disable_planes/intel_disable_sprite_planes/
> >  - s/intel_enable_planes/intel_enable_sprite_planes/
> >
> >Also, drop the sprite-specific intel_destroy_plane() and just use
> >the type-agnostic intel_plane_destroy() function.  The extra 'disable'
> >call that intel_destroy_plane() did is unnecessary since the plane will
> >already be disabled due to framebuffer destruction by the point it gets
> >called.
> >
> >v2: Earlier consolidation patches have reduced the number of functions
> >     we need to rename here.
> >
> >v3: Also rename intel_plane_funcs vtable to intel_sprite_plane_funcs
> >     for consistency with primary/cursor.  (Ander)
> >
> >Reviewed-by(v1): Bob Paauwe <bob.j.paauwe@intel.com>
> >Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> >---
> >  drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
> >  drivers/gpu/drm/i915/intel_drv.h     |  1 +
> >  drivers/gpu/drm/i915/intel_sprite.c  | 14 +++-----------
> >  3 files changed, 9 insertions(+), 16 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >index ce552d1..030cf93 100644
> >--- a/drivers/gpu/drm/i915/intel_display.c
> >+++ b/drivers/gpu/drm/i915/intel_display.c
> >@@ -4037,7 +4037,7 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc)
> >  	}
> >  }
> >
> >-static void intel_enable_planes(struct drm_crtc *crtc)
> >+static void intel_enable_sprite_planes(struct drm_crtc *crtc)
> >  {
> >  	struct drm_device *dev = crtc->dev;
> >  	enum pipe pipe = to_intel_crtc(crtc)->pipe;
> >@@ -4051,7 +4051,7 @@ static void intel_enable_planes(struct drm_crtc *crtc)
> >  	}
> >  }
> >
> >-static void intel_disable_planes(struct drm_crtc *crtc)
> >+static void intel_disable_sprite_planes(struct drm_crtc *crtc)
> >  {
> >  	struct drm_device *dev = crtc->dev;
> >  	enum pipe pipe = to_intel_crtc(crtc)->pipe;
> >@@ -4195,7 +4195,7 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc)
> >  	int pipe = intel_crtc->pipe;
> >
> >  	intel_enable_primary_hw_plane(crtc->primary, crtc);
> >-	intel_enable_planes(crtc);
> >+	intel_enable_sprite_planes(crtc);
> >  	intel_crtc_update_cursor(crtc, true);
> >  	intel_crtc_dpms_overlay(intel_crtc, true);
> >
> >@@ -4230,7 +4230,7 @@ static void intel_crtc_disable_planes(struct drm_crtc *crtc)
> >
> >  	intel_crtc_dpms_overlay(intel_crtc, false);
> >  	intel_crtc_update_cursor(crtc, false);
> >-	intel_disable_planes(crtc);
> >+	intel_disable_sprite_planes(crtc);
> >  	intel_disable_primary_hw_plane(crtc->primary, crtc);
> >
> >  	/*
> >@@ -12008,7 +12008,7 @@ intel_disable_plane(struct drm_plane *plane)
> >  }
> >
> >  /* Common destruction function for both primary and cursor planes */
> >-static void intel_plane_destroy(struct drm_plane *plane)
> >+void intel_plane_destroy(struct drm_plane *plane)
> 
> Do we need kernel doc for this?

Not sure kerneldoc for all the plane stuff is worth it yet while
everything is in-flux. Probably better to extract the higher-level stuff
into a new file/regroup functions a bit once the dust has settled and then
kerneldoc everything.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-01-05  9:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  0:23 [PATCH 0/5] i915 atomic plane helper conversion (v4) Matt Roper
2014-12-16  0:23 ` [PATCH 1/5] drm/i915: Refactor work that can sleep out of commit (v5) Matt Roper
2014-12-22 14:12   ` Ander Conselvan de Oliveira
2014-12-16  0:23 ` [PATCH 2/5] drm/i915: Move vblank evasion to commit (v3) Matt Roper
2014-12-23 10:01   ` Ander Conselvan de Oliveira
2014-12-16  0:23 ` [PATCH 3/5] drm/i915: Clarify sprite plane function names (v3) Matt Roper
2014-12-23 10:08   ` Ander Conselvan de Oliveira
2015-01-05  9:54     ` Daniel Vetter [this message]
2014-12-16  0:23 ` [PATCH 4/5] drm/i915: Move to atomic plane helpers (v8) Matt Roper
2014-12-23 13:27   ` Ander Conselvan de Oliveira
2014-12-16  0:23 ` [PATCH 5/5] drm/i915: Drop unused position fields (v2) Matt Roper
2014-12-16  5:31   ` shuang.he
2014-12-23 13:34   ` Ander Conselvan de Oliveira

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=20150105095420.GR2711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=conselvan2@gmail.com \
    --cc=intel-gfx@lists.freedesktop.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