summaryrefslogtreecommitdiff
path: root/nvkm
diff options
context:
space:
mode:
Diffstat (limited to 'nvkm')
-rw-r--r--nvkm/subdev/clock/nv50.c2
-rw-r--r--nvkm/subdev/fb/ramnvc0.c18
-rw-r--r--nvkm/subdev/mc/base.c2
-rw-r--r--nvkm/subdev/mxm/base.c2
-rw-r--r--nvkm/subdev/therm/ic.c3
5 files changed, 13 insertions, 14 deletions
diff --git a/nvkm/subdev/clock/nv50.c b/nvkm/subdev/clock/nv50.c
index 1a016df4e..250a6d960 100644
--- a/nvkm/subdev/clock/nv50.c
+++ b/nvkm/subdev/clock/nv50.c
@@ -197,7 +197,7 @@ nv50_clock_read(struct nouveau_clock *clk, enum nv_clk_src src)
case nv_clk_src_href:
return 100000; /* PCIE reference clock */
case nv_clk_src_hclk:
- return (u64)clk->read(clk, nv_clk_src_href) * 27778 / 10000;
+ return div_u64((u64)clk->read(clk, nv_clk_src_href) * 27778, 10000);
case nv_clk_src_hclkm3:
return clk->read(clk, nv_clk_src_hclk) * 3;
case nv_clk_src_hclkm3d2:
diff --git a/nvkm/subdev/fb/ramnvc0.c b/nvkm/subdev/fb/ramnvc0.c
index 1ac16492b..f464547c6 100644
--- a/nvkm/subdev/fb/ramnvc0.c
+++ b/nvkm/subdev/fb/ramnvc0.c
@@ -219,7 +219,7 @@ nvc0_ram_calc(struct nouveau_fb *pfb, u32 freq)
ram_mask(fuc, 0x10fe20, 0x00000002, 0x00000000);
}
-// 0x00020034 // 0x0000000a
+// 0x00020034 // 0x0000000a
ram_wr32(fuc, 0x132100, 0x00000001);
if (mode == 1 && from == 0) {
@@ -273,15 +273,15 @@ nvc0_ram_calc(struct nouveau_fb *pfb, u32 freq)
}
if (from == 0) {
-// 0x00020039 // 0x000000ba
+// 0x00020039 // 0x000000ba
}
-// 0x0002003a // 0x00000002
+// 0x0002003a // 0x00000002
ram_wr32(fuc, 0x100b0c, 0x00080012);
-// 0x00030014 // 0x00000000 // 0x02b5f070
-// 0x00030014 // 0x00010000 // 0x02b5f070
+// 0x00030014 // 0x00000000 // 0x02b5f070
+// 0x00030014 // 0x00010000 // 0x02b5f070
ram_wr32(fuc, 0x611200, 0x00003300);
-// 0x00020034 // 0x0000000a
+// 0x00020034 // 0x0000000a
// 0x00030020 // 0x00000001 // 0x00000000
ram_mask(fuc, 0x10f200, 0x00000800, 0x00000000);
@@ -360,7 +360,7 @@ nvc0_ram_calc(struct nouveau_fb *pfb, u32 freq)
ram_wr32(fuc, 0x10f050, 0xff000090);
ram_wr32(fuc, 0x1373ec, 0x00030404);
ram_wr32(fuc, 0x1373f0, 0x00000002);
- // 0x00020039 // 0x00000011
+ // 0x00020039 // 0x00000011
ram_wr32(fuc, 0x132100, 0x00000001);
ram_wr32(fuc, 0x1373f8, 0x00002000);
ram_nsec(fuc, 2000);
@@ -394,8 +394,8 @@ nvc0_ram_calc(struct nouveau_fb *pfb, u32 freq)
ram_nsec(fuc, 1000);
ram_wr32(fuc, 0x10f800, 0x00001804);
- // 0x00030020 // 0x00000000 // 0x00000000
- // 0x00020034 // 0x0000000b
+ // 0x00030020 // 0x00000000 // 0x00000000
+ // 0x00020034 // 0x0000000b
ram_wr32(fuc, 0x13d8f4, 0x00000000);
ram_wr32(fuc, 0x100b0c, 0x00080028);
ram_wr32(fuc, 0x611200, 0x00003330);
diff --git a/nvkm/subdev/mc/base.c b/nvkm/subdev/mc/base.c
index ba5e53b1f..b4b994377 100644
--- a/nvkm/subdev/mc/base.c
+++ b/nvkm/subdev/mc/base.c
@@ -40,7 +40,6 @@ nouveau_mc_intr(int irq, void *arg)
struct nouveau_mc *pmc = arg;
const struct nouveau_mc_oclass *oclass = (void *)nv_object(pmc)->oclass;
const struct nouveau_mc_intr *map = oclass->intr;
- struct nouveau_device *device = nv_device(pmc);
struct nouveau_subdev *unit;
u32 intr;
@@ -64,7 +63,6 @@ nouveau_mc_intr(int irq, void *arg)
if (stat)
nv_error(pmc, "unknown intr 0x%08x\n", stat);
- pm_runtime_mark_last_busy(&device->pdev->dev);
}
nv_wr32(pmc, 0x000140, 0x00000001);
diff --git a/nvkm/subdev/mxm/base.c b/nvkm/subdev/mxm/base.c
index e286e132c..129120473 100644
--- a/nvkm/subdev/mxm/base.c
+++ b/nvkm/subdev/mxm/base.c
@@ -116,7 +116,7 @@ mxm_shadow_dsm(struct nouveau_mxm *mxm, u8 version)
acpi_handle handle;
int ret;
- handle = DEVICE_ACPI_HANDLE(&device->pdev->dev);
+ handle = ACPI_HANDLE(&device->pdev->dev);
if (!handle)
return false;
diff --git a/nvkm/subdev/therm/ic.c b/nvkm/subdev/therm/ic.c
index 13b850076..e44ed7b93 100644
--- a/nvkm/subdev/therm/ic.c
+++ b/nvkm/subdev/therm/ic.c
@@ -41,7 +41,8 @@ probe_monitoring_device(struct nouveau_i2c_port *i2c,
if (!client)
return false;
- if (!client->driver || client->driver->detect(client, info)) {
+ if (!client->dev.driver ||
+ to_i2c_driver(client->dev.driver)->detect(client, info)) {
i2c_unregister_device(client);
return false;
}