Commit 0196cc65 authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie
Browse files

drm/nouveau/device: remove pwrsrc notify in favour of a direct call to clk

parent 6d729184
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
#ifndef __NVKM_DEVICE_H__
#define __NVKM_DEVICE_H__
#include <core/oclass.h>
#include <core/event.h>
enum nvkm_subdev_type;

enum nvkm_device_type {
@@ -28,8 +27,6 @@ struct nvkm_device {

	void __iomem *pri;

	struct nvkm_event event;

	u32 debug;

	const struct nvkm_device_chip *chip;
+1 −2
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
#ifndef __NVKM_CLK_H__
#define __NVKM_CLK_H__
#include <core/subdev.h>
#include <core/notify.h>
#include <subdev/pci.h>
struct nvbios_pll;
struct nvkm_pll_vals;
@@ -94,7 +93,6 @@ struct nvkm_clk {
	wait_queue_head_t wait;
	atomic_t waiting;

	struct nvkm_notify pwrsrc_ntfy;
	int pwrsrc;
	int pstate; /* current */
	int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */
@@ -124,6 +122,7 @@ int nvkm_clk_ustate(struct nvkm_clk *, int req, int pwr);
int nvkm_clk_astate(struct nvkm_clk *, int req, int rel, bool wait);
int nvkm_clk_dstate(struct nvkm_clk *, int req, int rel);
int nvkm_clk_tstate(struct nvkm_clk *, u8 temperature);
int nvkm_clk_pwrsrc(struct nvkm_device *);

int nv04_clk_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_clk **);
int nv40_clk_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_clk **);
+1 −0
Original line number Diff line number Diff line
#ifndef __NVKM_FAULT_H__
#define __NVKM_FAULT_H__
#include <core/subdev.h>
#include <core/event.h>
#include <core/notify.h>

struct nvkm_fault {
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <core/ioctl.h>
#include <core/client.h>
#include <core/engine.h>
#include <core/event.h>

#include <nvif/unpack.h>
#include <nvif/ioctl.h>
+3 −3
Original line number Diff line number Diff line
@@ -24,17 +24,17 @@
#include "acpi.h"

#include <core/device.h>
#include <subdev/clk.h>

#ifdef CONFIG_ACPI
static int
nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data)
{
	struct nvkm_device *device =
		container_of(nb, typeof(*device), acpi.nb);
	struct nvkm_device *device = container_of(nb, typeof(*device), acpi.nb);
	struct acpi_bus_event *info = data;

	if (!strcmp(info->device_class, "ac_adapter"))
		nvkm_event_send(&device->event, 1, 0, NULL, 0);
		nvkm_clk_pwrsrc(device);

	return NOTIFY_DONE;
}
Loading