Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 560f989f authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/pmu/gk104: check fuse to determine presence of PGOB



Not 100% confirmed, but seems to match from the few boards I've looked
at so far.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 779d16aa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include "fuc/gf119.fuc4.h"

#include <core/option.h>
#include <subdev/fuse.h>
#include <subdev/timer.h>

static void
@@ -57,6 +58,9 @@ gk104_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
{
	struct nvkm_device *device = pmu->subdev.device;

	if (!(nvkm_fuse_read(device->fuse, 0x31c) & 0x00000001))
		return;

	nvkm_mask(device, 0x000200, 0x00001000, 0x00000000);
	nvkm_rd32(device, 0x000200);
	nvkm_mask(device, 0x000200, 0x08000000, 0x08000000);