Re: [Intel-gfx] [PATCH 1/1] drm/i915: Adding Gfx Clock, Wake and Gunit save/restore logic in PM suspend/resume paths.

2014-08-07 Thread Sagar Arun Kamble
Hi Daniel, On Mon, 2014-08-04 at 10:07 +0200, Daniel Vetter wrote: > On Fri, Aug 01, 2014 at 12:34:56PM +0530, sagar.a.kam...@intel.com wrote: > > From: Sagar Kamble > > > > Sequence to get gfx clocks on/off, allow/disallow wake and save/restore of > > gunit registers need to be followed in > >

Re: [Intel-gfx] [PATCH] drm: Restore drm_file->is_master

2014-08-07 Thread Dave Airlie
On 8 August 2014 02:00, David Herrmann wrote: > Hi > > On Thu, Aug 7, 2014 at 3:04 PM, Chris Wilson wrote: >> Despite the claims of >> >> commit 48ba813701eb14b3008edefef4a0789b328e278c >> Author: David Herrmann >> Date: Tue Jul 22 18:46:09 2014 +0200 >> >> drm: drop redundant drm_file->is

Re: [Intel-gfx] [PATCH 7/7] Revert "drm/i915: Enable semaphores on BDW"

2014-08-07 Thread Rodrigo Vivi
The rest of the series was a reference for the records of what I had and let semaphores on bdw a bit more stable. But even with them we still get hungs so please consider only to get the revert for now. On Mon, Aug 4, 2014 at 11:15 AM, Rodrigo Vivi wrote: > This reverts commit 521e62e49a42661a4

Re: [Intel-gfx] [PATCH] drm/i915: FBC flush nuke for BDW

2014-08-07 Thread Rodrigo Vivi
I tested here on HSW a full sw nuke/cache clean and I didn't liked the result. It seems to compress less than the hw one and to recompress everything a lot and stay less time compressed. So, imho v3 is the way to go. On Mon, Aug 4, 2014 at 3:51 AM, Rodrigo Vivi wrote: > According to spec FBC o

Re: [Intel-gfx] [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START

2014-08-07 Thread Ville Syrjälä
On Thu, Aug 07, 2014 at 03:39:54PM +0100, Chris Wilson wrote: > Ville found an old w/a documented for g4x that suggested that we need to > reset the HEAD after writing START. This is a useful fixup for some of > the g4x ring initialisation woes, but as usual, not all. > > v2: Do the rewrite uncond

Re: [Intel-gfx] [PATCH] drm: Restore drm_file->is_master

2014-08-07 Thread David Herrmann
Hi On Thu, Aug 7, 2014 at 3:04 PM, Chris Wilson wrote: > Despite the claims of > > commit 48ba813701eb14b3008edefef4a0789b328e278c > Author: David Herrmann > Date: Tue Jul 22 18:46:09 2014 +0200 > > drm: drop redundant drm_file->is_master > > drm_file->is_master is not synomous with having

Re: [Intel-gfx] [PATCH] drm/i915: read HEAD register back in init_ring_common() to enforce ordering

2014-08-07 Thread Daniel Vetter
On Thu, Aug 07, 2014 at 04:29:53PM +0200, Jiri Kosina wrote: > Withtout this, ring initialization fails reliabily during resume with > > [drm:init_ring_common] *ERROR* render ring initialization failed ctl > 0001f001 head ff8804 tail start 000e4000 > > This is not a complete f

Re: [Intel-gfx] [PATCH 6/6] igt_kms: add igt_unset_all_crtcs()

2014-08-07 Thread Daniel Vetter
On Thu, Aug 07, 2014 at 10:09:07AM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's > give it a name that better describes what the implementation does. > > Signed-off-by: Paulo Zanoni Same comment as earlier, this should

Re: [Intel-gfx] [PATCH 4/6] igt_kms: document and export igt_get_property()

2014-08-07 Thread Daniel Vetter
On Thu, Aug 07, 2014 at 10:09:05AM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > So we can use it on pm_rpm.c. > > Signed-off-by: Paulo Zanoni The idea behind the igt_kms_ and kmstest_ prefix split is that kmstests_ are the lower-level helpers wrapping around just the libdrm interfaces (

[Intel-gfx] [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START

2014-08-07 Thread Chris Wilson
Ville found an old w/a documented for g4x that suggested that we need to reset the HEAD after writing START. This is a useful fixup for some of the g4x ring initialisation woes, but as usual, not all. v2: Do the rewrite unconditionally anyway References: https://bugs.freedesktop.org/show_bug.cgi?

Re: [Intel-gfx] 3.15-rc: regression in suspend

2014-08-07 Thread Daniel Vetter
On Thu, Aug 07, 2014 at 02:47:21PM +0200, Jiri Kosina wrote: > On Fri, 11 Jul 2014, Pavel Machek wrote: > > > > > > Ok, so I have set up machines for ktest / autobisect, and found out > > > > > that > > > > > 3.16-rc1 no longer has that problem. Oh well, bisect would not be > > > > > fun, > >

Re: [Intel-gfx] [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START

2014-08-07 Thread Chris Wilson
On Thu, Aug 07, 2014 at 05:26:20PM +0300, Ville Syrjälä wrote: > On Thu, Aug 07, 2014 at 03:11:17PM +0100, Chris Wilson wrote: > > Ville found an old w/a documented for g4x that suggested that we need to > > reset the HEAD after writing START. This is a useful fixup for some of > > the g4x ring ini

[Intel-gfx] [PATCH] drm/i915: read HEAD register back in init_ring_common() to enforce ordering

2014-08-07 Thread Jiri Kosina
Withtout this, ring initialization fails reliabily during resume with [drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head ff8804 tail start 000e4000 This is not a complete fix, but it is verified to make the ring initialization failures during

Re: [Intel-gfx] [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START

2014-08-07 Thread Ville Syrjälä
On Thu, Aug 07, 2014 at 03:11:17PM +0100, Chris Wilson wrote: > Ville found an old w/a documented for g4x that suggested that we need to > reset the HEAD after writing START. This is a useful fixup for some of > the g4x ring initialisation woes, but as usual, not all. > > References: https://bugs.

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Iterate through the initialized DDIs to prepare their buffers

2014-08-07 Thread Damien Lespiau
On Thu, Aug 07, 2014 at 11:17:35AM -0300, Paulo Zanoni wrote: > > +#define for_each_digital_port(dev, digital_port) \ > > + list_for_each_entry(digital_port, \ > > + &dev->mode_config.encoder_list, \ > > +

Re: [Intel-gfx] [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START

2014-08-07 Thread Chris Wilson
On Thu, Aug 07, 2014 at 03:11:17PM +0100, Chris Wilson wrote: > Ville found an old w/a documented for g4x that suggested that we need to > reset the HEAD after writing START. This is a useful fixup for some of > the g4x ring initialisation woes, but as usual, not all. Note that a slightly differen

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Iterate through the initialized DDIs to prepare their buffers

2014-08-07 Thread Paulo Zanoni
2014-08-05 7:29 GMT-03:00 Damien Lespiau : > Not every DDIs is necessarily connected can be strapped off and, in the > future, we'll have platforms with a different number of default DDI > ports. So, let's only call intel_prepare_ddi_buffers() on DDI ports that > are actually detected. > > We also

Re: [Intel-gfx] [PATCH] drm/i915: No busy-loop wait_for in the ring init code

2014-08-07 Thread Chris Wilson
On Thu, Aug 07, 2014 at 04:07:59PM +0200, Daniel Vetter wrote: > Doing a 1s wait (tops) with the cpu is a bit excessive. Tune it down > like everything else in that code. > > Cc: Naresh Kumar Kachhi > Cc: Chris Wilson > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/intel_ringbuffer

Re: [Intel-gfx] [PATCH] drm/i915: No busy-loop wait_for in the ring init code

2014-08-07 Thread Chris Wilson
On Thu, Aug 07, 2014 at 04:07:59PM +0200, Daniel Vetter wrote: > Doing a 1s wait (tops) with the cpu is a bit excessive. Tune it down > like everything else in that code. 1s? Didn't wait_for_atomic() take a timeout in microseconds? -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH] drm/i915: Reset the HEAD pointer for the ring after writing START

2014-08-07 Thread Chris Wilson
Ville found an old w/a documented for g4x that suggested that we need to reset the HEAD after writing START. This is a useful fixup for some of the g4x ring initialisation woes, but as usual, not all. References: https://bugs.freedesktop.org/show_bug.cgi?id=76554 Signed-off-by: Chris Wilson Cc: V

[Intel-gfx] [PATCH] drm/i915: No busy-loop wait_for in the ring init code

2014-08-07 Thread Daniel Vetter
Doing a 1s wait (tops) with the cpu is a bit excessive. Tune it down like everything else in that code. Cc: Naresh Kumar Kachhi Cc: Chris Wilson Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

Re: [Intel-gfx] [PATCH] drm/i915: Idleness detection for DRRS

2014-08-07 Thread Daniel Vetter
Hi Vandana, I think we need to start over from a fresh&clean slate with this part - too much changed and all the differen revisions of this patch don't provide that much information. Also as Chris says this introduces yet another idleness detection system, and we already have plenty of them. Hig

Re: [Intel-gfx] [PATCH] drm/i915: Idleness detection for DRRS

2014-08-07 Thread Chris Wilson
On Thu, Aug 07, 2014 at 07:15:15PM +0530, Vandana Kannan wrote: > Adding support to detect display idleness by tracking page flip from > user space. Switch to low refresh rate is triggered after 2 seconds of > idleness. The delay is configurable. If there is a page flip or call to > update the plan

[Intel-gfx] [PATCH] drm/i915: Idleness detection for DRRS

2014-08-07 Thread Vandana Kannan
Adding support to detect display idleness by tracking page flip from user space. Switch to low refresh rate is triggered after 2 seconds of idleness. The delay is configurable. If there is a page flip or call to update the plane, then high refresh rate is applied. The feature is not used in dual-di

[Intel-gfx] [PATCH] drm/i915: Prevent recursive deadlock on releasing a busy userptr

2014-08-07 Thread Chris Wilson
During release of the GEM object we hold the struct_mutex. As the object may be holding onto the last reference for the task->mm, calling mmput() may trigger exit_mmap() which close the vma which will call drm_gem_vm_close() and attempt to reacquire the struct_mutex. In order to avoid that recursio

[Intel-gfx] [PATCH] tests/pm_rpm: add subtests for fences

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni Daniel thought fences were not surviving runtime PM on DPMS, so we wrote this test to check. The good news is that the test passed, so there's no need for a Kernel patch, at least on the Kernel I tested. Signed-off-by: Paulo Zanoni --- tests/pm_rpm.c | 72 +++

[Intel-gfx] [PATCH 5/6] tests/pm_rpm: use igt_get_property()

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni So we can reduce the code size. Signed-off-by: Paulo Zanoni --- tests/pm_rpm.c | 97 -- 1 file changed, 40 insertions(+), 57 deletions(-) diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 0633476..800ab4b 100644 --- a

[Intel-gfx] [PATCH 4/6] igt_kms: document and export igt_get_property()

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni So we can use it on pm_rpm.c. Signed-off-by: Paulo Zanoni --- lib/igt_kms.c | 27 +-- lib/igt_kms.h | 4 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 664b9e8..6cca7e8 100644 --- a/lib/igt_km

[Intel-gfx] [PATCH 6/6] igt_kms: add igt_unset_all_crtcs()

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's give it a name that better describes what the implementation does. Signed-off-by: Paulo Zanoni --- lib/igt_kms.c | 18 ++ lib/igt_kms.h | 1 + tests/pm_lpsp.c | 17 +++-- te

[Intel-gfx] [PATCH 3/6] igt_kms: optionally return the property from get_property

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni So we can use this function on places that also need the property pointer, without having to call drmModeGetProperty() again with the returned id. Signed-off-by: Paulo Zanoni --- lib/igt_kms.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletio

[Intel-gfx] [PATCH 2/6] igt_kms: pass drm_fd instead of igt_display_t on some functions

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni Since these functions only really use the drm_fd. The goal is to be able to reuse these functions on programs that don't use the igt_display_t structure. Signed-off-by: Paulo Zanoni --- lib/igt_kms.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletion

[Intel-gfx] [PATCH 1/6] igt_kms: don't get drmModeRes just to free it later

2014-08-07 Thread Paulo Zanoni
From: Paulo Zanoni Stress testing malloc is not our goal :) Signed-off-by: Paulo Zanoni --- lib/igt_kms.c | 12 1 file changed, 12 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 740b5dd..8ab729b 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -276,21 +276,11 @@ v

[Intel-gfx] [PATCH] drm: Restore drm_file->is_master

2014-08-07 Thread Chris Wilson
Despite the claims of commit 48ba813701eb14b3008edefef4a0789b328e278c Author: David Herrmann Date: Tue Jul 22 18:46:09 2014 +0200 drm: drop redundant drm_file->is_master drm_file->is_master is not synomous with having drm_file->master == drm_file->minor->master. This is because drm_file->

[Intel-gfx] [PATCH 3/3] drm/i915: Program PFI credits for VLV

2014-08-07 Thread Vandana Kannan
From: Vidya Srinivas PFI credit programming is required when CD clock (related to data flow from display pipeline to end display) is greater than CZ clock (related to data flow from memory to display plane). This programming should be done when all planes are OFF to avoid intermittent hangs while

[Intel-gfx] [PATCH 1/3] drm/i915: Renaming CCK related reg definitions

2014-08-07 Thread Vandana Kannan
Rename the DISPLAY_TRUNK_* and DISPLAY_FREQUENCY_* bits to CCK_... instead of DISPLAY_... to make it clear they apply to all CCK clock control registers. Suggested by Ville. Signed-off-by: Vandana Kannan Cc: Ville Syrjä --- drivers/gpu/drm/i915/i915_reg.h | 10 +- drivers/gpu/drm/i

[Intel-gfx] [PATCH v2 2/3] drm/i915: Get CZ clock for VLV

2014-08-07 Thread Vandana Kannan
CZ clock is related to data flow from memory to display plane. This is required for comparison with CD clock before programming PFI credits. v2: Ville's review comments - Re-ordered CCK_CZ_CONTROL - Refactored get_clock_speed Signed-off-by: Vandana Kannan --- drivers/gpu/drm/i91

Re: [Intel-gfx] 3.15-rc: regression in suspend

2014-08-07 Thread Jiri Kosina
On Thu, 7 Aug 2014, Jiri Kosina wrote: > The patch below seems to finally cure the problem at my system; I've just > attached it to freedesktop bugzilla, but sending it to this thread as well > to hopefully get as much testing coverage by affected people as possible. > > I am going on with test

Re: [Intel-gfx] 3.15-rc: regression in suspend

2014-08-07 Thread Jiri Kosina
On Fri, 11 Jul 2014, Pavel Machek wrote: > > > > Ok, so I have set up machines for ktest / autobisect, and found out > > > > that > > > > 3.16-rc1 no longer has that problem. Oh well, bisect would not be fun, > > > > anyway... > > > > > > I am still seeing the problem with 3.16-rc2. > > > > I

[Intel-gfx] [PATCH 39/43] drm/i915/bdw: Print context state in debugfs

2014-08-07 Thread Thomas Daniel
From: Ben Widawsky This has turned out to be really handy in debug so far. Update: Since writing this patch, I've gotten similar code upstream for error state. I've used it quite a bit in debugfs however, and I'd like to keep it here at least until preemption is working. Signed-off-by: Ben Wida

[Intel-gfx] [PATCH 37/43] drm/i915/bdw: Display execlists info in debugfs

2014-08-07 Thread Thomas Daniel
From: Oscar Mateo v2: Warn and return if LRCs are not enabled. v3: Grab the Execlists spinlock (noticed by Daniel Vetter). Signed-off-by: Oscar Mateo v4: Lock the struct mutex for atomic state capture Signed-off-by: Thomas Daniel --- drivers/gpu/drm/i915/i915_debugfs.c | 80 +

[Intel-gfx] [PATCH 12/43] drm/i915/bdw: Don't write PDP in the legacy way when using LRCs

2014-08-07 Thread Thomas Daniel
From: Oscar Mateo This is mostly for correctness so that we know we are running the LR context correctly (this is, the PDPs are contained inside the context object). v2: Move the check to inside the enable PPGTT function. The switch happens in two places: the legacy context switch (that we won't

Re: [Intel-gfx] [PATCH 5/6] drm/i915: Add 180 degree primary plane rotation support

2014-08-07 Thread Daniel Vetter
On Thu, Aug 07, 2014 at 01:45:31PM +0200, Daniel Vetter wrote: > On Tue, Jul 15, 2014 at 11:11:37AM +0200, Daniel Vetter wrote: > > On Tue, Jul 15, 2014 at 02:10:28PM +0530, sonika.jin...@intel.com wrote: > > > + /* FBC does not work on some platforms for rotated planes */ > > > +

Re: [Intel-gfx] [PATCH 5/6] drm/i915: Add 180 degree primary plane rotation support

2014-08-07 Thread Daniel Vetter
On Tue, Jul 15, 2014 at 11:11:37AM +0200, Daniel Vetter wrote: > On Tue, Jul 15, 2014 at 02:10:28PM +0530, sonika.jin...@intel.com wrote: > > + /* FBC does not work on some platforms for rotated planes */ > > + if (INTEL_INFO(dev)->gen <= 4 && !IS_G4X(dev)) { > > +

Re: [Intel-gfx] [PATCH] drm/i915: Rename defines for selection of ddi buffer translation slot

2014-08-07 Thread Damien Lespiau
On Tue, Aug 05, 2014 at 05:36:19PM +0530, sonika.jin...@intel.com wrote: > From: Sonika Jindal > > Renaming the HSW-specific macros for ddi buffer translation slot to denote the > slot and not the vswing/pre-emph values as they are platform-dependent. > > This patch is based on top of the patch

Re: [Intel-gfx] [PATCH 0/6] Rename DP training vswing/pre-emph defines

2014-08-07 Thread Damien Lespiau
On Tue, Aug 05, 2014 at 04:38:16PM +0530, sonika.jin...@intel.com wrote: > From: Sonika Jindal > > Rename the defines to have levels instead of values for vswing and pre-emph > levels as the values may differ in other scenarios like low vswing of eDP 1.4 > where the values are different. > Update

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Add sprite watermark programming for VLV and CHV

2014-08-07 Thread Imre Deak
On Thu, 2014-08-07 at 11:26 +0530, Bhat, Gajanan wrote: > On 7/31/2014 7:14 PM, Imre Deak wrote: > > On Wed, 2014-07-16 at 18:24 +0530, Gajanan Bhat wrote: > >> Program DDL register as part sprite watermark programming for CHV and VLV. > >> > >> Signed-off-by: Gajanan Bhat > > This looks ok, but c

Re: [Intel-gfx] [PATCH V3] drm/i915: Add sprite watermark programming for VLV and CHV

2014-08-07 Thread Ville Syrjälä
On Thu, Aug 07, 2014 at 05:03:30PM +0530, Gajanan Bhat wrote: > Program DDL register as part of sprite watermark programming for CHV and VLV. > > v2: Rename DRAIN_LATENCY_MAX by DRAIN_LATENCY_MASK > > v3: Addressed review comments by Ville > - Changed Sprite DDL definitions to more generic to

[Intel-gfx] [PATCH 2/2] drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam

2014-08-07 Thread Zhipeng Gong
This will let userland only try to use the new ring when the appropriate kernel is present Signed-off-by: Zhipeng Gong --- drivers/gpu/drm/i915/i915_dma.c | 3 +++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/

[Intel-gfx] [PATCH 1/2] drm/i915: Specify bsd rings through exec flag

2014-08-07 Thread Zhipeng Gong
On Broadwell GT3 we have 2 Video Command Streamers (VCS), but userspace has no control when using VCS1 or VCS2. This patch introduces a mechanism to avoid the default ping-pong mode and use one specific ring through execution flag. Signed-off-by: Zhipeng Gong --- drivers/gpu/drm/i915/i915_gem_ex

[Intel-gfx] [PATCH 3/3] test/gem_dummy_reloc_loop: add tests for dual bsd ring

2014-08-07 Thread Zhipeng Gong
Signed-off-by: Zhipeng Gong --- tests/gem_dummy_reloc_loop.c | 16 1 file changed, 16 insertions(+) diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c index 4fe0786..6913537 100644 --- a/tests/gem_dummy_reloc_loop.c +++ b/tests/gem_dummy_reloc_loop.c @@ -26

[Intel-gfx] [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings

2014-08-07 Thread Zhipeng Gong
The Broadwell GT3 machine has two independent BSD rings that can be used to process the video commands. New execution flags are added to export the two rings to userspace so that userspace can specify the bsd ring. Zhipeng Gong (3): i-g-t: check whether kernel has dual bsd ring tests/gem_exec_

[Intel-gfx] [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring

2014-08-07 Thread Zhipeng Gong
Signed-off-by: Zhipeng Gong --- lib/ioctl_wrappers.c | 16 lib/ioctl_wrappers.h | 1 + 2 files changed, 17 insertions(+) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index c4e1080..03163a0 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -754,6 +754,2

[Intel-gfx] [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring

2014-08-07 Thread Zhipeng Gong
Signed-off-by: Zhipeng Gong --- tests/gem_exec_params.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c index 769969d..b18ef4e 100644 --- a/tests/gem_exec_params.c +++ b/tests/gem_exec_params.c @@ -126,6 +126,12 @@ igt_main