diff options
author | Dave Airlie <airlied@redhat.com> | 2010-08-01 20:24:46 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-01 20:24:46 -0400 |
commit | 7827627107aeb629f1a056cb56b17bd4fb789e03 (patch) | |
tree | cbd83582abb9120c7ef724bf439916c8bf864e37 /drivers/gpu/drm/nouveau | |
parent | e190bfe56841551b1ad5abb42ebd0c4798cc8c01 (diff) | |
parent | 219de62a1627247fca10789f28902f66cb0b408f (diff) |
Merge branch 'drm-radeon-next' of ../drm-radeon-next into drm-core-next
* 'drm-radeon-next' of ../drm-radeon-next: (333 commits)
drm/radeon/kms: trivial code style fixes for audio
drm/radeon: remove viewport transform from r6xx/r7xx blit emit
drm/radeon: group r6xx/r7xx newly sequential blit state
drm/radeon: reorder r6xx/r7xx blit state emit to make more regs sequential
drm/radeon: r6xx/r7xx move vport clipping to a single packet
drm/radeon: group r6xx/r7xx sequential blit state
drm/radeon: remove duplicate state emit in r6xx/r7xx blit
drm/radeon: add comments to r6xx/r7xx blit state
drm/radeon/kms/r7xx: add workaround for hw issue with HDP flush
drm/radeon/kms: remove rs4xx gart limit
drm: radeon: fix sign bug
drm/radeon/kms: check/restore sanity before doing anything else with GPU.
drm/radeon: fall back to GTT if bo creation/validation in VRAM fails.
drm/radeon/kms: add ioport register access
drm/radeon/kms: enable HDMI audio on RS600/RS690/RS740
drm/radeon/kms: track audio engine state, do not use not setup timer
drm/radeon/kms/r6xx+: add query for tile config (v2)
drm/radeon/kms: fix CS alignment checking for tiling (v2)
drm/radeon/kms: add tiling support to the cs checker for r6xx/r7xx
drm/radeon/kms: Add crtc tiling setup support for evergreen
...
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 33 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 |
2 files changed, 11 insertions, 25 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index fc924b649195..e492919faf44 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -203,36 +203,26 @@ struct methods { | |||
203 | const bool rw; | 203 | const bool rw; |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static struct methods nv04_methods[] = { | 206 | static struct methods shadow_methods[] = { |
207 | { "PROM", load_vbios_prom, false }, | ||
208 | { "PRAMIN", load_vbios_pramin, true }, | ||
209 | { "PCIROM", load_vbios_pci, true }, | ||
210 | }; | ||
211 | |||
212 | static struct methods nv50_methods[] = { | ||
213 | { "ACPI", load_vbios_acpi, true }, | ||
214 | { "PRAMIN", load_vbios_pramin, true }, | 207 | { "PRAMIN", load_vbios_pramin, true }, |
215 | { "PROM", load_vbios_prom, false }, | 208 | { "PROM", load_vbios_prom, false }, |
216 | { "PCIROM", load_vbios_pci, true }, | 209 | { "PCIROM", load_vbios_pci, true }, |
210 | { "ACPI", load_vbios_acpi, true }, | ||
217 | }; | 211 | }; |
218 | 212 | ||
219 | #define METHODCNT 3 | ||
220 | |||
221 | static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) | 213 | static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) |
222 | { | 214 | { |
223 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 215 | const int nr_methods = ARRAY_SIZE(shadow_methods); |
224 | struct methods *methods; | 216 | struct methods *methods = shadow_methods; |
225 | int i; | ||
226 | int testscore = 3; | 217 | int testscore = 3; |
227 | int scores[METHODCNT]; | 218 | int scores[nr_methods], i; |
228 | 219 | ||
229 | if (nouveau_vbios) { | 220 | if (nouveau_vbios) { |
230 | methods = nv04_methods; | 221 | for (i = 0; i < nr_methods; i++) |
231 | for (i = 0; i < METHODCNT; i++) | ||
232 | if (!strcasecmp(nouveau_vbios, methods[i].desc)) | 222 | if (!strcasecmp(nouveau_vbios, methods[i].desc)) |
233 | break; | 223 | break; |
234 | 224 | ||
235 | if (i < METHODCNT) { | 225 | if (i < nr_methods) { |
236 | NV_INFO(dev, "Attempting to use BIOS image from %s\n", | 226 | NV_INFO(dev, "Attempting to use BIOS image from %s\n", |
237 | methods[i].desc); | 227 | methods[i].desc); |
238 | 228 | ||
@@ -244,12 +234,7 @@ static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) | |||
244 | NV_ERROR(dev, "VBIOS source \'%s\' invalid\n", nouveau_vbios); | 234 | NV_ERROR(dev, "VBIOS source \'%s\' invalid\n", nouveau_vbios); |
245 | } | 235 | } |
246 | 236 | ||
247 | if (dev_priv->card_type < NV_50) | 237 | for (i = 0; i < nr_methods; i++) { |
248 | methods = nv04_methods; | ||
249 | else | ||
250 | methods = nv50_methods; | ||
251 | |||
252 | for (i = 0; i < METHODCNT; i++) { | ||
253 | NV_TRACE(dev, "Attempting to load BIOS image from %s\n", | 238 | NV_TRACE(dev, "Attempting to load BIOS image from %s\n", |
254 | methods[i].desc); | 239 | methods[i].desc); |
255 | data[0] = data[1] = 0; /* avoid reuse of previous image */ | 240 | data[0] = data[1] = 0; /* avoid reuse of previous image */ |
@@ -260,7 +245,7 @@ static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) | |||
260 | } | 245 | } |
261 | 246 | ||
262 | while (--testscore > 0) { | 247 | while (--testscore > 0) { |
263 | for (i = 0; i < METHODCNT; i++) { | 248 | for (i = 0; i < nr_methods; i++) { |
264 | if (scores[i] == testscore) { | 249 | if (scores[i] == testscore) { |
265 | NV_TRACE(dev, "Using BIOS image from %s\n", | 250 | NV_TRACE(dev, "Using BIOS image from %s\n", |
266 | methods[i].desc); | 251 | methods[i].desc); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index c9a4a0d2a115..257ea130ae13 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -387,7 +387,8 @@ int nouveau_fbcon_init(struct drm_device *dev) | |||
387 | dev_priv->nfbdev = nfbdev; | 387 | dev_priv->nfbdev = nfbdev; |
388 | nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; | 388 | nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; |
389 | 389 | ||
390 | ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4); | 390 | ret = drm_fb_helper_init(dev, &nfbdev->helper, |
391 | nv_two_heads(dev) ? 2 : 1, 4); | ||
391 | if (ret) { | 392 | if (ret) { |
392 | kfree(nfbdev); | 393 | kfree(nfbdev); |
393 | return ret; | 394 | return ret; |