Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dave Airlie <airlied@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 05/13] drm/i915: refactor i915 plane code into separate file.
Date: Fri, 18 Dec 2020 16:55:16 +0200	[thread overview]
Message-ID: <X9zC1GM5iWbUr7Gh@intel.com> (raw)
In-Reply-To: <20201218060420.3203-6-airlied@gmail.com>

On Fri, Dec 18, 2020 at 04:04:12PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> Ville suggested this as a good idea, let's move this before moving
> the crtc code.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
>  drivers/gpu/drm/i915/Makefile                |   3 +-
>  drivers/gpu/drm/i915/display/i9xx_plane.c    | 704 +++++++++++++++++++
>  drivers/gpu/drm/i915/display/i9xx_plane.h    |  21 +
>  drivers/gpu/drm/i915/display/intel_display.c | 689 +-----------------
>  drivers/gpu/drm/i915/display/intel_display.h |   4 -
>  drivers/gpu/drm/i915/display/intel_sprite.c  |   1 +
>  6 files changed, 729 insertions(+), 693 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/display/i9xx_plane.c
>  create mode 100644 drivers/gpu/drm/i915/display/i9xx_plane.h
<snip>
> +struct intel_plane *
> +intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
> +{
> +	struct intel_plane *plane;
> +	const struct drm_plane_funcs *plane_funcs;
> +	unsigned int supported_rotations;
> +	const u32 *formats;
> +	int num_formats;
> +	int ret, zpos;
> +
> +	if (INTEL_GEN(dev_priv) >= 9)
> +		return skl_universal_plane_create(dev_priv, pipe,
> +						  PLANE_PRIMARY);
> +

A further followup idea:

intel_primary_plane_create()
{
	if (gen>=9)
		skl_universal_plane_create();
	else
		i9xx_primary_plane_create();
}

so we don't have this silly rountrip through i9xx_plane.c for
skl+.

Another thing we probably want is to move all the pre-skl sprite
plane code into this file as well since quite a bit of the code/etc.
can actually be shared between the primary and sprite planes.

Anyways, this seems like a good way to start so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-18 14:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18  6:04 [Intel-gfx] [RFC v5] refactor intel display a bit more Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 01/13] drm/i915/display: move needs_modeset to an inline in header Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 02/13] drm/i915/display: move to_intel_frontbuffer to header Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 03/13] drm/i915/display: fix misused comma Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 04/13] drm/i915: refactor cursor code out of i915_display.c Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 05/13] drm/i915: refactor i915 plane code into separate file Dave Airlie
2020-12-18 14:55   ` Ville Syrjälä [this message]
2020-12-18  6:04 ` [Intel-gfx] [PATCH 06/13] drm/i915: refactor some crtc code out of intel display. (v2) Dave Airlie
2020-12-18 14:56   ` Ville Syrjälä
2020-12-18  6:04 ` [Intel-gfx] [PATCH 07/13] drm/i915: refactor pll code out into intel_dpll.c Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 08/13] drm/i915: split fdi code out from intel_display.c Dave Airlie
2020-12-18 14:58   ` Ville Syrjälä
2020-12-18  6:04 ` [Intel-gfx] [PATCH 09/13] drm/i915: migrate hsw fdi code to new file Dave Airlie
2020-12-18 15:13   ` Ville Syrjälä
2020-12-18  6:04 ` [Intel-gfx] [PATCH 10/13] drm/i915: migrate skl planes code new file (v2) Dave Airlie
2020-12-18 15:13   ` Ville Syrjälä
2020-12-18  6:04 ` [Intel-gfx] [PATCH 11/13] drm/i915: move pipe update code into crtc Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 12/13] drm/i915: split fb scalable checks into g4x and skl versions Dave Airlie
2020-12-18  6:04 ` [Intel-gfx] [PATCH 13/13] drm/i915: move is_ccs_modifier to an inline Dave Airlie
2020-12-18  7:22 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [01/13] drm/i915/display: move needs_modeset to an inline in header Patchwork

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=X9zC1GM5iWbUr7Gh@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@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