[Nouveau] [PATCH v2 4/7] clk: drop cstates with higher voltage than boost_max_voltage

Karol Herbst nouveau at karolherbst.de
Wed Dec 2 08:24:31 PST 2015


---
 drm/nouveau/nvkm/subdev/clk/base.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index d731bc3..43abca7 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -154,6 +154,9 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate)
 	if (volt && (voltage > volt->max_voltage || voltage < volt->min_voltage))
 		return -EINVAL;
 
+	if (volt && volt->boost_max_voltage && (voltage > volt->boost_max_voltage))
+		return -EINVAL;
+
 	cstate = kzalloc(sizeof(*cstate), GFP_KERNEL);
 	if (!cstate)
 		return -ENOMEM;
-- 
2.6.3



More information about the Nouveau mailing list