From patchwork Wed Aug 9 17:29:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 9891401 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F0B3F601EB for ; Wed, 9 Aug 2017 17:30:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D969628A51 for ; Wed, 9 Aug 2017 17:30:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE7B528A70; Wed, 9 Aug 2017 17:30:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2A84928AA5 for ; Wed, 9 Aug 2017 17:30:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0466689CBE; Wed, 9 Aug 2017 17:29:38 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6C246E384 for ; Wed, 9 Aug 2017 17:29:36 +0000 (UTC) Received: by mail-pf0-x244.google.com with SMTP id c65so6741618pfl.0 for ; Wed, 09 Aug 2017 10:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jlekstrand-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=EZ6AKaSq0lVRbPyMWdoBEC3SCXHCX2X07O4ZQwkJ5/A=; b=nocibp1o2Zk0yEtgvY7/EG+hjFQeqqZ1obabnZdK7bytIlyEHOT8dADW9Ghak69x3E ctxFY9IrbO2fUgDeJjDKa3B7S9wytmWUiMg2RD/18yTNL7lIyxk3sKYM5jnOgQpaOi7B eL6sQLxuMdRuVO1+2QIclQiPROF1yiXBjBCqoTgf8ZCWuVPXqmAxg3i7fLoB+QXagZ8C XO3yPsjpx/nXdeLAuhide0rMJCwdLel39T2XXsVeQ7nGXvIDoOHDmtMp/SjNUwB4DipN XJRSOm7nS6eZVujK/HgeL3qnVeQi33V1lSOZd6NlcEhD1eYb0ZolXODDe4UI2oxyJqtF Ji1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EZ6AKaSq0lVRbPyMWdoBEC3SCXHCX2X07O4ZQwkJ5/A=; b=UY/4QC5KmwDt+eTRghRgait18L752UnLdsQE8Bh0R74EuSex774flTY3o2z1J2u3WR ny+tTK0vrG12OrpJ/1e2sCuKN2/EBp1PautybQzEqAw4INq9Pb3rLP5mKe/K0pAy3uhV sPfefDI3/0xbVTn+te11YF3w6SG/+/cmdA9WMCahYYOcVASDVFYgqSiFQMM8WOIs9APV mggHYbuqAdi2sGdslpxVhqWiNZoU5nM1XEW3ft6BFCd8sQQ09TMzJnIbOp2OLGfuJOms sYV0lmp18foNry7CbqyWLVgxKq1PmZjD4VT8Be7M9yw4QRafg/342QVKuorphBV5qYOF wQXg== X-Gm-Message-State: AHYfb5jSXd3ddXQJ230j3cY45e6f2zsxsSJvpNBDmjBtDszcSTuBq0TZ Bx30O8+9n2IO1eDIDMOo6w== X-Received: by 10.99.114.7 with SMTP id n7mr5084809pgc.139.1502299776510; Wed, 09 Aug 2017 10:29:36 -0700 (PDT) Received: from omlet.jlekstrand.net (static-50-43-41-117.bvtn.or.frontiernet.net. [50.43.41.117]) by smtp.gmail.com with ESMTPSA id n11sm7679901pgr.76.2017.08.09.10.29.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Aug 2017 10:29:35 -0700 (PDT) From: Jason Ekstrand X-Google-Original-From: Jason Ekstrand To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Wed, 9 Aug 2017 10:29:33 -0700 Message-Id: <1502299773-24224-1-git-send-email-jason.ekstrand@intel.com> X-Mailer: git-send-email 2.5.0.400.gff86faf Cc: Jason Ekstrand Subject: [Intel-gfx] [PATCH] drm/i915: Update from drm-next X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP --- include/drm/i915_drm.h | 61 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 5ebe046..c26bf7c 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h @@ -412,6 +412,25 @@ typedef struct drm_i915_irq_wait { */ #define I915_PARAM_HAS_EXEC_FENCE 44 +/* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture + * user specified bufffers for post-mortem debugging of GPU hangs. See + * EXEC_OBJECT_CAPTURE. + */ +#define I915_PARAM_HAS_EXEC_CAPTURE 45 + +#define I915_PARAM_SLICE_MASK 46 + +/* Assuming it's uniform for each slice, this queries the mask of subslices + * per-slice for this system. + */ +#define I915_PARAM_SUBSLICE_MASK 47 + +/* + * Query whether DRM_I915_GEM_EXECBUFFER2 supports supplying the batch buffer + * as the first execobject as opposed to the last. See I915_EXEC_BATCH_FIRST. + */ +#define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 + typedef struct drm_i915_getparam { __s32 param; /* @@ -666,6 +685,8 @@ struct drm_i915_gem_relocation_entry { #define I915_GEM_DOMAIN_VERTEX 0x00000020 /** GTT domain - aperture and scanout */ #define I915_GEM_DOMAIN_GTT 0x00000040 +/** WC domain - uncached access */ +#define I915_GEM_DOMAIN_WC 0x00000080 /** @} */ struct drm_i915_gem_exec_object { @@ -773,8 +794,15 @@ struct drm_i915_gem_exec_object2 { * I915_PARAM_HAS_EXEC_FENCE to order execbufs and execute them asynchronously. */ #define EXEC_OBJECT_ASYNC (1<<6) +/* Request that the contents of this execobject be copied into the error + * state upon a GPU hang involving this batch for post-mortem debugging. + * These buffers are recorded in no particular order as "user" in + * /sys/class/drm/cardN/error. Query I915_PARAM_HAS_EXEC_CAPTURE to see + * if the kernel supports this flag. + */ +#define EXEC_OBJECT_CAPTURE (1<<7) /* All remaining bits are MBZ and RESERVED FOR FUTURE USE */ -#define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_ASYNC<<1) +#define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_CAPTURE<<1) __u64 flags; union { @@ -889,7 +917,17 @@ struct drm_i915_gem_execbuffer2 { */ #define I915_EXEC_FENCE_OUT (1<<17) -#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_OUT<<1)) +/* + * Traditionally the execbuf ioctl has only considered the final element in + * the execobject[] to be the executable batch. Often though, the client + * will known the batch object prior to construction and being able to place + * it into the execobject[] array first can simplify the relocation tracking. + * Setting I915_EXEC_BATCH_FIRST tells execbuf to use element 0 of the + * execobject[] as the * batch instead (the default is to use the last + * element). + */ +#define I915_EXEC_BATCH_FIRST (1<<18) +#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_BATCH_FIRST<<1)) #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) #define i915_execbuffer2_set_context_id(eb2, context) \ @@ -1293,13 +1331,18 @@ struct drm_i915_gem_context_param { }; enum drm_i915_oa_format { - I915_OA_FORMAT_A13 = 1, - I915_OA_FORMAT_A29, - I915_OA_FORMAT_A13_B8_C8, - I915_OA_FORMAT_B4_C8, - I915_OA_FORMAT_A45_B8_C8, - I915_OA_FORMAT_B4_C8_A16, - I915_OA_FORMAT_C4_B8, + I915_OA_FORMAT_A13 = 1, /* HSW only */ + I915_OA_FORMAT_A29, /* HSW only */ + I915_OA_FORMAT_A13_B8_C8, /* HSW only */ + I915_OA_FORMAT_B4_C8, /* HSW only */ + I915_OA_FORMAT_A45_B8_C8, /* HSW only */ + I915_OA_FORMAT_B4_C8_A16, /* HSW only */ + I915_OA_FORMAT_C4_B8, /* HSW+ */ + + /* Gen8+ */ + I915_OA_FORMAT_A12, + I915_OA_FORMAT_A12_B8_C8, + I915_OA_FORMAT_A32u40_A4u32_B8_C8, I915_OA_FORMAT_MAX /* non-ABI */ };