Skip to content

Commit ba70676

Browse files
committed
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull nouveau drm fixes from Dave Airlie: "Just a bunch of nouveau fixes, Ben wants to get some alternate versions into stable." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/nouveau/timer: bump ptimer's alarm delay from u32 to u64 drm/nouveau/fan: fix a typo in PWM's input clock calculation drm/nv50/clk: wire up pll_calc hook drm/nouveau: remove unused _nouveau_parent_ctor drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB
2 parents 42859ee + ceb736c commit ba70676

File tree

7 files changed

+14
-34
lines changed

7 files changed

+14
-34
lines changed

drivers/gpu/drm/nouveau/core/core/parent.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,6 @@ nouveau_parent_create_(struct nouveau_object *parent,
101101
return 0;
102102
}
103103

104-
int
105-
_nouveau_parent_ctor(struct nouveau_object *parent,
106-
struct nouveau_object *engine,
107-
struct nouveau_oclass *oclass, void *data, u32 size,
108-
struct nouveau_object **pobject)
109-
{
110-
struct nouveau_parent *object;
111-
int ret;
112-
113-
ret = nouveau_parent_create(parent, engine, oclass, 0, NULL, 0, &object);
114-
*pobject = nv_object(object);
115-
if (ret)
116-
return ret;
117-
118-
return 0;
119-
}
120-
121104
void
122105
nouveau_parent_destroy(struct nouveau_parent *parent)
123106
{

drivers/gpu/drm/nouveau/core/include/core/parent.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ int nouveau_parent_create_(struct nouveau_object *, struct nouveau_object *,
5050
int size, void **);
5151
void nouveau_parent_destroy(struct nouveau_parent *);
5252

53-
int _nouveau_parent_ctor(struct nouveau_object *, struct nouveau_object *,
54-
struct nouveau_oclass *, void *, u32,
55-
struct nouveau_object **);
5653
void _nouveau_parent_dtor(struct nouveau_object *);
5754
#define _nouveau_parent_init _nouveau_object_init
5855
#define _nouveau_parent_fini _nouveau_object_fini

drivers/gpu/drm/nouveau/core/include/subdev/timer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void nouveau_timer_alarm(void *, u32 nsec, struct nouveau_alarm *);
2626
struct nouveau_timer {
2727
struct nouveau_subdev base;
2828
u64 (*read)(struct nouveau_timer *);
29-
void (*alarm)(struct nouveau_timer *, u32 time, struct nouveau_alarm *);
29+
void (*alarm)(struct nouveau_timer *, u64 time, struct nouveau_alarm *);
3030
};
3131

3232
static inline struct nouveau_timer *

drivers/gpu/drm/nouveau/core/subdev/bios/base.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -185,23 +185,22 @@ static void
185185
nouveau_bios_shadow_acpi(struct nouveau_bios *bios)
186186
{
187187
struct pci_dev *pdev = nv_device(bios)->pdev;
188-
int cnt = 65536 / 4096;
189-
int ret;
188+
int ret, cnt, i;
189+
u8 data[3];
190190

191191
if (!nouveau_acpi_rom_supported(pdev))
192192
return;
193193

194-
bios->data = kmalloc(65536, GFP_KERNEL);
195194
bios->size = 0;
196-
if (!bios->data)
197-
return;
198-
199-
while (cnt--) {
200-
ret = nouveau_acpi_get_bios_chunk(bios->data, bios->size, 4096);
201-
if (ret != 4096)
202-
return;
195+
if (nouveau_acpi_get_bios_chunk(data, 0, 3) == 3)
196+
bios->size = data[2] * 512;
203197

204-
bios->size += 4096;
198+
bios->data = kmalloc(bios->size, GFP_KERNEL);
199+
for (i = 0; bios->data && i < bios->size; i += cnt) {
200+
cnt = min((bios->size - i), (u32)4096);
201+
ret = nouveau_acpi_get_bios_chunk(bios->data, i, cnt);
202+
if (ret != cnt)
203+
break;
205204
}
206205
}
207206

drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ nv50_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
9090
return ret;
9191

9292
priv->base.pll_set = nv50_clock_pll_set;
93+
priv->base.pll_calc = nv04_clock_pll_calc;
9394
return 0;
9495
}
9596

drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ nv50_fan_pwm_clock(struct nouveau_therm *therm)
9292
if (nv_rd32(therm, 0xc040) & 0x800000) {
9393
/* Use the HOST clock (100 MHz)
9494
* Where does this constant(2.4) comes from? */
95-
pwm_clock = (100000000 >> pwm_div) / 10 / 24;
95+
pwm_clock = (100000000 >> pwm_div) * 10 / 24;
9696
} else {
9797
/* Where does this constant(20) comes from? */
9898
pwm_clock = (crystal * 1000) >> pwm_div;

drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ nv04_timer_alarm_trigger(struct nouveau_timer *ptimer)
8585
}
8686

8787
static void
88-
nv04_timer_alarm(struct nouveau_timer *ptimer, u32 time,
88+
nv04_timer_alarm(struct nouveau_timer *ptimer, u64 time,
8989
struct nouveau_alarm *alarm)
9090
{
9191
struct nv04_timer_priv *priv = (void *)ptimer;

0 commit comments

Comments
 (0)