drm/nouveau/volt: Fix for some cards having 0 maximum voltage
authorMark Menzynski <mmenzyns@redhat.com>
Fri, 2 Aug 2019 09:21:00 +0000 (11:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 16:56:54 +0000 (18:56 +0200)
commit274d7acb0b8154bdc091f074186b948988c2c440
tree24aedd980a75621c5c2451413e70f2b0cea731cf
parent9b2d2f2ad0039fb8bb77993751cbf9eaaff223f0
drm/nouveau/volt: Fix for some cards having 0 maximum voltage

[ Upstream commit a1af2afbd244089560794c260b2d4326a86e39b6 ]

Some, mostly Fermi, vbioses appear to have zero max voltage. That causes Nouveau to not parse voltage entries, thus users not being able to set higher clocks.

When changing this value Nvidia driver still appeared to ignore it, and I wasn't able to find out why, thus the code is ignoring the value if it is zero.

CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Mark Menzynski <mmenzyns@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nvkm/subdev/bios/volt.c