Commit e810f1f8 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files
Pull OPP updates for 7.1 from Viresh Kumar:

"- Use performance level if available to distinguish between rates in
   debugfs (Manivannan Sadhasivam).

 - Fix scoped_guard in dev_pm_opp_xlate_required_opp() (Viresh Kumar)."

* tag 'opp-updates-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  OPP: Move break out of scoped_guard in dev_pm_opp_xlate_required_opp()
  OPP: debugfs: Use performance level if available to distinguish between rates
parents 591cd656 3d2398f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2742,8 +2742,8 @@ struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,
					break;
				}
			}
			break;
		}
		break;
	}

	if (IS_ERR(dest_opp)) {
+11 −9
Original line number Diff line number Diff line
@@ -130,22 +130,24 @@ void opp_debug_create_one(struct dev_pm_opp *opp, struct opp_table *opp_table)
{
	struct dentry *pdentry = opp_table->dentry;
	struct dentry *d;
	unsigned long id;
	char name[25];	/* 20 chars for 64 bit value + 5 (opp:\0) */
	char name[36];	/* "opp:"(4) + u64(20) + "-" (1) + u32(10) + NULL(1) */

	/*
	 * Get directory name for OPP.
	 *
	 * - Normally rate is unique to each OPP, use it to get unique opp-name.
	 * - Normally rate is unique to each OPP, use it to get unique opp-name,
	 *   together with performance level if available.
	 * - For some devices rate isn't available or there are multiple, use
	 *   index instead for them.
	 */
	if (likely(opp_table->clk_count == 1 && opp->rates[0]))
		id = opp->rates[0];
	if (likely(opp_table->clk_count == 1 && opp->rates[0])) {
		if (opp->level == OPP_LEVEL_UNSET)
			snprintf(name, sizeof(name), "opp:%lu", opp->rates[0]);
		else
		id = _get_opp_count(opp_table);

	snprintf(name, sizeof(name), "opp:%lu", id);
			snprintf(name, sizeof(name), "opp:%lu-%u", opp->rates[0], opp->level);
	} else {
		snprintf(name, sizeof(name), "opp:%u", _get_opp_count(opp_table));
	}

	/* Create per-opp directory */
	d = debugfs_create_dir(name, pdentry);