Commit ba706765 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 42859eea ceb736c3
...@@ -101,23 +101,6 @@ nouveau_parent_create_(struct nouveau_object *parent, ...@@ -101,23 +101,6 @@ nouveau_parent_create_(struct nouveau_object *parent,
return 0; return 0;
} }
int
_nouveau_parent_ctor(struct nouveau_object *parent,
struct nouveau_object *engine,
struct nouveau_oclass *oclass, void *data, u32 size,
struct nouveau_object **pobject)
{
struct nouveau_parent *object;
int ret;
ret = nouveau_parent_create(parent, engine, oclass, 0, NULL, 0, &object);
*pobject = nv_object(object);
if (ret)
return ret;
return 0;
}
void void
nouveau_parent_destroy(struct nouveau_parent *parent) nouveau_parent_destroy(struct nouveau_parent *parent)
{ {
......
...@@ -50,9 +50,6 @@ int nouveau_parent_create_(struct nouveau_object *, struct nouveau_object *, ...@@ -50,9 +50,6 @@ int nouveau_parent_create_(struct nouveau_object *, struct nouveau_object *,
int size, void **); int size, void **);
void nouveau_parent_destroy(struct nouveau_parent *); void nouveau_parent_destroy(struct nouveau_parent *);
int _nouveau_parent_ctor(struct nouveau_object *, struct nouveau_object *,
struct nouveau_oclass *, void *, u32,
struct nouveau_object **);
void _nouveau_parent_dtor(struct nouveau_object *); void _nouveau_parent_dtor(struct nouveau_object *);
#define _nouveau_parent_init _nouveau_object_init #define _nouveau_parent_init _nouveau_object_init
#define _nouveau_parent_fini _nouveau_object_fini #define _nouveau_parent_fini _nouveau_object_fini
......
...@@ -26,7 +26,7 @@ void nouveau_timer_alarm(void *, u32 nsec, struct nouveau_alarm *); ...@@ -26,7 +26,7 @@ void nouveau_timer_alarm(void *, u32 nsec, struct nouveau_alarm *);
struct nouveau_timer { struct nouveau_timer {
struct nouveau_subdev base; struct nouveau_subdev base;
u64 (*read)(struct nouveau_timer *); u64 (*read)(struct nouveau_timer *);
void (*alarm)(struct nouveau_timer *, u32 time, struct nouveau_alarm *); void (*alarm)(struct nouveau_timer *, u64 time, struct nouveau_alarm *);
}; };
static inline struct nouveau_timer * static inline struct nouveau_timer *
......
...@@ -185,23 +185,22 @@ static void ...@@ -185,23 +185,22 @@ static void
nouveau_bios_shadow_acpi(struct nouveau_bios *bios) nouveau_bios_shadow_acpi(struct nouveau_bios *bios)
{ {
struct pci_dev *pdev = nv_device(bios)->pdev; struct pci_dev *pdev = nv_device(bios)->pdev;
int cnt = 65536 / 4096; int ret, cnt, i;
int ret; u8 data[3];
if (!nouveau_acpi_rom_supported(pdev)) if (!nouveau_acpi_rom_supported(pdev))
return; return;
bios->data = kmalloc(65536, GFP_KERNEL);
bios->size = 0; bios->size = 0;
if (!bios->data) if (nouveau_acpi_get_bios_chunk(data, 0, 3) == 3)
return; bios->size = data[2] * 512;
while (cnt--) {
ret = nouveau_acpi_get_bios_chunk(bios->data, bios->size, 4096);
if (ret != 4096)
return;
bios->size += 4096; bios->data = kmalloc(bios->size, GFP_KERNEL);
for (i = 0; bios->data && i < bios->size; i += cnt) {
cnt = min((bios->size - i), (u32)4096);
ret = nouveau_acpi_get_bios_chunk(bios->data, i, cnt);
if (ret != cnt)
break;
} }
} }
......
...@@ -90,6 +90,7 @@ nv50_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -90,6 +90,7 @@ nv50_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return ret; return ret;
priv->base.pll_set = nv50_clock_pll_set; priv->base.pll_set = nv50_clock_pll_set;
priv->base.pll_calc = nv04_clock_pll_calc;
return 0; return 0;
} }
......
...@@ -92,7 +92,7 @@ nv50_fan_pwm_clock(struct nouveau_therm *therm) ...@@ -92,7 +92,7 @@ nv50_fan_pwm_clock(struct nouveau_therm *therm)
if (nv_rd32(therm, 0xc040) & 0x800000) { if (nv_rd32(therm, 0xc040) & 0x800000) {
/* Use the HOST clock (100 MHz) /* Use the HOST clock (100 MHz)
* Where does this constant(2.4) comes from? */ * Where does this constant(2.4) comes from? */
pwm_clock = (100000000 >> pwm_div) / 10 / 24; pwm_clock = (100000000 >> pwm_div) * 10 / 24;
} else { } else {
/* Where does this constant(20) comes from? */ /* Where does this constant(20) comes from? */
pwm_clock = (crystal * 1000) >> pwm_div; pwm_clock = (crystal * 1000) >> pwm_div;
......
...@@ -85,7 +85,7 @@ nv04_timer_alarm_trigger(struct nouveau_timer *ptimer) ...@@ -85,7 +85,7 @@ nv04_timer_alarm_trigger(struct nouveau_timer *ptimer)
} }
static void static void
nv04_timer_alarm(struct nouveau_timer *ptimer, u32 time, nv04_timer_alarm(struct nouveau_timer *ptimer, u64 time,
struct nouveau_alarm *alarm) struct nouveau_alarm *alarm)
{ {
struct nv04_timer_priv *priv = (void *)ptimer; struct nv04_timer_priv *priv = (void *)ptimer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment