[Intel-gfx] [PATCH] drm/i915: Allow overlapping userptr objects

2014-07-10 Thread Chris Wilson
Whilst I strongly advise against doing so for the implicit coherency issues between the multiple buffer objects accessing the same backing store, it nevertheless is a valid use case, akin to mmaping the same file multiple times. The reason why we forbade it earlier was that our use of the interval

Re: [Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo

2014-07-10 Thread Chris Wilson
On Wed, Jul 09, 2014 at 06:00:48PM -0700, Daisy Sun wrote: > BDW supports GT C0 residency reporting in constant time unit. Driver > calculates > GT utilization based on C0 residency and adjusts RP frequency up/down > accordingly. This explanation is a bit thin on the ground for why you want to ru

[Intel-gfx] [PATCH 2/2] drm/i915: Serialise userptr gup with mmu-notifier

2014-07-10 Thread Chris Wilson
Jerome Glisse pointed out that get_user_pages() does not synchronize with concurrent invalidations of the VMA. As such if the backing vma is changed whilst the pages for the object are being grabbed for use by the GPU, we may end up with a random mixture of page references being held. Worse still a

[Intel-gfx] [PATCH 1/2] drm/i915: Allow overlapping userptr objects

2014-07-10 Thread Chris Wilson
Whilst I strongly advise against doing so for the implicit coherency issues between the multiple buffer objects accessing the same backing store, it nevertheless is a valid use case, akin to mmaping the same file multiple times. The reason why we forbade it earlier was that our use of the interval

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Serialise userptr gup with mmu-notifier

2014-07-10 Thread Chris Wilson
On Thu, Jul 10, 2014 at 10:21:44AM +0100, Chris Wilson wrote: > Jerome Glisse pointed out that get_user_pages() does not synchronize > with concurrent invalidations of the VMA. As such if the backing vma is > changed whilst the pages for the object are being grabbed for use by the > GPU, we may end

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Allow overlapping userptr objects

2014-07-10 Thread Tvrtko Ursulin
On 07/10/2014 10:21 AM, Chris Wilson wrote: Whilst I strongly advise against doing so for the implicit coherency issues between the multiple buffer objects accessing the same backing store, it nevertheless is a valid use case, akin to mmaping the same file multiple times. The reason why we forb

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Serialise userptr gup with mmu-notifier

2014-07-10 Thread Tvrtko Ursulin
On 07/10/2014 10:21 AM, Chris Wilson wrote: Jerome Glisse pointed out that get_user_pages() does not synchronize with concurrent invalidations of the VMA. As such if the backing vma is changed whilst the pages for the object are being grabbed for use by the GPU, we may end up with a random mixtu

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Allow overlapping userptr objects

2014-07-10 Thread Chris Wilson
On Thu, Jul 10, 2014 at 01:26:53PM +0100, Tvrtko Ursulin wrote: > Too bad that on first overlapping object the whole process goes into > "slow mode". I wonder what would benchmarking say to that. > > Perhaps we could still use interval tree but add another layer of > indirection where ranges would

[Intel-gfx] [PATCH 1/2] lib/gen6_render: removed duplicate defines

2014-07-10 Thread Mika Kuoppala
Textually the same so no harm was done and no warnings from compiler either. Signed-off-by: Mika Kuoppala --- lib/gen6_render.h | 38 -- 1 file changed, 38 deletions(-) diff --git a/lib/gen6_render.h b/lib/gen6_render.h index 495cc2e..58d511f 100644 --- a/l

[Intel-gfx] [PATCH i-g-t 1/2] drv_module_reload: Don't declare success when failing

2014-07-10 Thread Damien Lespiau
We weren't returning straight away when failing to unload the driver, so the test happilly executed gem_suspend and printed ""module successfully loaded again". Signed-off-by: Damien Lespiau --- tests/drv_module_reload | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test

[Intel-gfx] [PATCH i-g-t 2/2] drv_module_reload: For some reason, vtcon0 has been seen as being fbcon

2014-07-10 Thread Damien Lespiau
Not sure if this was ABI, I vote for no, so just unbind everyone. Signed-off-by: Damien Lespiau --- tests/drv_module_reload | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/drv_module_reload b/tests/drv_module_reload index 66cd6bb..0e729d3 100755 --- a/tests/drv_m

Re: [Intel-gfx] [PATCH i-g-t 2/2] drv_module_reload: For some reason, vtcon0 has been seen as being fbcon

2014-07-10 Thread Damien Lespiau
On Thu, Jul 10, 2014 at 02:17:43PM +0100, Damien Lespiau wrote: > Not sure if this was ABI, I vote for no, so just unbind everyone. > > Signed-off-by: Damien Lespiau Meh, this is very wrong, don't look at it. > --- > tests/drv_module_reload | 7 +-- > 1 file changed, 5 insertions(+), 2 del

[Intel-gfx] [PATCH 2/2] drm/i915: Don't cast a pointer to void* unnecessarily

2014-07-10 Thread Damien Lespiau
C is super happy to asign anything pointer to void *. Don't pretend otherwise. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index ce69185..2c

[Intel-gfx] [PATCH 1/2] drm/i915: Make the device_info structure __initconst

2014-07-10 Thread Damien Lespiau
We don't need them past the module initialization as the correct structure is copied into dev_priv in ->load(), called from drm_pci_init(), called from the module init funtion. I'm always hesitant about adding new members to struct intel_device_info because it will add 30+ * sizeof(member) bytes t

Re: [Intel-gfx] [PATCH 1/4] drm/i915: add POWER_DOMAIN_PLLS

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 01:38:33PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > And get/put it when needed. The special thing about this commit is > that it will now return false in ibx_pch_dpll_get_hw_state() in case > the power domain is not enabled. This will fix some WARNs we have when

Re: [Intel-gfx] [PATCH 2/4] drm/i915: check the power domains in ironlake_get_pipe_config()

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 01:38:34PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > Just like we already do in haswell_get_pipe_config(). This should > prevent some WARNs when we run pm_rpm on SNB. > > Testcase: igt/pm_rpm > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80463 > Signe

Re: [Intel-gfx] [PATCH 3/4] drm/i915: check the power domains in intel_lvds_get_hw_state()

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 01:38:35PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > Just like we do for the other encoders. This should fix some WARNs > when running pm_rpm on SNB. > > Testcase: igt/pm_rpm > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80463 > Signed-off-by: Paulo Z

Re: [Intel-gfx] [PATCH 13.5/19] drm/i915: add POWER_DOMAIN_PLLS

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 11:27:38AM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > And get/put it when needed. The special thing about this commit is > that it will now return false in ibx_pch_dpll_get_hw_state() in case > the power domain is not enabled. This will fix some WARNs we have when

Re: [Intel-gfx] [PATCH 14/19] drm/i915: State readout support for WRPLLs

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 11:27:39AM -0300, Paulo Zanoni wrote: > From: Daniel Vetter > > Still tacked onto the side, but slowly getting there. > > v2: Don't forget the debugfs file. > > v3 (from Paulo): Don't forget to check the power domains. > > Signed-off-by: Daniel Vetter > Reviewed-by: Da

Re: [Intel-gfx] [PATCH 20/19] drm/i915: don't skip shared DPLL assertion on LPT

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 11:30:28AM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > Since we now have support for shared DPLLS. > > Signed-off-by: Paulo Zanoni Reviewed-by: Damien Lespiau -- Damien > --- > drivers/gpu/drm/i915/intel_display.c | 5 - > 1 file changed, 5 deletions(-)

Re: [Intel-gfx] [PATCH 1/2] lib/gen6_render: removed duplicate defines

2014-07-10 Thread Damien Lespiau
On Thu, Jul 10, 2014 at 03:47:55PM +0300, Mika Kuoppala wrote: > Textually the same so no harm was done and no warnings > from compiler either. > > Signed-off-by: Mika Kuoppala Ship it! (is there a patch 2/2?) -- Damien ___ Intel-gfx mailing list In

Re: [Intel-gfx] [PATCH 1/2] lib/gen6_render: removed duplicate defines

2014-07-10 Thread Mika Kuoppala
Damien Lespiau writes: > On Thu, Jul 10, 2014 at 03:47:55PM +0300, Mika Kuoppala wrote: >> Textually the same so no harm was done and no warnings >> from compiler either. >> >> Signed-off-by: Mika Kuoppala > > Ship it! Will do. > (is there a patch 2/2?) Not for public consumption, not yet. J

Re: [Intel-gfx] [PATCH 4/4] drm/i915: don't read LVDS regs at compute_config time

2014-07-10 Thread Damien Lespiau
On Fri, Jul 04, 2014 at 01:38:36PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > We may reach this point while the machine is still runtime suspended, > so we'll hit a WARN. The other encoders also don't touch registers at > this point, so instead of waking the machine up, write some code t

[Intel-gfx] [PATCH] drv_module_reload: Unbind the right console driver

2014-07-10 Thread Daniel Vetter
We want to unbind fbcon, but only fbcon and only if it's there. This was broken by the recent patch in 3.16-rc to kick out the vgacon driver. I've forgotten to push out the relevant fix from the machine used to create the kick vgacon patches. Reported-by: Damien Lespiau Cc: Damien Lespiau Signe

[Intel-gfx] [PATCH i-g-t 01/43] igt_kms: Factor out a generic get_property() out of get_drm_plane_type()

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/igt_kms.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 4a8c394..666b0d0 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -495,37 +495,56 @@ static void

[Intel-gfx] [PATCH i-g-t 00/43] Rotation test

2014-07-10 Thread Damien Lespiau
I've taken the current rotation test to test the kernel patches and improved it a bit along the way. It's a bit like a detailed review, but with patches instead of comments. With the rotation kernel patches and an IVB machine, that test now passes. Part of the motivation has been to augment the i

[Intel-gfx] [PATCH i-g-t 08/43] kms_rotation_crc: Make check_plane_type() static

2014-07-10 Thread Damien Lespiau
Clearly, someone tried to solve the following warning: kms_rotation_crc.c:189:6: warning: no previous prototype for ‘check_plane_type’ [-Wmissing-prototypes] Without really understanding what was the warning about. Make check_plane_type() static and move it before its user to get rid of the for

[Intel-gfx] [PATCH i-g-t 02/43] igt_kms: Make has_universal_planes a bitfield

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/igt_kms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_kms.h b/lib/igt_kms.h index a079fc2..058114a 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -153,7 +153,7 @@ struct igt_display { unsigned long pipes_in_use;

[Intel-gfx] [PATCH i-g-t 04/43] igt_kms: Add a way to query of the plane supports rotation

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/igt_kms.c | 7 +++ lib/igt_kms.h | 10 ++ 2 files changed, 17 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 5c8a3cc..87f5109 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -592,6 +592,7 @@ void igt_display_init(igt_display_t

[Intel-gfx] [PATCH i-g-t 05/43] igt_kms: Add support for setting plane rotation

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/igt_kms.c | 54 ++ lib/igt_kms.h | 11 +++ 2 files changed, 65 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 87f5109..69f9977 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -537,

[Intel-gfx] [PATCH i-g-t 03/43] igt_kms: Provide a get_plane_property() shorthand

2014-07-10 Thread Damien Lespiau
So one doesn't have to write the plane type all the time. Signed-off-by: Damien Lespiau --- lib/igt_kms.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 666b0d0..5c8a3cc 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -529,

[Intel-gfx] [PATCH i-g-t 06/43] igt_kms: Introduce a for_each_pipe() macro

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/igt_kms.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/igt_kms.h b/lib/igt_kms.h index d34bcee..9e7bc2b 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -202,6 +202,9 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe); for (int i__

[Intel-gfx] [PATCH i-g-t 09/43] kms_rotation_crc: Make more functions static

2014-07-10 Thread Damien Lespiau
More of the same. This time no need to move code around, just adding static. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 6249e0f..b079376 1

[Intel-gfx] [PATCH i-g-t 12/43] kms_rotation_crc: Test the validity of the output first

2014-07-10 Thread Damien Lespiau
So we don't need code to unwind what we just did. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index f5a569a..1f2953d 100644 --- a/tests/kms_rotation_c

[Intel-gfx] [PATCH i-g-t 17/43] kms_rotation_crc: Factor out common primary/sprite code in prepare_crtc()

2014-07-10 Thread Damien Lespiau
This results in less code, always a good thing. Also, we only really need one reference CRC. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 89 +--- 1 file changed, 32 insertions(+), 57 deletions(-) diff --git a/tests/kms_rotation_crc.c

[Intel-gfx] [PATCH i-g-t 29/43] kms_rotation_crc: Use for_each_pipe()

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 58852c2..ae0ca21 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -146,7 +146,7 @@

[Intel-gfx] [PATCH i-g-t 19/43] kms_rotation_crc: Use drm_plane from igt_plane_t

2014-07-10 Thread Damien Lespiau
So we don't need all that extra code to grab the drm_plane structure for the primary_plane. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 70 +++- 1 file changed, 3 insertions(+), 67 deletions(-) diff --git a/tests/kms_rotation_crc.c b/

[Intel-gfx] [PATCH i-g-t 07/43] tests/kms_rotation_crc: IGT for 180 degree HW rotation

2014-07-10 Thread Damien Lespiau
From: Sonika Jindal Testcase for 180 degree HW rotation Cc: sagar.a.kam...@intel.com Signed-off-by: Sonika Jindal --- tests/Makefile.sources | 1 + tests/kms_rotation_crc.c | 427 +++ 2 files changed, 428 insertions(+) create mode 100644 tests/

[Intel-gfx] [PATCH i-g-t 11/43] kms_rotation_crc: Update the copyright to have this year as well

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 485a6df..f5a569a 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -1,5 +1,5 @@ /* - * Co

[Intel-gfx] [PATCH i-g-t 10/43] kms_rotation_crc: Align a few wrapped lines to the opening brace

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index b079376..485a6df 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -83,10

[Intel-gfx] [PATCH i-g-t 20/43] kms_rotation_crc: Style issue: binary operators need spaces before and after

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index f062b52..341f7bc 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -83,10 +83,10 @

[Intel-gfx] [PATCH i-g-t 24/43] kms_rotation_crc: Always disable the plane in cleanup

2014-07-10 Thread Damien Lespiau
There's no need for this check, always use set_fb(NULL) on the plane. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 0edc6c3..30eb227 100644 --- a/tests

[Intel-gfx] [PATCH i-g-t 16/43] kms_rotation_crc: Factor out the square drawing function

2014-07-10 Thread Damien Lespiau
Making function to the similar things is very common in programming. Let's do it once again. Cairo being a drawing library, it can be used to do the rotation! Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 65 ++-- 1 file changed, 35 ins

[Intel-gfx] [PATCH i-g-t 18/43] kms_rotation_crc: Remove useless comments

2014-07-10 Thread Damien Lespiau
A typical example of what comments shouldn't be: case DRM_PLANE_TYPE_PRIMARY: /* primary */ Well, yes!, it's written just there, PRIMARY! Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/kms_rotation_crc.c

[Intel-gfx] [PATCH i-g-t 22/43] kms_rotation_crc: Just store the igt_plane_t in data

2014-07-10 Thread Damien Lespiau
Now that we're always using an igt_plane_t, we can get rid of ->type to use ->directly without those switch() or if()/else Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 46 +++--- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git

[Intel-gfx] [PATCH i-g-t 13/43] kms_rotation_crc: Require universal planes for the testing primary rotation

2014-07-10 Thread Damien Lespiau
Otherwise the test will fail instead of just skipping. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 1f2953d..db1ad57 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms

[Intel-gfx] [PATCH i-g-t 15/43] kms_rotation_crc: Fix style issue: single statement conditionals

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 9c194ce..eb63326 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -187,9 +187,

[Intel-gfx] [PATCH i-g-t 14/43] kms_rotation_crc: Fix style issue: '{' at the end of lines

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index db1ad57..9c194ce 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -18

[Intel-gfx] [PATCH i-g-t 25/43] kms_rotation_crc: Don't store rotate in the test state

2014-07-10 Thread Damien Lespiau
We don't use it anywhere else than the test function. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 30eb227..81d001b 100644 --- a/tests/kms_rotation_crc.c

[Intel-gfx] [PATCH i-g-t 28/43] kms_rotation_crc: Remove now unnecessary defines

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 15529c7..58852c2 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -42,16 +42,6 @@ #define DRM

[Intel-gfx] [PATCH i-g-t 30/43] kms_rotation_crc: Remove the test on output->valid

2014-07-10 Thread Damien Lespiau
This test is already done by the for_each_connected_output() macro. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 4 1 file changed, 4 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index ae0ca21..a68aece 100644 --- a/tests/kms_rotation_crc.c +

[Intel-gfx] [PATCH i-g-t 23/43] kms_rotation_crc: Unify the two tests

2014-07-10 Thread Damien Lespiau
The only difference is which plane we are talking about. So we really need one function here with a paramater. Well, almost. For the primary plane we need to ensure we support unviversal planes. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 54 ++--

[Intel-gfx] [PATCH i-g-t 21/43] kms_rotation_crc: Skip the tests if rotation is not supported

2014-07-10 Thread Damien Lespiau
This happens when the kernel lacks the rotation patches. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 341f7bc..026c333 100644 --- a/tests/kms_rotation_crc.c +++ b/tes

[Intel-gfx] [PATCH i-g-t 32/43] kms_rotation_crc: Remove the sleep(2)

2014-07-10 Thread Damien Lespiau
One can inspect the output of the igt_kms API by setting IGT_DISPLAY_WAIT_AT_COMMIT=1. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 5b195f9..701fa70 100644 --- a/tests/kms

[Intel-gfx] [PATCH i-g-t 26/43] kms_rotation_crc: Don't store 'pipe' in the state

2014-07-10 Thread Damien Lespiau
This variable is only needed for prepare_crtc(), need need to put it in the test state. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 81d001b.

[Intel-gfx] [PATCH i-g-t 36/43] kms_rotation_crc: Don't commit with no fb set up

2014-07-10 Thread Damien Lespiau
prepare_crtc() was trying to commit a display state without any fb to scan out... Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index d318cd2..5022b99 100644 --- a/tests/kms_rotati

[Intel-gfx] [PATCH i-g-t 40/43] kms_rotation_crc: Document the two steps in prepare_crtc()

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 5780e40..cb1b00b 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -104,14 +104,19 @

[Intel-gfx] [PATCH i-g-t 37/43] kms_rotation_crc: Properly paint the whole frame buffer

2014-07-10 Thread Damien Lespiau
The -1 meant we weren't properly filling the whole fb. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 5022b99..5780e40 100644 --- a/tests/kms_rotation_c

[Intel-gfx] [PATCH i-g-t 34/43] kms_rotation_crc: No need to test for NULL before freeing the pipe CRC object

2014-07-10 Thread Damien Lespiau
igt_pipe_crc_free() does that check already. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 75cfff8..d196c7c 100644 --- a/tests/kms_rotation_crc.c +++ b/te

[Intel-gfx] [PATCH i-g-t 33/43] kms_rotation_crc: Remove plane from the state

2014-07-10 Thread Damien Lespiau
having everythin in the data_t structure makes it hard to understand what should be set when. Replace that by explicit function parameters. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --g

[Intel-gfx] [PATCH i-g-t 31/43] kms_rotation_crc: Remove 'output' from the state

2014-07-10 Thread Damien Lespiau
This restore the balance between prepare_crtc() and cleanup_crtc(), both now taking the output as a parameter. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c

[Intel-gfx] [PATCH i-g-t 38/43] kms_rotation_crc: Add the test to .gitignore

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index da9af6b..985afbd 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -126,6 +126,7 @@ kms_mmio_vs_cs_flip kms_pipe_crc_basic kms_plane kms_render

[Intel-gfx] [PATCH i-g-t 39/43] kms_rotation_crc: Don't compile the test on Android with no cairo support

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Android.mk b/tests/Android.mk index 663a6b4..22f12ad 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -70,7 +70,8 @@ else kms_fence_pin_leak \ kms_mmio_v

[Intel-gfx] [PATCH i-g-t 35/43] kms_rotation_crc: Allow the sprite test to run even without universal planes

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index d196c7c..d318cd2 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -142,9 +142,12 @

[Intel-gfx] [PATCH i-g-t 27/43] kms_rotation_crc: Use igt_plane_set_rotation()

2014-07-10 Thread Damien Lespiau
More code we can remove from the test. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 52 +--- 1 file changed, 5 insertions(+), 47 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 308e884..15529c7 10064

[Intel-gfx] [PATCH i-g-t 41/43] kms_rotation_crc: Always use the primary plane to compute the reference CRC

2014-07-10 Thread Damien Lespiau
Trying to disable the primary planes isn't exactly working at the moment. W/A it until it works. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index cb1b00

[Intel-gfx] [PATCH i-g-t 43/43] kms_rotation_crc: Use the igt_kms enum to encode the plane rotation

2014-07-10 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 2005b2a..5041f90 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -29,11 +2

[Intel-gfx] [PATCH i-g-t 42/43] kms_rotation_crc: Remove unnecessary includes

2014-07-10 Thread Damien Lespiau
Turns out we didn't need most of them. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 9 - 1 file changed, 9 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 9aacddd..2005b2a 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_

[Intel-gfx] [PATCH] tests: Run igt.cocci

2014-07-10 Thread Daniel Vetter
New stuff caught. Plus manually simplify the massive igt_fail_on_f(file == NULL, ...) to a simple igt_assert(file). We already print the errno (if applicapable) and the condition, which is equally informative. Cc: Yi Sun Cc: Matt Roper Cc: Wendy Wang Signed-off-by: Daniel Vetter --- tests/km

[Intel-gfx] [PATCH] NEWS: Updates

2014-07-10 Thread Daniel Vetter
Signed-off-by: Daniel Vetter --- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 33354f9d5360..1b5ee83ec849 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,12 @@ Release 1.8 (-xx-xx) - Added lib/igt.cocci semantic patch to catch often-seen patterns and convert the

Re: [Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo

2014-07-10 Thread Sun, Daisy
GT is not going to run at a single frequency all the time actually. It starts from a single frequency, and then will dynamically adjust according to the GT utilization, either go up or down. From this perspective, SW turbo function the same as the HW turbo. For the algorithm, we did go over t

Re: [Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo

2014-07-10 Thread Chris Wilson
On Thu, Jul 10, 2014 at 11:42:59AM -0700, Sun, Daisy wrote: > > GT is not going to run at a single frequency all the time actually. > It starts from a single frequency, and then will dynamically adjust > according to the GT utilization, either go up or down. > From this perspective, SW turbo funct

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Make the device_info structure __initconst

2014-07-10 Thread Paulo Zanoni
2014-07-10 10:52 GMT-03:00 Damien Lespiau : > We don't need them past the module initialization as the correct > structure is copied into dev_priv in ->load(), called from > drm_pci_init(), called from the module init funtion. > > I'm always hesitant about adding new members to struct intel_device_

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Don't cast a pointer to void* unnecessarily

2014-07-10 Thread Paulo Zanoni
2014-07-10 10:52 GMT-03:00 Damien Lespiau : > C is super happy to asign anything pointer to void *. Don't pretend > otherwise. Reviewed-by: Paulo Zanoni > > Signed-off-by: Damien Lespiau > --- > drivers/gpu/drm/i915/i915_dma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --

[Intel-gfx] [PATCH 3/7] drm/i915: Include the RPS evalutation metrics in debugfs for Baytrail

2014-07-10 Thread Chris Wilson
Baytail, like Sandybridge+, also has the RPS registers which are useful to monitor. In addition, we were missing the evaluation interval registers so add those to all. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c | 186 ++-- 1 file changed,

[Intel-gfx] [PATCH 2/7] drm/i915: Make the RPS interrupt generation mask handle the vlv wa

2014-07-10 Thread Chris Wilson
We can eliminate a lot of special case code by making the computation of the interrupt mask be correct for all callers. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_pm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b

[Intel-gfx] [PATCH 6/7] drm/i915: Improve code clarity of vlv_set_rps_idle()

2014-07-10 Thread Chris Wilson
Use a short local variable to pass around the desired idle frequency. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_pm.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index f29c643c

[Intel-gfx] [PATCH 5/7] drm/i915: Use down ei for manual Baytrail RPS calculations

2014-07-10 Thread Chris Wilson
Use both up/down manual ei calcuations for symmetry and greater flexibility for reclocking, instead of faking the down interrupt based on a fixed integer number of up interrupts. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_irq.c | 15 ++-

Re: [Intel-gfx] [PATCH 1/5] drm/i915: don't write powered down IRQ registers on Gen 8

2014-07-10 Thread Paulo Zanoni
2014-07-08 11:58 GMT-03:00 Daniel Vetter : > On Tue, Jul 08, 2014 at 11:15:03AM -0300, Paulo Zanoni wrote: >> 2014-07-07 18:23 GMT-03:00 Daniel Vetter : >> > On Fri, Jul 04, 2014 at 11:50:29AM -0300, Paulo Zanoni wrote: >> >> From: Paulo Zanoni >> >> >> >> If we enable unclaimed register reporting

[Intel-gfx] [PATCH 1/7] drm/i915: Move RPS evaluation interval counters to i915->rps

2014-07-10 Thread Chris Wilson
Place the RPS counters inside the RPS struct. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 18 +++--- drivers/gpu/drm/i915/i915_irq.c | 32 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH 7/7] drm/i915: Agressive downclocking on Baytrail

2014-07-10 Thread Chris Wilson
Reuse the same reclocking strategy for Baytail as on its bigger brethren, Sandybridge and Ivybridge. In particular, this makes the device quicker to reclock (both up and down) though the tendency now is to downclock more aggressively to compensate for the RPS boosts. Signed-off-by: Chris Wilson C

[Intel-gfx] [PATCH 4/7] drm/i915: Improved w/a for rps on Baytrail

2014-07-10 Thread Chris Wilson
Rewrite commit 31685c258e0b0ad6aa486c5ec001382cf8a64212 Author: Deepak S Date: Thu Jul 3 17:33:01 2014 -0400 drm/i915/vlv: WA for Turbo and RC6 to work together. Other than code clarity, the major improvement is to disable the extra interrupts generated when idle. However, the reclocking

Re: [Intel-gfx] [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"

2014-07-10 Thread Hans de Bruin
On 07/09/2014 10:35 PM, Daniel Vetter wrote: This reverts commit 773875bfb6737982903c42d1ee88cf60af80089c. It is very much needed and the lack of dithering has been reported by a large list of people with various gen2/3 hardware. Also, the original patch was complete non-sense since the WARNING

Re: [Intel-gfx] [PATCH 00/19] ddi: respin of runtime PM for DPMS

2014-07-10 Thread Daniel Vetter
On Tue, Jul 01, 2014 at 06:33:50PM -0300, Paulo Zanoni wrote: > 2014-06-25 16:01 GMT-03:00 Imre Deak : > > This is a respin of the unmerged part of Daniel's runtime PM for DPMS > > patchset [1]. The original one also included a refactoring of the DDI > > PCH/CRT encoder modesetting path, I left the

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Allow overlapping userptr objects

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 10:21:43AM +0100, Chris Wilson wrote: > Whilst I strongly advise against doing so for the implicit coherency > issues between the multiple buffer objects accessing the same backing > store, it nevertheless is a valid use case, akin to mmaping the same > file multiple times.

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Make the device_info structure __initconst

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 02:52:42PM +0100, Damien Lespiau wrote: > We don't need them past the module initialization as the correct > structure is copied into dev_priv in ->load(), called from > drm_pci_init(), called from the module init funtion. > > I'm always hesitant about adding new members to

Re: [Intel-gfx] [PATCH 4/4] drm/i915: don't read LVDS regs at compute_config time

2014-07-10 Thread Daniel Vetter
On Fri, Jul 04, 2014 at 01:38:36PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > We may reach this point while the machine is still runtime suspended, > so we'll hit a WARN. The other encoders also don't touch registers at > this point, so instead of waking the machine up, write some code t

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Don't cast a pointer to void* unnecessarily

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 04:26:53PM -0300, Paulo Zanoni wrote: > 2014-07-10 10:52 GMT-03:00 Damien Lespiau : > > C is super happy to asign anything pointer to void *. Don't pretend > > otherwise. > > Reviewed-by: Paulo Zanoni Queued for -next, thanks for the patch. -Daniel > > > > > Signed-off-

Re: [Intel-gfx] [PATCH 2/7] drm/i915: Make the RPS interrupt generation mask handle the vlv wa

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 08:31:19PM +0100, Chris Wilson wrote: > We can eliminate a lot of special case code by making the computation of > the interrupt mask be correct for all callers. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/intel_pm.c | 10 +- > 1 file changed, 5 i

Re: [Intel-gfx] [PATCH i-g-t 06/43] igt_kms: Introduce a for_each_pipe() macro

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 07:00:07PM +0100, Damien Lespiau wrote: > Signed-off-by: Damien Lespiau > --- > lib/igt_kms.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/igt_kms.h b/lib/igt_kms.h > index d34bcee..9e7bc2b 100644 > --- a/lib/igt_kms.h > +++ b/lib/igt_kms.h > @@ -202,6

[Intel-gfx] [PATCH] drm/i915: Make the physical object coherent with GTT

2014-07-10 Thread Chris Wilson
Currently objects for which the hardware needs a contiguous physical address are allocated a shadow backing storage to satisfy the contraint. This shadow buffer is not wired into the normal obj->pages and so the physical object is incoherent with accesses via the GPU, GTT and CPU. By setting up the

Re: [Intel-gfx] [PATCH] drm/i915: Make the physical object coherent with GTT

2014-07-10 Thread Daniel Vetter
On Wed, Jun 11, 2014 at 12:59:51PM +0100, Chris Wilson wrote: > Currently objects for which the hardware needs a contiguous physical > address are allocated a shadow backing storage to satisfy the contraint. > This shadow buffer is not wired into the normal obj->pages and so the > physical object i

Re: [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-10 Thread Tian, Kevin
> From: Daniel Vetter > Sent: Monday, July 07, 2014 11:40 AM > > On Mon, Jul 07, 2014 at 07:58:30PM +0200, Paolo Bonzini wrote: > > Il 07/07/2014 19:54, Daniel Vetter ha scritto: > > >On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote: > > >>Il 07/07/2014 16:49, Daniel Vetter ha scritto

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Make the device_info structure __initconst

2014-07-10 Thread Damien Lespiau
On Thu, Jul 10, 2014 at 10:25:27PM +0200, Daniel Vetter wrote: > On Thu, Jul 10, 2014 at 02:52:42PM +0100, Damien Lespiau wrote: > > We don't need them past the module initialization as the correct > > structure is copied into dev_priv in ->load(), called from > > drm_pci_init(), called from the mo

[Intel-gfx] startx on Fedora died today

2014-07-10 Thread Felix Miata
F21 branched off Rawhide over recent hours. On i945G host gx62b I cloned first, then upgraded one to current F21 state and the other to Rawhide. Before today's upgrade, which moved server from 1.15.99.903 to 1.15.99.904 on both, and kernel from rc4git0.1 to rc4git2.1, booting first to multi-user

Re: [Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo

2014-07-10 Thread Sun, Daisy
This Software turbo will mainly take place of the hardware driven interrupt part without touching the boost/idle strategy. So gen6_rps_boost and gen6_rps_idle will still function for BDW. I can revise the commit message to clarify. On 7/10/2014 12:07 PM, Chris Wilson wrote: On Thu, Jul 10, 2

Re: [Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo

2014-07-10 Thread Chris Wilson
On Thu, Jul 10, 2014 at 07:39:32PM -0700, Sun, Daisy wrote: > > This Software turbo will mainly take place of the hardware driven > interrupt part without touching the boost/idle strategy. > So gen6_rps_boost and gen6_rps_idle will still function for BDW. You still are not addressing that your fu

Re: [Intel-gfx] startx on Fedora died today

2014-07-10 Thread Chris Wilson
On Thu, Jul 10, 2014 at 09:09:31PM -0400, Felix Miata wrote: > F21 branched off Rawhide over recent hours. On i945G host gx62b I > cloned first, then upgraded one to current F21 state and the other > to Rawhide. Before today's upgrade, which moved server from > 1.15.99.903 to 1.15.99.904 on both, a

Re: [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 09:08:24PM +, Tian, Kevin wrote: > actually I'm curious whether it's still necessary to __detect__ PCH. Could > we assume a 1:1 mapping between GPU and PCH, e.g. BDW already hard > code the knowledge: > > } else if (IS_BROADWELL(dev)) { >

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Make the device_info structure __initconst

2014-07-10 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 10:47:21PM +0100, Damien Lespiau wrote: > On Thu, Jul 10, 2014 at 10:25:27PM +0200, Daniel Vetter wrote: > > On Thu, Jul 10, 2014 at 02:52:42PM +0100, Damien Lespiau wrote: > > > We don't need them past the module initialization as the correct > > > structure is copied into

  1   2   >