[Intel-gfx] [PATCH 2/2] drm/i915/gt: Always try to reserve GGTT address 0x0
Since writing to address 0 is a very common mistake, let's try to avoid putting anything sensitive there. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2989 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 40 +++- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c index dac07d66f658..3a737d4fbc3c 100644 --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c @@ -535,16 +535,32 @@ static int init_ggtt(struct i915_ggtt *ggtt) mutex_init(&ggtt->error_mutex); if (ggtt->mappable_end) { - /* Reserve a mappable slot for our lockless error capture */ - ret = drm_mm_insert_node_in_range(&ggtt->vm.mm, - &ggtt->error_capture, - PAGE_SIZE, 0, - I915_COLOR_UNEVICTABLE, - 0, ggtt->mappable_end, - DRM_MM_INSERT_LOW); - if (ret) - return ret; + /* +* Reserve a mappable slot for our lockless error capture. +* +* We strongly prefer taking address 0x0 in order to protect +* other critical buffers against accidental overwrites, +* as writing to address 0 is a very common mistake. +* +* Since 0 may already be in use by the system (e.g. the BIOS +* framebuffer), we let the reservation fail quietly and hope +* 0 remains reserved always. +*/ + ggtt->error_capture.size = I915_GTT_PAGE_SIZE; + ggtt->error_capture.color = I915_COLOR_UNEVICTABLE; + if (drm_mm_reserve_node(&ggtt->vm.mm, &ggtt->error_capture)) + drm_mm_insert_node_in_range(&ggtt->vm.mm, + &ggtt->error_capture, + ggtt->error_capture.size, 0, + ggtt->error_capture.color, + 0, ggtt->mappable_end, + DRM_MM_INSERT_LOW); } + if (drm_mm_node_allocated(&ggtt->error_capture)) + drm_dbg(&ggtt->vm.i915->drm, + "Reserved GGTT:[%llx, %llx] for use by error capture\n", + ggtt->error_capture.start, + ggtt->error_capture.start + ggtt->error_capture.size); /* * The upper portion of the GuC address space has a sizeable hole @@ -557,9 +573,9 @@ static int init_ggtt(struct i915_ggtt *ggtt) /* Clear any non-preallocated blocks */ drm_mm_for_each_hole(entry, &ggtt->vm.mm, hole_start, hole_end) { - drm_dbg_kms(&ggtt->vm.i915->drm, - "clearing unused GTT space: [%lx, %lx]\n", - hole_start, hole_end); + drm_dbg(&ggtt->vm.i915->drm, + "clearing unused GTT space: [%lx, %lx]\n", + hole_start, hole_end); ggtt->vm.clear_range(&ggtt->vm, hole_start, hole_end - hole_start); } -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/2] drm/i915: Remove guard page insertion around unevictable nodes
Assume that unevictable nodes are not in the GTT and so we can ignore page boundary concerns, and so allow regular nodes to abutt against irregular unevictable nodes. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_evict.c | 6 -- drivers/gpu/drm/i915/i915_vma.h | 9 - drivers/gpu/drm/i915/i915_vma_types.h | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 99cf861df92d..69c5a185ecff 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -357,8 +357,6 @@ enum i915_cache_level { I915_CACHE_WT, /* hsw:gt3e WriteThrough for scanouts */ }; -#define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */ - struct intel_fbc { /* This is always the inner lock when overlapping with struct_mutex and * it's the outer lock when overlapping with stolen_lock. */ diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 4d2d59a9942b..aef88fdb9f66 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -313,11 +313,13 @@ int i915_gem_evict_for_node(struct i915_address_space *vm, */ if (i915_vm_has_cache_coloring(vm)) { if (node->start + node->size == target->start) { - if (node->color == target->color) + if (i915_node_color_matches(node, + target->color)) continue; } if (node->start == target->start + target->size) { - if (node->color == target->color) + if (i915_node_color_matches(node, + target->color)) continue; } } diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h index a64adc8c883b..609e8be142e6 100644 --- a/drivers/gpu/drm/i915/i915_vma.h +++ b/drivers/gpu/drm/i915/i915_vma.h @@ -283,10 +283,17 @@ static inline bool i915_vma_is_bound(const struct i915_vma *vma, return atomic_read(&vma->flags) & where; } +static inline bool i915_node_color_matches(const struct drm_mm_node *node, + unsigned long color) +{ + return color == I915_COLOR_UNEVICTABLE || node->color == color; +} + static inline bool i915_node_color_differs(const struct drm_mm_node *node, unsigned long color) { - return drm_mm_node_allocated(node) && node->color != color; + return drm_mm_node_allocated(node) && + !i915_node_color_matches(node, color); } /** diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h index f5cb848b7a7e..e72a07692a64 100644 --- a/drivers/gpu/drm/i915/i915_vma_types.h +++ b/drivers/gpu/drm/i915/i915_vma_types.h @@ -95,6 +95,8 @@ enum i915_cache_level; * */ +#define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */ + struct intel_remapped_plane_info { /* in gtt pages */ unsigned int width, height, stride, offset; -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Remove guard page insertion around unevictable nodes
Assume that unevictable nodes are not in the GTT and so we can ignore page boundary concerns, and so allow regular nodes to abutt against irregular unevictable nodes. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_evict.c | 6 -- drivers/gpu/drm/i915/i915_vma.h | 10 +- drivers/gpu/drm/i915/i915_vma_types.h | 2 ++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 99cf861df92d..69c5a185ecff 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -357,8 +357,6 @@ enum i915_cache_level { I915_CACHE_WT, /* hsw:gt3e WriteThrough for scanouts */ }; -#define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */ - struct intel_fbc { /* This is always the inner lock when overlapping with struct_mutex and * it's the outer lock when overlapping with stolen_lock. */ diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 4d2d59a9942b..aef88fdb9f66 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -313,11 +313,13 @@ int i915_gem_evict_for_node(struct i915_address_space *vm, */ if (i915_vm_has_cache_coloring(vm)) { if (node->start + node->size == target->start) { - if (node->color == target->color) + if (i915_node_color_matches(node, + target->color)) continue; } if (node->start == target->start + target->size) { - if (node->color == target->color) + if (i915_node_color_matches(node, + target->color)) continue; } } diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h index a64adc8c883b..dac953815118 100644 --- a/drivers/gpu/drm/i915/i915_vma.h +++ b/drivers/gpu/drm/i915/i915_vma.h @@ -283,10 +283,18 @@ static inline bool i915_vma_is_bound(const struct i915_vma *vma, return atomic_read(&vma->flags) & where; } +static inline bool i915_node_color_matches(const struct drm_mm_node *node, + unsigned long color) +{ + return (node->color | color) == I915_COLOR_UNEVICTABLE || + node->color == color; +} + static inline bool i915_node_color_differs(const struct drm_mm_node *node, unsigned long color) { - return drm_mm_node_allocated(node) && node->color != color; + return drm_mm_node_allocated(node) && + !i915_node_color_matches(node, color); } /** diff --git a/drivers/gpu/drm/i915/i915_vma_types.h b/drivers/gpu/drm/i915/i915_vma_types.h index f5cb848b7a7e..e72a07692a64 100644 --- a/drivers/gpu/drm/i915/i915_vma_types.h +++ b/drivers/gpu/drm/i915/i915_vma_types.h @@ -95,6 +95,8 @@ enum i915_cache_level; * */ +#define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */ + struct intel_remapped_plane_info { /* in gtt pages */ unsigned int width, height, stride, offset; -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2)
== Series Details == Series: series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2) URL : https://patchwork.freedesktop.org/series/86220/ State : warning == Summary == $ dim checkpatch origin/drm-tip d8da1202f742 drm/i915: Remove guard page insertion around unevictable nodes -:58: ERROR:CODE_INDENT: code indent should use tabs where possible #58: FILE: drivers/gpu/drm/i915/i915_vma.h:290: +^I ^Inode->color == color;$ -:58: WARNING:SPACE_BEFORE_TAB: please, no space before tabs #58: FILE: drivers/gpu/drm/i915/i915_vma.h:290: +^I ^Inode->color == color;$ total: 1 errors, 1 warnings, 0 checks, 50 lines checked ef937ce200af drm/i915/gt: Always try to reserve GGTT address 0x0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2)
== Series Details == Series: series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2) URL : https://patchwork.freedesktop.org/series/86220/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_reset.c:1327:5: warning: context imbalance in 'intel_gt_reset_trylock' - different lock contexts for basic block +drivers/gpu/drm/i915/gvt/mmio.c:295:23: warning: memcpy with byte count of 279040 +drivers/gpu/drm/i915/i915_perf.c:1450:15: warning: memset with byte count of 16777216 +drivers/gpu/drm/i915/i915_perf.c:1504:15: warning: memset with byte count of 16777216 +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_write16' - different lock contexts f
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2)
== Series Details == Series: series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2) URL : https://patchwork.freedesktop.org/series/86220/ State : success == Summary == CI Bug Log - changes from CI_DRM_9675 -> Patchwork_19474 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/index.html Known issues Here are the changes found in Patchwork_19474 that come from known issues: ### IGT changes ### Issues hit * igt@debugfs_test@read_all_entries: - fi-tgl-y: [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/fi-tgl-y/igt@debugfs_test@read_all_entries.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/fi-tgl-y/igt@debugfs_test@read_all_entries.html * igt@i915_selftest@live@blt: - fi-snb-2600:[PASS][3] -> [DMESG-FAIL][4] ([i915#1409]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/fi-snb-2600/igt@i915_selftest@l...@blt.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/fi-snb-2600/igt@i915_selftest@l...@blt.html Possible fixes * igt@gem_close_race@basic-threads: - fi-tgl-y: [DMESG-WARN][5] ([i915#402]) -> [PASS][6] +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/fi-tgl-y/igt@gem_close_r...@basic-threads.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/fi-tgl-y/igt@gem_close_r...@basic-threads.html [i915#1409]: https://gitlab.freedesktop.org/drm/intel/issues/1409 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 Participating hosts (41 -> 37) -- Missing(4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u Build changes - * Linux: CI_DRM_9675 -> Patchwork_19474 CI-20190529: 20190529 CI_DRM_9675: f84d1efce492ef0f46cf4fa1bf01b17ce1627fe4 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5968: 267fa33c0947fbbb642098098ff6e5902f9a3d94 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_19474: ef937ce200af05b71504476de427b0b4f054f4b9 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == ef937ce200af drm/i915/gt: Always try to reserve GGTT address 0x0 d8da1202f742 drm/i915: Remove guard page insertion around unevictable nodes == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI 3/8] drm/i915: Update client name on context create
From: Tvrtko Ursulin Some clients have the DRM fd passed to them over a socket by the X server. Grab the real client and pid when they create their first context and update the exposed data for more useful enumeration. To enable lockless access to client name and pid data from the following patches, we also make these fields rcu protected. In this way asynchronous code paths where both contexts which remain after the client exit, and access to client name and pid as they are getting updated due context creation running in parallel with name/pid queries. v2: * Do not leak the pid reference and borrow context idr_lock. (Chris) v3: * More avoiding leaks. (Chris) v4: * Move update completely to drm client. (Chris) * Do not lose previous client data on failure to re-register and simplify update to only touch what it needs. v5: * Reuse ext_data local. (Chris) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-3-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 ++ drivers/gpu/drm/i915/i915_drm_client.c | 93 + drivers/gpu/drm/i915/i915_drm_client.h | 34 +++- 3 files changed, 115 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index 61a7360c4d9a..c35f2ff4431c 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -76,6 +76,7 @@ #include "gt/intel_gpu_commands.h" #include "gt/intel_ring.h" +#include "i915_drm_client.h" #include "i915_gem_context.h" #include "i915_globals.h" #include "i915_trace.h" @@ -2315,6 +2316,10 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, void *data, return -EIO; } + ret = i915_drm_client_update(ext_data.fpriv->client, current); + if (ret) + return ret; + ext_data.ctx = i915_gem_create_context(i915, args->flags); if (IS_ERR(ext_data.ctx)) return PTR_ERR(ext_data.ctx); diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c index 7c2d36860ac1..ad3d36c9dee2 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.c +++ b/drivers/gpu/drm/i915/i915_drm_client.c @@ -7,7 +7,10 @@ #include #include +#include + #include "i915_drm_client.h" +#include "i915_drv.h" #include "i915_gem.h" #include "i915_utils.h" @@ -25,10 +28,15 @@ show_client_name(struct device *kdev, struct device_attribute *attr, char *buf) { struct i915_drm_client *client = container_of(attr, typeof(*client), attr.name); + int ret; - return sysfs_emit(buf, - READ_ONCE(client->closed) ? "<%s>\n" : "%s\n", - client->name); + rcu_read_lock(); + ret = sysfs_emit(buf, +READ_ONCE(client->closed) ? "<%s>\n" : "%s\n", +i915_drm_client_name(client)); + rcu_read_unlock(); + + return ret; } static ssize_t @@ -36,10 +44,15 @@ show_client_pid(struct device *kdev, struct device_attribute *attr, char *buf) { struct i915_drm_client *client = container_of(attr, typeof(*client), attr.pid); + int ret; - return sysfs_emit(buf, - READ_ONCE(client->closed) ? "<%u>\n" : "%u\n", - pid_nr(client->pid)); + rcu_read_lock(); + ret = sysfs_emit(buf, +READ_ONCE(client->closed) ? "<%u>\n" : "%u\n", +pid_nr(i915_drm_client_pid(client))); + rcu_read_unlock(); + + return ret; } static int __client_register_sysfs(struct i915_drm_client *client) @@ -91,20 +104,46 @@ static void __client_unregister_sysfs(struct i915_drm_client *client) kobject_put(fetch_and_zero(&client->root)); } +static struct i915_drm_client_name *get_name(struct i915_drm_client *client, +struct task_struct *task) +{ + struct i915_drm_client_name *name; + int len = strlen(task->comm); + + name = kmalloc(struct_size(name, name, len + 1), GFP_KERNEL); + if (!name) + return NULL; + + init_rcu_head(&name->rcu); + name->client = client; + name->pid = get_task_pid(task, PIDTYPE_PID); + memcpy(name->name, task->comm, len + 1); + + return name; +} + +static void free_name(struct rcu_head *rcu) +{ + struct i915_drm_client_name *name = + container_of(rcu, typeof(*name), rcu); + + put_pid(name->pid); + kfree(name); +} + static int __i915_drm_client_register(struct i915_drm_client *client, struct task_struct *task) { struct i915_drm_clients *clients = client->clients; - char *name; +
[Intel-gfx] [CI 1/8] drm/i915/gt: Show the per-engine runtime in sysfs
Since we already report the per-engine runtime via PMU (using sampling if a direct measure is not available), and in debugfs, also trivially include the information for each engine under sysfs as a read-only property. We only present the total milliseconds to hide any misleading accuracy and to purposely reduce the precision of the global unprivileged information. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-1-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gt/sysfs_engines.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/sysfs_engines.c b/drivers/gpu/drm/i915/gt/sysfs_engines.c index 967031056202..57ef5383dd4e 100644 --- a/drivers/gpu/drm/i915/gt/sysfs_engines.c +++ b/drivers/gpu/drm/i915/gt/sysfs_engines.c @@ -411,6 +411,19 @@ heartbeat_default(struct kobject *kobj, struct kobj_attribute *attr, char *buf) static struct kobj_attribute heartbeat_interval_def = __ATTR(heartbeat_interval_ms, 0444, heartbeat_default, NULL); +static ssize_t +runtime_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) +{ + struct intel_engine_cs *engine = kobj_to_engine(kobj); + ktime_t dummy; + + return sprintf(buf, "%llu\n", + ktime_to_ms(intel_engine_get_busy_time(engine, &dummy))); +} + +static struct kobj_attribute runtime_attr = +__ATTR(runtime_ms, 0444, runtime_show, NULL); + static void kobj_engine_release(struct kobject *kobj) { kfree(kobj); @@ -521,6 +534,10 @@ void intel_engines_add_sysfs(struct drm_i915_private *i915) sysfs_create_file(kobj, &preempt_timeout_attr.attr)) goto err_engine; + if (intel_engine_supports_stats(engine) && + sysfs_create_file(kobj, &runtime_attr.attr)) + goto err_engine; + add_defaults(container_of(kobj, struct kobj_engine, base)); if (0) { -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI 6/8] drm/i915: Track all user contexts per client
From: Tvrtko Ursulin We soon want to start answering questions like how much GPU time is the context belonging to a client which exited still using. To enable this we start tracking all context belonging to a client on a separate list. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-6-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 12 drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 3 +++ drivers/gpu/drm/i915/i915_drm_client.c| 3 +++ drivers/gpu/drm/i915/i915_drm_client.h| 5 + 4 files changed, 23 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index 0e3a513eedf6..ecacfae8412d 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -603,6 +603,7 @@ static void set_closed_name(struct i915_gem_context *ctx) static void context_close(struct i915_gem_context *ctx) { struct i915_address_space *vm; + struct i915_drm_client *client; /* Flush any concurrent set_engines() */ mutex_lock(&ctx->engines_mutex); @@ -631,6 +632,13 @@ static void context_close(struct i915_gem_context *ctx) list_del(&ctx->link); spin_unlock(&ctx->i915->gem.contexts.lock); + client = ctx->client; + if (client) { + spin_lock(&client->ctx_lock); + list_del_rcu(&ctx->client_link); + spin_unlock(&client->ctx_lock); + } + mutex_unlock(&ctx->mutex); /* @@ -936,6 +944,10 @@ static int gem_context_register(struct i915_gem_context *ctx, ctx->client = client; + spin_lock(&client->ctx_lock); + list_add_tail_rcu(&ctx->client_link, &client->ctx_list); + spin_unlock(&client->ctx_lock); + spin_lock(&i915->gem.contexts.lock); list_add_tail(&ctx->link, &i915->gem.contexts.list); spin_unlock(&i915->gem.contexts.lock); diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h index c47bb45d2110..085f6a3735e8 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h @@ -102,6 +102,9 @@ struct i915_gem_context { /** client: struct i915_drm_client */ struct i915_drm_client *client; + /** link: &drm_client.context_list */ + struct list_head client_link; + /** * @ref: reference count * diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c index ad3d36c9dee2..0ca81a750895 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.c +++ b/drivers/gpu/drm/i915/i915_drm_client.c @@ -196,6 +196,9 @@ i915_drm_client_add(struct i915_drm_clients *clients, struct task_struct *task) kref_init(&client->kref); mutex_init(&client->update_lock); + spin_lock_init(&client->ctx_lock); + INIT_LIST_HEAD(&client->ctx_list); + client->clients = clients; INIT_RCU_WORK(&client->rcu, __rcu_i915_drm_client_free); diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h index 6f25e754e978..13f92142e474 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.h +++ b/drivers/gpu/drm/i915/i915_drm_client.h @@ -9,10 +9,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include "gt/intel_engine_types.h" @@ -46,6 +48,9 @@ struct i915_drm_client { struct i915_drm_client_name __rcu *name; bool closed; + spinlock_t ctx_lock; /* For add/remove from ctx_list. */ + struct list_head ctx_list; /* List of contexts belonging to client. */ + struct i915_drm_clients *clients; struct kobject *root; -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI 4/8] drm/i915: Make GEM contexts track DRM clients
From: Tvrtko Ursulin If we make GEM contexts keep a reference to i915_drm_client for the whole of their lifetime, we can consolidate the current task pid and name usage by getting it from the client. v2: Don't bother supporting selftests contexts from debugfs. (Chris) v3 (Lucas): Finish constructing ctx before adding it to the list v4 (Ram): Rebase on upstream Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-4-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 20 +++- .../gpu/drm/i915/gem/i915_gem_context_types.h | 13 +++--- drivers/gpu/drm/i915/i915_gpu_error.c | 24 +++ 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index c35f2ff4431c..f0cc3edffebf 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -343,13 +343,14 @@ void i915_gem_context_release(struct kref *ref) trace_i915_context_free(ctx); GEM_BUG_ON(!i915_gem_context_is_closed(ctx)); - mutex_destroy(&ctx->engines_mutex); - mutex_destroy(&ctx->lut_mutex); + if (ctx->client) + i915_drm_client_put(ctx->client); if (ctx->timeline) intel_timeline_put(ctx->timeline); - put_pid(ctx->pid); + mutex_destroy(&ctx->engines_mutex); + mutex_destroy(&ctx->lut_mutex); mutex_destroy(&ctx->mutex); kfree_rcu(ctx, rcu); @@ -888,6 +889,7 @@ static int gem_context_register(struct i915_gem_context *ctx, u32 *id) { struct drm_i915_private *i915 = ctx->i915; + struct i915_drm_client *client; struct i915_address_space *vm; int ret; @@ -899,15 +901,21 @@ static int gem_context_register(struct i915_gem_context *ctx, WRITE_ONCE(vm->file, fpriv); /* XXX */ mutex_unlock(&ctx->mutex); - ctx->pid = get_task_pid(current, PIDTYPE_PID); + client = i915_drm_client_get(fpriv->client); + + rcu_read_lock(); snprintf(ctx->name, sizeof(ctx->name), "%s[%d]", -current->comm, pid_nr(ctx->pid)); +i915_drm_client_name(client), +pid_nr(i915_drm_client_pid(client))); + rcu_read_unlock(); /* And finally expose ourselves to userspace via the idr */ ret = xa_alloc(&fpriv->context_xa, id, ctx, xa_limit_32b, GFP_KERNEL); if (ret) goto err_pid; + ctx->client = client; + spin_lock(&i915->gem.contexts.lock); list_add_tail(&ctx->link, &i915->gem.contexts.list); spin_unlock(&i915->gem.contexts.lock); @@ -915,7 +923,7 @@ static int gem_context_register(struct i915_gem_context *ctx, return 0; err_pid: - put_pid(fetch_and_zero(&ctx->pid)); + i915_drm_client_put(client); return ret; } diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h index 1449f54924e0..c47bb45d2110 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h @@ -96,19 +96,12 @@ struct i915_gem_context { */ struct i915_address_space __rcu *vm; - /** -* @pid: process id of creator -* -* Note that who created the context may not be the principle user, -* as the context may be shared across a local socket. However, -* that should only affect the default context, all contexts created -* explicitly by the client are expected to be isolated. -*/ - struct pid *pid; - /** link: place with &drm_i915_private.context_list */ struct list_head link; + /** client: struct i915_drm_client */ + struct i915_drm_client *client; + /** * @ref: reference count * diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index f962693404b7..9b72a431b351 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1240,7 +1240,9 @@ static void record_request(const struct i915_request *request, ctx = rcu_dereference(request->context->gem_context); if (ctx) - erq->pid = pid_nr(ctx->pid); + erq->pid = I915_SELFTEST_ONLY(!ctx->client) ? + 0 : + pid_nr(i915_drm_client_pid(ctx->client)); } rcu_read_unlock(); } @@ -1261,23 +1263,25 @@ static bool record_context(struct i915_gem_context_coredump *e, const struct i915_request *rq) { struct i915_gem_context *ctx; - struct task_st
[Intel-gfx] [CI 5/8] drm/i915: Track runtime spent in closed and unreachable GEM contexts
From: Tvrtko Ursulin As contexts are abandoned we want to remember how much GPU time they used (per class) so later we can used it for smarter purposes. As GEM contexts are closed we want to have the DRM client remember how much GPU time they used (per class) so later we can used it for smarter purposes. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-5-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 24 +++-- drivers/gpu/drm/i915/i915_drm_client.h | 7 ++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index f0cc3edffebf..0e3a513eedf6 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -260,23 +260,43 @@ static void free_engines_rcu(struct rcu_head *rcu) free_engines(engines); } +static void accumulate_runtime(struct i915_drm_client *client, + struct i915_gem_engines *engines) +{ + struct i915_gem_engines_iter it; + struct intel_context *ce; + + if (!client) + return; + + /* Transfer accumulated runtime to the parent GEM context. */ + for_each_gem_engine(ce, engines, it) { + unsigned int class = ce->engine->uabi_class; + + GEM_BUG_ON(class >= ARRAY_SIZE(client->past_runtime)); + atomic64_add(intel_context_get_total_runtime_ns(ce), +&client->past_runtime[class]); + } +} + static int __i915_sw_fence_call engines_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state) { struct i915_gem_engines *engines = container_of(fence, typeof(*engines), fence); + struct i915_gem_context *ctx = engines->ctx; switch (state) { case FENCE_COMPLETE: if (!list_empty(&engines->link)) { - struct i915_gem_context *ctx = engines->ctx; unsigned long flags; spin_lock_irqsave(&ctx->stale.lock, flags); list_del(&engines->link); spin_unlock_irqrestore(&ctx->stale.lock, flags); } - i915_gem_context_put(engines->ctx); + accumulate_runtime(ctx->client, engines); + i915_gem_context_put(ctx); break; case FENCE_FREE: diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h index 556a59d6b834..6f25e754e978 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.h +++ b/drivers/gpu/drm/i915/i915_drm_client.h @@ -15,6 +15,8 @@ #include #include +#include "gt/intel_engine_types.h" + struct drm_i915_private; struct i915_drm_clients { @@ -51,6 +53,11 @@ struct i915_drm_client { struct device_attribute pid; struct device_attribute name; } attr; + + /** +* @past_runtime: Accumulation of pphwsp runtimes from closed contexts. +*/ + atomic64_t past_runtime[MAX_ENGINE_CLASS + 1]; }; void i915_drm_clients_init(struct i915_drm_clients *clients, -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI 7/8] drm/i915: Track context current active time
From: Tvrtko Ursulin Track context active (on hardware) status together with the start timestamp. This will be used to provide better granularity of context runtime reporting in conjunction with already tracked pphwsp accumulated runtime. The latter is only updated on context save so does not give us visibility to any currently executing work. As part of the patch the existing runtime tracking data is moved under the new ce->stats member and updated under the seqlock. This provides the ability to atomically read out accumulated plus active runtime. v2: * Rename and make __intel_context_get_active_time unlocked. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty # v1 Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-7-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/gt/intel_context.c | 27 ++- drivers/gpu/drm/i915/gt/intel_context.h | 17 +--- drivers/gpu/drm/i915/gt/intel_context_types.h | 24 +++-- .../drm/i915/gt/intel_execlists_submission.c | 23 .../gpu/drm/i915/gt/intel_gt_clock_utils.c| 4 +++ drivers/gpu/drm/i915/gt/intel_lrc.c | 27 ++- drivers/gpu/drm/i915/gt/intel_lrc.h | 24 + drivers/gpu/drm/i915/gt/selftest_lrc.c| 10 +++ drivers/gpu/drm/i915/i915_gpu_error.c | 9 +++ drivers/gpu/drm/i915/i915_gpu_error.h | 2 +- 10 files changed, 117 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c index 17cf2640b082..daf537d1e415 100644 --- a/drivers/gpu/drm/i915/gt/intel_context.c +++ b/drivers/gpu/drm/i915/gt/intel_context.c @@ -374,7 +374,7 @@ intel_context_init(struct intel_context *ce, struct intel_engine_cs *engine) ce->sseu = engine->sseu; ce->ring = __intel_context_ring_size(SZ_4K); - ewma_runtime_init(&ce->runtime.avg); + ewma_runtime_init(&ce->stats.runtime.avg); ce->vm = i915_vm_get(engine->gt->vm); @@ -500,6 +500,31 @@ struct i915_request *intel_context_create_request(struct intel_context *ce) return rq; } +u64 intel_context_get_total_runtime_ns(const struct intel_context *ce) +{ + u64 total, active; + + total = ce->stats.runtime.total; + if (ce->ops->flags & COPS_RUNTIME_CYCLES) + total *= ce->engine->gt->clock_period_ns; + + active = READ_ONCE(ce->stats.active); + if (active) + active = intel_context_clock() - active; + + return total + active; +} + +u64 intel_context_get_avg_runtime_ns(struct intel_context *ce) +{ + u64 avg = ewma_runtime_read(&ce->stats.runtime.avg); + + if (ce->ops->flags & COPS_RUNTIME_CYCLES) + avg *= ce->engine->gt->clock_period_ns; + + return avg; +} + #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) #include "selftest_context.c" #endif diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h index f83a73a2b39f..a9125768b1b4 100644 --- a/drivers/gpu/drm/i915/gt/intel_context.h +++ b/drivers/gpu/drm/i915/gt/intel_context.h @@ -250,18 +250,13 @@ intel_context_clear_nopreempt(struct intel_context *ce) clear_bit(CONTEXT_NOPREEMPT, &ce->flags); } -static inline u64 intel_context_get_total_runtime_ns(struct intel_context *ce) +u64 intel_context_get_total_runtime_ns(const struct intel_context *ce); +u64 intel_context_get_avg_runtime_ns(struct intel_context *ce); + +static inline u64 intel_context_clock(void) { - const u32 period = ce->engine->gt->clock_period_ns; - - return READ_ONCE(ce->runtime.total) * period; -} - -static inline u64 intel_context_get_avg_runtime_ns(struct intel_context *ce) -{ - const u32 period = ce->engine->gt->clock_period_ns; - - return mul_u32_u32(ewma_runtime_read(&ce->runtime.avg), period); + /* As we mix CS cycles with CPU clocks, use the raw monotonic clock. */ + return ktime_get_raw_fast_ns(); } #endif /* __INTEL_CONTEXT_H__ */ diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h index db25919543bb..0ea18c9e2aca 100644 --- a/drivers/gpu/drm/i915/gt/intel_context_types.h +++ b/drivers/gpu/drm/i915/gt/intel_context_types.h @@ -33,6 +33,9 @@ struct intel_context_ops { #define COPS_HAS_INFLIGHT_BIT 0 #define COPS_HAS_INFLIGHT BIT(COPS_HAS_INFLIGHT_BIT) +#define COPS_RUNTIME_CYCLES_BIT 1 +#define COPS_RUNTIME_CYCLES BIT(COPS_RUNTIME_CYCLES_BIT) + int (*alloc)(struct intel_context *ce); int (*pre_pin)(struct intel_context *ce, struct i915_gem_ww_ctx *ww, void **vaddr); @@ -106,14 +109,19 @@ struct intel_context { } lrc; u32 tag; /* cookie passed to HW to track this context on submission */ - /* Time on GPU as tracked by the hw. */ - struct { - struct ewma_runtime avg;
[Intel-gfx] [CI 8/8] drm/i915: Expose per-engine client busyness
From: Tvrtko Ursulin Expose per-client and per-engine busyness under the previously added sysfs client root. The new files are one per-engine instance and located under the 'busy' directory. Each contains a monotonically increasing nano-second resolution times each client's jobs were executing on the GPU. This enables userspace to create a top-like tool for GPU utilization: == intel-gpu-top - 935/ 935 MHz;0% RC6; 14.73 Watts; 1097 irqs/s IMC reads: 1401 MiB/s IMC writes:4 MiB/s ENGINE BUSY MI_SEMA MI_WAIT Render/3D/0 63.73% |███ | 3% 0% Blitter/09.53% |██▊ | 6% 0% Video/0 39.32% |███▊ | 16% 0% Video/1 15.62% |▋ | 0% 0% VideoEnhance/00.00% | | 0% 0% PIDNAME RCS BCS VCS VECS 4084gem_wsim |█▌ ||█ || || | 4086gem_wsim |█▌ || ||███|| | == v2: Use intel_context_engine_get_busy_time. v3: New directory structure. v4: Rebase. v5: sysfs_attr_init. v6: Small tidy in i915_gem_add_client. v7: Rebase to be engine class based. v8: * Always enable stats. * Walk all client contexts. v9: * Skip unsupported engine classes. (Chris) * Use scheduler caps. (Chris) v10: * Use pphwsp runtime only. Link: https://patchwork.freedesktop.org/series/71182/ # intel_gpu_top Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-8-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_drm_client.c | 101 - drivers/gpu/drm/i915/i915_drm_client.h | 10 +++ 2 files changed, 110 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c index 0ca81a750895..1f8b08a413d4 100644 --- a/drivers/gpu/drm/i915/i915_drm_client.c +++ b/drivers/gpu/drm/i915/i915_drm_client.c @@ -9,6 +9,11 @@ #include +#include + +#include "gem/i915_gem_context.h" +#include "gt/intel_engine_user.h" + #include "i915_drm_client.h" #include "i915_drv.h" #include "i915_gem.h" @@ -55,6 +60,95 @@ show_client_pid(struct device *kdev, struct device_attribute *attr, char *buf) return ret; } +static u64 busy_add(struct i915_gem_context *ctx, unsigned int class) +{ + struct i915_gem_engines_iter it; + struct intel_context *ce; + u64 total = 0; + + for_each_gem_engine(ce, rcu_dereference(ctx->engines), it) { + if (ce->engine->uabi_class != class) + continue; + + total += intel_context_get_total_runtime_ns(ce); + } + + return total; +} + +static ssize_t +show_busy(struct device *kdev, struct device_attribute *attr, char *buf) +{ + struct i915_engine_busy_attribute *i915_attr = + container_of(attr, typeof(*i915_attr), attr); + unsigned int class = i915_attr->engine_class; + const struct i915_drm_client *client = i915_attr->client; + const struct list_head *list = &client->ctx_list; + u64 total = atomic64_read(&client->past_runtime[class]); + struct i915_gem_context *ctx; + + rcu_read_lock(); + list_for_each_entry_rcu(ctx, list, client_link) + total += busy_add(ctx, class); + rcu_read_unlock(); + + return sysfs_emit(buf, "%llu\n", total); +} + +static const char * const uabi_class_names[] = { + [I915_ENGINE_CLASS_RENDER] = "0", + [I915_ENGINE_CLASS_COPY] = "1", + [I915_ENGINE_CLASS_VIDEO] = "2", + [I915_ENGINE_CLASS_VIDEO_ENHANCE] = "3", +}; + +static int __client_register_sysfs_busy(struct i915_drm_client *client) +{ + struct i915_drm_clients *clients = client->clients; + unsigned int i; + int ret = 0; + + if (!(clients->i915->caps.scheduler & I915_SCHEDULER_CAP_ENGINE_BUSY_STATS)) + return 0; + + client->busy_root = kobject_create_and_add("busy", client->root); + if (!client->busy_root) + return -ENOMEM; + + for (i = 0; i < ARRAY_SIZE(uabi_class_names); i++) { + struct i915_engine_busy_attribute *i915_attr = + &client->attr.busy[i]; + struct device_attribute *attr = &i915_attr->attr; + + if (!intel_engine_lookup_user(clients->i915, i, 0)) + continue; + + i915_attr->client = client; + i915_attr->engine_class = i; + + sysfs_attr_init(&attr->attr); + +
[Intel-gfx] [CI 2/8] drm/i915: Expose list of clients in sysfs
From: Tvrtko Ursulin Expose a list of clients with open file handles in sysfs. This will be a basis for a top-like utility showing per-client and per- engine GPU load. Currently we only expose each client's pid and name under opaque numbered directories in /sys/class/drm/card0/clients/. For instance: /sys/class/drm/card0/clients/3/name: Xorg /sys/class/drm/card0/clients/3/pid: 5664 v2: Chris Wilson: * Enclose new members into dedicated structs. * Protect against failed sysfs registration. v3: * sysfs_attr_init. v4: * Fix for internal clients. v5: * Use cyclic ida for client id. (Chris) * Do not leak pid reference. (Chris) * Tidy code with some locals. v6: * Use xa_alloc_cyclic to simplify locking. (Chris) * No need to unregister individial sysfs files. (Chris) * Rebase on top of fpriv kref. * Track client closed status and reflect in sysfs. v7: * Make drm_client more standalone concept. v8: * Simplify sysfs show. (Chris) * Always track name and pid. v9: * Fix cyclic id assignment. v10: * No need for a mutex around xa_alloc_cyclic. * Refactor sysfs into own function. * Unregister sysfs before freeing pid and name. * Move clients setup into own function. v11: * Call clients init directly from driver init. (Chris) v12: * Do not fail client add on id wrap. (Maciej) v13 (Lucas): Rebase on upstream Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Reviewed-by: Aravind Iddamsetty # v11 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210123153733.18139-2-ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/Makefile | 5 +- drivers/gpu/drm/i915/i915_drm_client.c | 200 + drivers/gpu/drm/i915/i915_drm_client.h | 71 + drivers/gpu/drm/i915/i915_drv.c| 6 + drivers/gpu/drm/i915/i915_drv.h| 5 + drivers/gpu/drm/i915/i915_gem.c| 21 ++- drivers/gpu/drm/i915/i915_sysfs.c | 8 + 7 files changed, 311 insertions(+), 5 deletions(-) create mode 100644 drivers/gpu/drm/i915/i915_drm_client.c create mode 100644 drivers/gpu/drm/i915/i915_drm_client.h diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index ea1cc5736049..026d500443d7 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -34,8 +34,9 @@ subdir-ccflags-y += -I$(srctree)/$(src) # Please keep these build lists sorted! # core driver code -i915-y += i915_drv.o \ - i915_config.o \ +i915-y += i915_config.o \ + i915_drm_client.o \ + i915_drv.o \ i915_irq.o \ i915_getparam.o \ i915_mitigations.o \ diff --git a/drivers/gpu/drm/i915/i915_drm_client.c b/drivers/gpu/drm/i915/i915_drm_client.c new file mode 100644 index ..7c2d36860ac1 --- /dev/null +++ b/drivers/gpu/drm/i915/i915_drm_client.c @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright © 2020 Intel Corporation + */ + +#include +#include +#include + +#include "i915_drm_client.h" +#include "i915_gem.h" +#include "i915_utils.h" + +void i915_drm_clients_init(struct i915_drm_clients *clients, + struct drm_i915_private *i915) +{ + clients->i915 = i915; + + clients->next_id = 0; + xa_init_flags(&clients->xarray, XA_FLAGS_ALLOC); +} + +static ssize_t +show_client_name(struct device *kdev, struct device_attribute *attr, char *buf) +{ + struct i915_drm_client *client = + container_of(attr, typeof(*client), attr.name); + + return sysfs_emit(buf, + READ_ONCE(client->closed) ? "<%s>\n" : "%s\n", + client->name); +} + +static ssize_t +show_client_pid(struct device *kdev, struct device_attribute *attr, char *buf) +{ + struct i915_drm_client *client = + container_of(attr, typeof(*client), attr.pid); + + return sysfs_emit(buf, + READ_ONCE(client->closed) ? "<%u>\n" : "%u\n", + pid_nr(client->pid)); +} + +static int __client_register_sysfs(struct i915_drm_client *client) +{ + const struct { + const char *name; + struct device_attribute *attr; + ssize_t (*show)(struct device *dev, + struct device_attribute *attr, + char *buf); + } files[] = { + { "name", &client->attr.name, show_client_name }, + { "pid", &client->attr.pid, show_client_pid }, + }; + unsigned int i; + char buf[16]; + int ret; + + ret = scnprintf(buf, sizeof(buf), "%u", client->id); + if (ret == sizeof(buf)) + return -EINVAL; + + client->root = kobject_create_and_add(buf, client->clients->root); + if (!client->root) + return -ENOMEM; + + for (i = 0; i < ARRAY_SIZE(files); i++) { + struct device_attribute *attr = files[i].attr; + + sysfs_a
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs
== Series Details == Series: series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs URL : https://patchwork.freedesktop.org/series/86222/ State : warning == Summary == $ dim checkpatch origin/drm-tip fd3b420c3829 drm/i915/gt: Show the per-engine runtime in sysfs 3537604ec4c2 drm/i915: Expose list of clients in sysfs -:88: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #88: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 402 lines checked 9e87704f2eac drm/i915: Update client name on context create 2d114de7f3f4 drm/i915: Make GEM contexts track DRM clients c551926259e4 drm/i915: Track runtime spent in closed and unreachable GEM contexts 60c93db17ee3 drm/i915: Track all user contexts per client 42d11544f6f9 drm/i915: Track context current active time -:137: WARNING:LINE_SPACING: Missing a blank line after declarations #137: FILE: drivers/gpu/drm/i915/gt/intel_context_types.h:121: + u32 last; + I915_SELFTEST_DECLARE(u32 num_underflow); total: 0 errors, 1 warnings, 0 checks, 296 lines checked a1ec37ed680a drm/i915: Expose per-engine client busyness -:25: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #25: Render/3D/0 63.73% |███ | 3% 0% total: 0 errors, 1 warnings, 0 checks, 152 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs
== Series Details == Series: series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs URL : https://patchwork.freedesktop.org/series/86222/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_reset.c:1327:5: warning: context imbalance in 'intel_gt_reset_trylock' - different lock contexts for basic block +drivers/gpu/drm/i915/gvt/mmio.c:295:23: warning: memcpy with byte count of 279040 +drivers/gpu/drm/i915/i915_perf.c:1450:15: warning: memset with byte count of 16777216 +drivers/gpu/drm/i915/i915_perf.c:1504:15: warning: memset with byte count of 16777216 +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_write16' - different lock contexts for basic bl
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2)
== Series Details == Series: series starting with drm/i915: Remove guard page insertion around unevictable nodes (rev2) URL : https://patchwork.freedesktop.org/series/86220/ State : success == Summary == CI Bug Log - changes from CI_DRM_9675_full -> Patchwork_19474_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_19474_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_fair@basic-none-vip@rcs0: - shard-glk: [PASS][1] -> [FAIL][2] ([i915#2842]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-glk5/igt@gem_exec_fair@basic-none-...@rcs0.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-glk9/igt@gem_exec_fair@basic-none-...@rcs0.html * igt@gem_exec_fair@basic-pace@vcs1: - shard-iclb: NOTRUN -> [FAIL][3] ([i915#2842]) +1 similar issue [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-iclb1/igt@gem_exec_fair@basic-p...@vcs1.html * igt@gen7_exec_parse@basic-offset: - shard-skl: NOTRUN -> [SKIP][4] ([fdo#109271]) +15 similar issues [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl3/igt@gen7_exec_pa...@basic-offset.html * igt@kms_color@pipe-a-ctm-0-75: - shard-skl: [PASS][5] -> [DMESG-WARN][6] ([i915#1982]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-skl6/igt@kms_co...@pipe-a-ctm-0-75.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl3/igt@kms_co...@pipe-a-ctm-0-75.html * igt@kms_color_chamelium@pipe-b-gamma: - shard-kbl: NOTRUN -> [SKIP][7] ([fdo#109271] / [fdo#111827]) +3 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-kbl1/igt@kms_color_chamel...@pipe-b-gamma.html * igt@kms_cursor_crc@pipe-a-cursor-256x85-offscreen: - shard-skl: [PASS][8] -> [FAIL][9] ([i915#54]) +6 similar issues [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-skl3/igt@kms_cursor_...@pipe-a-cursor-256x85-offscreen.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl9/igt@kms_cursor_...@pipe-a-cursor-256x85-offscreen.html * igt@kms_cursor_legacy@flip-vs-cursor-legacy: - shard-skl: [PASS][10] -> [FAIL][11] ([i915#2346]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-skl6/igt@kms_cursor_leg...@flip-vs-cursor-legacy.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl3/igt@kms_cursor_leg...@flip-vs-cursor-legacy.html * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1: - shard-skl: [PASS][12] -> [FAIL][13] ([i915#79]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-skl3/igt@kms_flip@flip-vs-expired-vblank-interrupti...@c-edp1.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl9/igt@kms_flip@flip-vs-expired-vblank-interrupti...@c-edp1.html * igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a2: - shard-glk: [PASS][14] -> [FAIL][15] ([i915#79]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-glk9/igt@kms_flip@flip-vs-expired-vbl...@c-hdmi-a2.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-glk9/igt@kms_flip@flip-vs-expired-vbl...@c-hdmi-a2.html * igt@kms_flip@flip-vs-suspend@b-vga1: - shard-snb: [PASS][16] -> [DMESG-WARN][17] ([i915#42]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-snb2/igt@kms_flip@flip-vs-susp...@b-vga1.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-snb6/igt@kms_flip@flip-vs-susp...@b-vga1.html * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile: - shard-skl: NOTRUN -> [FAIL][18] ([i915#2628]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl8/igt@kms_flip_scaled_...@flip-64bpp-ytile-to-16bpp-ytile.html * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt: - shard-kbl: NOTRUN -> [SKIP][19] ([fdo#109271]) +40 similar issues [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-kbl1/igt@kms_frontbuffer_track...@psr-1p-offscren-pri-shrfb-draw-mmap-gtt.html * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc: - shard-skl: NOTRUN -> [FAIL][20] ([fdo#108145] / [i915#265]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl6/igt@kms_plane_alpha_bl...@pipe-c-alpha-7efc.html * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: [PASS][21] -> [FAIL][22] ([fdo#108145] / [i915#265]) +1 similar issue [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/shard-skl5/igt@kms_plane_alpha_bl...@pipe-c-coverage-7efc.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19474/shard-skl2/igt@kms_p
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs
== Series Details == Series: series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs URL : https://patchwork.freedesktop.org/series/86222/ State : success == Summary == CI Bug Log - changes from CI_DRM_9675 -> Patchwork_19475 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19475/index.html Known issues Here are the changes found in Patchwork_19475 that come from known issues: ### IGT changes ### Issues hit * igt@gem_mmap_gtt@basic: - fi-tgl-y: [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/fi-tgl-y/igt@gem_mmap_...@basic.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19475/fi-tgl-y/igt@gem_mmap_...@basic.html Possible fixes * igt@gem_close_race@basic-threads: - fi-tgl-y: [DMESG-WARN][3] ([i915#402]) -> [PASS][4] +1 similar issue [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9675/fi-tgl-y/igt@gem_close_r...@basic-threads.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19475/fi-tgl-y/igt@gem_close_r...@basic-threads.html [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 Participating hosts (41 -> 36) -- Missing(5): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-bsw-cyan fi-bdw-samus Build changes - * Linux: CI_DRM_9675 -> Patchwork_19475 CI-20190529: 20190529 CI_DRM_9675: f84d1efce492ef0f46cf4fa1bf01b17ce1627fe4 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5968: 267fa33c0947fbbb642098098ff6e5902f9a3d94 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_19475: a1ec37ed680a947ceb9f0ca1fd94e96502f3e16f @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == a1ec37ed680a drm/i915: Expose per-engine client busyness 42d11544f6f9 drm/i915: Track context current active time 60c93db17ee3 drm/i915: Track all user contexts per client c551926259e4 drm/i915: Track runtime spent in closed and unreachable GEM contexts 2d114de7f3f4 drm/i915: Make GEM contexts track DRM clients 9e87704f2eac drm/i915: Update client name on context create 3537604ec4c2 drm/i915: Expose list of clients in sysfs fd3b420c3829 drm/i915/gt: Show the per-engine runtime in sysfs == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19475/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs
== Series Details == Series: series starting with [CI,1/8] drm/i915/gt: Show the per-engine runtime in sysfs URL : https://patchwork.freedesktop.org/series/86222/ State : success == Summary == CI Bug Log - changes from CI_DRM_9675_full -> Patchwork_19475_full Summary --- **SUCCESS** No regressions found. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_19475_full: ### IGT changes ### Possible regressions * {igt@sysfs_clients@busy@vecs0} (NEW): - shard-glk: NOTRUN -> [FAIL][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19475/shard-glk9/igt@sysfs_clients@b...@vecs0.html * {igt@sysfs_clients@sema-10@rcs0} (NEW): - shard-skl: NOTRUN -> [FAIL][2] +6 similar issues [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19475/shard-skl3/igt@sysfs_clients@sema...@rcs0.html New tests - New tests have been introduced between CI_DRM_9675_full and Patchwork_19475_full: ### New IGT tests (44) ### * igt@sysfs_clients@busy@all: - Statuses : 6 pass(s) - Exec time: [0.05, 0.26] s * igt@sysfs_clients@busy@bcs0: - Statuses : 1 fail(s) 5 pass(s) - Exec time: [0.08, 0.26] s * igt@sysfs_clients@busy@rcs0: - Statuses : 1 fail(s) 5 pass(s) - Exec time: [0.08, 0.27] s * igt@sysfs_clients@busy@vcs0: - Statuses : 1 fail(s) 5 pass(s) - Exec time: [0.07, 0.26] s * igt@sysfs_clients@busy@vcs1: - Statuses : 3 pass(s) - Exec time: [0.07, 0.12] s * igt@sysfs_clients@busy@vecs0: - Statuses : 2 fail(s) 4 pass(s) - Exec time: [0.06, 0.32] s * igt@sysfs_clients@fair-1@bcs: - Statuses : 6 pass(s) - Exec time: [5.05, 5.23] s * igt@sysfs_clients@fair-1@rcs: - Statuses : 6 pass(s) - Exec time: [5.05, 5.24] s * igt@sysfs_clients@fair-1@vcs: - Statuses : 6 pass(s) - Exec time: [5.04, 5.24] s * igt@sysfs_clients@fair-1@vecs: - Statuses : 6 pass(s) - Exec time: [5.05, 5.21] s * igt@sysfs_clients@fair-3@bcs: - Statuses : 6 pass(s) - Exec time: [5.06, 5.29] s * igt@sysfs_clients@fair-3@rcs: - Statuses : 6 pass(s) - Exec time: [5.05, 5.27] s * igt@sysfs_clients@fair-3@vcs: - Statuses : 6 pass(s) - Exec time: [5.04, 5.26] s * igt@sysfs_clients@fair-3@vecs: - Statuses : 6 pass(s) - Exec time: [5.06, 5.30] s * igt@sysfs_clients@sema-10@bcs0: - Statuses : 2 pass(s) - Exec time: [2.21, 2.23] s * igt@sysfs_clients@sema-10@rcs0: - Statuses : 1 fail(s) 5 pass(s) - Exec time: [2.20, 2.53] s * igt@sysfs_clients@sema-10@vcs0: - Statuses : 1 fail(s) 5 pass(s) - Exec time: [2.21, 2.51] s * igt@sysfs_clients@sema-10@vcs1: - Statuses : 3 pass(s) - Exec time: [2.21, 2.24] s * igt@sysfs_clients@sema-10@vecs0: - Statuses : 1 fail(s) 5 pass(s) - Exec time: [2.21, 2.50] s * igt@sysfs_clients@sema-25@bcs0: - Statuses : 2 pass(s) - Exec time: [2.20, 2.22] s * igt@sysfs_clients@sema-25@rcs0: - Statuses : 5 pass(s) - Exec time: [2.20, 2.26] s * igt@sysfs_clients@sema-25@vcs0: - Statuses : 5 pass(s) - Exec time: [2.21, 2.24] s * igt@sysfs_clients@sema-25@vcs1: - Statuses : 3 pass(s) - Exec time: [2.21, 2.24] s * igt@sysfs_clients@sema-25@vecs0: - Statuses : 5 pass(s) - Exec time: [2.21, 2.25] s * igt@sysfs_clients@sema-50@bcs0: - Statuses : 2 pass(s) - Exec time: [2.20, 2.21] s * igt@sysfs_clients@sema-50@rcs0: - Statuses : 6 pass(s) - Exec time: [2.21, 2.44] s * igt@sysfs_clients@sema-50@vcs0: - Statuses : 6 pass(s) - Exec time: [2.21, 2.45] s * igt@sysfs_clients@sema-50@vcs1: - Statuses : 2 pass(s) - Exec time: [2.22, 2.23] s * igt@sysfs_clients@sema-50@vecs0: - Statuses : 6 pass(s) - Exec time: [2.21, 2.43] s * igt@sysfs_clients@split-10@bcs0: - Statuses : 6 pass(s) - Exec time: [2.20, 2.49] s * igt@sysfs_clients@split-10@rcs0: - Statuses : 6 pass(s) - Exec time: [2.18, 2.45] s * igt@sysfs_clients@split-10@vcs0: - Statuses : 6 pass(s) - Exec time: [2.20, 2.46] s * igt@sysfs_clients@split-10@vcs1: - Statuses : 2 pass(s) - Exec time: [2.21, 2.24] s * igt@sysfs_clients@split-10@vecs0: - Statuses : 6 pass(s) - Exec time: [2.19, 2.46] s * igt@sysfs_clients@split-25@bcs0: - Statuses : 6 pass(s) - Exec time: [2.21, 2.50] s * igt@sysfs_clients@split-25@rcs0: - Statuses : 6 pass(s) - Exec time: [2.20, 2.43] s * igt@sysfs_clients@split-25@vcs0: - Statuses : 6 pass(s) - Exec time: [2.19, 2.46] s * igt@sysfs_clients@split-25@vcs1: - Statuses : 2 pass(s) - Exec time: [2.18, 2.23] s * igt@sysfs_clients@split-25@vecs0: - Statuses : 6 pass(s) - Exec time: [2.18, 2.43] s * igt@sysfs_clients@split-50@bcs0: - Statuses : 6 pass(s) - Exec time
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Remainder of dbuf state stuff (rev4)
== Series Details == Series: drm/i915: Remainder of dbuf state stuff (rev4) URL : https://patchwork.freedesktop.org/series/83114/ State : warning == Summary == $ dim checkpatch origin/drm-tip 8502dc616912 drm/i915: Extract intel_crtc_ddb_weight() 192a1ce9a57e drm/i915: Pass the crtc to skl_compute_dbuf_slices() 089f3c212ac3 drm/i915: Introduce intel_dbuf_slice_size() 876a831b047d drm/i915: Introduce skl_ddb_entry_for_slices() 81cfa01bd61b drm/i915: Add pipe ddb entries into the dbuf state fae390c08ff4 drm/i915: Extract intel_crtc_dbuf_weights() -:140: WARNING:LINE_SPACING: Missing a blank line after declarations #140: FILE: drivers/gpu/drm/i915/intel_pm.c:4195: + struct skl_ddb_entry *alloc, /* out */ + int *num_active /* out */) total: 0 errors, 1 warnings, 0 checks, 178 lines checked 08058285382b drm/i915: Encapsulate dbuf state handling harder 0636d62e81e3 drm/i915: Do a bit more initial readout for dbuf ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Remainder of dbuf state stuff (rev4)
== Series Details == Series: drm/i915: Remainder of dbuf state stuff (rev4) URL : https://patchwork.freedesktop.org/series/83114/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy expression type 31 +drivers/gpu/drm/i915/gt/intel_reset.c:1327:5: warning: context imbalance in 'intel_gt_reset_trylock' - different lock contexts for basic block +drivers/gpu/drm/i915/gvt/mmio.c:295:23: warning: memcpy with byte count of 279040 +drivers/gpu/drm/i915/i915_perf.c:1450:15: warning: memset with byte count of 16777216 +drivers/gpu/drm/i915/i915_perf.c:1504:15: warning: memset with byte count of 16777216 +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen11_fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen12_fwtable_write8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read16' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read32' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read64' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_read8' - different lock contexts for basic block +./include/linux/spinlock.h:409:9: warning: context imbalance in 'gen6_write16' - different lock contexts for basic block +./include/linux/spinlock.h:40
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Remainder of dbuf state stuff (rev4)
== Series Details == Series: drm/i915: Remainder of dbuf state stuff (rev4) URL : https://patchwork.freedesktop.org/series/83114/ State : success == Summary == CI Bug Log - changes from CI_DRM_9676 -> Patchwork_19476 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/index.html Known issues Here are the changes found in Patchwork_19476 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_basic@userptr: - fi-byt-j1900: NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/fi-byt-j1900/igt@amdgpu/amd_ba...@userptr.html * igt@gem_exec_suspend@basic-s3: - fi-tgl-u2: [PASS][2] -> [FAIL][3] ([i915#1888]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/fi-tgl-u2/igt@gem_exec_susp...@basic-s3.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/fi-tgl-u2/igt@gem_exec_susp...@basic-s3.html Possible fixes * igt@i915_pm_rpm@module-reload: - fi-byt-j1900: [INCOMPLETE][4] ([i915#142] / [i915#2405]) -> [PASS][5] [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/fi-byt-j1900/igt@i915_pm_...@module-reload.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/fi-byt-j1900/igt@i915_pm_...@module-reload.html [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [i915#142]: https://gitlab.freedesktop.org/drm/intel/issues/142 [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888 [i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405 Participating hosts (41 -> 36) -- Missing(5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-tgl-y fi-bdw-samus Build changes - * Linux: CI_DRM_9676 -> Patchwork_19476 CI-20190529: 20190529 CI_DRM_9676: 6816490bedd12ceff651faf657c3827b71197769 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5970: 94647cd8315d63867f57f716380601bdf8595ee7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_19476: 0636d62e81e3a855ed285516134b16201dca43ab @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 0636d62e81e3 drm/i915: Do a bit more initial readout for dbuf 08058285382b drm/i915: Encapsulate dbuf state handling harder fae390c08ff4 drm/i915: Extract intel_crtc_dbuf_weights() 81cfa01bd61b drm/i915: Add pipe ddb entries into the dbuf state 876a831b047d drm/i915: Introduce skl_ddb_entry_for_slices() 089f3c212ac3 drm/i915: Introduce intel_dbuf_slice_size() 192a1ce9a57e drm/i915: Pass the crtc to skl_compute_dbuf_slices() 8502dc616912 drm/i915: Extract intel_crtc_ddb_weight() == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Start disabling pread/pwrite ioctl's for future platforms
On Sat, 23 Jan 2021 05:05:02 -0800, Patchwork wrote: > > [1 ] > [2 ] > Project List - Patchwork > > Patch Details > > Series: drm/i915: Start disabling pread/pwrite ioctl's for future platforms > URL: https://patchwork.freedesktop.org/series/86199/ > State: failure > Details: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/index.html > > CI Bug Log - changes from CI_DRM_9671_full -> Patchwork_19470_full > > Summary > > FAILURE > > Serious unknown changes coming with Patchwork_19470_full absolutely need to be > verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_19470_full, please notify your bug team to allow them > to document this new failure mode, which will reduce false positives in CI. > > Possible new issues > > Here are the unknown changes that may have been introduced in > Patchwork_19470_full: > > IGT changes > > Possible regressions > > * igt@kms_sequence@queue-busy: > > * shard-skl: PASS -> FAIL This is a unrelated failure and a false positive, the patch should not have any effect on this platform. Seeing a few igt@kms_sequence bugs in gitlab but maybe the signature for this one is a little different. Thanks. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Remainder of dbuf state stuff (rev4)
== Series Details == Series: drm/i915: Remainder of dbuf state stuff (rev4) URL : https://patchwork.freedesktop.org/series/83114/ State : success == Summary == CI Bug Log - changes from CI_DRM_9676_full -> Patchwork_19476_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_19476_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_fair@basic-none-share@rcs0: - shard-tglb: [PASS][1] -> [FAIL][2] ([i915#2842]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/shard-tglb3/igt@gem_exec_fair@basic-none-sh...@rcs0.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-tglb8/igt@gem_exec_fair@basic-none-sh...@rcs0.html * igt@gem_exec_fair@basic-none-solo@rcs0: - shard-kbl: [PASS][3] -> [FAIL][4] ([i915#2842]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/shard-kbl7/igt@gem_exec_fair@basic-none-s...@rcs0.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-kbl4/igt@gem_exec_fair@basic-none-s...@rcs0.html * igt@gem_exec_fair@basic-pace@vcs1: - shard-iclb: NOTRUN -> [FAIL][5] ([i915#2842]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-iclb2/igt@gem_exec_fair@basic-p...@vcs1.html * igt@gem_exec_reloc@basic-parallel: - shard-skl: NOTRUN -> [TIMEOUT][6] ([i915#1729]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-skl5/igt@gem_exec_re...@basic-parallel.html * igt@gem_exec_schedule@u-fairslice-all: - shard-tglb: [PASS][7] -> [DMESG-WARN][8] ([i915#2803]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/shard-tglb8/igt@gem_exec_sched...@u-fairslice-all.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-tglb3/igt@gem_exec_sched...@u-fairslice-all.html * igt@gem_exec_schedule@u-fairslice@rcs0: - shard-skl: [PASS][9] -> [DMESG-WARN][10] ([i915#1610] / [i915#2803]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/shard-skl6/igt@gem_exec_schedule@u-fairsl...@rcs0.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-skl1/igt@gem_exec_schedule@u-fairsl...@rcs0.html * igt@gem_userptr_blits@mmap-offset-invalidate-idle@uc: - shard-kbl: NOTRUN -> [SKIP][11] ([fdo#109271]) +31 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-kbl3/igt@gem_userptr_blits@mmap-offset-invalidate-i...@uc.html * igt@gen3_render_linear_blits: - shard-tglb: NOTRUN -> [SKIP][12] ([fdo#109289]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-tglb1/igt@gen3_render_linear_blits.html * igt@kms_async_flips@test-time-stamp: - shard-tglb: [PASS][13] -> [FAIL][14] ([i915#2597]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/shard-tglb1/igt@kms_async_fl...@test-time-stamp.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-tglb8/igt@kms_async_fl...@test-time-stamp.html * igt@kms_ccs@pipe-c-missing-ccs-buffer: - shard-skl: NOTRUN -> [SKIP][15] ([fdo#109271] / [fdo#111304]) +1 similar issue [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-skl9/igt@kms_...@pipe-c-missing-ccs-buffer.html * igt@kms_chamelium@dp-hpd-after-suspend: - shard-tglb: NOTRUN -> [SKIP][16] ([fdo#109284] / [fdo#111827]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-tglb1/igt@kms_chamel...@dp-hpd-after-suspend.html - shard-iclb: NOTRUN -> [SKIP][17] ([fdo#109284] / [fdo#111827]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-iclb5/igt@kms_chamel...@dp-hpd-after-suspend.html * igt@kms_chamelium@hdmi-aspect-ratio: - shard-skl: NOTRUN -> [SKIP][18] ([fdo#109271] / [fdo#111827]) +5 similar issues [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-skl2/igt@kms_chamel...@hdmi-aspect-ratio.html * igt@kms_color_chamelium@pipe-d-ctm-blue-to-red: - shard-kbl: NOTRUN -> [SKIP][19] ([fdo#109271] / [fdo#111827]) +1 similar issue [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-kbl3/igt@kms_color_chamel...@pipe-d-ctm-blue-to-red.html * igt@kms_color_chamelium@pipe-d-gamma: - shard-hsw: NOTRUN -> [SKIP][20] ([fdo#109271] / [fdo#111827]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19476/shard-hsw1/igt@kms_color_chamel...@pipe-d-gamma.html * igt@kms_cursor_crc@pipe-b-cursor-128x42-random: - shard-skl: [PASS][21] -> [FAIL][22] ([i915#54]) +6 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9676/shard-skl8/igt@kms_cursor_...@pipe-b-cursor-128x42-random.html [22]: https://intel-gfx-ci.01.org/tree/
[Intel-gfx] linux-next: manual merge of the drm-intel tree with the drm tree
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/gem/i915_gem_object.h between commit: 41a9c75d0acf ("drm/i915/gem: Move stolen node into GEM object union") from the drm tree and commit: 5fbc2c2bfa5c ("drm/i915/gem: Add a helper to read data from a GEM object page") from the drm-intel tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/gpu/drm/i915/gem/i915_gem_object.h index 5274e9d139b4,ae83737f1d48.. --- a/drivers/gpu/drm/i915/gem/i915_gem_object.h +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h @@@ -548,6 -546,6 +554,8 @@@ i915_gem_object_invalidate_frontbuffer( __i915_gem_object_invalidate_frontbuffer(obj, origin); } +bool i915_gem_object_is_shmem(const struct drm_i915_gem_object *obj); + + int i915_gem_object_read_from_page(struct drm_i915_gem_object *obj, u64 offset, void *dst, int size); + #endif pgp6TdaXYrLi0.pgp Description: OpenPGP digital signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Start disabling pread/pwrite ioctl's for future platforms
== Series Details == Series: drm/i915: Start disabling pread/pwrite ioctl's for future platforms URL : https://patchwork.freedesktop.org/series/86199/ State : success == Summary == CI Bug Log - changes from CI_DRM_9671_full -> Patchwork_19470_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_19470_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_persistence@legacy-engines-hostile: - shard-snb: NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#1099]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-snb4/igt@gem_ctx_persiste...@legacy-engines-hostile.html - shard-hsw: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#1099]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-hsw2/igt@gem_ctx_persiste...@legacy-engines-hostile.html * igt@gem_eio@suspend: - shard-iclb: [PASS][3] -> [INCOMPLETE][4] ([i915#1185] / [i915#2483]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-iclb8/igt@gem_...@suspend.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-iclb3/igt@gem_...@suspend.html * igt@gem_exec_balancer@bonded-pair: - shard-hsw: NOTRUN -> [SKIP][5] ([fdo#109271]) +43 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-hsw2/igt@gem_exec_balan...@bonded-pair.html * igt@gem_exec_capture@pi@rcs0: - shard-skl: [PASS][6] -> [INCOMPLETE][7] ([i915#2369]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-skl10/igt@gem_exec_capture@p...@rcs0.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-skl3/igt@gem_exec_capture@p...@rcs0.html * igt@gem_exec_fair@basic-none-share@rcs0: - shard-iclb: [PASS][8] -> [FAIL][9] ([i915#2842]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-iclb6/igt@gem_exec_fair@basic-none-sh...@rcs0.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-iclb8/igt@gem_exec_fair@basic-none-sh...@rcs0.html - shard-apl: [PASS][10] -> [SKIP][11] ([fdo#109271]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-apl7/igt@gem_exec_fair@basic-none-sh...@rcs0.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-apl2/igt@gem_exec_fair@basic-none-sh...@rcs0.html * igt@gem_exec_fair@basic-none-solo@rcs0: - shard-kbl: [PASS][12] -> [FAIL][13] ([i915#2842]) +2 similar issues [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-kbl7/igt@gem_exec_fair@basic-none-s...@rcs0.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-kbl4/igt@gem_exec_fair@basic-none-s...@rcs0.html * igt@gem_exec_fair@basic-pace@vcs1: - shard-tglb: [PASS][14] -> [FAIL][15] ([i915#2842]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-tglb7/igt@gem_exec_fair@basic-p...@vcs1.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-tglb6/igt@gem_exec_fair@basic-p...@vcs1.html * igt@gem_exec_fair@basic-pace@vecs0: - shard-kbl: [PASS][16] -> [SKIP][17] ([fdo#109271]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-kbl2/igt@gem_exec_fair@basic-p...@vecs0.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-kbl4/igt@gem_exec_fair@basic-p...@vecs0.html * igt@gem_exec_fair@basic-throttle@rcs0: - shard-glk: [PASS][18] -> [FAIL][19] ([i915#2842]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-glk9/igt@gem_exec_fair@basic-throt...@rcs0.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-glk4/igt@gem_exec_fair@basic-throt...@rcs0.html - shard-iclb: NOTRUN -> [FAIL][20] ([i915#2849]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-iclb5/igt@gem_exec_fair@basic-throt...@rcs0.html * igt@gem_exec_flush@basic-batch-kernel-default-cmd: - shard-iclb: NOTRUN -> [SKIP][21] ([fdo#109313]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-iclb7/igt@gem_exec_fl...@basic-batch-kernel-default-cmd.html * igt@gem_exec_whisper@basic-queues-all: - shard-glk: NOTRUN -> [DMESG-WARN][22] ([i915#118] / [i915#95]) [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-glk4/igt@gem_exec_whis...@basic-queues-all.html * igt@gem_exec_whisper@basic-queues-forked-all: - shard-glk: [PASS][23] -> [DMESG-WARN][24] ([i915#118] / [i915#95]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9671/shard-glk2/igt@gem_exec_whis...@basic-queues-forked-all.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/shard-glk4/igt@gem_exec_whis...@basic-queues-forked-all.html * igt@gem_userptr_blits@
Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Start disabling pread/pwrite ioctl's for future platforms
Re-reported. -Original Message- From: Dixit, Ashutosh Sent: Sunday, January 24, 2021 3:55 PM To: intel-gfx@lists.freedesktop.org; Vudum, Lakshminarayana Subject: Re: ✗ Fi.CI.IGT: failure for drm/i915: Start disabling pread/pwrite ioctl's for future platforms On Sat, 23 Jan 2021 05:05:02 -0800, Patchwork wrote: > > [1 ] > [2 ] > Project List - Patchwork > > Patch Details > > Series: drm/i915: Start disabling pread/pwrite ioctl's for future > platforms > URL: https://patchwork.freedesktop.org/series/86199/ > State: failure > Details: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19470/index.html > > CI Bug Log - changes from CI_DRM_9671_full -> Patchwork_19470_full > > Summary > > FAILURE > > Serious unknown changes coming with Patchwork_19470_full absolutely > need to be verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_19470_full, please notify your bug team to > allow them to document this new failure mode, which will reduce false > positives in CI. > > Possible new issues > > Here are the unknown changes that may have been introduced in > Patchwork_19470_full: > > IGT changes > > Possible regressions > > * igt@kms_sequence@queue-busy: > > * shard-skl: PASS -> FAIL This is a unrelated failure and a false positive, the patch should not have any effect on this platform. Seeing a few igt@kms_sequence bugs in gitlab but maybe the signature for this one is a little different. Thanks. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/buddy: document the unused header bits
Hi Matthew, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip v5.11-rc5 next-20210122] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Matthew-Auld/drm-i915-buddy-document-the-unused-header-bits/20210125-01 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-a012-20210125 (attached as .config) compiler: gcc-9 (Debian 9.3.0-20) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/9d12a23788459bd678c0f5979acaaf94a88d808c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Matthew-Auld/drm-i915-buddy-document-the-unused-header-bits/20210125-01 git checkout 9d12a23788459bd678c0f5979acaaf94a88d808c # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/asm-generic/bug.h:5, from arch/x86/include/asm/bug.h:93, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/gfp.h:5, from include/linux/slab.h:15, from include/linux/kmemleak.h:12, from drivers/gpu/drm/i915/i915_buddy.c:6: drivers/gpu/drm/i915/selftests/i915_buddy.c: In function 'igt_buddy_alloc_limit': >> include/linux/log2.h:194:8: warning: left shift count >= width of type >> [-Wshift-count-overflow] 194 | (1UL << ilog2(n))) : \ |^~ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) |^~~~ drivers/gpu/drm/i915/selftests/i915_buddy.c:761:2: note: in expansion of macro 'if' 761 | if (i915_buddy_block_size(&mm, block) != rounddown_pow_of_two(size)) { | ^~ drivers/gpu/drm/i915/selftests/i915_buddy.c:761:43: note: in expansion of macro 'rounddown_pow_of_two' 761 | if (i915_buddy_block_size(&mm, block) != rounddown_pow_of_two(size)) { | ^~~~ >> include/linux/log2.h:194:8: warning: left shift count >= width of type >> [-Wshift-count-overflow] 194 | (1UL << ilog2(n))) : \ |^~ include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value' 69 | (cond) ? \ | ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) |^~ drivers/gpu/drm/i915/selftests/i915_buddy.c:761:2: note: in expansion of macro 'if' 761 | if (i915_buddy_block_size(&mm, block) != rounddown_pow_of_two(size)) { | ^~ drivers/gpu/drm/i915/selftests/i915_buddy.c:761:43: note: in expansion of macro 'rounddown_pow_of_two' 761 | if (i915_buddy_block_size(&mm, block) != rounddown_pow_of_two(size)) { | ^~~~ In file included from include/linux/kernel.h:12, from include/asm-generic/bug.h:20, from arch/x86/include/asm/bug.h:93, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/gfp.h:5, from include/linux/slab.h:15, from include/linux/kmemleak.h:12, from drivers/gpu/drm/i915/i915_buddy.c:6: >> include/linux/log2.h:194:8: warning: left shift count >= width of type >> [-Wshift-count-overflow] 194 | (1UL << ilog2(n))) : \ |^~ include/linux/printk.h:343:33: note: in expansion of macro 'rounddown_pow_of_two' 343 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~ drivers/gpu/drm/i915/selftests/i915_buddy.c:762:3: note: in expansion of macro 'pr_err' 762 | pr_err("block size(%llu) != %lu\n", | ^~ vim +194 include/linux/log2.h b311e921b385b5a Robert P. J. Day 2007-10-16 69 f0d1b0b30d250a0 David Howells2006-12-08 70 /** dbef91ec5482239 Martin Wilck 2018-04-18 71 * const_ilog2 - log base 2 of 32-bit or a 64-bit constant unsigned value a1c4d24e02d093e Randy Dunlap 2017-09-30 72 * @n: parameter f0d1b0b30d250a0 David Howells2006-12-08 73 * dbef91ec5482239 Martin