Re: [Intel-gfx] [PATCH v2 2/2] drm/i915: enable to read CSB and CSB write pointer from HWSP in GVT-g VM
On 10/2/2017 7:37 PM, Joonas Lahtinen wrote: On Mon, 2017-10-02 at 11:23 +0100, Chris Wilson wrote: Quoting Joonas Lahtinen (2017-10-02 11:03:30) On Sat, 2017-09-30 at 13:57 +0800, Weinan Li wrote: Let GVT-g VM read the CSB and CSB write pointer from virtual HWSP, not all the host support this feature, need to check the BIT(3) of caps in PVINFO. Signed-off-by: Weinan LiCc: Chris Wilson @@ -396,6 +393,12 @@ static bool csb_force_mmio(struct drm_i915_private *i915) if (intel_vtd_active()) return true; + /* GVT emulation depends upon host kernel implementation, check + * support capbility by reading PV INFO before access HWSP. + */ The comment can be dropped completely, the code is self-descriptive. will remove it in next version. +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -722,7 +722,12 @@ static void intel_lrc_irq_handler(unsigned long data) >status_page.page_addr[I915_HWS_CSB_BUF0_INDEX]; unsigned int head, tail; - /* However GVT emulation depends upon intercepting CSB mmio */ + /* However GVT-g emulation depends upon host kernel + * implementation, need to check support capbility by reading PV + * INFO before access HWSP. Beside from this, another special + * configuration may also need to force use mmio, like IOMMU + * enabled. + */ s/capbility/capability/ and please rephrase this to be a kerneldoc for csb_use_mmio at the declaration. This is not a description of how to use the function or even on how csb_use_mmio work, this is why we want certain logic paths. Just a regular old comment. That's why I asked to "rephrase" :) Anyway, it seems like there already is kerneldoc for the csb_use_mmio, so this comment can be dropped. will remove this comment in next version. Regards, Joonas ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 12/12] drm/i915: replace with
The header drivers/gpu/drm/i915/i915_gem_context.h requires the definition of struct radix_tree_root, but does not need to know anything about other radix tree stuff. Include instead of to reduce the number of included header files. While we are here, let's add missing where radix tree accessors are used. Signed-off-by: Masahiro Yamada--- drivers/gpu/drm/i915/i915_gem.c| 1 + drivers/gpu/drm/i915/i915_gem_context.c| 1 + drivers/gpu/drm/i915/i915_gem_context.h| 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/i915_gem_object.h | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 19404c9..d2356eb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -37,6 +37,7 @@ #include "intel_mocs.h" #include #include +#include #include #include #include diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 58a2a44..34b2195 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -86,6 +86,7 @@ */ #include +#include #include #include #include "i915_drv.h" diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h index 44688e2..0ebe11f 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.h +++ b/drivers/gpu/drm/i915/i915_gem_context.h @@ -27,7 +27,7 @@ #include #include -#include +#include struct pid; diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 92437f4..af9ee58 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -27,6 +27,7 @@ */ #include +#include #include #include #include diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h index c30d8f8..a5a5506 100644 --- a/drivers/gpu/drm/i915/i915_gem_object.h +++ b/drivers/gpu/drm/i915/i915_gem_object.h @@ -25,6 +25,7 @@ #ifndef __I915_GEM_OBJECT_H__ #define __I915_GEM_OBJECT_H__ +#include #include #include -- 2.7.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 00/12] radix-tree: split out struct radix_tree_root out to
The motivation of this series is to cut down unnecessary header dependency in terms of radix tree. Sub-systems or drivers that use radix-tree for data management typically embed struct radix_tree_root in their data structures, like this: struct foo { ... struct radix_tree_root foo_tree; ... }; So, needs to include , therefore, users of include a lot of bloat from . If you see the definition of radix_tree_root, struct radix_tree_root { gfp_tgfp_mask; struct radix_tree_node __rcu *rnode; }; it is a very simple structure. It only depends on for gfp_t and for __rcu. By splitting out the radix_tree_root definition, we can reduce the header file dependency. Reducing the header dependency will help for speeding the kernel build, suppressing unnecessary recompile of objects during git-bisect'ing, etc. The patch 1 is a trivial clean-up; it is just here to avoid conflict. The patch 2 is the main part of this series; split out struct radix_tree_root. The rest of the series replace with where appropriate. Please review if the idea is OK. If it is OK, I'd like to know how to apply the series. Perhaps, the first two for v4.15. Then, rest of series will be sent per-subsystem for v4.16? Or, can somebody take care of the whole series? I checked allmodconfig for x86 and arm64. I am expecting 0 day testing will check it too. Masahiro Yamada (12): radix-tree: replace with radix-tree: split struct radix_tree_root to irqdomain: replace with writeback: replace with iocontext.h: replace with fs: replace with blkcg: replace with fscache: include sh: intc: replace with net/mlx4: replace with net/mlx5: replace with drm/i915: replace with drivers/gpu/drm/i915/i915_gem.c| 1 + drivers/gpu/drm/i915/i915_gem_context.c| 1 + drivers/gpu/drm/i915/i915_gem_context.h| 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/i915_gem_object.h | 1 + drivers/net/ethernet/mellanox/mlx4/cq.c| 1 + drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 +- drivers/net/ethernet/mellanox/mlx4/qp.c| 1 + drivers/net/ethernet/mellanox/mlx4/srq.c | 1 + drivers/sh/intc/internals.h| 2 +- include/linux/backing-dev-defs.h | 2 +- include/linux/blk-cgroup.h | 2 +- include/linux/fs.h | 2 +- include/linux/fscache.h| 1 + include/linux/iocontext.h | 2 +- include/linux/irqdomain.h | 2 +- include/linux/mlx4/device.h| 2 +- include/linux/mlx4/qp.h| 1 + include/linux/mlx5/driver.h| 2 +- include/linux/mlx5/qp.h| 1 + include/linux/radix-tree-root.h| 24 include/linux/radix-tree.h | 8 ++-- 22 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 include/linux/radix-tree-root.h -- 2.7.4 ___ 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 [1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT
== Series Details == Series: series starting with [1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT URL : https://patchwork.freedesktop.org/series/31549/ State : success == Summary == Test kms_cursor_legacy: Subgroup cursorA-vs-flipA-varying-size: skip -> PASS (shard-hsw) Test kms_setmode: Subgroup basic: pass -> FAIL (shard-hsw) fdo#99912 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 shard-hswtotal:2446 pass:1328 dwarn:6 dfail:0 fail:9 skip:1103 time:10088s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5941/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT
On 8 October 2017 at 14:43, Chris Wilsonwrote: > We only apply the hugepage PD redirection inside the ppGTT, so during > i915_vma_insert() we want to exclude the GGTT from the additional > alignment constraints (thereby avoiding the extra GTT pressure from > fragmentation). Add an assert to document that intention alongside the > comment. > > Signed-off-by: Chris Wilson > Cc: Matthew Auld > Cc: Joonas Lahtinen > --- > drivers/gpu/drm/i915/i915_vma.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c > index 72e86b32ab41..2d27027eaf85 100644 > --- a/drivers/gpu/drm/i915/i915_vma.c > +++ b/drivers/gpu/drm/i915/i915_vma.c > @@ -513,6 +513,8 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 > alignment, u64 flags) > rounddown_pow_of_two(vma->page_sizes.sg | > I915_GTT_PAGE_SIZE_2M); > > + GEM_BUG_ON((flags & PIN_USER) == 0); /* No GGTT! */ > + Maybe GEM_BUG_ON(i915_is_ggtt(vm)); should also catch misuse with the appgtt? Either way: Reviewed-by: Matthew Auld ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v3] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put()
Quoting Harsha Sharma (2017-10-08 15:04:07) > @@ -624,7 +624,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, > ifbdev->preferred_bpp = fb->base.format->cpp[0] * 8; > ifbdev->fb = fb; > > - drm_framebuffer_reference(>fb->base); > + drm_framebuffer_put(>fb->base); Whoops. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() (rev2)
== Series Details == Series: drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() (rev2) URL : https://patchwork.freedesktop.org/series/31283/ State : failure == Summary == Series 31283v2 drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() https://patchwork.freedesktop.org/api/1.0/series/31283/revisions/2/mbox/ Test gem_exec_suspend: Subgroup basic-s3: pass -> INCOMPLETE (fi-ivb-3770) pass -> INCOMPLETE (fi-byt-j1900) pass -> INCOMPLETE (fi-hsw-4770) pass -> INCOMPLETE (fi-hsw-4770r) Test gem_ringfill: Subgroup basic-default: skip -> PASS (fi-bsw-n3050) Subgroup basic-default-hang: dmesg-warn -> INCOMPLETE (fi-pnv-d510) fdo#101600 Test kms_pipe_crc_basic: Subgroup nonblocking-crc-pipe-a: pass -> DMESG-WARN (fi-skl-6700k) Subgroup suspend-read-crc-pipe-b: dmesg-warn -> PASS (fi-skl-6700k) fdo#100367 Test drv_module_reload: Subgroup basic-no-display: dmesg-warn -> PASS (fi-cfl-s) fdo#103022 fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600 fdo#100367 https://bugs.freedesktop.org/show_bug.cgi?id=100367 fdo#103022 https://bugs.freedesktop.org/show_bug.cgi?id=103022 fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:455s fi-bdw-gvtdvmtotal:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:471s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:396s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:565s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:287s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:521s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:522s fi-byt-j1900 total:118 pass:96 dwarn:0 dfail:0 fail:0 skip:21 fi-cfl-s total:289 pass:256 dwarn:1 dfail:0 fail:0 skip:32 time:564s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:620s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:431s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:597s fi-hsw-4770 total:118 pass:100 dwarn:0 dfail:0 fail:0 skip:17 fi-hsw-4770r total:118 pass:100 dwarn:0 dfail:0 fail:0 skip:17 fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:508s fi-ivb-3770 total:118 pass:96 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:502s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:578s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:489s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:591s fi-pnv-d510 total:156 pass:113 dwarn:0 dfail:0 fail:0 skip:42 fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:465s fi-skl-6700hqtotal:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:653s fi-skl-6700k total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:526s fi-skl-6770hqtotal:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:564s fi-skl-gvtdvmtotal:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:473s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:579s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:436s 36006288fba389b08bbfb73a89da8eced404dfed drm-tip: 2017y-10m-07d-09h-13m-34s UTC integration manifest cd4b24cbf5e4 drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5942/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v3] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put()
Replace instances of drm_framebuffer_reference/unreference() with *_get/put() suffixes and drm_dev_unref with *_put() suffix because get/put is shorter and consistent with the kernel use of *_get/put suffixes. Done with following coccinelle semantic patch @@ expression ex; @@ ( -drm_framebuffer_unreference(ex); +drm_framebuffer_put(ex); | -drm_dev_unref(ex); +drm_dev_put(ex); | -drm_framebuffer_reference(ex); +drm_framebuffer_get(ex); ) Signed-off-by: Harsha Sharma--- Changes in v3: -Removed changes in selftests Changes in v2: -Added cocinelle patch in log message -cc to all driver-specific mailing lists drivers/gpu/drm/i915/i915_pci.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 10 +- drivers/gpu/drm/i915/intel_fbdev.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 09d97e0990b7..2f106cca46b4 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -510,7 +510,7 @@ static void i915_pci_remove(struct pci_dev *pdev) struct drm_device *dev = pci_get_drvdata(pdev); i915_driver_unload(dev); - drm_dev_unref(dev); + drm_dev_put(dev); } static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f17275519484..92f83045878f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2856,7 +2856,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc, if (intel_plane_ggtt_offset(state) == plane_config->base) { fb = c->primary->fb; - drm_framebuffer_reference(fb); + drm_framebuffer_get(fb); goto valid_fb; } } @@ -2887,7 +2887,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc, intel_crtc->pipe, PTR_ERR(intel_state->vma)); intel_state->vma = NULL; - drm_framebuffer_unreference(fb); + drm_framebuffer_put(fb); return; } @@ -2908,7 +2908,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc, if (i915_gem_object_is_tiled(obj)) dev_priv->preserve_bios_swizzle = true; - drm_framebuffer_reference(fb); + drm_framebuffer_get(fb); primary->fb = primary->state->fb = fb; primary->crtc = primary->state->crtc = _crtc->base; @@ -9847,7 +9847,7 @@ mode_fits_in_fbdev(struct drm_device *dev, if (obj->base.size < mode->vdisplay * fb->pitches[0]) return NULL; - drm_framebuffer_reference(fb); + drm_framebuffer_get(fb); return fb; #else return NULL; @@ -10028,7 +10028,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector, if (ret) goto fail; - drm_framebuffer_unreference(fb); + drm_framebuffer_put(fb); ret = drm_atomic_set_mode_for_crtc(_state->base, mode); if (ret) diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 262e75c00dd2..1ff714935c38 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -189,7 +189,7 @@ static int intelfb_create(struct drm_fb_helper *helper, " releasing it\n", intel_fb->base.width, intel_fb->base.height, sizes->fb_width, sizes->fb_height); - drm_framebuffer_unreference(_fb->base); + drm_framebuffer_put(_fb->base); intel_fb = ifbdev->fb = NULL; } if (!intel_fb || WARN_ON(!intel_fb->obj)) { @@ -624,7 +624,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, ifbdev->preferred_bpp = fb->base.format->cpp[0] * 8; ifbdev->fb = fb; - drm_framebuffer_reference(>fb->base); + drm_framebuffer_put(>fb->base); /* Final pass to check if any active pipes don't have fbs */ for_each_crtc(dev, crtc) { -- 2.11.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT
== Series Details == Series: series starting with [1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT URL : https://patchwork.freedesktop.org/series/31549/ State : success == Summary == Series 31549v1 series starting with [1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT https://patchwork.freedesktop.org/api/1.0/series/31549/revisions/1/mbox/ Test gem_ringfill: Subgroup basic-default: skip -> PASS (fi-bsw-n3050) Test kms_pipe_crc_basic: Subgroup suspend-read-crc-pipe-b: dmesg-warn -> PASS (fi-skl-6700k) fdo#100367 +1 Test drv_module_reload: Subgroup basic-no-display: dmesg-warn -> PASS (fi-cfl-s) fdo#103022 fdo#100367 https://bugs.freedesktop.org/show_bug.cgi?id=100367 fdo#103022 https://bugs.freedesktop.org/show_bug.cgi?id=103022 fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:449s fi-bdw-gvtdvmtotal:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:465s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:390s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:575s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:284s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:524s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:521s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:538s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:517s fi-cfl-s total:289 pass:256 dwarn:1 dfail:0 fail:0 skip:32 time:562s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:614s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:431s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:596s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:439s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:417s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:508s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:471s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:498s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:581s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:488s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:596s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:656s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:470s fi-skl-6700hqtotal:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:656s fi-skl-6700k total:289 pass:264 dwarn:0 dfail:0 fail:1 skip:24 time:515s fi-skl-6770hqtotal:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:511s fi-skl-gvtdvmtotal:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:470s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:576s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:426s 36006288fba389b08bbfb73a89da8eced404dfed drm-tip: 2017y-10m-07d-09h-13m-34s UTC integration manifest be87680d54c7 drm/i915: Replace manual checking for idleness with active_requests counter 51d9130d2ff8 drm/i915: Retire after wait-for-idle on evict ed803116c2aa drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5941/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] drm/i915: Retire after wait-for-idle on evict
Quoting Chris Wilson (2017-10-08 14:43:21) > We have to manually retire the requests in order to unpin the contexts, > and thereby make their space available in the GGTT. So call retire after > we idle the GPU to account for the lazy pinning. Bah, no we moved the retire to i915_gem_wait_for_idle. commit 72022a705e1da854653e56b67bef57b72f1392eb Author: Chris WilsonDate: Thu Mar 30 15:50:38 2017 +0100 drm/i915: Move retire-requests into i915_gem_wait_for_idle() As we now distinguish everywhere that can call i915_gem_retire_requests() following a successful wait_for_idle, we can remove the duplication by moving that call into i915_gem_wait_for_idle() itself. Back to the drawing board why we weren't apparently able to clear the pinned contexts from the GGTT. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/3] drm/i915: Replace manual checking for idleness with active_requests counter
As we emit and retire requests, we track how many are still in flight. As we have this knowledge, we can make use of that inside i915_gem_evict_something() as a better test to see if the device is idle. Signed-off-by: Chris Wilson--- drivers/gpu/drm/i915/i915_gem_evict.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index fc7e476448e3..00b8ca15784c 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -33,23 +33,6 @@ #include "intel_drv.h" #include "i915_trace.h" -static bool ggtt_is_idle(struct drm_i915_private *dev_priv) -{ - struct i915_ggtt *ggtt = _priv->ggtt; - struct intel_engine_cs *engine; - enum intel_engine_id id; - - for_each_engine(engine, dev_priv, id) { - struct intel_timeline *tl; - - tl = >base.timeline.engine[engine->id]; - if (i915_gem_active_isset(>last_request)) - return false; - } - - return true; -} - static int ggtt_flush(struct drm_i915_private *i915) { int err; @@ -191,7 +174,7 @@ i915_gem_evict_something(struct i915_address_space *vm, if (!i915_is_ggtt(vm) || flags & PIN_NONBLOCK) return -ENOSPC; - if (ggtt_is_idle(dev_priv)) { + if (!dev_priv->gt.active_requests) { /* If we still have pending pageflip completions, drop * back to userspace to give our workqueues time to * acquire our locks and unpin the old scanouts. -- 2.14.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT
We only apply the hugepage PD redirection inside the ppGTT, so during i915_vma_insert() we want to exclude the GGTT from the additional alignment constraints (thereby avoiding the extra GTT pressure from fragmentation). Add an assert to document that intention alongside the comment. Signed-off-by: Chris WilsonCc: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_vma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c index 72e86b32ab41..2d27027eaf85 100644 --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -513,6 +513,8 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 alignment, u64 flags) rounddown_pow_of_two(vma->page_sizes.sg | I915_GTT_PAGE_SIZE_2M); + GEM_BUG_ON((flags & PIN_USER) == 0); /* No GGTT! */ + alignment = max(alignment, page_alignment); if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) -- 2.14.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/3] drm/i915: Retire after wait-for-idle on evict
We have to manually retire the requests in order to unpin the contexts, and thereby make their space available in the GGTT. So call retire after we idle the GPU to account for the lazy pinning. Signed-off-by: Chris Wilson--- drivers/gpu/drm/i915/i915_gem_evict.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 4df039ef2ce3..fc7e476448e3 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -157,17 +157,18 @@ i915_gem_evict_something(struct i915_address_space *vm, min_size, alignment, cache_level, start, end, mode); - /* Retire before we search the active list. Although we have + /* +* Retire before we search the active list. Although we have * reasonable accuracy in our retirement lists, we may have * a stray pin (preventing eviction) that can only be resolved by * retiring. */ +search_again: if (!(flags & PIN_NONBLOCK)) i915_gem_retire_requests(dev_priv); else phases[1] = NULL; -search_again: INIT_LIST_HEAD(_list); phase = phases; do { @@ -380,6 +381,8 @@ int i915_gem_evict_vm(struct i915_address_space *vm) ret = ggtt_flush(vm->i915); if (ret) return ret; + + i915_gem_retire_requests(vm->i915); } INIT_LIST_HEAD(_list); -- 2.14.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put()
On Fri, Sep 29, 2017 at 10:00 AM, Harsha Sharmawrote: > Replace instances of drm_framebuffer_reference/unreference() with > *_get/put() suffixes and drm_dev_unref with *_put() suffix > because get/put is shorter and consistent with the > kernel use of *_get/put suffixes. > Done with following coccinelle semantic patch > > @@ > expression ex; > @@ > > ( > -drm_framebuffer_unreference(ex); > +drm_framebuffer_put(ex); > | > -drm_dev_unref(ex); > +drm_dev_put(ex); > | > -drm_framebuffer_reference(ex); > +drm_framebuffer_get(ex); > ) > > > Signed-off-by: Harsha Sharma > --- > Changes in v2: > -Added coccinelle patch in log message > -cc to all driver-specific mailing lists > > drivers/gpu/drm/i915/i915_pci.c| 2 +- > drivers/gpu/drm/i915/intel_display.c | 10 +- > drivers/gpu/drm/i915/intel_fbdev.c | 4 ++-- > drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_evict.c| 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_gem_request.c | 2 +- > drivers/gpu/drm/i915/selftests/i915_vma.c | 2 +- > drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 2 +- > 10 files changed, 15 insertions(+), 15 deletions(-) > Hi, Any update regarding this ? Thanks. Regards, Harsha Sharma > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c > index 09d97e0..2f106cc 100644 > --- a/drivers/gpu/drm/i915/i915_pci.c > +++ b/drivers/gpu/drm/i915/i915_pci.c > @@ -510,7 +510,7 @@ static void i915_pci_remove(struct pci_dev *pdev) > struct drm_device *dev = pci_get_drvdata(pdev); > > i915_driver_unload(dev); > - drm_dev_unref(dev); > + drm_dev_put(dev); > } > > static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id > *ent) > diff --git a/drivers/gpu/drm/i915/intel_display.c > b/drivers/gpu/drm/i915/intel_display.c > index f172755..92f8304 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -2856,7 +2856,7 @@ static int skl_format_to_fourcc(int format, bool > rgb_order, bool alpha) > > if (intel_plane_ggtt_offset(state) == plane_config->base) { > fb = c->primary->fb; > - drm_framebuffer_reference(fb); > + drm_framebuffer_get(fb); > goto valid_fb; > } > } > @@ -2887,7 +2887,7 @@ static int skl_format_to_fourcc(int format, bool > rgb_order, bool alpha) > intel_crtc->pipe, PTR_ERR(intel_state->vma)); > > intel_state->vma = NULL; > - drm_framebuffer_unreference(fb); > + drm_framebuffer_put(fb); > return; > } > > @@ -2908,7 +2908,7 @@ static int skl_format_to_fourcc(int format, bool > rgb_order, bool alpha) > if (i915_gem_object_is_tiled(obj)) > dev_priv->preserve_bios_swizzle = true; > > - drm_framebuffer_reference(fb); > + drm_framebuffer_get(fb); > primary->fb = primary->state->fb = fb; > primary->crtc = primary->state->crtc = _crtc->base; > > @@ -9847,7 +9847,7 @@ struct drm_framebuffer * > if (obj->base.size < mode->vdisplay * fb->pitches[0]) > return NULL; > > - drm_framebuffer_reference(fb); > + drm_framebuffer_get(fb); > return fb; > #else > return NULL; > @@ -10028,7 +10028,7 @@ int intel_get_load_detect_pipe(struct drm_connector > *connector, > if (ret) > goto fail; > > - drm_framebuffer_unreference(fb); > + drm_framebuffer_put(fb); > > ret = drm_atomic_set_mode_for_crtc(_state->base, mode); > if (ret) > diff --git a/drivers/gpu/drm/i915/intel_fbdev.c > b/drivers/gpu/drm/i915/intel_fbdev.c > index 262e75c..1ff7149 100644 > --- a/drivers/gpu/drm/i915/intel_fbdev.c > +++ b/drivers/gpu/drm/i915/intel_fbdev.c > @@ -189,7 +189,7 @@ static int intelfb_create(struct drm_fb_helper *helper, > " releasing it\n", > intel_fb->base.width, intel_fb->base.height, > sizes->fb_width, sizes->fb_height); > - drm_framebuffer_unreference(_fb->base); > + drm_framebuffer_put(_fb->base); > intel_fb = ifbdev->fb = NULL; > } > if (!intel_fb || WARN_ON(!intel_fb->obj)) { > @@ -624,7 +624,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, > ifbdev->preferred_bpp = fb->base.format->cpp[0] * 8; > ifbdev->fb = fb; > > - drm_framebuffer_reference(>fb->base); > + drm_framebuffer_put(>fb->base); > > /* Final pass to check if any active pipes don't have fbs */ >