aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-10-11 01:12:04 -0400
committerDave Airlie <airlied@redhat.com>2013-10-11 01:19:22 -0400
commitebff5fa9d545574324095d9c6a3cb80c9157abc5 (patch)
treee75006c20f12d83c45e59849c4765b64ab771213 /drivers/gpu/drm
parente1264ebe9ff48e1b3e1dd11805eec9f5b143ab7c (diff)
Revert "i915: Update VGA arbiter support for newer devices"
This reverts commit 81b5c7bc8de3e6f63419139c2fc91bf81dea8a7d. Adding drm/i915 into the vga arbiter chain means that X (in a piece of well-meant paranoia) will do a get/put on the vga decoding around _every_ accel call down into the ddx. Which results in some nice performance disasters [1]. This really breaks userspace, by disabling DRI for everyone, and stops OpenGL from working, this isn't limited to just the i915 but both the integrated and discrete GPUs on multi-gpu systems, in other words this causes untold worlds of pain, Ville tried to come up with a Great Hack to fiddle the required VGA I/O ops behind everyone's back using stop_machine, but that didn't really work out [2]. Given that we're fairly late in the -rc stage for such games let's just revert this all. One thing we might want to keep is to delay the disabling of the vga decoding until the fbdev emulation and the fbcon screen is set up. If we kill vga mem decoding beforehand fbcon can end up with a white square in the top-left corner it tried to save from the vga memory for a seamless transition. And we have bug reports on older platforms which seem to match these symptoms. But again that's something to play around with in -next. References: [1] http://lists.x.org/archives/xorg-devel/2013-September/037763.html References: [2] http://www.spinics.net/lists/intel-gfx/msg34062.html Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c9
-rw-r--r--drivers/gpu/drm/i915/intel_display.c25
2 files changed, 3 insertions, 31 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 52f5ad8037cc..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
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index aaea3ec811ed..581fb4b2f766 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10038,15 +10038,6 @@ static void i915_disable_vga(struct drm_device *dev)
10038 outb(SR01, VGA_SR_INDEX); 10038 outb(SR01, VGA_SR_INDEX);
10039 sr1 = inb(VGA_SR_DATA); 10039 sr1 = inb(VGA_SR_DATA);
10040 outb(sr1 | 1<<5, VGA_SR_DATA); 10040 outb(sr1 | 1<<5, VGA_SR_DATA);
10041
10042 /* Disable VGA memory on Intel HD */
10043 if (HAS_PCH_SPLIT(dev)) {
10044 outb(inb(VGA_MSR_READ) & ~VGA_MSR_MEM_EN, VGA_MSR_WRITE);
10045 vga_set_legacy_decoding(dev->pdev, VGA_RSRC_LEGACY_IO |
10046 VGA_RSRC_NORMAL_IO |
10047 VGA_RSRC_NORMAL_MEM);
10048 }
10049
10050 vga_put(dev->pdev, VGA_RSRC_LEGACY_IO); 10041 vga_put(dev->pdev, VGA_RSRC_LEGACY_IO);
10051 udelay(300); 10042 udelay(300);
10052 10043
@@ -10054,20 +10045,6 @@ static void i915_disable_vga(struct drm_device *dev)
10054 POSTING_READ(vga_reg); 10045 POSTING_READ(vga_reg);
10055} 10046}
10056 10047
10057static void i915_enable_vga(struct drm_device *dev)
10058{
10059 /* Enable VGA memory on Intel HD */
10060 if (HAS_PCH_SPLIT(dev)) {
10061 vga_get_uninterruptible(dev->pdev, VGA_RSRC_LEGACY_IO);
10062 outb(inb(VGA_MSR_READ) | VGA_MSR_MEM_EN, VGA_MSR_WRITE);
10063 vga_set_legacy_decoding(dev->pdev, VGA_RSRC_LEGACY_IO |
10064 VGA_RSRC_LEGACY_MEM |
10065 VGA_RSRC_NORMAL_IO |
10066 VGA_RSRC_NORMAL_MEM);
10067 vga_put(dev->pdev, VGA_RSRC_LEGACY_IO);
10068 }
10069}
10070
10071void intel_modeset_init_hw(struct drm_device *dev) 10048void intel_modeset_init_hw(struct drm_device *dev)
10072{ 10049{
10073 intel_init_power_well(dev); 10050 intel_init_power_well(dev);
@@ -10559,8 +10536,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
10559 10536
10560 intel_disable_fbc(dev); 10537 intel_disable_fbc(dev);
10561 10538
10562 i915_enable_vga(dev);
10563
10564 intel_disable_gt_powersave(dev); 10539 intel_disable_gt_powersave(dev);
10565 10540
10566 ironlake_teardown_rc6(dev); 10541 ironlake_teardown_rc6(dev);