diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-11 13:41:21 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-11 13:41:21 -0400 |
| commit | cd4edf7a3476b24f60ef3eac4260b7ff6fbc4d00 (patch) | |
| tree | ea5cc2e41de0a476a18b993cc692562f64940b7f | |
| parent | 2fe80d3bbf1c8bd9efc5b8154207c8dd104e7306 (diff) | |
| parent | ebff5fa9d545574324095d9c6a3cb80c9157abc5 (diff) | |
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"All over the map..
- nouveau:
disable MSI, needs more work, will try again next merge window
- radeon:
audio + uvd regression fixes, dpm fixes, reset fixes
- i915:
the dpms fix might fix your haswell
And one pain in the ass revert, so we have VGA arbitration that when
implemented 4-5 years ago really hoped that GPUs could remove
themselves from arbitration completely once they had a kernel driver.
It seems Intel hw designers decided that was too nice a facility to
allow us to have so they removed it when they went on-die (so since
Ironlake at least). Now Alex Williamson added support for VGA
arbitration for newer GPUs however this now exposes itself to
userspace as requireing arbitration of GPU VGA regions and the X
server gets involved and disables things that it can't handle when VGA
access is possibly required around every operation.
So in order to not break userspace we just reverted things back to the
old known broken status so maybe we can try and design out way out.
Ville also had a patch to use stop machine for the two times Intel
needs to access VGA space, that might be acceptable with some rework,
but for now myself and Daniel agreed to just go back"
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (23 commits)
Revert "i915: Update VGA arbiter support for newer devices"
Revert "drm/i915: Delay disabling of VGA memory until vgacon->fbcon handoff is done"
drm/radeon: re-enable sw ACR support on pre-DCE4
drm/radeon/dpm: disable bapm on TN asics
drm/radeon: improve soft reset on CIK
drm/radeon: improve soft reset on SI
drm/radeon/dpm: off by one in si_set_mc_special_registers()
drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers()
drm/radeon: forever loop on error in radeon_do_test_moves()
drm/radeon: fix hw contexts for SUMO2 asics
drm/radeon: fix typo in CP DMA register headers
drm/radeon/dpm: disable multiple UVD states
drm/radeon: use hw generated CTS/N values for audio
drm/radeon: fix N/CTS clock matching for audio
drm/radeon: use 64-bit math to calculate CTS values for audio (v2)
drm/edid: catch kmalloc failure in drm_edid_to_speaker_allocation
Revert "drm/fb-helper: don't sleep for screen unblank when an oops is in progress"
drm/gma500: fix things after get/put page helpers
drm/nouveau/mc: disable msi support by default, it's busted in tons of places
drm/i915: Only apply DPMS to the encoder if enabled
...
25 files changed, 74 insertions, 93 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 1688ff500513..830f7501cb4d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
| @@ -2925,6 +2925,8 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb) | |||
| 2925 | /* Speaker Allocation Data Block */ | 2925 | /* Speaker Allocation Data Block */ |
| 2926 | if (dbl == 3) { | 2926 | if (dbl == 3) { |
| 2927 | *sadb = kmalloc(dbl, GFP_KERNEL); | 2927 | *sadb = kmalloc(dbl, GFP_KERNEL); |
| 2928 | if (!*sadb) | ||
| 2929 | return -ENOMEM; | ||
| 2928 | memcpy(*sadb, &db[1], dbl); | 2930 | memcpy(*sadb, &db[1], dbl); |
| 2929 | count = dbl; | 2931 | count = dbl; |
| 2930 | break; | 2932 | break; |
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index f6f6cc7fc133..3d13ca6e257f 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
| @@ -416,14 +416,6 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) | |||
| 416 | return; | 416 | return; |
| 417 | 417 | ||
| 418 | /* | 418 | /* |
| 419 | * fbdev->blank can be called from irq context in case of a panic. | ||
| 420 | * Since we already have our own special panic handler which will | ||
| 421 | * restore the fbdev console mode completely, just bail out early. | ||
| 422 | */ | ||
| 423 | if (oops_in_progress) | ||
| 424 | return; | ||
| 425 | |||
| 426 | /* | ||
| 427 | * For each CRTC in this fb, turn the connectors on/off. | 419 | * For each CRTC in this fb, turn the connectors on/off. |
| 428 | */ | 420 | */ |
| 429 | drm_modeset_lock_all(dev); | 421 | drm_modeset_lock_all(dev); |
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c index 92babac362ec..2db731f00930 100644 --- a/drivers/gpu/drm/gma500/gtt.c +++ b/drivers/gpu/drm/gma500/gtt.c | |||
| @@ -204,6 +204,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt) | |||
| 204 | if (IS_ERR(pages)) | 204 | if (IS_ERR(pages)) |
| 205 | return PTR_ERR(pages); | 205 | return PTR_ERR(pages); |
| 206 | 206 | ||
| 207 | gt->npage = gt->gem.size / PAGE_SIZE; | ||
| 207 | gt->pages = pages; | 208 | gt->pages = pages; |
| 208 | 209 | ||
| 209 | return 0; | 210 | return 0; |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index c27a21034a5e..d5c784d48671 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
| @@ -1290,12 +1290,9 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
| 1290 | * then we do not take part in VGA arbitration and the | 1290 | * then we do not take part in VGA arbitration and the |
| 1291 | * vga_client_register() fails with -ENODEV. | 1291 | * vga_client_register() fails with -ENODEV. |
| 1292 | */ | 1292 | */ |
| 1293 | if (!HAS_PCH_SPLIT(dev)) { | 1293 | ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode); |
| 1294 | ret = vga_client_register(dev->pdev, dev, NULL, | 1294 | if (ret && ret != -ENODEV) |
| 1295 | i915_vga_set_decode); | 1295 | goto out; |
| 1296 | if (ret && ret != -ENODEV) | ||
| 1297 | goto out; | ||
| 1298 | } | ||
| 1299 | 1296 | ||
| 1300 | intel_register_dsm_handler(); | 1297 | intel_register_dsm_handler(); |
| 1301 | 1298 | ||
| @@ -1351,12 +1348,6 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
| 1351 | */ | 1348 | */ |
| 1352 | intel_fbdev_initial_config(dev); | 1349 | intel_fbdev_initial_config(dev); |
| 1353 | 1350 | ||
| 1354 | /* | ||
| 1355 | * Must do this after fbcon init so that | ||
| 1356 | * vgacon_save_screen() works during the handover. | ||
| 1357 | */ | ||
| 1358 | i915_disable_vga_mem(dev); | ||
| 1359 | |||
| 1360 | /* Only enable hotplug handling once the fbdev is fully set up. */ | 1351 | /* Only enable hotplug handling once the fbdev is fully set up. */ |
| 1361 | dev_priv->enable_hotplug_processing = true; | 1352 | dev_priv->enable_hotplug_processing = true; |
| 1362 | 1353 | ||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c159e1a6810f..38f96f65d87a 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -3881,6 +3881,9 @@ | |||
| 3881 | #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 | 3881 | #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 |
| 3882 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) | 3882 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) |
| 3883 | 3883 | ||
| 3884 | #define HSW_SCRATCH1 0xb038 | ||
| 3885 | #define HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE (1<<27) | ||
| 3886 | |||
| 3884 | #define HSW_FUSE_STRAP 0x42014 | 3887 | #define HSW_FUSE_STRAP 0x42014 |
| 3885 | #define HSW_CDCLK_LIMIT (1 << 24) | 3888 | #define HSW_CDCLK_LIMIT (1 << 24) |
| 3886 | 3889 | ||
| @@ -4728,6 +4731,9 @@ | |||
| 4728 | #define GEN7_ROW_CHICKEN2_GT2 0xf4f4 | 4731 | #define GEN7_ROW_CHICKEN2_GT2 0xf4f4 |
| 4729 | #define DOP_CLOCK_GATING_DISABLE (1<<0) | 4732 | #define DOP_CLOCK_GATING_DISABLE (1<<0) |
| 4730 | 4733 | ||
| 4734 | #define HSW_ROW_CHICKEN3 0xe49c | ||
| 4735 | #define HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE (1 << 6) | ||
| 4736 | |||
| 4731 | #define G4X_AUD_VID_DID (dev_priv->info->display_mmio_offset + 0x62020) | 4737 | #define G4X_AUD_VID_DID (dev_priv->info->display_mmio_offset + 0x62020) |
| 4732 | #define INTEL_AUDIO_DEVCL 0x808629FB | 4738 | #define INTEL_AUDIO_DEVCL 0x808629FB |
| 4733 | #define INTEL_AUDIO_DEVBLC 0x80862801 | 4739 | #define INTEL_AUDIO_DEVBLC 0x80862801 |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e5822e79f912..581fb4b2f766 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -3941,8 +3941,6 @@ static void intel_connector_check_state(struct intel_connector *connector) | |||
| 3941 | * consider. */ | 3941 | * consider. */ |
| 3942 | void intel_connector_dpms(struct drm_connector *connector, int mode) | 3942 | void intel_connector_dpms(struct drm_connector *connector, int mode) |
| 3943 | { | 3943 | { |
| 3944 | struct intel_encoder *encoder = intel_attached_encoder(connector); | ||
| 3945 | |||
| 3946 | /* All the simple cases only support two dpms states. */ | 3944 | /* All the simple cases only support two dpms states. */ |
| 3947 | if (mode != DRM_MODE_DPMS_ON) | 3945 | if (mode != DRM_MODE_DPMS_ON) |
| 3948 | mode = DRM_MODE_DPMS_OFF; | 3946 | mode = DRM_MODE_DPMS_OFF; |
| @@ -3953,10 +3951,8 @@ void intel_connector_dpms(struct drm_connector *connector, int mode) | |||
| 3953 | connector->dpms = mode; | 3951 | connector->dpms = mode; |
| 3954 | 3952 | ||
| 3955 | /* Only need to change hw state when actually enabled */ | 3953 | /* Only need to change hw state when actually enabled */ |
| 3956 | if (encoder->base.crtc) | 3954 | if (connector->encoder) |
| 3957 | intel_encoder_dpms(encoder, mode); | 3955 | intel_encoder_dpms(to_intel_encoder(connector->encoder), mode); |
| 3958 | else | ||
| 3959 | WARN_ON(encoder->connectors_active != false); | ||
| 3960 | 3956 | ||
| 3961 | intel_modeset_check_state(connector->dev); | 3957 | intel_modeset_check_state(connector->dev); |
| 3962 | } | 3958 | } |
| @@ -10049,33 +10045,6 @@ static void i915_disable_vga(struct drm_device *dev) | |||
| 10049 | POSTING_READ(vga_reg); | 10045 | POSTING_READ(vga_reg); |
| 10050 | } | 10046 | } |
| 10051 | 10047 | ||
| 10052 | static void i915_enable_vga_mem(struct drm_device *dev) | ||
| 10053 | { | ||
| 10054 | /* Enable VGA memory on Intel HD */ | ||
| 10055 | if (HAS_PCH_SPLIT(dev)) { | ||
| 10056 | vga_get_uninterruptible(dev->pdev, VGA_RSRC_LEGACY_IO); | ||
| 10057 | outb(inb(VGA_MSR_READ) | VGA_MSR_MEM_EN, VGA_MSR_WRITE); | ||
| 10058 | vga_set_legacy_decoding(dev->pdev, VGA_RSRC_LEGACY_IO | | ||
| 10059 | VGA_RSRC_LEGACY_MEM | | ||
| 10060 | VGA_RSRC_NORMAL_IO | | ||
| 10061 | VGA_RSRC_NORMAL_MEM); | ||
| 10062 | vga_put(dev->pdev, VGA_RSRC_LEGACY_IO); | ||
| 10063 | } | ||
| 10064 | } | ||
