From: Ander Conselvan de Oliveira <conselvan2@gmail.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/13] drm/i915: Consolidate plane handler vtables
Date: Wed, 21 Jan 2015 12:09:59 +0200 [thread overview]
Message-ID: <54BF7AF7.2050901@gmail.com> (raw)
In-Reply-To: <1421726266-31941-4-git-send-email-matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
On 01/20/2015 05:57 AM, Matt Roper wrote:
> All of the previous refactoring/consolidation of plane code has resulted
> in intel_primary_plane_funcs, intel_cursor_plane_funcs, and
> intel_sprite_plane_funcs being identical. Replace all of these with a
> single 'intel_plane_funcs' vtable for simplicity.
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 15 +++------------
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> drivers/gpu/drm/i915/intel_sprite.c | 11 +----------
> 3 files changed, 5 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 7863414..9bf5221 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11968,7 +11968,7 @@ void intel_plane_destroy(struct drm_plane *plane)
> kfree(intel_plane);
> }
>
> -static const struct drm_plane_funcs intel_primary_plane_funcs = {
> +const struct drm_plane_funcs intel_plane_funcs = {
> .update_plane = drm_plane_helper_update,
> .disable_plane = drm_plane_helper_disable,
> .destroy = intel_plane_destroy,
> @@ -12016,7 +12016,7 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
> }
>
> drm_universal_plane_init(dev, &primary->base, 0,
> - &intel_primary_plane_funcs,
> + &intel_plane_funcs,
> intel_primary_formats, num_formats,
> DRM_PLANE_TYPE_PRIMARY);
>
> @@ -12144,15 +12144,6 @@ update:
> intel_crtc_update_cursor(crtc, state->visible);
> }
>
> -static const struct drm_plane_funcs intel_cursor_plane_funcs = {
> - .update_plane = drm_plane_helper_update,
> - .disable_plane = drm_plane_helper_disable,
> - .destroy = intel_plane_destroy,
> - .set_property = intel_plane_set_property,
> - .atomic_duplicate_state = intel_plane_duplicate_state,
> - .atomic_destroy_state = intel_plane_destroy_state,
> -};
> -
> static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
> int pipe)
> {
> @@ -12179,7 +12170,7 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
> cursor->commit_plane = intel_commit_cursor_plane;
>
> drm_universal_plane_init(dev, &cursor->base, 0,
> - &intel_cursor_plane_funcs,
> + &intel_plane_funcs,
> intel_cursor_formats,
> ARRAY_SIZE(intel_cursor_formats),
> DRM_PLANE_TYPE_CURSOR);
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 918cce2..2133fd1 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -908,6 +908,7 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv);
> void i915_audio_component_cleanup(struct drm_i915_private *dev_priv);
>
> /* intel_display.c */
> +extern const struct drm_plane_funcs intel_plane_funcs;
> bool intel_has_pending_fb_unpin(struct drm_device *dev);
> int intel_pch_rawclk(struct drm_device *dev);
> void intel_mark_busy(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 140c5b7..8af4c69 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1406,15 +1406,6 @@ int intel_plane_restore(struct drm_plane *plane)
> plane->state->src_w, plane->state->src_h);
> }
>
> -static const struct drm_plane_funcs intel_sprite_plane_funcs = {
> - .update_plane = drm_plane_helper_update,
> - .disable_plane = drm_plane_helper_disable,
> - .destroy = intel_plane_destroy,
> - .set_property = intel_plane_set_property,
> - .atomic_duplicate_state = intel_plane_duplicate_state,
> - .atomic_destroy_state = intel_plane_destroy_state,
> -};
> -
> static uint32_t ilk_plane_formats[] = {
> DRM_FORMAT_XRGB8888,
> DRM_FORMAT_YUYV,
> @@ -1557,7 +1548,7 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane)
> intel_plane->commit_plane = intel_commit_sprite_plane;
> possible_crtcs = (1 << pipe);
> ret = drm_universal_plane_init(dev, &intel_plane->base, possible_crtcs,
> - &intel_sprite_plane_funcs,
> + &intel_plane_funcs,
> plane_formats, num_plane_formats,
> DRM_PLANE_TYPE_OVERLAY);
> if (ret) {
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-01-21 10:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 3:57 [PATCH 00/13] i915 nuclear pageflip Matt Roper
2015-01-20 3:57 ` [PATCH 01/13] squash! drm/i915: Improve how the memory for crtc state is allocated Matt Roper
2015-01-20 3:57 ` [PATCH 02/13] drm/i915: Move rotation from intel_plane to intel_plane_state Matt Roper
2015-01-21 10:03 ` Ander Conselvan de Oliveira
2015-01-20 3:57 ` [PATCH 03/13] drm/i915: Consolidate plane handler vtables Matt Roper
2015-01-21 10:09 ` Ander Conselvan de Oliveira [this message]
2015-01-20 3:57 ` [PATCH 04/13] drm/plane-helper: Add transitional helper for .set_plane() Matt Roper
2015-01-20 3:57 ` [PATCH 05/13] drm/plane-helper: Fix transitional helper kerneldocs Matt Roper
2015-01-20 3:57 ` [PATCH 06/13] drm/i915: Add .atomic_{get, set}_property() entrypoints to planes Matt Roper
2015-01-20 3:57 ` [PATCH 07/13] drm/i915: Replace intel_set_property() with transitional helper Matt Roper
2015-01-20 3:57 ` [PATCH 08/13] drm/i915: Add main atomic entrypoints Matt Roper
2015-01-21 13:48 ` Ander Conselvan de Oliveira
2015-01-20 3:57 ` [PATCH 09/13] drm/i915: Setup dummy atomic state for connectors Matt Roper
2015-01-21 18:21 ` Ander Conselvan de Oliveira
2015-01-20 3:57 ` [PATCH 10/13] drm/i915: Set connector state destruction handler Matt Roper
2015-01-21 18:24 ` Ander Conselvan de Oliveira
2015-01-20 3:57 ` [PATCH 11/13] drm/i915: Add atomic_get_property entrypoint for connectors Matt Roper
2015-01-20 3:57 ` [PATCH 12/13] drm/i915: Add crtc state duplication/destruction functions Matt Roper
2015-01-20 3:57 ` [PATCH 13/13] drm/i915: Add i915.nuclear kernel command line param to force atomic Matt Roper
2015-01-20 10:17 ` Daniel Vetter
2015-01-20 14:22 ` Jani Nikula
2015-01-21 18:44 ` 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=54BF7AF7.2050901@gmail.com \
--to=conselvan2@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.