[Intel-gfx] [PATCH 07/14] drm/i915: Extract i845_cursor_ctl() and i9xx_cursor_ctl()

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 17 21:58:57 UTC 2017


On Fri, Mar 17, 2017 at 11:18:01PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Pull the code to calculate the cursor control register value into
> separate functions. Allows us to pre-compute them in the future.

Want to comment on the benefit of passing struct intel_crtc_state?
 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 119 +++++++++++++++++++++--------------
>  1 file changed, 72 insertions(+), 47 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 99b72c4219a8..040978e704f3 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9161,7 +9161,33 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
>  	return active;
>  }
>  
> +static u32 i845_cursor_ctl(const struct intel_crtc_state *crtc_state,
> +			   const struct intel_plane_state *plane_state)
> +{

>  static void i845_update_cursor(struct drm_crtc *crtc, u32 base,
> +			       const struct intel_crtc_state *crtc_state,
>  			       const struct intel_plane_state *plane_state)
>  {

Odd mishmap of parameters as both functions seem to use the same state
in the end. (i845/i915_cursor_ctl recovering crtc, dev etc).

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list