Re: drm/i915/slpc: Update freq min/max softlimits

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

 



On Sat, Aug 20, 2016 at 10:39:25AM +0530, Sagar Arun Kamble wrote:
> +	obj = dev_priv->guc.slpc.vma->obj;
> +	if (obj) {

OOPS.

> +		intel_slpc_query_task_state(dev_priv);
> +
> +		page = i915_gem_object_get_page(obj, 0);
> +		if (page)
> +			pv = kmap_atomic(page);
> +	}
> +
> +	if (pv) {
> +		data = *(struct slpc_shared_data *) pv;
> +		kunmap_atomic(pv);

Can kmap_atomic return zero?

> +
> +		/*
> +		 * TODO: Define separate variables for slice and unslice
> +		 *	 frequencies for driver state variable.
> +		 */
> +		dev_priv->rps.max_freq_softlimit =
> +				data.task_state_data.freq_unslice_max;
> +		dev_priv->rps.min_freq_softlimit =
> +				data.task_state_data.freq_unslice_min;

These are user values, you do not get to arbitrarily rewrite them.

You control dev_priv->rps.[min|max]_freq.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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