[Intel-gfx] lib: Fix out of tree build of version.h

2014-12-11 Thread Joonas Lahtinen
Currently out of tree build fails because the version.h.tmp is generated into the source directory instead of the build directory where it is later looked for. This commit fixes it. From 2c0617e21101d69e7219c6660936c0015f93f8ee Mon Sep 17 00:00:00 2001 From: Joonas Lahtinen joonas.lahti

Re: [Intel-gfx] lib: Fix out of tree build of version.h

2014-12-11 Thread Joonas Lahtinen
it is later looked for. This commit fixes it. From 2c0617e21101d69e7219c6660936c0015f93f8ee Mon Sep 17 00:00:00 2001 From: Joonas Lahtinen joonas.lahti...@linux.intel.com Date: Thu, 11 Dec 2014 15:05:11 +0200 Subject: [PATCH] lib: Fix out of tree build of version.h Write the version.h.tmp

Re: [Intel-gfx] [patch] drm/i915: memory leak in __i915_gem_vma_create()

2015-03-18 Thread Joonas Lahtinen
On ke, 2015-03-18 at 09:41 +0100, Daniel Vetter wrote: On Wed, Mar 18, 2015 at 10:36:45AM +0200, Jani Nikula wrote: On Wed, 18 Mar 2015, Dan Carpenter dan.carpen...@oracle.com wrote: In the original code then if WARN_ON(i915_is_ggtt(vm) != !!ggtt_view) was true then we leak vma.

Re: [Intel-gfx] [PATCH 1/7] drm/i915/skl: Extract tile height code into a helper function

2015-03-18 Thread Joonas Lahtinen
int. * Make it take pixel_format for consistency and simplicity. Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Reviewed-by: Michel Thierry michel.thie...@intel.com (v1) Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com (v4) --- drivers/gpu/drm/i915/intel_display.c | 43

Re: [Intel-gfx] [PATCH 2/7] drm/i915: Use GGTT view when (un)pinning objects to planes

2015-03-18 Thread Joonas Lahtinen
the callers default to the normal view. v2: Rebased for ggtt view changes. Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 14 +++--- drivers/gpu/drm/i915/i915_gem.c | 22

Re: [Intel-gfx] [PATCH 3/7] drm/i915: Pass in plane state when (un)pinning frame buffers

2015-03-18 Thread Joonas Lahtinen
. Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/intel_display.c | 18 -- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_fbdev.c | 2 +- 3 files changed

Re: [Intel-gfx] [PATCH 4/7] drm/i915: Helper function to determine GGTT view from plane state

2015-03-18 Thread Joonas Lahtinen
I'd fix the below code style corrections, the functionality is ok. On ti, 2015-03-17 at 15:45 +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin tvrtko.ursu...@intel.com For now only default implementation defaulting to normal view. Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com

[Intel-gfx] [PATCH v3] drm/i915: Do not use ggtt_view with (aliasing) PPGTT

2015-03-16 Thread Joonas Lahtinen
that valid parameters are passed - More readable error checking v3: - Prefer WARN_ONCE over BUG_ON when there is code path for failure Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 102 + drivers/gpu/drm/i915/i915_gem.c

Re: [Intel-gfx] [PATCH v2] drm/i915: Do not use ggtt_view with (aliasing) PPGTT

2015-03-16 Thread Joonas Lahtinen
On to, 2015-03-12 at 12:21 +, Tvrtko Ursulin wrote: Hi, Much more likeable in general, some comments inline: On 03/12/2015 11:10 AM, Joonas Lahtinen wrote: GGTT views are only applicable when dealing with GGTT. Change the code to reject ggtt_view where it should not be used

Re: [Intel-gfx] [PATCH v3] drm/i915: Do not use ggtt_view with (aliasing) PPGTT

2015-03-16 Thread Joonas Lahtinen
Hi, Regression testing completed without problems for BYT, HSW and BDW already. On ma, 2015-03-16 at 13:26 +, Tvrtko Ursulin wrote: Hi, On 03/16/2015 12:11 PM, Joonas Lahtinen wrote: GGTT views are only applicable when dealing with GGTT. Change the code to reject ggtt_view where

Re: [Intel-gfx] [PATCH v3] drm/i915: Do not use ggtt_view with (aliasing) PPGTT

2015-03-16 Thread Joonas Lahtinen
On ma, 2015-03-16 at 18:50 +0100, Daniel Vetter wrote: On Mon, Mar 16, 2015 at 02:11:13PM +0200, Joonas Lahtinen wrote: [snip] int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level, u32 flags); @@ -2800,60 +2796,48 @@ struct dma_buf

[Intel-gfx] [PATCH] drm/i915: Compare GGTT view structs instead of types

2015-03-17 Thread Joonas Lahtinen
. partial views. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 8 drivers/gpu/drm/i915/i915_gem.c | 34 ++ drivers/gpu/drm/i915/i915_gem_gtt.c | 12 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h

Re: [Intel-gfx] [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping

2015-03-20 Thread Joonas Lahtinen
Hi, On pe, 2015-03-20 at 12:11 +, Tvrtko Ursulin wrote: On 03/20/2015 12:01 PM, Joonas Lahtinen wrote: On to, 2015-03-19 at 15:07 +, Tvrtko Ursulin wrote: Hi, On 03/19/2015 01:02 PM, Joonas Lahtinen wrote: static inline int i915_get_ggtt_vma_pages(struct i915_vma *vma

Re: [Intel-gfx] [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping

2015-03-19 Thread Joonas Lahtinen
that actually returns the size of an VMA which may not exist. * Rebased for ggtt view changes. For: VIZ-4726 Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Reviewed-by: Michel Thierry michel.thie...@intel.com (v4) Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu

Re: [Intel-gfx] [PATCH 6/7] drm/i915/skl: Query display address through a wrapper

2015-03-19 Thread Joonas Lahtinen
...@intel.com Reviewed-by: Michel Thierry michel.thie...@intel.com Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com (v5) --- drivers/gpu/drm/i915/intel_display.c | 23 +-- drivers/gpu/drm/i915/intel_drv.h | 9 + drivers/gpu/drm/i915/intel_sprite.c

Re: [Intel-gfx] [PATCH 7/7] drm/i915/skl: Take 90/270 rotation into account in watermark calculations

2015-03-19 Thread Joonas Lahtinen
Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Reviewed-by: Michel Thierry michel.thie...@intel.com (v3) Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com (v4) --- drivers/gpu/drm/i915/intel_display.c | 27 +++ drivers/gpu/drm/i915/intel_drv.h

Re: [Intel-gfx] [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping

2015-03-20 Thread Joonas Lahtinen
On to, 2015-03-19 at 15:07 +, Tvrtko Ursulin wrote: Hi, On 03/19/2015 01:02 PM, Joonas Lahtinen wrote: static inline int i915_get_ggtt_vma_pages(struct i915_vma *vma) Same rant about function signatures as on earlier patch, put all on the same line like most of new the code

[Intel-gfx] [PATCH] drm/i915: Do not use ggtt_view with (aliasing) PPGTT

2015-03-09 Thread Joonas Lahtinen
GGTT views are only applicable when dealing with GGTT. Change the code to reject ggtt_view where it should not be used and require it when it should be. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 91 drivers

[Intel-gfx] [PATCH v2] drm/i915: Do not use ggtt_view with (aliasing) PPGTT

2015-03-12 Thread Joonas Lahtinen
that valid parameters are passed - More readable error checking Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 102 +- drivers/gpu/drm/i915/i915_gem.c | 169 +++- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v2] drm/i915: Compare GGTT view structs instead of types

2015-03-24 Thread Joonas Lahtinen
The patch could be committed then with the R-B. On ma, 2015-03-23 at 13:39 +, Tvrtko Ursulin wrote: On 03/23/2015 12:51 PM, Joonas Lahtinen wrote: Preparatory code to decrease amount of conflicts between rotated and partial views code. To allow for views where the view type

[Intel-gfx] [PATCH i-g-t v4] tests: install test programs to libexec

2015-03-31 Thread Joonas Lahtinen
Cc: Thomas Wood thomas.w...@intel.com Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/Makefile.am | 21 ++--- tests/Makefile.sources | 16 ++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/tests/Makefile.am b/tests

[Intel-gfx] [PATCH i-g-t v5] tests: install test programs to libexec

2015-03-31 Thread Joonas Lahtinen
with packagers. v4: - Fixed commit message. v5: - Add file locator helper to retain backwards compatibility. (Thomas Wood) - Test with testdisplay -r option that draws the .png file. Cc: Chris Wilson ch...@chris-wilson.co.uk Cc: Thomas Wood thomas.w...@intel.com Signed-off-by: Joonas Lahtinen joonas.lahti

Re: [Intel-gfx] [PATCH v3] drm/i915: Simplify and fix object to display tracking

2015-03-31 Thread Joonas Lahtinen
On ti, 2015-03-31 at 13:55 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin tvrtko.ursu...@intel.com Purpose of this tracking is to know when to flush the cache between the CPU and the non-coherent display engine. Prior to: commit 121920faf2ccce9aa66a7e2588415c9647b66104 Author:

Re: [Intel-gfx] [PATCH i-g-t v2] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
Hi, On to, 2015-03-26 at 16:14 +, Chris Wilson wrote: On Thu, Mar 26, 2015 at 06:05:27PM +0200, Joonas Lahtinen wrote: Install the test programs by default so that they can be packaged. v2: - Install more tests including scripts and their data Packaged by whom? Developers

Re: [Intel-gfx] [PATCH i-g-t v2] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
On to, 2015-03-26 at 17:29 +, Thomas Wood wrote: On 26 March 2015 at 16:05, Joonas Lahtinen joonas.lahti...@linux.intel.com wrote: Install the test programs by default so that they can be packaged. Could you also explain why the tests should be packaged? Explained in previous e-mail

[Intel-gfx] [PATCH i-g-t v2] tests: install test programs to libexec

2015-03-26 Thread Joonas Lahtinen
Install the test programs by default so that they can be packaged. v2: - Install more tests including scripts and their data Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/Makefile.am | 22 +++--- tests/Makefile.sources | 10 -- 2 files

[Intel-gfx] [PATCH v4] drm/i915: Compare GGTT view structs instead of types

2015-03-27 Thread Joonas Lahtinen
tvrtko.ursu...@linux.intel.com (v2) Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 8 drivers/gpu/drm/i915/i915_gem.c | 16 +--- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++ drivers/gpu/drm/i915/i915_gem_gtt.h

[Intel-gfx] [PATCH v3] drm/i915: Compare GGTT view structs instead of types

2015-03-27 Thread Joonas Lahtinen
patches. Add rotated view singleton. - If one view is missing in comparison they're equal only if both are missing. Cc: Daniel Vetter dan...@ffwll.ch Reviewed-by: Tvrtko Ursulin tvrtko.ursu...@linux.intel.com (v2) Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH i-g-t v3] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/Makefile.am | 21 ++--- tests/Makefile.sources | 16 ++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index f45c6c9..5cce450 100644 --- a/tests

Re: [Intel-gfx] [PATCH i-g-t v3] tests: install test programs to libexec

2015-03-27 Thread Joonas Lahtinen
On pe, 2015-03-27 at 10:51 +0200, Joonas Lahtinen wrote: Install the test programs by default so that they can be packaged. Tested the testdisplay test so that it still runs after modifications, as it depends on script data. Duh, s/depends on script data/depends on a data file/. Also

Re: [Intel-gfx] [PATCH 4/7] drm/i915: Helper function to determine GGTT view from plane state

2015-03-23 Thread Joonas Lahtinen
On ma, 2015-03-23 at 11:10 +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin tvrtko.ursu...@intel.com For now only default implementation defaulting to normal view. v2: Some code review cleanups. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Reviewed-by: Joonas

[Intel-gfx] [PATCH v2] drm/i915: Compare GGTT view structs instead of types

2015-03-23 Thread Joonas Lahtinen
including parameters like offset to be included in the view which is useful for eg. partial views. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_drv.h | 8 drivers/gpu/drm/i915/i915_gem.c | 26 ++ drivers/gpu

Re: [Intel-gfx] [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping

2015-03-23 Thread Joonas Lahtinen
that actually returns the size of an VMA which may not exist. * Rebased for ggtt view changes. v9: * Rebased after code review changes on the preceding patches. * Tidy function definitions. (Joonas Lahtinen) For: VIZ-4726 Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com

Re: [Intel-gfx] [PATCH 2/7] drm/i915: Use GGTT view when (un)pinning objects to planes

2015-03-23 Thread Joonas Lahtinen
the callers default to the normal view. v2: Rebased for ggtt view changes. v3: Don't limit PIN_MAPPABLE to normal views just yet. (Joonas Lahtinen) Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com (v3) --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH i-g-t] tests: install test programs to libexec

2015-03-25 Thread Joonas Lahtinen
Install the test programs by default so that they can be packaged. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/Makefile.sources | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.sources b/tests/Makefile.sources index a165978

[Intel-gfx] [PATCH i-g-t v5] tests/gem_mmap_gtt: add huge BO test

2015-04-14 Thread Joonas Lahtinen
Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 106 +++ 1 file changed, 106 insertions(+) diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index 115e398..487eecf 100644

[Intel-gfx] [PATCH 5/5] drm/i915: Use partial view in mmap fault handler

2015-04-24 Thread Joonas Lahtinen
Use partial view for huge BOs (bigger than half the mappable aperture) in fault handler so that they can be accessed withough trying to make room for them by evicting other objects. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem.c | 67

[Intel-gfx] [PATCH 0/5] Partial GGTT views

2015-04-24 Thread Joonas Lahtinen
to virtualization. (vGT) Tiling is not supported yet. Other than that, the gem_mmap_gtt suite passes without errors even when the mmap fault handler would be converted to unconditionally use partial views. Regards, Joonas Joonas Lahtinen (5): drm/i915: Do not clear mappings beyond VMA size drm/i915: Do

[Intel-gfx] [PATCH 1/5] drm/i915: Do not clear mappings beyond VMA size

2015-04-24 Thread Joonas Lahtinen
Do not to clear mappings outside the allocated VMA under any circumstances. Only clear the smaller of VMA or object page count. This is required to allow creating partial object VMAs which in turn are needed for partial GGTT views. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com

[Intel-gfx] [PATCH 2/5] drm/i915: Do not make assumptions on GGTT VMA sizes

2015-04-24 Thread Joonas Lahtinen
GGTT VMA sizes might be smaller than the whole object size due to different GGTT views. v2: - Separate GGTT view constraint calculations from normal view constraint calculations (Chris Wilson) Cc: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen joonas.lahti

[Intel-gfx] [PATCH 3/5] drm/i915: Consider object pinned if any VMA is pinned

2015-04-24 Thread Joonas Lahtinen
Do not skip special GGTT views when considering whether an object is pinned or not. Wrong behaviour was introduced in; commit ec7adb6ee79c8c9fe64d63ad638a31cd62e55515 Author: Joonas Lahtinen joonas.lahti...@linux.intel.com Date: Mon Mar 16 14:11:13 2015 +0200 drm/i915: Do not use

[Intel-gfx] [PATCH 4/5] drm/i915: Add a partial GGTT view type

2015-04-24 Thread Joonas Lahtinen
Partial view type allows manipulating parts of huge BOs through the GGTT, which was not previously possible due to constraint that whole object had to be mapped for any access to it through GGTT. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt: Use PAGE_SIZE instead of hard coded value

2015-04-24 Thread Joonas Lahtinen
Now that there is PAGE_SIZE define, use it. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index e80f52e..92fa644 100644

Re: [Intel-gfx] [PATCH 04/11] drm/i915: Extend GET_APERTURE ioctl to report available map space

2015-04-30 Thread Joonas Lahtinen
On ke, 2015-04-29 at 11:27 +0100, Chris Wilson wrote: On Wed, Jan 28, 2015 at 10:59:28AM +0100, Daniel Vetter wrote: Do we have the libdrm patch for this too? Imo there's not much use in this if mesa remains broken, especially since this is for gen2/3 ... most DE use gl nowadays. On the

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt: Use PAGE_SIZE instead of hard coded value

2015-04-30 Thread Joonas Lahtinen
On ma, 2015-04-27 at 20:43 +0100, Chris Wilson wrote: On Mon, Apr 27, 2015 at 06:35:54PM +0100, Thomas Wood wrote: On 24 April 2015 at 08:38, Joonas Lahtinen joonas.lahti...@linux.intel.com wrote: Now that there is PAGE_SIZE define, use it. Thanks, I've pushed this patch. I also

[Intel-gfx] [PATCH v2 0/5] Partial GGTT views

2015-04-30 Thread Joonas Lahtinen
the code the code path that was previously early rejected. Joonas Lahtinen (5): drm/i915: Do not clear mappings beyond VMA size drm/i915: Do not make assumptions on GGTT VMA sizes drm/i915: Consider object pinned if any VMA is pinned drm/i915: Add a partial GGTT view type drm/i915: Use

Re: [Intel-gfx] [PATCH] drm/i915: Add missing MacBook Pro models with dual channel LVDS

2015-04-30 Thread Joonas Lahtinen
On ke, 2015-04-29 at 17:21 +0300, Jani Nikula wrote: On Sun, 12 Apr 2015, Lukas Wunner lu...@wunner.de wrote: Single channel LVDS maxes out at 112 MHz. All 17 models with i915 graphics had a resolution of 1920x1200 (193 MHz), necessitating dual channel LVDS. The 15 pre-retina models had

[Intel-gfx] [PATCH v2 2/5] drm/i915: Do not make assumptions on GGTT VMA sizes

2015-04-30 Thread Joonas Lahtinen
Cc: Tvrtko Ursulin tvrtko.ursu...@intel.com Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem.c | 103 +++- drivers/gpu/drm/i915/i915_gem_gtt.c | 23 drivers/gpu/drm/i915/i915_gem_gtt.h | 4 ++ 3 files

[Intel-gfx] [PATCH v2 1/5] drm/i915: Do not clear mappings beyond VMA size

2015-04-30 Thread Joonas Lahtinen
-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 9d3852c..fc562c6 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH v2 3/5] drm/i915: Consider object pinned if any VMA is pinned

2015-04-30 Thread Joonas Lahtinen
Do not skip special GGTT views when considering whether an object is pinned or not. Wrong behaviour was introduced in; commit ec7adb6ee79c8c9fe64d63ad638a31cd62e55515 Author: Joonas Lahtinen joonas.lahti...@linux.intel.com Date: Mon Mar 16 14:11:13 2015 +0200 drm/i915: Do not use

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Add a partial GGTT view type

2015-04-30 Thread Joonas Lahtinen
On ma, 2015-04-27 at 15:50 +0100, Tvrtko Ursulin wrote: Hi, On 04/24/2015 01:09 PM, Joonas Lahtinen wrote: Partial view type allows manipulating parts of huge BOs through the GGTT, which was not previously possible due to constraint that whole object had to be mapped for any access

[Intel-gfx] [PATCH v2 4/5] drm/i915: Add a partial GGTT view type

2015-04-30 Thread Joonas Lahtinen
(Tvrtko Ursulin) - Use more common variable types for page size/offset(Tvrtko Ursulin) Cc: Tvrtko Ursulin tvrtko.ursu...@intel.com Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem_gtt.c | 45 + drivers/gpu/drm/i915

[Intel-gfx] [PATCH v2 5/5] drm/i915: Use partial view in mmap fault handler

2015-04-30 Thread Joonas Lahtinen
from previous reroll. Cc: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem.c | 69 +++-- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Use partial view in mmap fault handler

2015-04-27 Thread Joonas Lahtinen
On pe, 2015-04-24 at 13:33 +0100, Chris Wilson wrote: On Fri, Apr 24, 2015 at 03:10:20PM +0300, Joonas Lahtinen wrote: Use partial view for huge BOs (bigger than half the mappable aperture) in fault handler so that they can be accessed withough trying to make room for them by evicting other

Re: [Intel-gfx] [PATCH 3/5] drm/i915: Consider object pinned if any VMA is pinned

2015-04-27 Thread Joonas Lahtinen
On pe, 2015-04-24 at 13:29 +0100, Chris Wilson wrote: On Fri, Apr 24, 2015 at 03:09:39PM +0300, Joonas Lahtinen wrote: Do not skip special GGTT views when considering whether an object is pinned or not. Wrong behaviour was introduced in; commit

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Use partial view in mmap fault handler

2015-04-27 Thread Joonas Lahtinen
On ma, 2015-04-27 at 12:21 +0100, Chris Wilson wrote: On Mon, Apr 27, 2015 at 02:01:59PM +0300, Joonas Lahtinen wrote: On pe, 2015-04-24 at 13:33 +0100, Chris Wilson wrote: On Fri, Apr 24, 2015 at 03:10:20PM +0300, Joonas Lahtinen wrote: Use partial view for huge BOs (bigger than half

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Use partial view in mmap fault handler

2015-04-27 Thread Joonas Lahtinen
On ma, 2015-04-27 at 13:25 +0100, Chris Wilson wrote: On Mon, Apr 27, 2015 at 03:12:01PM +0300, Joonas Lahtinen wrote: On ma, 2015-04-27 at 12:21 +0100, Chris Wilson wrote: On Mon, Apr 27, 2015 at 02:01:59PM +0300, Joonas Lahtinen wrote: On pe, 2015-04-24 at 13:33 +0100, Chris Wilson

Re: [Intel-gfx] [PATCH v2 5/5] drm/i915: Use partial view in mmap fault handler

2015-05-04 Thread Joonas Lahtinen
On to, 2015-04-30 at 15:54 +0100, Tvrtko Ursulin wrote: On 04/30/2015 12:21 PM, Joonas Lahtinen wrote: Use partial view for huge BOs (bigger than the mappable aperture) in fault handler so that they can be accessed without trying to make room for them by evicting other objects. v2

Re: [Intel-gfx] [PATCH 2/5] drm/i915: Do not make assumptions on GGTT VMA sizes

2015-04-28 Thread Joonas Lahtinen
On ma, 2015-04-27 at 14:55 +0100, Tvrtko Ursulin wrote: Hi, On 04/24/2015 01:09 PM, Joonas Lahtinen wrote: GGTT VMA sizes might be smaller than the whole object size due to different GGTT views. v2: - Separate GGTT view constraint calculations from normal view constraint

Re: [Intel-gfx] [PATCH v2 4/5] drm/i915: Add a partial GGTT view type

2015-05-06 Thread Joonas Lahtinen
On ke, 2015-05-06 at 12:20 +0200, Daniel Vetter wrote: On Thu, Apr 30, 2015 at 01:16:30PM +0100, Tvrtko Ursulin wrote: On 04/30/2015 12:20 PM, Joonas Lahtinen wrote: @@ -495,7 +503,10 @@ i915_ggtt_view_equal(const struct i915_ggtt_view *a, if (WARN_ON(!a || !b)) return false

[Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt(huge_bo): Use pread more to verify domain transfer.

2015-05-06 Thread Joonas Lahtinen
Use pread right after moving out of CPU domain to verify all writes flushed correctly. Due to extended usage, add own buffer. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions

[Intel-gfx] [PATCH v3 2/4] drm/i915: Consider object pinned if any VMA is pinned

2015-05-06 Thread Joonas Lahtinen
Do not skip special GGTT views when considering whether an object is pinned or not. Wrong behaviour was introduced in; commit ec7adb6ee79c8c9fe64d63ad638a31cd62e55515 Author: Joonas Lahtinen joonas.lahti...@linux.intel.com Date: Mon Mar 16 14:11:13 2015 +0200 drm/i915: Do not use

[Intel-gfx] [PATCH v3 4/4] drm/i915: Use partial view in mmap fault handler

2015-05-06 Thread Joonas Lahtinen
changes from previous reroll. v3: - Add a comment about overwriting existing page entries. (Tvrtko Ursulin) - Whitespace fixes. Cc: Chris Wilson ch...@chris-wilson.co.uk Cc: Tvrtko Ursulin tvrtko.ursu...@linux.intel.com Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu

[Intel-gfx] [PATCH v3 1/4] drm/i915: Do not make assumptions on GGTT VMA sizes

2015-05-06 Thread Joonas Lahtinen
map_and_fenceable (Tvrtko Ursulin) Cc: Chris Wilson ch...@chris-wilson.co.uk Cc: Tvrtko Ursulin tvrtko.ursu...@intel.com Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem.c | 74 + drivers/gpu/drm/i915/i915_gem_gtt.c

Re: [Intel-gfx] [PATCH v2 2/5] drm/i915: Do not make assumptions on GGTT VMA sizes

2015-05-06 Thread Joonas Lahtinen
On to, 2015-04-30 at 13:03 +0100, Tvrtko Ursulin wrote: On 04/30/2015 12:19 PM, Joonas Lahtinen wrote: GGTT VMA sizes might be smaller than the whole object size due to different GGTT views. v2: - Separate GGTT view constraint calculations from normal view constraint calculations

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt(huge_bo): Use pread more to verify domain transfer.

2015-05-06 Thread Joonas Lahtinen
On ke, 2015-05-06 at 14:15 +0100, Chris Wilson wrote: On Wed, May 06, 2015 at 03:31:10PM +0300, Joonas Lahtinen wrote: Use pread right after moving out of CPU domain to verify all writes flushed correctly. Wrong test, see gem_pread. Adding extra work may have the unintended side

[Intel-gfx] [PATCH v3 3/4] drm/i915: Add a partial GGTT view type

2015-05-06 Thread Joonas Lahtinen
-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem_gtt.c | 46 + drivers/gpu/drm/i915/i915_gem_gtt.h | 16 +++-- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu

Re: [Intel-gfx] [PATCH v2 5/5] drm/i915: Use partial view in mmap fault handler

2015-05-06 Thread Joonas Lahtinen
On ti, 2015-05-05 at 10:07 +0100, Tvrtko Ursulin wrote: On 05/04/2015 12:51 PM, Joonas Lahtinen wrote: On to, 2015-04-30 at 15:54 +0100, Tvrtko Ursulin wrote: On 04/30/2015 12:21 PM, Joonas Lahtinen wrote: Use partial view for huge BOs (bigger than the mappable aperture) in fault

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt(huge_bo): Use pread more to verify domain transfer.

2015-05-06 Thread Joonas Lahtinen
On ke, 2015-05-06 at 14:29 +0100, Chris Wilson wrote: On Wed, May 06, 2015 at 04:22:23PM +0300, Joonas Lahtinen wrote: On ke, 2015-05-06 at 14:15 +0100, Chris Wilson wrote: On Wed, May 06, 2015 at 03:31:10PM +0300, Joonas Lahtinen wrote: Use pread right after moving out of CPU

Re: [Intel-gfx] [PATCH] drm/i915: Reject huge tiled objects

2015-05-08 Thread Joonas Lahtinen
On pe, 2015-05-08 at 12:46 +0100, Chris Wilson wrote: On Fri, May 08, 2015 at 02:37:39PM +0300, Joonas Lahtinen wrote: We do not yet support tiled objects bigger than the mappable aperture size so reject them. Reported-by: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas

[Intel-gfx] [PATCH] drm/i915: Reject huge tiled objects

2015-05-08 Thread Joonas Lahtinen
We do not yet support tiled objects bigger than the mappable aperture size so reject them. Reported-by: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Log view type when printing warnings

2015-04-15 Thread Joonas Lahtinen
-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index cc8672a

Re: [Intel-gfx] [PATCH i-g-t v3 1/2] tests/gem_mmap_gtt: clarify BO domain setting functions

2015-04-13 Thread Joonas Lahtinen
These two patches still have something to work on, or could they be committed? On ke, 2015-04-08 at 15:55 +0300, Joonas Lahtinen wrote: Add suffix and complementary function for CPU domain. v2: - Change function signatures to be consistent with the rest Signed-off-by: Joonas Lahtinen

[Intel-gfx] [PATCH i-g-t v4 2/2] tests/gem_mmap_gtt: add huge BO test

2015-04-13 Thread Joonas Lahtinen
buffer too. v4: - Add more comments (Tvrtko Ursulin) - Use igt_require (Tvrtko Ursulin) Cc: Tvrtko Ursulin tvrtko.ursu...@linux.intel.com Cc: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 106

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt: add huge BO test

2015-04-13 Thread Joonas Lahtinen
On ma, 2015-04-13 at 12:32 +0100, Tvrtko Ursulin wrote: Hi, On 04/07/2015 01:23 PM, Joonas Lahtinen wrote: Add a straightforward test that allocates a BO that is bigger than (by 1 page currently) the mappable aperture, tests mmap access to it by CPU directly and through GTT in sequence

[Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt: add huge BO test

2015-04-07 Thread Joonas Lahtinen
completely for mmap access. Once the partial view support is merged to kernel, the test should pass for all parts. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 68 1 file changed, 68 insertions(+) diff

[Intel-gfx] [PATCH i-g-t v2 1/2] tests/gem_mmap_gtt: Clarify BO domain setting functions

2015-04-08 Thread Joonas Lahtinen
Add suffix and complementary function for CPU domain. Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index 55c66a2..d2803d7 100644

[Intel-gfx] [PATCH i-g-t v2 2/2] tests/gem_mmap_gtt: add huge BO test

2015-04-08 Thread Joonas Lahtinen
completely for mmap access. Once the partial view support is merged to kernel, the test should pass for all parts. v2: - Corrected BO domain handling (Chris Wilson) - Check again after GTT access for added paranoia (Chris Wilson) Cc: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_mmap_gtt: add huge BO test

2015-04-08 Thread Joonas Lahtinen
Hi, On ti, 2015-04-07 at 15:08 +0100, Chris Wilson wrote: On Tue, Apr 07, 2015 at 03:23:08PM +0300, Joonas Lahtinen wrote: [snip] + + bo = gem_create(fd, huge_object_size); + + ptr_cpu = gem_mmap__cpu(fd, bo, 0, huge_object_size, + PROT_READ | PROT_WRITE

[Intel-gfx] [PATCH i-g-t v3 1/2] tests/gem_mmap_gtt: clarify BO domain setting functions

2015-04-08 Thread Joonas Lahtinen
Add suffix and complementary function for CPU domain. v2: - Change function signatures to be consistent with the rest Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests

[Intel-gfx] [PATCH i-g-t v3 2/2] tests/gem_mmap_gtt: add huge BO test

2015-04-08 Thread Joonas Lahtinen
buffer too. Cc: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- tests/gem_mmap_gtt.c | 104 +++ 1 file changed, 104 insertions(+) diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index

Re: [Intel-gfx] [PATCH 1/5] mutex: Export an interface to wrap a mutex lock

2015-04-09 Thread Joonas Lahtinen
Hi, On ti, 2015-04-07 at 17:31 +0100, Chris Wilson wrote: In i915, we have a big mutex around our device struct - every time before we attempt to communicate with the GPU, we acquire the mutex. This makes it a convenient juncture to place our GPU error handling - before we take the mutex we

Re: [Intel-gfx] [PATCH 4/5] mm: Export remap_io_mapping()

2015-04-09 Thread Joonas Lahtinen
On ti, 2015-04-07 at 17:31 +0100, Chris Wilson wrote: This is similar to remap_pfn_range(), and uses the recently refactor code to do the page table walking. The key difference is that is back propagates its error as this is required for use from within a pagefault handler. The other

Re: [Intel-gfx] [PATCH 3/5] io-mapping: Always create a struct to hold metadata about the io-mapping

2015-04-09 Thread Joonas Lahtinen
platforms. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: linux...@kvack.org --- include/linux/io-mapping.h | 52 -- 1 file changed, 32 insertions(+), 20 deletions

Re: [Intel-gfx] Fast prefaulting for GTT mmappings

2015-04-09 Thread Joonas Lahtinen
On ti, 2015-04-07 at 17:31 +0100, Chris Wilson wrote: Hi Joonas, since you were looking at extending the GTT fault capabilities, I thought you might like to revivew these patches, as they may prove beneficial for your use case as well. Did so, sent a couple cosmical comments. Regards,

Re: [Intel-gfx] [PATCH 2/5] mm: Refactor remap_pfn_range()

2015-04-09 Thread Joonas Lahtinen
. Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com +{ + if (!pte_none(*pte)) + return -EBUSY; + + set_pte_at(r-mm, r-addr, pte, +pte_mkspecial(pfn_pte(r-pfn, r-prot))); + r-pfn++; + r-addr += PAGE_SIZE; + return 0; +} + +static int

Re: [Intel-gfx] [PATCH i-g-t 2/2] tests: use standard install prefix for programs, scripts and data

2015-04-09 Thread Joonas Lahtinen
On ke, 2015-04-08 at 14:56 +0100, Thomas Wood wrote: Use the pkglibexec and pkgdata prefixes rather than setting bindir and datadir. This also removes the extra 'tests' directory from within the package libexec and data directories. Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com Signed

Re: [Intel-gfx] [PATCH i-g-t 1/2] tests: ensure scripts and data are included in the distribution

2015-04-09 Thread Joonas Lahtinen
On ke, 2015-04-08 at 14:56 +0100, Thomas Wood wrote: Prefix the test scripts and data variables with dist_ to ensure they are included in the distribution. Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Comment below

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Use remap_io_mapping() to prefault all PTE in a single pass

2015-04-09 Thread Joonas Lahtinen
/gem_fence_upload/performance Testcase: igt/gem_mmap_gtt Reviewed-by: Brad Volkin bradley.d.vol...@intel.com Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: linux...@kvack.org --- drivers/gpu/drm/i915/i915_gem.c | 23 ++- 1 file changed, 6 insertions(+), 17

Re: [Intel-gfx] [PATCH 05/21] drm/i915/gtt: Don't leak scratch page on mapping error

2015-06-02 Thread Joonas Lahtinen
On pe, 2015-05-22 at 20:04 +0300, Mika Kuoppala wrote: Free the scratch page if dma mapping fails. Signed-off-by: Mika Kuoppala mika.kuopp...@intel.com Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com --- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 +++- 1 file changed, 3

Re: [Intel-gfx] [PATCH v3 3/4] drm/i915: Add a partial GGTT view type

2015-06-10 Thread Joonas Lahtinen
Hi, As discussed in IRC, this patch is not relevant. The interface is bit misbehaving. CC'd Imre who agreed to go and change the interface to more intuitive one. Regards, Joonas On ti, 2015-06-09 at 09:56 +0100, Chris Wilson wrote: On Wed, May 06, 2015 at 02:35:38PM +0300, Joonas Lahtinen

Re: [Intel-gfx] [PATCH] drm/i915: Make pinned object handling more specific

2015-06-04 Thread Joonas Lahtinen
On to, 2015-06-04 at 10:01 +0100, Chris Wilson wrote: On Thu, Jun 04, 2015 at 11:49:06AM +0300, Joonas Lahtinen wrote: Get rid of the over-generic i915_gem_obj_is_pinned and replace it with i915_gem_obj_ggtt_is_pinned or more specific VMA handling. Requested-by: Chris Wilson ch...@chris

[Intel-gfx] [PATCH] drm/i915: Make pinned object handling more specific

2015-06-04 Thread Joonas Lahtinen
Get rid of the over-generic i915_gem_obj_is_pinned and replace it with i915_gem_obj_ggtt_is_pinned or more specific VMA handling. Requested-by: Chris Wilson ch...@chris-wilson.co.uk Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_debugfs.c | 8 +-- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH i-g-t v2] tests/gem_ringfill: Add {render, blitter}-forked subtests.

2015-06-25 Thread Joonas Lahtinen
On to, 2015-06-25 at 13:49 +0100, Chris Wilson wrote: On Thu, Jun 25, 2015 at 03:04:44PM +0300, Joonas Lahtinen wrote: Add forking subtests to gem_ringfill. Tests cause consistent GPU hangs on SKL. Cc: Mika Kuoppala mika.kuopp...@linux.intel.com Signed-off-by: Joonas Lahtinen

[Intel-gfx] [PATCH i-g-t v2] tests/gem_ringfill: Add {render, blitter}-forked subtests.

2015-06-25 Thread Joonas Lahtinen
Add forking subtests to gem_ringfill. Tests cause consistent GPU hangs on SKL. Cc: Mika Kuoppala mika.kuopp...@linux.intel.com Signed-off-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959 --- tests/gem_ringfill.c | 22

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Return correct size for rotated views

2015-06-24 Thread Joonas Lahtinen
issue with this is wasting some GGTT space, but still feels nicer to fix and report the real size. v2: Rebase for tracking size in bytes instead of pages. Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Cc: Joonas Lahtinen

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Remove mostly unused variable in intel_rotate_fb_obj_pages

2015-06-24 Thread Joonas Lahtinen
On ke, 2015-06-24 at 09:55 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin tvrtko.ursu...@intel.com It is only used in logging and it doesn't need to exist on its own. Also it was misleading to log view size as object size. v2: Improve commit message. (Joonas Lahtinen) Reviewed

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Move rotated geometry calculations into the fill helper

2015-06-24 Thread Joonas Lahtinen
Lahtinen joonas.lahti...@linux.intel.com Signed-off-by: Tvrtko Ursulin tvrtko.ursu...@intel.com Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: Chris Wilson ch...@chris-wilson.co.uk --- This will be needed in the following patch which fixes i915_ggtt_view_size. --- drivers/gpu/drm

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Remove mostly unused variable in intel_rotate_fb_obj_pages

2015-06-24 Thread Joonas Lahtinen
On ti, 2015-06-23 at 12:57 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin tvrtko.ursu...@intel.com It is only used in logging and it doesn't need to exist on its own. Comment below. Reviewed-by: Joonas Lahtinen joonas.lahti...@linux.intel.com Signed-off-by: Tvrtko Ursulin tvrtko.ursu

[Intel-gfx] [PATCH] tests: Add gem_ringfill_noop and -forked subtests to gem_ringfill

2015-06-24 Thread Joonas Lahtinen
Add a new test which executes dummy workloads on the GPU. Use same method as with gem_concurrent_{blit,all} not to interfere with standard command line parsing. Also adds {render,blt}-forked subtests to gem_ringfill. Cc: Mika Kuoppala mika.kuopp...@linux.intel.com Signed-off-by: Joonas Lahtinen

  1   2   3   4   5   6   7   8   9   10   >