-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new Kernel recipe, as per instructions from MSDK. Also, compil…
…ing the libdrm and libva provided directly from intel. TAR balls are commited in repo, I need to make them hosted somewhere else (eventaully).
- Loading branch information
1 parent
fa746d9
commit 72c6cce
Showing
160 changed files
with
32,464 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PREFERRED_PROVIDER_virtual/kernel = "linux-intel-media-stack" | ||
MACHINE_HWCODECS_remove += "va-intel" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
SUMMARY = "Userspace interface to the kernel DRM services" | ||
DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ | ||
stands for \"Direct Rendering Manager\", which is the kernel portion of the \ | ||
\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ | ||
accelerated OpenGL drivers." | ||
HOMEPAGE = "http://dri.freedesktop.org" | ||
SECTION = "x11/base" | ||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" | ||
PROVIDES = "drm" | ||
DEPENDS = "libpthread-stubs libpciaccess" | ||
|
||
SRC_URI = "file://${BP}.tar.bz2" | ||
|
||
SRC_URI[md5sum] = "57b0589122ec4b8d5dfb9e430a21f0b3" | ||
SRC_URI[sha256sum] = "2d5a500eef412cc287d12268eed79d571e262d4957a2ec9258073f305985054f" | ||
|
||
inherit autotools pkgconfig manpages | ||
|
||
EXTRA_OECONF += "--disable-cairo-tests \ | ||
--without-cunit \ | ||
--enable-omap-experimental-api \ | ||
--enable-install-test-programs \ | ||
--disable-valgrind \ | ||
" | ||
PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" | ||
|
||
ALLOW_EMPTY_${PN}-drivers = "1" | ||
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ | ||
${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \ | ||
${PN}-etnaviv" | ||
|
||
RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ | ||
${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ | ||
${PN}-etnaviv" | ||
|
||
FILES_${PN}-tests = "${bindir}/*" | ||
FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*" | ||
FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" | ||
FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*" | ||
FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" | ||
FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" | ||
FILES_${PN}-kms = "${libdir}/libkms*.so.*" | ||
FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" | ||
FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*" | ||
FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...x/linux-intel-media-stack/0001-drm-i915-Allow-the-user-to-pass-a-context-to-any-rin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From a62f8e9e87d9efe7f1285fdbf0614e24d5131bd9 Mon Sep 17 00:00:00 2001 | ||
From: Chris Wilson <chris@chris-wilson.co.uk> | ||
Date: Mon, 11 Jan 2016 11:01:03 +0000 | ||
Subject: [PATCH 001/153] drm/i915: Allow the user to pass a context to any ring | ||
|
||
With full-ppgtt, we want the user to have full control over their memory | ||
layout, with a separate instance per context. Forcing them to use a | ||
shared memory layout for !RCS not only duplicates the amount of work we | ||
have to do, but also defeats the memory segregation on offer. | ||
|
||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> | ||
--- | ||
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +---- | ||
1 files changed, 1 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | ||
index 6ed7d63..ac1d220 100644 | ||
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c | ||
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | ||
@@ -1017,12 +1017,9 @@ static struct intel_context * | ||
i915_gem_validate_context(struct drm_device *dev, struct drm_file *file, | ||
struct intel_engine_cs *ring, const u32 ctx_id) | ||
{ | ||
- struct intel_context *ctx = NULL; | ||
+ struct intel_context *ctx; | ||
struct i915_ctx_hang_stats *hs; | ||
|
||
- if (ring->id != RCS && ctx_id != DEFAULT_CONTEXT_HANDLE) | ||
- return ERR_PTR(-EINVAL); | ||
- | ||
ctx = i915_gem_context_get(file->driver_priv, ctx_id); | ||
if (IS_ERR(ctx)) | ||
return ctx; | ||
-- | ||
1.7.1 | ||
|
67 changes: 67 additions & 0 deletions
67
...kernel/linux/linux-intel-media-stack/0002-drm-i915-Only-grab-timestamps-when-needed.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
From a97288a235456efd14deacead1c67bdb247f5ceb Mon Sep 17 00:00:00 2001 | ||
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> | ||
Date: Fri, 15 Jan 2016 15:11:12 +0000 | ||
Subject: [PATCH 002/153] drm/i915: Only grab timestamps when needed | ||
|
||
No need to call ktime_get_raw_ns twice per unlimited wait and can | ||
also elimate a local variable. | ||
|
||
v2: Added comment about silencing the compiler warning. (Daniel Vetter) | ||
|
||
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> | ||
Reviewed-by: Dave Gordon <david.s.gordon@intel.com> | ||
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> | ||
Link: http://patchwork.freedesktop.org/patch/msgid/1452870672-13901-1-git-send-email-tvrtko.ursulin@linux.intel.com | ||
--- | ||
drivers/gpu/drm/i915/i915_gem.c | 12 +++++++----- | ||
1 files changed, 7 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c | ||
index f56af0a..726fd51 100644 | ||
--- a/drivers/gpu/drm/i915/i915_gem.c | ||
+++ b/drivers/gpu/drm/i915/i915_gem.c | ||
@@ -1251,7 +1251,7 @@ int __i915_wait_request(struct drm_i915_gem_request *req, | ||
int state = interruptible ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE; | ||
DEFINE_WAIT(wait); | ||
unsigned long timeout_expire; | ||
- s64 before, now; | ||
+ s64 before = 0; /* Only to silence a compiler warning. */ | ||
int ret; | ||
|
||
WARN(!intel_irqs_enabled(dev_priv), "IRQs disabled"); | ||
@@ -1271,14 +1271,17 @@ int __i915_wait_request(struct drm_i915_gem_request *req, | ||
return -ETIME; | ||
|
||
timeout_expire = jiffies + nsecs_to_jiffies_timeout(*timeout); | ||
+ | ||
+ /* | ||
+ * Record current time in case interrupted by signal, or wedged. | ||
+ */ | ||
+ before = ktime_get_raw_ns(); | ||
} | ||
|
||
if (INTEL_INFO(dev_priv)->gen >= 6) | ||
gen6_rps_boost(dev_priv, rps, req->emitted_jiffies); | ||
|
||
- /* Record current time in case interrupted by signal, or wedged */ | ||
trace_i915_gem_request_wait_begin(req); | ||
- before = ktime_get_raw_ns(); | ||
|
||
/* Optimistic spin for the next jiffie before touching IRQs */ | ||
ret = __i915_spin_request(req, state); | ||
@@ -1343,11 +1346,10 @@ int __i915_wait_request(struct drm_i915_gem_request *req, | ||
finish_wait(&ring->irq_queue, &wait); | ||
|
||
out: | ||
- now = ktime_get_raw_ns(); | ||
trace_i915_gem_request_wait_end(req); | ||
|
||
if (timeout) { | ||
- s64 tres = *timeout - (now - before); | ||
+ s64 tres = *timeout - (ktime_get_raw_ns() - before); | ||
|
||
*timeout = tres < 0 ? 0 : tres; | ||
|
||
-- | ||
1.7.1 | ||
|
139 changes: 139 additions & 0 deletions
139
...x/linux-intel-media-stack/0003-drm-i915-Recover-all-available-ringbuffer-space-foll.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
From 4d5c1718fcad2ef72bfdb2b9b4606a8d54a2ecf3 Mon Sep 17 00:00:00 2001 | ||
From: Chris Wilson <chris@chris-wilson.co.uk> | ||
Date: Thu, 3 Sep 2015 13:01:40 +0100 | ||
Subject: [PATCH 003/153] drm/i915: Recover all available ringbuffer space following reset | ||
|
||
Having flushed all requests from all queues, we know that all | ||
ringbuffers must now be empty. However, since we do not reclaim | ||
all space when retiring the request (to prevent HEADs colliding | ||
with rapid ringbuffer wraparound) the amount of available space | ||
on each ringbuffer upon reset is less than when we start. Do one | ||
more pass over all the ringbuffers to reset the available space | ||
|
||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> | ||
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> | ||
Cc: Arun Siluvery <arun.siluvery@linux.intel.com> | ||
Cc: Mika Kuoppala <mika.kuoppala@intel.com> | ||
Cc: Dave Gordon <david.s.gordon@intel.com> | ||
--- | ||
drivers/gpu/drm/i915/i915_gem.c | 14 ++++++++++++++ | ||
drivers/gpu/drm/i915/intel_lrc.c | 1 + | ||
drivers/gpu/drm/i915/intel_ringbuffer.c | 13 ++++++++++--- | ||
drivers/gpu/drm/i915/intel_ringbuffer.h | 2 ++ | ||
4 files changed, 27 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c | ||
index 726fd51..42d9b08 100644 | ||
--- a/drivers/gpu/drm/i915/i915_gem.c | ||
+++ b/drivers/gpu/drm/i915/i915_gem.c | ||
@@ -2799,6 +2799,8 @@ static void i915_gem_reset_ring_status(struct drm_i915_private *dev_priv, | ||
static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv, | ||
struct intel_engine_cs *ring) | ||
{ | ||
+ struct intel_ringbuffer *buffer; | ||
+ | ||
while (!list_empty(&ring->active_list)) { | ||
struct drm_i915_gem_object *obj; | ||
|
||
@@ -2844,6 +2846,18 @@ static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv, | ||
|
||
i915_gem_request_retire(request); | ||
} | ||
+ | ||
+ /* Having flushed all requests from all queues, we know that all | ||
+ * ringbuffers must now be empty. However, since we do not reclaim | ||
+ * all space when retiring the request (to prevent HEADs colliding | ||
+ * with rapid ringbuffer wraparound) the amount of available space | ||
+ * upon reset is less than when we start. Do one more pass over | ||
+ * all the ringbuffers to reset last_retired_head. | ||
+ */ | ||
+ list_for_each_entry(buffer, &ring->buffers, link) { | ||
+ buffer->last_retired_head = buffer->tail; | ||
+ intel_ring_update_space(buffer); | ||
+ } | ||
} | ||
|
||
void i915_gem_reset(struct drm_device *dev) | ||
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c | ||
index 88e12bd..4701d35 100644 | ||
--- a/drivers/gpu/drm/i915/intel_lrc.c | ||
+++ b/drivers/gpu/drm/i915/intel_lrc.c | ||
@@ -1923,6 +1923,7 @@ static int logical_ring_init(struct drm_device *dev, struct intel_engine_cs *rin | ||
i915_gem_batch_pool_init(dev, &ring->batch_pool); | ||
init_waitqueue_head(&ring->irq_queue); | ||
|
||
+ INIT_LIST_HEAD(&ring->buffers); | ||
INIT_LIST_HEAD(&ring->execlist_queue); | ||
INIT_LIST_HEAD(&ring->execlist_retired_req_list); | ||
spin_lock_init(&ring->execlist_lock); | ||
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c | ||
index 9461a23..c505ebc 100644 | ||
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c | ||
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | ||
@@ -2070,10 +2070,14 @@ intel_engine_create_ringbuffer(struct intel_engine_cs *engine, int size) | ||
int ret; | ||
|
||
ring = kzalloc(sizeof(*ring), GFP_KERNEL); | ||
- if (ring == NULL) | ||
+ if (ring == NULL) { | ||
+ DRM_DEBUG_DRIVER("Failed to allocate ringbuffer %s\n", | ||
+ engine->name); | ||
return ERR_PTR(-ENOMEM); | ||
+ } | ||
|
||
ring->ring = engine; | ||
+ list_add(&ring->link, &engine->buffers); | ||
|
||
ring->size = size; | ||
/* Workaround an erratum on the i830 which causes a hang if | ||
@@ -2089,8 +2093,9 @@ intel_engine_create_ringbuffer(struct intel_engine_cs *engine, int size) | ||
|
||
ret = intel_alloc_ringbuffer_obj(engine->dev, ring); | ||
if (ret) { | ||
- DRM_ERROR("Failed to allocate ringbuffer %s: %d\n", | ||
- engine->name, ret); | ||
+ DRM_DEBUG_DRIVER("Failed to allocate ringbuffer %s: %d\n", | ||
+ engine->name, ret); | ||
+ list_del(&ring->link); | ||
kfree(ring); | ||
return ERR_PTR(ret); | ||
} | ||
@@ -2102,6 +2107,7 @@ void | ||
intel_ringbuffer_free(struct intel_ringbuffer *ring) | ||
{ | ||
intel_destroy_ringbuffer_obj(ring); | ||
+ list_del(&ring->link); | ||
kfree(ring); | ||
} | ||
|
||
@@ -2117,6 +2123,7 @@ static int intel_init_ring_buffer(struct drm_device *dev, | ||
INIT_LIST_HEAD(&ring->active_list); | ||
INIT_LIST_HEAD(&ring->request_list); | ||
INIT_LIST_HEAD(&ring->execlist_queue); | ||
+ INIT_LIST_HEAD(&ring->buffers); | ||
i915_gem_batch_pool_init(dev, &ring->batch_pool); | ||
memset(ring->semaphore.sync_seqno, 0, sizeof(ring->semaphore.sync_seqno)); | ||
|
||
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h | ||
index 49fa41d..58b1976 100644 | ||
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h | ||
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h | ||
@@ -100,6 +100,7 @@ struct intel_ringbuffer { | ||
void __iomem *virtual_start; | ||
|
||
struct intel_engine_cs *ring; | ||
+ struct list_head link; | ||
|
||
u32 head; | ||
u32 tail; | ||
@@ -157,6 +158,7 @@ struct intel_engine_cs { | ||
u32 mmio_base; | ||
struct drm_device *dev; | ||
struct intel_ringbuffer *buffer; | ||
+ struct list_head buffers; | ||
|
||
/* | ||
* A pool of objects to use as shadow copies of client batch buffers | ||
-- | ||
1.7.1 | ||
|
52 changes: 52 additions & 0 deletions
52
...ernel/linux/linux-intel-media-stack/0004-drm-i915-remove-parens-around-revision-ids.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From ebcb6eeae780fc7c4b89b6ae9e0dcb9d55b5560c Mon Sep 17 00:00:00 2001 | ||
From: Jani Nikula <jani.nikula@intel.com> | ||
Date: Tue, 20 Oct 2015 15:22:00 +0300 | ||
Subject: [PATCH 004/153] drm/i915: remove parens around revision ids | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
Totally unnecessary. | ||
|
||
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> | ||
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> | ||
Link: http://patchwork.freedesktop.org/patch/msgid/1445343722-3312-1-git-send-email-jani.nikula@intel.com | ||
Signed-off-by: Jani Nikula <jani.nikula@intel.com> | ||
--- | ||
drivers/gpu/drm/i915/i915_drv.h | 20 ++++++++++---------- | ||
1 files changed, 10 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h | ||
index f4af19a..3914469 100644 | ||
--- a/drivers/gpu/drm/i915/i915_drv.h | ||
+++ b/drivers/gpu/drm/i915/i915_drv.h | ||
@@ -2506,16 +2506,16 @@ struct drm_i915_cmd_table { | ||
|
||
#define IS_PRELIMINARY_HW(intel_info) ((intel_info)->is_preliminary) | ||
|
||
-#define SKL_REVID_A0 (0x0) | ||
-#define SKL_REVID_B0 (0x1) | ||
-#define SKL_REVID_C0 (0x2) | ||
-#define SKL_REVID_D0 (0x3) | ||
-#define SKL_REVID_E0 (0x4) | ||
-#define SKL_REVID_F0 (0x5) | ||
- | ||
-#define BXT_REVID_A0 (0x0) | ||
-#define BXT_REVID_B0 (0x3) | ||
-#define BXT_REVID_C0 (0x9) | ||
+#define SKL_REVID_A0 0x0 | ||
+#define SKL_REVID_B0 0x1 | ||
+#define SKL_REVID_C0 0x2 | ||
+#define SKL_REVID_D0 0x3 | ||
+#define SKL_REVID_E0 0x4 | ||
+#define SKL_REVID_F0 0x5 | ||
+ | ||
+#define BXT_REVID_A0 0x0 | ||
+#define BXT_REVID_B0 0x3 | ||
+#define BXT_REVID_C0 0x9 | ||
|
||
/* | ||
* The genX designation typically refers to the render engine, so render | ||
-- | ||
1.7.1 | ||
|
Oops, something went wrong.