diff options
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 64 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 33 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/r520.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/r600_blit.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 20 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 23 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_legacy_tv.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/rs400.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/rs600.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/rs690.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/rv515.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 1 | ||||
| -rw-r--r-- | include/linux/fb.h | 2 | ||||
| -rw-r--r-- | include/linux/vgaarb.h | 1 |
22 files changed, 142 insertions, 49 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index e7018708cc31..51bd301cf10d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -4742,6 +4742,16 @@ i915_gem_load(struct drm_device *dev) | |||
| 4742 | list_add(&dev_priv->mm.shrink_list, &shrink_list); | 4742 | list_add(&dev_priv->mm.shrink_list, &shrink_list); |
| 4743 | spin_unlock(&shrink_list_lock); | 4743 | spin_unlock(&shrink_list_lock); |
| 4744 | 4744 | ||
| 4745 | /* On GEN3 we really need to make sure the ARB C3 LP bit is set */ | ||
| 4746 | if (IS_GEN3(dev)) { | ||
| 4747 | u32 tmp = I915_READ(MI_ARB_STATE); | ||
| 4748 | if (!(tmp & MI_ARB_C3_LP_WRITE_ENABLE)) { | ||
| 4749 | /* arb state is a masked write, so set bit + bit in mask */ | ||
| 4750 | tmp = MI_ARB_C3_LP_WRITE_ENABLE | (MI_ARB_C3_LP_WRITE_ENABLE << MI_ARB_MASK_SHIFT); | ||
| 4751 | I915_WRITE(MI_ARB_STATE, tmp); | ||
| 4752 | } | ||
| 4753 | } | ||
| 4754 | |||
| 4745 | /* Old X drivers will take 0-2 for front, back, depth buffers */ | 4755 | /* Old X drivers will take 0-2 for front, back, depth buffers */ |
| 4746 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 4756 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) |
| 4747 | dev_priv->fence_reg_start = 3; | 4757 | dev_priv->fence_reg_start = 3; |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 150400f40534..6d9b0288272a 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -359,6 +359,70 @@ | |||
| 359 | #define LM_BURST_LENGTH 0x00000700 | 359 | #define LM_BURST_LENGTH 0x00000700 |
| 360 | #define LM_FIFO_WATERMARK 0x0000001F | 360 | #define LM_FIFO_WATERMARK 0x0000001F |
| 361 | #define MI_ARB_STATE 0x020e4 /* 915+ only */ | 361 | #define MI_ARB_STATE 0x020e4 /* 915+ only */ |
| 362 | #define MI_ARB_MASK_SHIFT 16 /* shift for enable bits */ | ||
| 363 | |||
| 364 | /* Make render/texture TLB fetches lower priorty than associated data | ||
| 365 | * fetches. This is not turned on by default | ||
| 366 | */ | ||
| 367 | #define MI_ARB_RENDER_TLB_LOW_PRIORITY (1 << 15) | ||
| 368 | |||
| 369 | /* Isoch request wait on GTT enable (Display A/B/C streams). | ||
| 370 | * Make isoch requests stall on the TLB update. May cause | ||
| 371 | * display underruns (test mode only) | ||
| 372 | */ | ||
| 373 | #define MI_ARB_ISOCH_WAIT_GTT (1 << 14) | ||
| 374 | |||
| 375 | /* Block grant count for isoch requests when block count is | ||
| 376 | * set to a finite value. | ||
| 377 | */ | ||
| 378 | #define MI_ARB_BLOCK_GRANT_MASK (3 << 12) | ||
| 379 | #define MI_ARB_BLOCK_GRANT_8 (0 << 12) /* for 3 display planes */ | ||
| 380 | #define MI_ARB_BLOCK_GRANT_4 (1 << 12) /* for 2 display planes */ | ||
| 381 | #define MI_ARB_BLOCK_GRANT_2 (2 << 12) /* for 1 display plane */ | ||
| 382 | #define MI_ARB_BLOCK_GRANT_0 (3 << 12) /* don't use */ | ||
| 383 | |||
| 384 | /* Enable render writes to complete in C2/C3/C4 power states. | ||
| 385 | * If this isn't enabled, render writes are prevented in low | ||
| 386 | * power states. That seems bad to me. | ||
| 387 | */ | ||
| 388 | #define MI_ARB_C3_LP_WRITE_ENABLE (1 << 11) | ||
| 389 | |||
| 390 | /* This acknowledges an async flip immediately instead | ||
| 391 | * of waiting for 2TLB fetches. | ||
| 392 | */ | ||
| 393 | #define MI_ARB_ASYNC_FLIP_ACK_IMMEDIATE (1 << 10) | ||
| 394 | |||
| 395 | /* Enables non-sequential data reads through arbiter | ||
| 396 | */ | ||
| 397 | #define MI_ARB_DUAL_DATA_PHASE_DISABLE (1 << 9) | ||
| 398 | |||
| 399 | /* Disable FSB snooping of cacheable write cycles from binner/render | ||
| 400 | * command stream | ||
| 401 | */ | ||
| 402 | #define MI_ARB_CACHE_SNOOP_DISABLE (1 << 8) | ||
| 403 | |||
| 404 | /* Arbiter time slice for non-isoch streams */ | ||
| 405 | #define MI_ARB_TIME_SLICE_MASK (7 << 5) | ||
| 406 | #define MI_ARB_TIME_SLICE_1 (0 << 5) | ||
| 407 | #define MI_ARB_TIME_SLICE_2 (1 << 5) | ||
| 408 | #define MI_ARB_TIME_SLICE_4 (2 << 5) | ||
| 409 | #define MI_ARB_TIME_SLICE_6 (3 << 5) | ||
| 410 | #define MI_ARB_TIME_SLICE_8 (4 << 5) | ||
| 411 | #define MI_ARB_TIME_SLICE_10 (5 << 5) | ||
| 412 | #define MI_ARB_TIME_SLICE_14 (6 << 5) | ||
| 413 | #define MI_ARB_TIME_SLICE_16 (7 << 5) | ||
| 414 | |||
| 415 | /* Low priority grace period page size */ | ||
| 416 | #define MI_ARB_LOW_PRIORITY_GRACE_4KB (0 << 4) /* default */ | ||
| 417 | #define MI_ARB_LOW_PRIORITY_GRACE_8KB (1 << 4) | ||
| 418 | |||
| 419 | /* Disable display A/B trickle feed */ | ||
| 420 | #define MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE (1 << 2) | ||
| 421 | |||
| 422 | /* Set display plane priority */ | ||
| 423 | #define MI_ARB_DISPLAY_PRIORITY_A_B (0 << 0) /* display A > display B */ | ||
| 424 | #define MI_ARB_DISPLAY_PRIORITY_B_A (1 << 0) /* display B > display A */ | ||
| 425 | |||
| 362 | #define CACHE_MODE_0 0x02120 /* 915+ only */ | 426 | #define CACHE_MODE_0 0x02120 /* 915+ only */ |
| 363 | #define CM0_MASK_SHIFT 16 | 427 | #define CM0_MASK_SHIFT 16 |
| 364 | #define CM0_IZ_OPT_DISABLE (1<<6) | 428 | #define CM0_IZ_OPT_DISABLE (1<<6) |
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) | ||
