diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-10 06:47:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-10 06:47:12 -0400 |
commit | ba7067651083bdcc37223d8879478cbc51cca923 (patch) | |
tree | 4e33d20d4ae41d3b278e888f19177a62a154efcf /drivers/gpu/drm | |
parent | 42859eea96ba6beabfb0369a1eeffa3c7d2bd9cb (diff) | |
parent | ceb736c395058699dc82e5efdb2a9279a5b29451 (diff) |
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
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/core/parent.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/core/parent.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/subdev/timer.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/base.c | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c | 2 |
7 files changed, 14 insertions, 34 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/parent.c b/drivers/gpu/drm/nouveau/core/core/parent.c index a1ea034611d..db7c5494310 100644 --- a/drivers/gpu/drm/nouveau/core/core/parent.c +++ b/drivers/gpu/drm/nouveau/core/core/parent.c | |||
@@ -101,23 +101,6 @@ nouveau_parent_create_(struct nouveau_object *parent, | |||
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
103 | 103 | ||
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 | |||
121 | void | 104 | void |
122 | nouveau_parent_destroy(struct nouveau_parent *parent) | 105 | nouveau_parent_destroy(struct nouveau_parent *parent) |
123 | { | 106 | { |
diff --git a/drivers/gpu/drm/nouveau/core/include/core/parent.h b/drivers/gpu/drm/nouveau/core/include/core/parent.h index d3aa251a5eb..3c2e940eb0f 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/parent.h +++ b/drivers/gpu/drm/nouveau/core/include/core/parent.h | |||
@@ -50,9 +50,6 @@ int nouveau_parent_create_(struct nouveau_object *, struct nouveau_object *, | |||
50 | int size, void **); | 50 | int size, void **); |
51 | void nouveau_parent_destroy(struct nouveau_parent *); | 51 | void nouveau_parent_destroy(struct nouveau_parent *); |
52 | 52 | ||
53 | int _nouveau_parent_ctor(struct nouveau_object *, struct nouveau_object *, | ||
54 | struct nouveau_oclass *, void *, u32, | ||
55 | struct nouveau_object **); | ||
56 | void _nouveau_parent_dtor(struct nouveau_object *); | 53 | void _nouveau_parent_dtor(struct nouveau_object *); |
57 | #define _nouveau_parent_init _nouveau_object_init | 54 | #define _nouveau_parent_init _nouveau_object_init |
58 | #define _nouveau_parent_fini _nouveau_object_fini | 55 | #define _nouveau_parent_fini _nouveau_object_fini |
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/timer.h b/drivers/gpu/drm/nouveau/core/include/subdev/timer.h index 49bff901544..c24ec8ab3db 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/timer.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/timer.h | |||
@@ -26,7 +26,7 @@ void nouveau_timer_alarm(void *, u32 nsec, struct nouveau_alarm *); | |||
26 | struct nouveau_timer { | 26 | struct nouveau_timer { |
27 | struct nouveau_subdev base; | 27 | struct nouveau_subdev base; |
28 | u64 (*read)(struct nouveau_timer *); | 28 | 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 *); |
30 | }; | 30 | }; |
31 | 31 | ||
32 | static inline struct nouveau_timer * | 32 | static inline struct nouveau_timer * |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c index 2fbb6df697c..dcb5c2befc9 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c | |||
@@ -185,23 +185,22 @@ static void | |||
185 | nouveau_bios_shadow_acpi(struct nouveau_bios *bios) | 185 | nouveau_bios_shadow_acpi(struct nouveau_bios *bios) |
186 | { | 186 | { |
187 | struct pci_dev *pdev = nv_device(bios)->pdev; | 187 | struct pci_dev *pdev = nv_device(bios)->pdev; |
188 | int cnt = 65536 / 4096; | 188 | int ret, cnt, i; |
189 | int ret; | 189 | u8 data[3]; |
190 | 190 | ||
191 | if (!nouveau_acpi_rom_supported(pdev)) | 191 | if (!nouveau_acpi_rom_supported(pdev)) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | bios->data = kmalloc(65536, GFP_KERNEL); | ||
195 | bios->size = 0; | 194 | bios->size = 0; |
196 | if (!bios->data) | 195 | if (nouveau_acpi_get_bios_chunk(data, 0, 3) == 3) |
197 | return; | 196 | bios->size = data[2] * 512; |
198 | |||
199 | while (cnt--) { | ||
200 | ret = nouveau_acpi_get_bios_chunk(bios->data, bios->size, 4096); | ||
201 | if (ret != 4096) | ||
202 | return; | ||
203 | 197 | ||
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; | ||
205 | } | 204 | } |
206 | } | 205 | } |
207 | 206 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c index fd181fbcedd..f4147f67eda 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/nv50.c | |||
@@ -90,6 +90,7 @@ nv50_clock_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
90 | return ret; | 90 | return ret; |
91 | 91 | ||
92 | priv->base.pll_set = nv50_clock_pll_set; | 92 | priv->base.pll_set = nv50_clock_pll_set; |
93 | priv->base.pll_calc = nv04_clock_pll_calc; | ||
93 | return 0; | 94 | return 0; |
94 | } | 95 | } |
95 | 96 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c index f87a7a3eb4e..9360ddd469e 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv50.c | |||
@@ -92,7 +92,7 @@ nv50_fan_pwm_clock(struct nouveau_therm *therm) | |||
92 | if (nv_rd32(therm, 0xc040) & 0x800000) { | 92 | if (nv_rd32(therm, 0xc040) & 0x800000) { |
93 | /* Use the HOST clock (100 MHz) | 93 | /* Use the HOST clock (100 MHz) |
94 | * Where does this constant(2.4) comes from? */ | 94 | * Where does this constant(2.4) comes from? */ |
95 | pwm_clock = (100000000 >> pwm_div) / 10 / 24; | 95 | pwm_clock = (100000000 >> pwm_div) * 10 / 24; |
96 | } else { | 96 | } else { |
97 | /* Where does this constant(20) comes from? */ | 97 | /* Where does this constant(20) comes from? */ |
98 | pwm_clock = (crystal * 1000) >> pwm_div; | 98 | pwm_clock = (crystal * 1000) >> pwm_div; |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c b/drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c index 49976be4d73..c26ca9bef67 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c +++ b/drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c | |||
@@ -85,7 +85,7 @@ nv04_timer_alarm_trigger(struct nouveau_timer *ptimer) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
88 | nv04_timer_alarm(struct nouveau_timer *ptimer, u32 time, | 88 | nv04_timer_alarm(struct nouveau_timer *ptimer, u64 time, |
89 | struct nouveau_alarm *alarm) | 89 | struct nouveau_alarm *alarm) |
90 | { | 90 | { |
91 | struct nv04_timer_priv *priv = (void *)ptimer; | 91 | struct nv04_timer_priv *priv = (void *)ptimer; |