[Intel-gfx] [PATCH 05/13] drm/i915: refactor i915 plane code into separate file.
Ville Syrjälä
ville.syrjala at linux.intel.com
Fri Dec 18 14:55:16 UTC 2020
On Fri, Dec 18, 2020 at 04:04:12PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Ville suggested this as a good idea, let's move this before moving
> the crtc code.
>
> Signed-off-by: Dave Airlie <airlied at 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 at linux.intel.com>
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list