Re: drm/i915/slpc: Sanitize SLPC version

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

 



On Sat, Aug 20, 2016 at 10:39:05AM +0530, Sagar Arun Kamble wrote:
> From: Tom O'Rourke <Tom.O'Rourke@xxxxxxxxx>
> 
> The SLPC interface has changed and could continue to
> change.  Only GuC versions known to be compatible are
> supported here.
> 
> On Skylake, GuC firmware v6 is supported.  Other
> platforms and versions can be added here later.
> 
> v5: Updated with modified sanitize_slpc_option in earlier patch.
> 
> Signed-off-by: Tom O'Rourke <Tom.O'Rourke@xxxxxxxxx>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_guc_loader.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 75b360f..6765edf 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -146,6 +146,9 @@ static void direct_interrupts_to_guc(struct drm_i915_private *dev_priv)
>  
>  static void sanitize_slpc_option(struct drm_device *dev)
>  {
> +	struct drm_i915_private *dev_priv = dev->dev_private;
> +	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
> +
>  	/* Handle default case */
>  	if (i915.enable_slpc < 0)
>  		i915.enable_slpc = HAS_SLPC(dev);
> @@ -161,6 +164,9 @@ static void sanitize_slpc_option(struct drm_device *dev)
>  	/* slpc requires guc submission */
>  	if (!i915.enable_guc_submission)
>  		i915.enable_slpc = 0;
> +
> +	if (IS_SKYLAKE(dev_priv) && (guc_fw->guc_fw_major_found != 6))
> +		i915.enable_slpc = 0;
>  }
>  
>  static u32 get_gttype(struct drm_i915_private *dev_priv)

Reviewed-by: David Weinehall <david.weinehall@xxxxxxxxxxxxxxx>

-- 
 /) David Weinehall <tao@xxxxxxxxxx> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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