Re: [PATCH 3/3] drm/msm: Add A6XX device support

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

 



On 02-03-18, 14:43, Jordan Crouse wrote:
> +static int a6xx_gmu_build_freq_table(struct device *dev, unsigned long *freqs,
> +		u32 size)
> +{
> +	int count = dev_pm_opp_get_opp_count(dev);
> +	struct dev_pm_opp *opp;
> +	int i, index = 0;
> +	unsigned long freq = 1;
> +
> +	/*
> +	 * The OPP table doesn't contain the "off" frequency level so we need to
> +	 * add 1 to the table size to account for it
> +	 */
> +
> +	if (WARN(count + 1 > size,
> +		"The GMU frequency table is being truncated\n"))
> +		count = size - 1;
> +
> +	/* Set the "off" frequency */
> +	freqs[index++] = 0;
> +
> +	for (i = 0; i < count; i++) {
> +		opp = dev_pm_opp_find_freq_ceil(dev, &freq);
> +		if (IS_ERR(opp))
> +			break;
> +
> +		freqs[index++] = freq++;

	dev_pm_opp_put(opp) ?

> +	}
> +
> +	return index;
> +}
> +
-- 
viresh
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux