Re: [Intel-gfx] [PATCH 4/4] drm/i915: Extend skl+ crc sources with more planes

2019-02-14 Thread Rodrigo Vivi
On Thu, Feb 14, 2019 at 11:29:08PM +0200, Ville Syrjälä wrote: > On Thu, Feb 14, 2019 at 12:47:23PM -0800, Rodrigo Vivi wrote: > > On Thu, Feb 14, 2019 at 09:22:19PM +0200, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > On skl the crc registers were extended to provide plane crcs > >

[Intel-gfx] [PATCH 2/2] drm/i915/guc: Calling guc_disable_communication in all suspend paths

2019-02-14 Thread Sujaritha Sundaresan
This aim of this patch is to call guc_disable_communication in all suspend paths. The reason to introduce this is to resolve a bug that occured due to suspend late not being called in the hibernate devices path. Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Signed-off-by: Sujaritha Sundaresan

[Intel-gfx] [PATCH 1/2] drm/i915/guc: Splitting CT channel open/close functions

2019-02-14 Thread Sujaritha Sundaresan
The aim of this patch is to allow enabling and disabling of CTB without requiring the mutex lock. Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Signed-off-by: Sujaritha Sundaresan --- drivers/gpu/drm/i915/intel_guc.c| 12 drivers/gpu/drm/i915/intel_guc_ct.c | 85

[Intel-gfx] [PATCH 0/2] GuC suspend paths cleanup

2019-02-14 Thread Sujaritha Sundaresan
The work was started to fix bugs that were seen on the suspend and hibernate devices path.The initial issue to be seen was a warning with the CTB. In parallel there were issues seen on the suspend paths. This series works to resolve the errors in the GuC cleanup paths and be compatible with lockl

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/selftests: Always use an active engine while resetting

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915/selftests: Always use an active engine while resetting URL : https://patchwork.freedesktop.org/series/56633/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5601_full -> Patchwork_12218_full ==

[Intel-gfx] [PATCH V4 i-g-t] Skip VBlank tests in modules without VBlank

2019-02-14 Thread Rodrigo Siqueira
The kms_flip test relies on VBlank support, and this situation may exclude some virtual drivers to take advantage of this set of tests. This commit adds a mechanism that checks if a module has VBlank. If the target module has VBlank support, kms_flip will run all the VBlank tests; otherwise, the VB

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Extend skl+ crc sources with more planes

2019-02-14 Thread Ville Syrjälä
On Thu, Feb 14, 2019 at 12:47:23PM -0800, Rodrigo Vivi wrote: > On Thu, Feb 14, 2019 at 09:22:19PM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > On skl the crc registers were extended to provide plane crcs > > for up to 7 planes. Add the new crc sources. > > > > The current code us

Re: [Intel-gfx] [RFC PATCH 34/42] drm/i915/query: Expose memory regions through the query uAPI

2019-02-14 Thread Chris Wilson
Quoting Chris Wilson (2019-02-14 21:15:17) > Quoting Matthew Auld (2019-02-14 14:57:32) > > From: Abdiel Janulgue > > > > Returns the available memory region areas supported by the HW. > > This should include references to the Vulkan spec to show how it can be > used to convey the information re

Re: [Intel-gfx] [RFC PATCH 34/42] drm/i915/query: Expose memory regions through the query uAPI

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:32) > From: Abdiel Janulgue > > Returns the available memory region areas supported by the HW. This should include references to the Vulkan spec to show how it can be used to convey the information required by anv (and what must be inferred by userspace). T

Re: [Intel-gfx] [RFC PATCH 34/42] drm/i915/query: Expose memory regions through the query uAPI

2019-02-14 Thread Chris Wilson
Quoting Chris Wilson (2019-02-14 16:33:55) > Quoting Chris Wilson (2019-02-14 16:31:13) > > Quoting Matthew Auld (2019-02-14 14:57:32) > > > int i915_query_ioctl(struct drm_device *dev, void *data, struct drm_file > > > *file) > > > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Extend skl+ crc sources with more planes

2019-02-14 Thread Rodrigo Vivi
On Thu, Feb 14, 2019 at 09:22:19PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > On skl the crc registers were extended to provide plane crcs > for up to 7 planes. Add the new crc sources. > > The current code uses the ivb+ register definitions for skl+ > which does happen to work as the

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Remove the broken DP CRC support for g4x

2019-02-14 Thread Ville Syrjälä
On Thu, Feb 14, 2019 at 12:38:22PM -0800, Rodrigo Vivi wrote: > On Thu, Feb 14, 2019 at 09:22:18PM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > DP CRCs don't really work on g4x. If you want any CRCs on DP you must > > select the CRC source before the port is enabled, otherwise the

Re: [Intel-gfx] [PATCH 4/6] drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc

2019-02-14 Thread Juha-Pekka Heikkilä
Swati Sharma kirjoitti 13.2.2019 klo 15.25: The following pixel formats are packed format that follows 4:2:2 chroma sampling. For memory represenation each component is allocated 16 bits each. Thus each pixel occupies 32bit. Y210: For each component, valid data occupies MSB 10 bits.

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Remove the broken DP CRC support for g4x

2019-02-14 Thread Rodrigo Vivi
On Thu, Feb 14, 2019 at 09:22:18PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > DP CRCs don't really work on g4x. If you want any CRCs on DP you must > select the CRC source before the port is enabled, otherwise the CRC > source select bits simply ignore any writes to them. And once the

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Use named initializers for the crc source name array

2019-02-14 Thread Rodrigo Vivi
On Thu, Feb 14, 2019 at 09:22:17PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > We assume that the index of the string in the crc source names > array matches the enum value for the crc source. Let's use named > initializers to make sure that is indeed the case even if someone > rearrang

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Remove the "pf" crc source

2019-02-14 Thread Rodrigo Vivi
On Thu, Feb 14, 2019 at 09:22:16PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > The "pipe" and "pf" crc sources are in fact the same thing. > Remove the "pf" one. > > Signed-off-by: Ville Syrjälä I wonder where this came from Anyway, just by looking the current code: Reviewed-by

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Remove the "pf" crc source

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/4] drm/i915: Remove the "pf" crc source URL : https://patchwork.freedesktop.org/series/56692/ State : success == Summary == CI Bug Log - changes from CI_DRM_5602 -> Patchwork_12224 Summar

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/i915: Remove the "pf" crc source

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/4] drm/i915: Remove the "pf" crc source URL : https://patchwork.freedesktop.org/series/56692/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: Remove the "pf" crc source -drivers/gpu/drm/i915

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Remove the "pf" crc source

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/4] drm/i915: Remove the "pf" crc source URL : https://patchwork.freedesktop.org/series/56692/ State : warning == Summary == $ dim checkpatch origin/drm-tip 1d7270fc22b4 drm/i915: Remove the "pf" crc source 4c9ccf4ebd34 drm/i915: Use named in

[Intel-gfx] [PATCH 3/4] drm/i915: Remove the broken DP CRC support for g4x

2019-02-14 Thread Ville Syrjala
From: Ville Syrjälä DP CRCs don't really work on g4x. If you want any CRCs on DP you must select the CRC source before the port is enabled, otherwise the CRC source select bits simply ignore any writes to them. And once the port is enabled we mustn't change the CRC source select until the port is

[Intel-gfx] [PATCH 1/4] drm/i915: Remove the "pf" crc source

2019-02-14 Thread Ville Syrjala
From: Ville Syrjälä The "pipe" and "pf" crc sources are in fact the same thing. Remove the "pf" one. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_pipe_crc.c | 6 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH 2/4] drm/i915: Use named initializers for the crc source name array

2019-02-14 Thread Ville Syrjala
From: Ville Syrjälä We assume that the index of the string in the crc source names array matches the enum value for the crc source. Let's use named initializers to make sure that is indeed the case even if someone rearranges either the enum or the array. Signed-off-by: Ville Syrjälä --- driver

[Intel-gfx] [PATCH 4/4] drm/i915: Extend skl+ crc sources with more planes

2019-02-14 Thread Ville Syrjala
From: Ville Syrjälä On skl the crc registers were extended to provide plane crcs for up to 7 planes. Add the new crc sources. The current code uses the ivb+ register definitions for skl+ which does happen to work as the plane1, plane2, and dmux/pf bits happen the match what ivb+ had. So no bug i

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Disable PSR2 while getting pipe CRC

2019-02-14 Thread Dhinakaran Pandiyan
On Wed, 2019-02-13 at 18:02 -0800, José Roberto de Souza wrote: > As stated in CRC_CTL spec, after PSR entry state CRC will not be > calculated anymore what is not a problem as IGT tests do some screen > change and then request the pipe CRC right after the change so PSR > will go to idle state and

[Intel-gfx] [PATCH i-g-t] i915/gem_create: Verify that all new objects are clear

2019-02-14 Thread Chris Wilson
The kernel must not return stale information back to userspace when they create a new object. For that purpose, we always clear objects on creation, so verify that this is so. Signed-off-by: Chris Wilson Cc: Matthew Auld --- tests/i915/gem_create.c | 71 +

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Introduce memory region concept (including device local memory)

2019-02-14 Thread Patchwork
== Series Details == Series: Introduce memory region concept (including device local memory) URL : https://patchwork.freedesktop.org/series/56683/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: support 1G pages for the 48b PPGTT Okay! Commit

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Introduce memory region concept (including device local memory)

2019-02-14 Thread Patchwork
== Series Details == Series: Introduce memory region concept (including device local memory) URL : https://patchwork.freedesktop.org/series/56683/ State : warning == Summary == $ dim checkpatch origin/drm-tip 3a398101dfda drm/i915: support 1G pages for the 48b PPGTT e99e4b7bc632 drm/i915: enab

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Replace the fixed vblank evasion with a ewma of past update times

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915: Replace the fixed vblank evasion with a ewma of past update times URL : https://patchwork.freedesktop.org/series/56680/ State : success == Summary == CI Bug Log - changes from CI_DRM_5601 -> Patchwork_1 ===

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Defer application of request banning to submission (rev2)

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915: Defer application of request banning to submission (rev2) URL : https://patchwork.freedesktop.org/series/56626/ State : success == Summary == CI Bug Log - changes from CI_DRM_5599_full -> Patchwork_12217_full ==

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Replace the fixed vblank evasion with a ewma of past update times

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915: Replace the fixed vblank evasion with a ewma of past update times URL : https://patchwork.freedesktop.org/series/56680/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: Replace the fixed vblank evasion wi

[Intel-gfx] ✗ Fi.CI.BAT: failure for Gen8+ GPU Watchdog Reset Support (rev2)

2019-02-14 Thread Patchwork
== Series Details == Series: Gen8+ GPU Watchdog Reset Support (rev2) URL : https://patchwork.freedesktop.org/series/56587/ State : failure == Summary == Applying: drm/i915: Add engine reset count in get-reset-stats ioctl Applying: drm/i915: Watchdog timeout: IRQ handler for gen8+ Using index i

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/4] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset URL : https://patchwork.freedesktop.org/series/56647/ State : success == Summary == CI Bug Log - changes from CI_DRM_5601 -> Patchwork_12220 =

[Intel-gfx] [PATCH i-g-t] i915/gem_create: Verify that all new objects are clear

2019-02-14 Thread Chris Wilson
The kernel must not return stale information back to userspace when they create a new object. For that purpose, we always clear objects on creation, so verify that this is so. Signed-off-by: Chris Wilson Cc: Matthew Auld --- tests/i915/gem_create.c | 29 + 1 file cha

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/3] Revert "drm/i915: W/A for underruns with WM1+ disabled on icl"

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/3] Revert "drm/i915: W/A for underruns with WM1+ disabled on icl" URL : https://patchwork.freedesktop.org/series/56621/ State : success == Summary == CI Bug Log - changes from CI_DRM_5599_full -> Patchwork_12216_full ===

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/4] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset URL : https://patchwork.freedesktop.org/series/56647/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915/psr: Only lookup f

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset

2019-02-14 Thread Patchwork
== Series Details == Series: series starting with [1/4] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset URL : https://patchwork.freedesktop.org/series/56647/ State : warning == Summary == $ dim checkpatch origin/drm-tip e53ec9ed5dc6 drm/i915/psr: Only lookup for enabled CRT

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Only try to stop engines after a failed reset

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915: Only try to stop engines after a failed reset URL : https://patchwork.freedesktop.org/series/56636/ State : success == Summary == CI Bug Log - changes from CI_DRM_5601 -> Patchwork_12219 Summary --

Re: [Intel-gfx] [RFC PATCH 34/42] drm/i915/query: Expose memory regions through the query uAPI

2019-02-14 Thread Chris Wilson
Quoting Chris Wilson (2019-02-14 16:31:13) > Quoting Matthew Auld (2019-02-14 14:57:32) > > int i915_query_ioctl(struct drm_device *dev, void *data, struct drm_file > > *file) > > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h > > index 26d2274b5d2b..5a102a5cb415 100644 >

Re: [Intel-gfx] [RFC PATCH 34/42] drm/i915/query: Expose memory regions through the query uAPI

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:32) > int i915_query_ioctl(struct drm_device *dev, void *data, struct drm_file > *file) > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h > index 26d2274b5d2b..5a102a5cb415 100644 > --- a/include/uapi/drm/i915_drm.h > +++ b/include/uap

Re: [Intel-gfx] [RFC PATCH 42/42] HAX drm/i915/lmem: default userspace allocations to LMEM

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:40) > Hack patch to default all userspace allocations to LMEM. Useful for > testing purposes. One caveat to note is that userspace assumes objects start idle in .write=CPU. That assumption may very well be put to the test, and go unnoticed for quite a while..

Re: [Intel-gfx] [RFC PATCH 35/42] drm/i915: Introduce GEM_OBJECT_SETPARAM with I915_PARAM_MEMORY_REGION

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:33) > From: Abdiel Janulgue > > This call will specify which memory region an object should be placed. > > Note that changing the object's backing storage should be immediately > done after an object is created or if it's not yet in use, otherwise > this wi

Re: [Intel-gfx] [RFC PATCH 42/42] HAX drm/i915/lmem: default userspace allocations to LMEM

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:40) > Hack patch to default all userspace allocations to LMEM. Useful for > testing purposes. > > Signed-off-by: Matthew Auld > Cc: Joonas Lahtinen > Cc: Abdiel Janulgue > --- > drivers/gpu/drm/i915/i915_gem.c | 45 +++-- > 1 f

Re: [Intel-gfx] [RFC PATCH 29/42] drm/i915: Set correct vmf source pages for gem objects

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:27) > +int i915_gem_vmf_fill_pages_cpu(struct drm_i915_gem_object *obj, > +struct vm_fault *vmf, > +pgoff_t page_offset) > +{ > + struct vm_area_struct *area = vmf->vma; > +

Re: [Intel-gfx] [RFC PATCH 31/42] drm/i915: cpu-map based dumb buffers

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:29) > From: Abdiel Janulgue > > If there is no aperture we can't use map_gtt to map dumb buffers, so we > need a cpu-map based path to do it. We prefer map_gtt on platforms that > do have aperture. This is very hard as a standalone patch to see if you the s

Re: [Intel-gfx] [RFC PATCH 30/42] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:28) > @@ -157,6 +163,10 @@ struct drm_i915_gem_object { > unsigned int userfault_count; > struct list_head userfault_link; > > + enum i915_cpu_mmap_origin_type mmap_origin; > + atomic_t mmap_count; > + u64 mmap_flags; These

Re: [Intel-gfx] [RFC PATCH 28/42] drm/i915: Split out GTT fault handler to make it generic

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:26) > From: Abdiel Janulgue > > In preparation for using multiple page-fault handlers depending > on the object's backing storage. > > Signed-off-by: Abdiel Janulgue > Cc: Joonas Lahtinen > --- > drivers/gpu/drm/i915/i915_gem.c | 112 +++-

Re: [Intel-gfx] [RFC PATCH 26/42] drm/i915: error capture with no ggtt slot

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:24) > + void *s; > + struct page *page; > + > + for_each_sgt_page(page, iter, vma->pages) { > + s = kmap_atomic(page); These pages are not coherent, so missing the point of using UC/WC access to

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Always use an active engine while resetting

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915/selftests: Always use an active engine while resetting URL : https://patchwork.freedesktop.org/series/56633/ State : success == Summary == CI Bug Log - changes from CI_DRM_5601 -> Patchwork_12218 Summar

Re: [Intel-gfx] [RFC PATCH 20/42] drm/i915/lmem: support pread

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:18) > + ret = mutex_lock_interruptible(&i915->drm.struct_mutex); > + if (ret) > + goto out_unpin; > + > + wakeref = intel_runtime_pm_get(i915); But why wakeref in the middle? > + > + ret = i915_gem_object_set_to_wc_domain

Re: [Intel-gfx] [RFC PATCH 18/42] drm/i915/lmem: support CPU relocations

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:16) > We need to support doing relocations from the CPU when dealing with LMEM > objects. Why not just use the GPU reloc? Please do explain the relative merits. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.free

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/psr: Bump vblank evasion time for seamless updates

2019-02-14 Thread Patchwork
== Series Details == Series: drm/i915/psr: Bump vblank evasion time for seamless updates URL : https://patchwork.freedesktop.org/series/56618/ State : success == Summary == CI Bug Log - changes from CI_DRM_5599_full -> Patchwork_12215_full

Re: [Intel-gfx] [RFC PATCH 14/42] drm/i915: introduce kernel blitter_context

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:12) > We may be without a context to perform various internal blitter > operations, for example when performing object migration. Piggybacking > off the kernel_context is probably a bad idea, since it has other uses. Explain why it is a worse idea than creati

Re: [Intel-gfx] [RFC PATCH 13/42] drm/i915: support object clearing via blitter engine

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:11) > +static int i915_gem_object_fill_blt(struct i915_gem_context *ctx, > + struct drm_i915_gem_object *obj, > + u32 value) > +{ > + struct drm_i915_private *i915 = to_i915(obj->base.de

Re: [Intel-gfx] [RFC PATCH 13/42] drm/i915: support object clearing via blitter engine

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:11) > +static struct i915_vma * > +__i915_gem_fill_blt(struct i915_vma *vma, u32 value) > +{ > + struct drm_i915_private *i915 = to_i915(vma->obj->base.dev); > + const int gen = INTEL_GEN(i915); > + struct drm_i915_gem_object *obj; > +

Re: [Intel-gfx] [RFC PATCH 13/42] drm/i915: support object clearing via blitter engine

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:11) > diff --git a/drivers/gpu/drm/i915/intel_gpu_commands.h > b/drivers/gpu/drm/i915/intel_gpu_commands.h > index b96a31bc1080..f74ff1d095c2 100644 > --- a/drivers/gpu/drm/i915/intel_gpu_commands.h > +++ b/drivers/gpu/drm/i915/intel_gpu_commands.h > @@ -175,

Re: [Intel-gfx] [RFC PATCH 10/42] drm/i915/lmem: add helper to get CPU visible pfn

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:08) > From: Abdiel Janulgue Why? So can something without a CPU visible struct page even have a pfn? > Signed-off-by: Abdiel Janulgue > Signed-off-by: Matthew Auld > Cc: Joonas Lahtinen > --- > drivers/gpu/drm/i915/intel_region_lmem.c | 11 +++

Re: [Intel-gfx] [RFC PATCH 09/42] drm/i915: support creating LMEM objects

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:07) > +int intel_memory_region_live_selftests(struct drm_i915_private *i915) > +{ > + static const struct i915_subtest tests[] = { > + SUBTEST(igt_lmem_create), > + }; > + struct i915_gem_context *ctx; > + struct drm_file

Re: [Intel-gfx] [RFC PATCH 05/42] drm/i915/region: support basic eviction

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:03) > Support basic eviction for regions. > > Signed-off-by: Matthew Auld > Cc: Joonas Lahtinen > Cc: Abdiel Janulgue > --- > drivers/gpu/drm/i915/i915_drv.h | 2 + > drivers/gpu/drm/i915/i915_gem.c | 16 > drivers/gpu/dr

Re: [Intel-gfx] [RFC PATCH 04/42] drm/i915: introduce intel_memory_region

2019-02-14 Thread Chris Wilson
Quoting Matthew Auld (2019-02-14 14:57:02) > +int > +i915_memory_region_get_pages_buddy(struct drm_i915_gem_object *obj) > +{ > + struct intel_memory_region *mem = obj->memory_region; > + resource_size_t size = obj->base.size; > + struct sg_table *st; > + struct scatterlist

[Intel-gfx] [RFC PATCH 34/42] drm/i915/query: Expose memory regions through the query uAPI

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue Returns the available memory region areas supported by the HW. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_query.c | 57 +++ include/uapi/drm/i915_drm.h | 40 +

[Intel-gfx] [RFC PATCH 40/42] drm/i915: setup io-mapping for LMEM

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/intel_region_lmem.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_region_lmem.c b/drivers/gpu/drm/i915/intel_region_lmem.c

[Intel-gfx] [RFC PATCH 41/42] HAX drm/i915: add the fake lmem region

2019-02-14 Thread Matthew Auld
Intended for upstream testing so that we can still exercise the LMEM plumbing and !HAS_MAPPABLE_APERTURE paths. Smoke tested on Skull Canyon device. This works by allocating an intel_memory_region for a reserved portion of system memory, which we treat like LMEM. For the LMEMBAR we steal the apertu

[Intel-gfx] [RFC PATCH 23/42] drm/i915: do not map aperture if it is not available.

2019-02-14 Thread Matthew Auld
From: Daniele Ceraolo Spurio Skip both setup and cleanup of the aperture mapping if the HW doesn't have an aperture bar. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_gtt.c | 34 ++--- 1 file changed, 21 insertions(+), 13 dele

[Intel-gfx] [RFC PATCH 42/42] HAX drm/i915/lmem: default userspace allocations to LMEM

2019-02-14 Thread Matthew Auld
Hack patch to default all userspace allocations to LMEM. Useful for testing purposes. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_gem.c | 45 +++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/d

[Intel-gfx] [RFC PATCH 21/42] drm/i915/lmem: support pwrite

2019-02-14 Thread Matthew Auld
We need to add support for pwrite'ing an LMEM object. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/intel_region_lmem.c | 73 1 file changed, 73 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_region_lmem.c b/drive

[Intel-gfx] [RFC PATCH 15/42] drm/i915: support copying objects via blitter engine

2019-02-14 Thread Matthew Auld
We need to support copying from one object backing store to another for object migration. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_drv.h | 3 + drivers/gpu/drm/i915/i915_gem.c | 187 ++ drive

[Intel-gfx] [RFC PATCH 31/42] drm/i915: cpu-map based dumb buffers

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue If there is no aperture we can't use map_gtt to map dumb buffers, so we need a cpu-map based path to do it. We prefer map_gtt on platforms that do have aperture. Signed-off-by: Abdiel Janulgue Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Matthew Auld --- drivers/g

[Intel-gfx] [RFC PATCH 25/42] drm/i915: set num_fence_regs to 0 if there is no aperture

2019-02-14 Thread Matthew Auld
From: Daniele Ceraolo Spurio We can't fence anything without aperture. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_gem.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i9

[Intel-gfx] [RFC PATCH 12/42] drm/i915/selftests: exercise huge-pages for LMEM

2019-02-14 Thread Matthew Auld
We already exercise huge-pages for our other object types, so add LMEM objects to the list. Also try our luck with 1G pages. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/selftests/huge_pages.c | 121 +++- 1 file changed, 120 inser

[Intel-gfx] [RFC PATCH 19/42] drm/i915: add vfunc for pread

2019-02-14 Thread Matthew Auld
Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_gem.c| 6 ++ drivers/gpu/drm/i915/i915_gem_object.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 3f3195

[Intel-gfx] [RFC PATCH 07/42] drm/i915/region: support volatile objects

2019-02-14 Thread Matthew Auld
Volatile objects are marked as DONTNEED while pinned, therefore once unpinned the backing store can be discarded. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_gem_object.h| 3 +- drivers/gpu/drm/i915/intel_memory_region.c| 10 ++

[Intel-gfx] [RFC PATCH 27/42] drm/i915: Don't try to place HWS in non-existing mappable region

2019-02-14 Thread Matthew Auld
From: Michal Wajdeczko HWS placement restrictions can't just rely on HAS_LLC flag. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c

[Intel-gfx] [RFC PATCH 20/42] drm/i915/lmem: support pread

2019-02-14 Thread Matthew Auld
We need to add support for pread'ing an LMEM object. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/intel_region_lmem.c | 73 1 file changed, 73 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_region_lmem.c b/driver

[Intel-gfx] [RFC PATCH 33/42] UPSTREAM: drm/i915/query: Split out query item checks

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue This simplifies adding new query item objects. Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_query.c | 40 --- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_query.c

[Intel-gfx] [RFC PATCH 30/42] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue CPU mmap implementation depending on the object's backing pages. At the moment we introduce shmem and local-memory BAR fault handlers Note that the mmap type is done one at a time to circumvent the DRM offset manager limitation. Note that we multiplex mmap_gtt and mmap_offse

[Intel-gfx] [RFC PATCH 28/42] drm/i915: Split out GTT fault handler to make it generic

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue In preparation for using multiple page-fault handlers depending on the object's backing storage. Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem.c | 112 +++- 1 file changed, 66 insertions(+), 46 deletions(

[Intel-gfx] [RFC PATCH 32/42] drm/i915: Add fill_pages handler for dma_buf imported objects

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue Use the plumbing from the new mmap_offset infrastructure to implement gtt-mmaps. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_gem.c| 8 drivers/gpu/drm/i915/i915_gem_dmabuf.c | 14 ++ drivers/gpu/drm/i915/i91

[Intel-gfx] [RFC PATCH 37/42] drm/i915: enumerate and init each supported region

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue Nothing to enumerate yet... Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem_gtt.c | 73 ++--- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i91

[Intel-gfx] [RFC PATCH 35/42] drm/i915: Introduce GEM_OBJECT_SETPARAM with I915_PARAM_MEMORY_REGION

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue This call will specify which memory region an object should be placed. Note that changing the object's backing storage should be immediately done after an object is created or if it's not yet in use, otherwise this will fail on a busy object. Signed-off-by: Abdiel Janulgue

[Intel-gfx] [RFC PATCH 04/42] drm/i915: introduce intel_memory_region

2019-02-14 Thread Matthew Auld
Support memory regions, as defined by a given (start, end), and allow creating GEM objects which are backed by said region. Signed-off-by: Matthew Auld Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [RFC PATCH 01/42] drm/i915: support 1G pages for the 48b PPGTT

2019-02-14 Thread Matthew Auld
Support inserting 1G gtt pages into the 48b PPGTT. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Signed-off-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/i915_debugfs.c | 4 drivers/gpu/drm/i915/i915_gem_gtt.c | 16 +--- drivers/gp

[Intel-gfx] [RFC PATCH 10/42] drm/i915/lmem: add helper to get CPU visible pfn

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_region_lmem.c | 11 +++ drivers/gpu/drm/i915/intel_region_lmem.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_reg

[Intel-gfx] [RFC PATCH 00/42] Introduce memory region concept (including device local memory)

2019-02-14 Thread Matthew Auld
In preparation for upcoming devices with device local memory, introduce the concept of different memory regions, and a simple buddy allocator to manage them. At the end of the series are a couple of HAX patches which introduce a fake local memory region for testing purposes. Currently smoke tested

[Intel-gfx] [RFC PATCH 38/42] drm/i915: treat shmem as a region

2019-02-14 Thread Matthew Auld
Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_drv.h| 2 + drivers/gpu/drm/i915/i915_gem.c| 89 ++ drivers/gpu/drm/i915/i915_gem_gtt.c| 11 ++- drivers/gpu/drm/i915/intel_memory_region.c | 9

[Intel-gfx] [RFC PATCH 39/42] drm/i915: treat stolen as a region

2019-02-14 Thread Matthew Auld
Convert stolen memory over to a region object. Still leaves open the question with what to do with pre-allocated objects... Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_drv.h| 3 +- drivers/gpu/drm/i915/i915_gem_gtt.c| 1

[Intel-gfx] [RFC PATCH 36/42] drm/i915/lmem: include debugfs metrics

2019-02-14 Thread Matthew Auld
Useful for debugging. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_debugfs.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index fe

[Intel-gfx] [RFC PATCH 26/42] drm/i915: error capture with no ggtt slot

2019-02-14 Thread Matthew Auld
From: Daniele Ceraolo Spurio If the aperture is not available in HW we can't use a ggtt slot and wc copy, so fal back to regular kmap. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_gem_gtt.c | 19 drivers/gpu/drm/i915/i915_gpu_er

[Intel-gfx] [RFC PATCH 24/42] drm/i915: expose missing map_gtt support to users

2019-02-14 Thread Matthew Auld
From: Daniele Ceraolo Spurio Done by returning -ENODEV from the map_gtt version ioctl. Cc: Antonio Argenziano Cc: Matthew Auld Signed-off-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/dri

[Intel-gfx] [RFC PATCH 29/42] drm/i915: Set correct vmf source pages for gem objects

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue This allows page-faults from objects with different backing stores from a single interface. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1

[Intel-gfx] [RFC PATCH 17/42] drm/i915/lmem: support kernel mapping

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue We can create LMEM objects, but we also need to support mapping them into kernel space for internal use. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem.c | 18 ++- drivers/gpu/drm/i915/inte

[Intel-gfx] [RFC PATCH 22/42] drm/i915: define HAS_MAPPABLE_APERTURE

2019-02-14 Thread Matthew Auld
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[Intel-gfx] [RFC PATCH 16/42] drm/i915: support basic object migration

2019-02-14 Thread Matthew Auld
We are going want to able to move objects between different regions like system memory and local memory. In the future everything should be just another region. Signed-off-by: Matthew Auld Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_drv

[Intel-gfx] [RFC PATCH 18/42] drm/i915/lmem: support CPU relocations

2019-02-14 Thread Matthew Auld
We need to support doing relocations from the CPU when dealing with LMEM objects. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue Cc: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 67 ++ 1 file changed, 56 insertions(+), 11 deletions(-)

[Intel-gfx] [RFC PATCH 14/42] drm/i915: introduce kernel blitter_context

2019-02-14 Thread Matthew Auld
We may be without a context to perform various internal blitter operations, for example when performing object migration. Piggybacking off the kernel_context is probably a bad idea, since it has other uses. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm

[Intel-gfx] [RFC PATCH 13/42] drm/i915: support object clearing via blitter engine

2019-02-14 Thread Matthew Auld
Support clearing objects via the blitter engine. This is needed for LMEM where we need to clear the backing store before handing the object to userspace. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/d

[Intel-gfx] [RFC PATCH 02/42] drm/i915: enable platform support for 1G pages

2019-02-14 Thread Matthew Auld
For gen8+ platforms which support the 48b PPGTT, enable support for 1G pages. Also enable for mock testing. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_pci.c | 6 -- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3

[Intel-gfx] [RFC PATCH 05/42] drm/i915/region: support basic eviction

2019-02-14 Thread Matthew Auld
Support basic eviction for regions. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem.c | 16 drivers/gpu/drm/i915/i915_gem_object.h| 7 ++ drivers/gpu/drm/i915

[Intel-gfx] [RFC PATCH 11/42] drm/i915/selftests: exercise writes to LMEM

2019-02-14 Thread Matthew Auld
Quick and dirty test to exercise writing through LMEM from the GPU/CPU. We currently don't have an LMEM region so these tests should just skip for now. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- .../drm/i915/selftests/intel_memory_region.c | 225 ++

[Intel-gfx] [RFC PATCH 08/42] drm/i915: Add memory region information to device_info

2019-02-14 Thread Matthew Auld
From: Abdiel Janulgue Exposes available regions for the platform. Shared memory will always be available. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 12 drivers/gpu/dr

[Intel-gfx] [RFC PATCH 03/42] drm/i915: buddy allocator

2019-02-14 Thread Matthew Auld
Really simply buddy allocator. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_gem_buddy.c | 206 + drivers/gpu/drm/i915/i915_gem_buddy.h | 118 ++ .

  1   2   >