[Intel-gfx] [PATCH 09/12] drm/i915: Perform automated conversions for plane uapi/hw split, base -> hw.

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Oct 31 14:49:35 UTC 2019


On Thu, Oct 31, 2019 at 12:26:07PM +0100, Maarten Lankhorst wrote:
> Split up plane_state->base to hw. This is done using the following patch:
> 
> @@
> struct intel_plane_state *T;
> identifier x =~ "^(crtc|fb|alpha|pixel_blend_mode|rotation|color_encoding|color_range)$";
> @@
> -T->base.x
> +T->hw.x
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_atomic.c   |   6 +-
>  .../gpu/drm/i915/display/intel_atomic_plane.c |   8 +-
>  drivers/gpu/drm/i915/display/intel_display.c  | 126 +++++++++---------
>  drivers/gpu/drm/i915/display/intel_fbc.c      |   8 +-
>  drivers/gpu/drm/i915/display/intel_overlay.c  |   2 +-
>  drivers/gpu/drm/i915/display/intel_sprite.c   |  90 ++++++-------
>  drivers/gpu/drm/i915/intel_pm.c               |  32 ++---
>  7 files changed, 136 insertions(+), 136 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
> index 3301c178da03..0a5eee4c350f 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic.c
> @@ -283,9 +283,9 @@ static void intel_atomic_setup_scaler(struct intel_crtc_scaler_state *scaler_sta
>  		return;
>  
>  	/* set scaler mode */
> -	if (plane_state && plane_state->base.fb &&
> -	    plane_state->base.fb->format->is_yuv &&
> -	    plane_state->base.fb->format->num_planes > 1) {
> +	if (plane_state && plane_state->hw.fb &&
> +	    plane_state->hw.fb->format->is_yuv &&
> +	    plane_state->hw.fb->format->num_planes > 1) {
>  		struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
>  		if (IS_GEN(dev_priv, 9) &&
>  		    !IS_GEMINILAKE(dev_priv)) {
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 416cfa439f33..6335355555b3 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -118,7 +118,7 @@ intel_plane_destroy_state(struct drm_plane *plane,
>  unsigned int intel_plane_data_rate(const struct intel_crtc_state *crtc_state,
>  				   const struct intel_plane_state *plane_state)
>  {
> -	const struct drm_framebuffer *fb = plane_state->base.fb;
> +	const struct drm_framebuffer *fb = plane_state->hw.fb;
>  	unsigned int cpp;
>  
>  	if (!plane_state->base.visible)
> @@ -144,7 +144,7 @@ bool intel_plane_calc_min_cdclk(struct intel_atomic_state *state,
>  	struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
>  	const struct intel_plane_state *plane_state =
>  		intel_atomic_get_new_plane_state(state, plane);
> -	struct intel_crtc *crtc = to_intel_crtc(plane_state->base.crtc);
> +	struct intel_crtc *crtc = to_intel_crtc(plane_state->hw.crtc);

Good :)

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list