From: David Weinehall <david.weinehall@linux.intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: [PATCH 03/03] beignet: set I915_CONTEXT_PARAM_NO_ZEROMAP when initializing context
Date: Wed, 20 May 2015 17:02:15 +0300 [thread overview]
Message-ID: <20150520140215.GD13974@boom> (raw)
In-Reply-To: <20150520135419.GA13974@boom>
Set the I915_CONTEXT_PARAM_NO_ZEROMAP context parameter to disable
zero mappings if libdrm is new enough to expose such functionality.
Signed-off-by: David Weinehall <david.weinehall@intel.com>
---
CMakeLists.txt | 6 ++++++
src/CMakeLists.txt | 5 +++++
src/intel/intel_driver.c | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5474447dbcf1..6c57a5346d65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,6 +146,12 @@ IF(DRM_INTEL_FOUND)
MESSAGE(STATUS "Disable EU total query support")
MESSAGE(STATUS "Disable subslice total query support")
ENDIF(DRM_INTEL_VERSION VERSION_GREATER 2.4.59)
+ IF(DRM_INTEL_VERSION VERSION_GREATER 2.4.61)
+ MESSAGE(STATUS "Enable no-zeromap support"
+ SET(DRM_INTEL_NOZEROMAP "enable")
+ ELSE(DRM_INTEL_VERSION VERSION_GREATER 2.4.61)
+ MESSAGE(STATUS "Disable no-zeromap support")
+ ENDIF(DRM_intEL_VERSION VERSION_GREATER 2.4.61)
ELSE(DRM_INTEL_FOUND)
MESSAGE(FATAL_ERROR "Looking for DRM Intel (>= 2.4.52) - not found")
ENDIF(DRM_INTEL_FOUND)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index da695324829b..83c838ca20f6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -119,6 +119,11 @@ SET(CMAKE_CXX_FLAGS "-DHAS_USERPTR ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "-DHAS_USERPTR ${CMAKE_C_FLAGS}")
endif (DRM_INTEL_USERPTR)
+if (DRM_INTEL_NOZEROMAP)
+SET(CMAKE_CXX_FLAGS "-DHAS_NOZEROMAP ${CMAKE_CXX_FLAGS}")
+SET(CMAKE_C_FLAGS "-DHAS_NOZEROMAP ${CMAKE_C_FLAGS}")
+endif (DRM_INTEL_NOZEROMAP)
+
if (DRM_INTEL_EU_TOTAL)
SET(CMAKE_CXX_FLAGS "-DHAS_EU_TOTAL ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "-DHAS_EU_TOTAL ${CMAKE_C_FLAGS}")
diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
index 755ab6b9b4fd..a33c2605fcc8 100644
--- a/src/intel/intel_driver.c
+++ b/src/intel/intel_driver.c
@@ -140,6 +140,10 @@ intel_driver_context_init(intel_driver_t *driver)
{
driver->ctx = drm_intel_gem_context_create(driver->bufmgr);
assert(driver->ctx);
+#ifdef HAS_ZEROMAP
+ drm_intel_gem_context_set_param(driver->ctx,
+ I915_CONTEXT_PARAM_NO_ZEROMAP, 1);
+#endif /* HAS_ZEROMAP */
}
static void
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-05-20 14:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 13:54 [PATCH 00/03] Preventing zero GPU virtual address allocation David Weinehall
2015-05-20 14:00 ` [PATCH 01/03] drm/i915: add a context parameter to {en, dis}able zero address mapping David Weinehall
2015-05-28 14:39 ` Chris Wilson
2015-05-28 15:52 ` Daniel Vetter
2015-05-28 16:56 ` Chris Wilson
2015-05-29 8:18 ` David Weinehall
2015-05-20 14:01 ` [PATCH 02/03] libdrm: export context_{get, set}param and I915_CONTEXT_PARAM_NO_ZEROMAP David Weinehall
2015-05-20 14:02 ` David Weinehall [this message]
2015-05-20 14:09 ` [PATCH 00/03] Preventing zero GPU virtual address allocation Chris Wilson
2015-05-20 14:14 ` Chris Wilson
2015-05-20 16:00 ` Daniel Vetter
2015-05-20 16:10 ` Chris Wilson
2015-05-21 8:08 ` David Weinehall
2015-05-21 8:43 ` Chris Wilson
2015-05-21 9:38 ` David Weinehall
2015-05-21 9:59 ` Chris Wilson
2015-05-21 9:44 ` Daniel Vetter
2015-05-21 9:50 ` Chris Wilson
2015-05-27 9:17 ` David Weinehall
2015-06-05 14:13 ` Dave Gordon
2015-05-21 7:59 ` David Weinehall
2015-05-27 7:54 ` Zou, Nanhai
2015-05-27 11:29 ` Daniel Vetter
2015-05-21 9:44 ` [PATCH i-g-t 4/3] tests/gem_ctx_param_basic: Expand ctx_param tests David Weinehall
2015-05-27 11:32 ` Daniel Vetter
2015-05-28 12:20 ` David Weinehall
2015-05-28 14:53 ` David Weinehall
2015-05-29 7:52 ` Daniel Vetter
2015-08-06 21:30 ` Daniel Vetter
2015-08-06 21:30 ` Daniel Vetter
2015-08-06 21:33 ` Jesse Barnes
2015-08-10 14:15 ` David Weinehall
2015-08-13 23:12 ` Jesse Barnes
2015-08-10 14:17 ` David Weinehall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150520140215.GD13974@boom \
--to=david.weinehall@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox