From: Daniel Vetter Subject: [PATCH 1/2] sna: Disable userspace w/a for i830/845 cs incoherency Date: Tue, 8 Oct 2013 10:02:38 +0200 Message-ID: <1381219359-4029-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com [209.85.215.171]) by gabe.freedesktop.org (Postfix) with ESMTP id A2E97E5C6E for ; Tue, 8 Oct 2013 01:02:53 -0700 (PDT) Received: by mail-ea0-f171.google.com with SMTP id n15so3754030ead.2 for ; Tue, 08 Oct 2013 01:02:51 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org In commit c7f7dd61fd07dbf938fc6ba711de07986d35ce1f Author: Chris Wilson Date: Wed Dec 12 19:43:19 2012 +0000 sna: Pin some batches to avoid CS incoherence on 830/845 the in-kernel w/a of pinning batches was duplicated for older kernels. Unfortunately the userspace w/a isn't as good as the kernel one - when restarting X we need to pin a new set of batch buffer objects. Those new batches could potentially have stale tlb entries still in the CS, leading to gpu hangs right after X started. The other problem is that when support for detecting the kernel-based w/a added to be able to opt out of it using the EXEC_IS_PINNED in commit 5b0572503eab235bc7eff20d369241330c41e630 Author: Chris Wilson Date: Sun Dec 16 23:04:55 2012 +0000 sna: Enable support for opting out of the kernel CS workaround the logic in kgem_create_batch was fumbled: Since we always opt out we should unconditionally pin the batches. The end result is that we've ended up with unpinned batches if the kernel implements the w/a :( Instead of fixing the userspace w/a to work even when the kernel w/a is available I've opted to just disable the EXEC_IS_PINNED optimization completely - given the above issues around restarting X it's imo better to be safe than sorry. Cc: Chris Wilson Signed-off-by: Daniel Vetter --- src/sna/kgem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 7da05dd..934ab3d 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1381,8 +1381,6 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, unsigned gen) kgem->batch_flags_base |= LOCAL_I915_EXEC_NO_RELOC; if (kgem->has_handle_lut) kgem->batch_flags_base |= LOCAL_I915_EXEC_HANDLE_LUT; - if (kgem->has_pinned_batches) - kgem->batch_flags_base |= LOCAL_I915_EXEC_IS_PINNED; kgem_init_swizzling(kgem); } -- 1.8.1.4