Re: [PATCH 16/21 v2] drm/i915: Ensure setting up scalers into staged crtc_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 20, 2015 at 05:04:37PM -0700, Chandra Konduru wrote:
> From intel_atomic_check, call intel_atomic_setup_scalers() to
> assign scalers based on staged scaling requests. Fail the
> transaction if setup returns error.
> 
> Setting up of scalers should be moved to atomic crtc check  once
> atomic crtc is ready.
> 
> v2:
> -updated parameter passing to setup_scalers (me)
> 
> Signed-off-by: Chandra Konduru <chandra.konduru@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_atomic.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index 407516a..73e94c4 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -48,6 +48,8 @@ int intel_atomic_check(struct drm_device *dev,
>  	int ncrtcs = dev->mode_config.num_crtc;
>  	int nconnectors = dev->mode_config.num_connector;
>  	enum pipe nuclear_pipe = INVALID_PIPE;
> +	struct intel_crtc *nuclear_crtc = NULL;
> +	struct intel_crtc_state *crtc_state = NULL;
>  	int ret;
>  	int i;
>  	bool not_nuclear = false;
> @@ -78,6 +80,10 @@ int intel_atomic_check(struct drm_device *dev,
>  		struct intel_crtc *crtc = to_intel_crtc(state->crtcs[i]);
>  		if (crtc && crtc->pipe != nuclear_pipe)
>  			not_nuclear = true;
> +		if (crtc && crtc->pipe == nuclear_pipe) {
> +			nuclear_crtc = crtc;
> +			crtc_state = to_intel_crtc_state(state->crtc_states[i]);
> +		}
>  	}
>  	for (i = 0; i < nconnectors; i++)
>  		if (state->connectors[i] != NULL)
> @@ -92,6 +98,11 @@ int intel_atomic_check(struct drm_device *dev,
>  	if (ret)
>  		return ret;
>  
> +	/* FIXME: move to crtc atomic check function once it is ready */

We can go ahead and add the crtc's atomic_check now.
drm_atomic_helper_check_planes() will call it if we setup the function
pointer.


Matt

> +	ret = intel_atomic_setup_scalers(dev, nuclear_crtc, crtc_state);
> +	if (ret)
> +		return ret;
> +
>  	return ret;
>  }
>  
> -- 
> 1.7.9.5
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux