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
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux