Re: [Intel-gfx] [RFC] drm: Add utility function to check for edp1.4

2014-10-29 Thread sonika
Thanks for your comments Thierry. I agree to all your comments. I will write a general function to return version and repost the patch Thanks, Sonika On Wednesday 29 October 2014 07:12 PM, Thierry Reding wrote: On Wed, Oct 22, 2014 at 11:45:23AM +0530, sonika.jin...@intel.com wrote: From: Soni

Re: [Intel-gfx] [PATCH 81/89] drm/i915/skl: Expose skl_ddb_get_hw_state()

2014-10-29 Thread Damien Lespiau
On Wed, Oct 29, 2014 at 09:21:20PM +0200, Ville Syrjälä wrote: > On Thu, Sep 04, 2014 at 12:27:47PM +0100, Damien Lespiau wrote: > > So we can use it in the modeset checker. > > > > v2: Rebase on top of nigthly > > > > v3: Rebase on top of -nigthly (minor conflict in intel_drv.h) > > > > Signed-

[Intel-gfx] [PATCH] drm/i915: Make sample_c messages go faster on Haswell.

2014-10-29 Thread Kenneth Graunke
Haswell significantly improved the performance of sampler_c messages, but the optimization appears to be off by default. Later platforms remove this bit, and apparently always enable the optimization. Improves performance in "Counter Strike: Global Offensive" by 18% at default settings on Iris Pr

Re: [Intel-gfx] [PATCH v3] drm/i915: rewrite hsw/bdw audio codec enable/disable sequences

2014-10-29 Thread Rodrigo Vivi
On Tue, Oct 28, 2014 at 5:03 AM, Jani Nikula wrote: > There's some serious confusion regarding ELD valid bit that gets set and > cleared back and forth etc. Rewrite it all based on the documented audio > codec enable/disable sequences. > > v3: replace vblank wait with a comment Why did you remove

Re: [Intel-gfx] [PATCH v2 05/18] drm/i915/audio: pass intel_encoder on to platform specific ELD functions

2014-10-29 Thread Rodrigo Vivi
Oh, I was going to review the rest... but based on this comment I guess I might wait for a new v2 series right? On Tue, Oct 28, 2014 at 12:30 AM, Daniel Vetter wrote: > On Mon, Oct 27, 2014 at 10:52:00AM -0700, Rodrigo Vivi wrote: >> On Mon, Oct 27, 2014 at 7:26 AM, Jani Nikula wrote: >> > This

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Initialize new chv primary plane and pipe blender registers

2014-10-29 Thread Rodrigo Vivi
On Thu, Oct 16, 2014 at 10:52 AM, wrote: > From: Ville Syrjälä > > CHV adds a bunch of new registers for primary plane size/position and > pipe blender setup. Initialize all those registers to avoid nasty > surprises. PRIMSIZE is especially important as without programming it > the outout will b

Re: [Intel-gfx] [PATCH] drm/i915: Add support for CHV pipe B sprite CSC

2014-10-29 Thread Rodrigo Vivi
First of all thanks for the spec On Mon, Oct 20, 2014 at 9:47 AM, wrote: > From: Ville Syrjälä > > CHV has a programmable CSC unit on the pipe B sprites. Program the unit > appropriately for BT.601 limited range YCbCr to full range RGB color > conversion. This matches the programming we current

Re: [Intel-gfx] [PATCH 82/89] drm/i915/skl: Add a debugfs file to dump the DDB allocation

2014-10-29 Thread Ville Syrjälä
On Thu, Sep 04, 2014 at 12:27:48PM +0100, Damien Lespiau wrote: > v2: minor conflict in i915_debugfs.c > v3: Rebase on top of the for_each_pipe() change adding dev_priv as first > argument. > v4: minor conflict in the i915_debugfs_files array > v5: minor conflict in the i915_debugfs_files array

Re: [Intel-gfx] [PATCH 81/89] drm/i915/skl: Expose skl_ddb_get_hw_state()

2014-10-29 Thread Ville Syrjälä
On Thu, Sep 04, 2014 at 12:27:47PM +0100, Damien Lespiau wrote: > So we can use it in the modeset checker. > > v2: Rebase on top of nigthly > > v3: Rebase on top of -nigthly (minor conflict in intel_drv.h) > > Signed-off-by: Damien Lespiau I don't know if I should even bother with the r-b. Fee

Re: [Intel-gfx] [PATCH 76/89] drm/i915/skl: Store the new WM state at the very end of the update

2014-10-29 Thread Ville Syrjälä
On Thu, Sep 04, 2014 at 12:27:42PM +0100, Damien Lespiau wrote: > We're going to add a new step, let's not hide the copy of the new WM > state inside one inner function, but as a 1st level operation in the WM > update. The new step being the flush which needs to compare the currnet and new ddb sta

Re: [Intel-gfx] [PATCH 83/89] drm/i915/skl: Check the DDB state at modeset

2014-10-29 Thread Ville Syrjälä
On Thu, Sep 04, 2014 at 03:27:49PM +0200, Daniel Vetter wrote: > On Thu, Sep 04, 2014 at 12:27:49PM +0100, Damien Lespiau wrote: > > v2: Don't check DDB on pre-SKL platforms > > Don't check DDB state on disabled pipes > > > > Signed-off-by: Damien Lespiau > > We probably want to do this with

Re: [Intel-gfx] [PATCH 52/89] drm/i915/gen9: Disable WM if corresponding latency is 0

2014-10-29 Thread Ville Syrjälä
On Wed, Sep 24, 2014 at 03:06:11PM +0100, Damien Lespiau wrote: > On Fri, Sep 19, 2014 at 01:05:02PM +0300, Ville Syrjälä wrote: > > > > If we're going to be paranoid I think we should disable all higher WM > > levels whose latency is lower than any of the lower levels. And I > > think we'll want

Re: [Intel-gfx] [PATCH 50/89] drm/i915/skl: Read the pipe WM HW state

2014-10-29 Thread Ville Syrjälä
On Thu, Sep 04, 2014 at 12:27:16PM +0100, Damien Lespiau wrote: > From: Pradeep Bhat > > This patch provides the implementation for reading the pipe wm HW > state. > > v2: Incorporated Damien's review comments and also made modifications > to incorporate the plane/cursor split. > > v3: No n

Re: [Intel-gfx] [PATCH 49/89] drm/i915/skl: Program the DDB allocation

2014-10-29 Thread Ville Syrjälä
On Sat, Sep 27, 2014 at 03:17:58PM +0100, Damien Lespiau wrote: > On Fri, Sep 19, 2014 at 01:03:15PM +0300, Ville Syrjälä wrote: > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c > > > b/drivers/gpu/drm/i915/intel_pm.c > > > index 0ddcbad..756ff16 100644 > > > --- a/drivers/gpu/drm/i915/intel_pm.

Re: [Intel-gfx] [PATCH 0/3] Rework of the WM flush (for the DDB allocation)

2014-10-29 Thread Ville Syrjälä
On Wed, Oct 15, 2014 at 06:34:41PM +0100, Damien Lespiau wrote: > Ville found that the sequencing I had to re-program the DDB wasn't quite > correct and so this is an attempt to do better. > > This series reworks patch: > > [PATCH 78/89] drm/i915/skl: Flush the WM configuration > > of the init

Re: [Intel-gfx] [PATCH 2/3] drm/i915/skl: Flush the WM configuration

2014-10-29 Thread Ville Syrjälä
On Wed, Oct 15, 2014 at 06:34:43PM +0100, Damien Lespiau wrote: > When we write new values for the DDB allocation and WM parameters, we now > need to trigger the double buffer update for the pipe to take the new > configuration into account. > > As the DDB is a global resource shared between plane

[Intel-gfx] [PATCH i-g-t 2/2] lib/tests: use the "check_" prefix for tests

2014-10-29 Thread Thomas Wood
The "check_" prefix ensures the test programs are not installed and are only built when "make check" is run. Signed-off-by: Thomas Wood --- lib/tests/Makefile.am | 5 + lib/tests/Makefile.sources | 12 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/tes

[Intel-gfx] [PATCH i-g-t 1/2] build: fix distcheck

2014-10-29 Thread Thomas Wood
Fix distcheck issues introduced by commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter Signed-off-by: Thomas Wood --- lib/tests/Makefile.am | 2 +- tests/Makefile.sources | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tests/Makefile.am b/lib/tests/

[Intel-gfx] [PATCH 6/8] drm/i915: Make intel_format_to_fourcc() static

2014-10-29 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 200a62e..c77cf9b 100644 --- a

Re: [Intel-gfx] [PATCH 0/8] SKL WM fixups

2014-10-29 Thread Ville Syrjälä
On Tue, Oct 14, 2014 at 05:30:58PM +0100, Damien Lespiau wrote: > Here's a few patches on top of the original WM series to both address some > review comments from Ville and disable the transition WMs (because we noticed > some underruns with them and the code is not quit ready). > > With those, I

[Intel-gfx] [PATCH 5/8] drm/i915: Use pipe_name() in the get_plane_config() functions

2014-10-29 Thread Damien Lespiau
We may as well try to be consistent everywhere and know the pipes by their name. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 3/8] drm/i915: Unclutter the get_plane() functions

2014-10-29 Thread Damien Lespiau
crtc->base.primary->fb was used everywhere. Use fb to temporarily point there and don't forget to assign fb to its final destination at the end. v2: Rebase on top of misc changes (mask of DSPSURF, PAGE_ALIGN) Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 61 ++

[Intel-gfx] [PATCH 8/8] drm/i915/skl: Provide a Skylake version of get_plane_config()

2014-10-29 Thread Damien Lespiau
Universal planes have changed a bit the register organization. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 108 --- 1 file changed, 101 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm

[Intel-gfx] [PATCH 2/8] drm/i915: Use a common function for computing the fb height alignment

2014-10-29 Thread Damien Lespiau
If we need to change the fb height constraints, it sounds like a good idea to have to do it in one place only. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 19 +++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_fbdev.c | 3

[Intel-gfx] [PATCH 7/8] drm/i915/skl: intel_format_to_fourcc() doesn't work for SKL planes

2014-10-29 Thread Damien Lespiau
We will have a skl_ version shortly! Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c77cf9b..02b2a97 100644 --- a/d

[Intel-gfx] [PATCH 4/8] drm/i915: Don't use crtc->plane in ILK+ get_config()

2014-10-29 Thread Damien Lespiau
crtc->plane can only be different from crtc->pipe pre-Gen4. Don't use it in new-ish code. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gp

[Intel-gfx] [PATCH 0/8] Skylake primary plane read-out

2014-10-29 Thread Damien Lespiau
Skylake changed a few things here and there in the plane registers and we weren't correctly reading out the primary plane state when trying to re-use the BIOS stolen allocated fb (especially the stride was all wrong). Of course, weird artefacts ensued when loading the driver. This series implement

[Intel-gfx] [PATCH 1/8] drm/i915: Change plane_config to store a tiling_mode

2014-10-29 Thread Damien Lespiau
Rather than having "tiled" meaning "is it X-tiled?" convert the field to explicitely store the tiling mode. The code doesn't have to change much as 1 is conveniently I915_TILING_X. This is to accommodate future changes around tiling modes and scannout buffers. Signed-off-by: Damien Lespiau ---

Re: [Intel-gfx] [PATCH 48/89 v6] drm/i915/skl: Allocate DDB portions for display planes

2014-10-29 Thread Ville Syrjälä
On Sat, Sep 27, 2014 at 03:15:00PM +0100, Damien Lespiau wrote: > v2: Fix the 3rd plane/cursor logic (Pradeep Bhat) > v3: Fix one-by-one error in the DDB allocation code > v4: Rebase on top of the skl_pipe_pixel_rate() argument change > v5: Replace the available/start/end output parameters of >

Re: [Intel-gfx] [PATCH 47/89 v11] drm/i915/skl: SKL Watermark Computation

2014-10-29 Thread Ville Syrjälä
On Tue, Sep 23, 2014 at 12:13:50PM +0100, Damien Lespiau wrote: > From: Pradeep Bhat > > This patch implements the watermark algorithm and its necessary > functions. Two function pointers skl_update_wm and > skl_update_sprite_wm are provided. The skl_update_wm will update > the watermarks for the

Re: [Intel-gfx] [PATCH 3/8] drm/i915/skl: Move the per-latency maximum test earlier

2014-10-29 Thread Ville Syrjälä
On Tue, Oct 14, 2014 at 05:31:01PM +0100, Damien Lespiau wrote: > To align with the ilk WM code and because it makes sense to test against > the upper bounds as soon as possible, let's move the maximum checks from > skl_compute_wm_results() to skl_compute_plane_wm(). > > This has the nice benefit

[Intel-gfx] [PATCH i-g-t] lib: ensure the library is build before the tests

2014-10-29 Thread Thomas Wood
This fixes the build problems introduced by commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter Signed-off-by: Thomas Wood --- lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 6b1e984..ab82302 100644

Re: [Intel-gfx] [PATCH 1/8] drm/i915/skl: Make 'end' of the DDB allocation entry exclusive

2014-10-29 Thread Ville Syrjälä
On Tue, Oct 14, 2014 at 05:30:59PM +0100, Damien Lespiau wrote: > Ville suggested that we should use the same semantics as C arrays to > reduce the number of those pesky +1/-1 in the allocation code. > > This patch leaves the debugfs file as is, showing the internal DDB > allocation structure, not

Re: [Intel-gfx] [PATCH 46/89] drm/i915/skl: Add DDB allocation management structures

2014-10-29 Thread Ville Syrjälä
On Thu, Sep 04, 2014 at 12:27:12PM +0100, Damien Lespiau wrote: > We now need to allocate space in the DDB for planes being scanned out > ourselves. The data structure to represent an allocation mirrors what > we'll need to write in the registers later on: (start, end). > > We add that allocation

[Intel-gfx] [PATCH i-g-t 2/2] lib/igt_core.h: add debug messages for test requirements

2014-10-29 Thread Thomas Wood
Signed-off-by: Thomas Wood --- lib/igt_core.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/igt_core.h b/lib/igt_core.h index 5318c5e..f7a92ce 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -199,7 +199,7 @@ void __igt_skip_check(const char *file, const int line

[Intel-gfx] [PATCH i-g-t 1/2] lib/igt_core.h: fix igt_skip_on_f requirement message

2014-10-29 Thread Thomas Wood
Signed-off-by: Thomas Wood --- lib/igt_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_core.h b/lib/igt_core.h index b8f6702..5318c5e 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -397,7 +397,7 @@ void igt_exit(void) __attribute__((noreturn)); * informat

Re: [Intel-gfx] [RFC] drm: Add utility function to check for edp1.4

2014-10-29 Thread Thierry Reding
On Wed, Oct 22, 2014 at 11:45:23AM +0530, sonika.jin...@intel.com wrote: > From: Sonika Jindal > > v2: Reading DP_EDP_REV, only when DISPLAY_CONTROL_CAPABLE field is set > (Satheesh) > > v3: Moving the utility function to drm_dp_helper (Daniel) > > Signed-off-by: Sonika Jindal > --- > driver

[Intel-gfx] [PATCH] drm/i915: Redefine WARN_ON to include the condition

2014-10-29 Thread Mika Kuoppala
When looking at the bug report logs with triggered WARN_ON, the person doing bug triaging will have to find exact kernel source and match file/line. Attach the condition that triggered the WARN_ON to kernel log. In most cases the context is self evident and this way we can save developer time. Th

Re: [Intel-gfx] [PATCH 4/4] drm/i915/bdw: Pin the ringbuffer backing

2014-10-29 Thread shuang . he
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) -Summary- Platform: baseline_drm_intel_nightly_pass_rate->patch_applied_pass_rate BYT: pass/total=354/354->353/354 PNV: pass/total=331/331->331

Re: [Intel-gfx] [PATCH] drm/i915: Add missed MI_BATCH_BUFFER_END in null state batch buffer.

2014-10-29 Thread Chris Wilson
On Wed, Oct 29, 2014 at 02:10:45PM +0200, Mika Kuoppala wrote: > Zhi Wang writes: > > > Currently MI_BATCH_BUFFER_END is missed in null state batch buffer. > > This fix is trying to append the missed instruction at the end of > > null state batch buffer gem bo after it was initialized and filled

Re: [Intel-gfx] [PATCH] drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.h

2014-10-29 Thread Matt Roper
On Wed, Oct 29, 2014 at 10:11:25AM +0100, Daniel Vetter wrote: > Just a bit of OCD cleanup on headers - this function isn't the core > interface any more but just a helper for drivers who haven't yet > transitioned to universal planes. Put the declaration at the right > spot and sprinkle necessary

Re: [Intel-gfx] [PATCH 2/6] drm/i915: use compute_config in set_config

2014-10-29 Thread Ander Conselvan de Oliveira
On 10/23/2014 09:50 PM, Jesse Barnes wrote: This will allow us to consult more info before deciding whether to flip or do a full mode set. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 36 ++-- 1 file changed, 30 insertions(+), 6 delet

Re: [Intel-gfx] [PATCH 1/6] drm/i915: factor out compute_config from __intel_set_mode

2014-10-29 Thread Ander Conselvan de Oliveira
On 10/23/2014 09:50 PM, Jesse Barnes wrote: This allows us to calculate the full pipe config before we do any mode setting work. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 93 +--- 1 file changed, 65 insertions(+), 28 deletions(-)

Re: [Intel-gfx] [PATCH 9/9] drm/i915: Don't store current shared DPLL

2014-10-29 Thread shuang . he
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) -Summary- Platform: baseline_drm_intel_nightly_pass_rate->patch_applied_pass_rate BYT: pass/total=271/271->271/271 PNV: pass/total=331/331->328

Re: [Intel-gfx] [PATCH] drm/i915: Add missed MI_BATCH_BUFFER_END in null state batch buffer.

2014-10-29 Thread Wang, Zhi A
Thanks Mika. Just found that command in render state. It mixed the commands with indirect state together. And my problem is caused by my old drm-intel-nightly branch. Sorry for being annoyed. -Original Message- From: Mika Kuoppala [mailto:mika.kuopp...@linux.intel.com] Sent: Wednesda

[Intel-gfx] [PATCH i-g-t 1/2] tests/testdisplay: Fix test status check fumble

2014-10-29 Thread Daniel Vetter
This is a regression from 4306538d1d3f60877866c39c9ca953cc5e541dae is the first bad commit commit 4306538d1d3f60877866c39c9ca953cc5e541dae Author: Daniel Vetter AuthorDate: Thu Oct 2 11:18:20 2014 +0200 Commit: Daniel Vetter CommitDate: Thu Oct 2 11:34:55 2014 +0200 tests: Sprinkle

[Intel-gfx] [PATCH i-g-t 2/2] tests: Reenable testdisplay

2014-10-29 Thread Daniel Vetter
This seems to have been accidentally disabled in commit 982f7eb238a0898c456e0574dee7c4507738d75f Author: Chris Wilson Date: Fri Aug 29 15:19:57 2014 +0100 Prepare for 64bit relocation addresses Apparently no one noticed. Cc: Chris Wilson Signed-off-by: Daniel Vetter --- tests/Makefile

Re: [Intel-gfx] [PATCH] drm/i915: Add missed MI_BATCH_BUFFER_END in null state batch buffer.

2014-10-29 Thread Mika Kuoppala
Zhi Wang writes: > Currently MI_BATCH_BUFFER_END is missed in null state batch buffer. > This fix is trying to append the missed instruction at the end of > null state batch buffer gem bo after it was initialized and filled > with null state commands. > > This issue was exposed under full GPU vir

[Intel-gfx] [PATCH] drm/i915: Remove unused WATCH_GTT define

2014-10-29 Thread Damien Lespiau
Chris removed the code using it in: commit be2d599b5da3936ca92e0187ff50b34b6b8ff997 Author: Chris Wilson Date: Wed Sep 10 19:52:18 2014 +0100 drm/i915: Remove dead code, i915_gem_verify_gtt Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_drv.h | 1 - 1 file changed,

Re: [Intel-gfx] [PATCH] drm/i915: Make intel_pipe_has_type() take an output type enum

2014-10-29 Thread Jani Nikula
On Wed, 29 Oct 2014, Damien Lespiau wrote: > As Paulo said when introducing the enum, having more types is really > good to document what should go where (int foo(int, int, bool, bool). > > Cc: Paulo Zanoni > Signed-off-by: Damien Lespiau Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i91

[Intel-gfx] [PATCH] drm/i915: Make intel_pipe_has_type() take an output type enum

2014-10-29 Thread Damien Lespiau
As Paulo said when introducing the enum, having more types is really good to document what should go where (int foo(int, int, bool, bool). Cc: Paulo Zanoni Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- 2 files changed

Re: [Intel-gfx] [PATCH] drm/i915/dp: only use training pattern 3 on platforms that support it

2014-10-29 Thread Ville Syrjälä
On Wed, Oct 29, 2014 at 11:03:26AM +0200, Jani Nikula wrote: > Ivybridge + 30" monitor prints a drm error on every modeset, since IVB > doesn't support DP3 we should even bother trying to use it. > > This regression has been introduced in > > commit 06ea66b6bb445043dc25a9626254d5c130093199 > Auth

[Intel-gfx] [PATCH 1/4] drm/i915/bdw: Clean up execlist queue items in retire_work

2014-10-29 Thread Thomas Daniel
No longer create a work item to clean each execlist queue item. Instead, move retired execlist requests to a queue and clean up the items during retire_requests. v2: Fix legacy ring path broken during overzealous cleanup v3: Update idle detection to take execlists queue into account Issue: VIZ-4

[Intel-gfx] [PATCH 2/4] drm/i915/bdw: Setup global hardware status page in execlists mode

2014-10-29 Thread Thomas Daniel
Write HWS_PGA address even in execlists mode as the global hardware status page is still required. This address was previously uninitialized and HWSP writes would clobber whatever buffer happened to reside at GGTT address 0. v2: Break out hardware status page setup into a separate function. Issu

[Intel-gfx] [PATCH 3/4] drm/i915/bdw: Pin the context backing objects to GGTT on-demand

2014-10-29 Thread Thomas Daniel
From: Oscar Mateo Up until now, we have pinned every logical ring context backing object during creation, and left it pinned until destruction. This made my life easier, but it's a harmful thing to do, because we cause fragmentation of the GGTT (and, eventually, we would run out of space). This

[Intel-gfx] [PATCH 4/4] drm/i915/bdw: Pin the ringbuffer backing object to GGTT on-demand

2014-10-29 Thread Thomas Daniel
Same as with the context, pinning to GGTT regardless is harmful (it badly fragments the GGTT and can even exhaust it). Unfortunately, this case is also more complex than the previous one because we need to map and access the ringbuffer in several places along the execbuffer path (and we cannot mak

[Intel-gfx] [PATCH 4/9] drm/i915: Add infrastructure for choosing DPLLs before disabling crtcs

2014-10-29 Thread Ander Conselvan de Oliveira
It is possible for a mode set to fail if there aren't shared DPLLS that match the new configuration requirement or other errors in clock computation. If that step is executed after disabling crtcs, in the failure case the hardware configuration is changed and needs to be restored. Doing those thing

[Intel-gfx] [PATCH 5/9] drm/i915: Covert HSW+ to choose DPLLS before disabling CRTCs

2014-10-29 Thread Ander Conselvan de Oliveira
Use the infrastructure added in a previous patch to choose shared DPLLs and calculate clocks before touching the hardware. v2: Don't set mode_set hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_ddi.c | 2 -- drivers/gpu/

[Intel-gfx] [PATCH 6/9] drm/i915: Covert ILK-IVB to choose DPLLS before disabling CRTCs

2014-10-29 Thread Ander Conselvan de Oliveira
Use the infrastructure added in a previous patch to choose shared DPLLs and calculate clocks before touching the hardware. v2: Don't set mode_set hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_display.c | 13 -

[Intel-gfx] [PATCH 9/9] drm/i915: Don't store current shared DPLL in the new pipe_config

2014-10-29 Thread Ander Conselvan de Oliveira
Now that shared DPLLs configuration is staged, there's no need to track the current ones in the new pipe_config since those are released before making the new pipe_config effective. Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_display.c | 8 1 file changed,

[Intel-gfx] [PATCH 3/9] drm/i915: Move dpll crtc_mask and hw_state fields into separate struct

2014-10-29 Thread Ander Conselvan de Oliveira
The new struct will be used in a follow up patch to allow a current and a staged config to exist for the same shared DPLL. v2: Rebase on by mask_to_refcount()->hweight32() change. (Damien) Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Damien Lespiau --- drivers/gpu/drm/i915/i915_deb

[Intel-gfx] [PATCH 2/9] drm/i915: Convert shared dpll reference count to a crtc mask

2014-10-29 Thread Ander Conselvan de Oliveira
This will be used in a follow up patch to properly release shared DPLLs without relying on the shared_dpll field in pipe_config. v2: Fix white space error (Ville) Use hweight32() (Ville) Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/i915_debugfs.c | 4 +-- drivers/g

[Intel-gfx] [PATCH 7/9] drm/i915: Covert remaining platforms to choose DPLLS before disabling CRTCs

2014-10-29 Thread Ander Conselvan de Oliveira
Use the infrastructure added in a previous patch to choose shared DPLLs and calculate clocks before touching the hardware. v2: Don't set mode_set hooks since dev_priv is kzalloc()'d (Ville) Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_display.c | 8 +++- 1 file

[Intel-gfx] [PATCH 8/9] drm/i915: Remove crtc_mode_set() hook

2014-10-29 Thread Ander Conselvan de Oliveira
There's no users left after the conversion to calculate clocks before disabling crtcs during mode set. Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/intel_display.c | 7 --- 2 files changed, 10 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH v2 0/9] Stage shared dpll config

2014-10-29 Thread Ander Conselvan de Oliveira
Version 2 of the series with the comments I got so far resolved. Ander Conselvan de Oliveira (9): drm/i915: Make *_crtc_mode_set work on new_config drm/i915: Convert shared dpll reference count to a crtc mask drm/i915: Move dpll crtc_mask and hw_state fields into separate struct drm/i915:

[Intel-gfx] [PATCH 1/9] drm/i915: Make *_crtc_mode_set work on new_config

2014-10-29 Thread Ander Conselvan de Oliveira
This shouldn't change the behavior of those functions, since they are called after the new_config is made effective and that points to the current config. In a follow up patch, the mode set sequence will be changed so this is called before disabling crtcs, and in that case those functions should wo

[Intel-gfx] [PATCH 3/3] drm/modeset_lock: document trylock_only in kerneldoc

2014-10-29 Thread Daniel Vetter
I've forgotten to do this in: commit cb597bb3a2fbfc871cc1c703fb330d247bd21394 Author: Daniel Vetter Date: Sun Jul 27 19:09:33 2014 +0200 drm: trylock modest locking for fbdev panics Oops, fix this asap. In my defense kerneldoc is really awful and there's no way it can pick up structured

[Intel-gfx] [PATCH 1/3] drm: Pull drm_crtc.h into the kerneldoc template

2014-10-29 Thread Daniel Vetter
While writing atomic docs I've noticed that I don't get any errors for my screw-ups in drm_crtc.h. Fix this immediately. This just does the bare minimum to get starts, lots of stuff isn't properly documented yet unfortunately. Signed-off-by: Daniel Vetter --- Documentation/DocBook/drm.tmpl | 4

[Intel-gfx] [PATCH 2/3] drm: fixup kerneldoc in drm_crtc.h

2014-10-29 Thread Daniel Vetter
I've tried to cc all the people who have recently added new stuff but forgotten to update documentation. I've also decided not to bother documenting the massive property list in struct drm_mode_config. If that beast keeps on growing we might want to extract it into a separate structure which we wo

[Intel-gfx] [PATCH] drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.h

2014-10-29 Thread Daniel Vetter
Just a bit of OCD cleanup on headers - this function isn't the core interface any more but just a helper for drivers who haven't yet transitioned to universal planes. Put the declaration at the right spot and sprinkle necessary #includes over all drivers. Maybe this helps to encourage driver maint

Re: [Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Jani Nikula
On Wed, 29 Oct 2014, Ville Syrjälä wrote: > On Wed, Oct 29, 2014 at 10:23:50AM +0200, Jani Nikula wrote: >> On Wed, 29 Oct 2014, Ville Syrjälä wrote: >> > On Wed, Oct 29, 2014 at 05:02:50PM +1000, Dave Airlie wrote: >> >> From: Dave Airlie >> >> >> >> Ivybridge + 30" monitor prints a drm error

[Intel-gfx] [PATCH] drm/i915/dp: only use training pattern 3 on platforms that support it

2014-10-29 Thread Jani Nikula
Ivybridge + 30" monitor prints a drm error on every modeset, since IVB doesn't support DP3 we should even bother trying to use it. This regression has been introduced in commit 06ea66b6bb445043dc25a9626254d5c130093199 Author: Todd Previte Date: Mon Jan 20 10:19:39 2014 -0700 drm/i915: Ena

[Intel-gfx] [PATCH 09/11] drm/i915: MIPI Timings related changes for dual link

2014-10-29 Thread Gaurav K Singh
hactive, hfp, hbp, hsync needs to be halved for dual link MIPI Panels. Accordingly timing related mmio regs needs to be programmed for both MIPI Ports. v2: Address review comments by Jani - Used a for loop instead of do-while loop Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar -

[Intel-gfx] [PATCH 07/11] drm/i915: Dual link needs Shutdown and Turn on packet for both ports

2014-10-29 Thread Gaurav K Singh
For dual link MIPI panels, SHUTDOWN packet needs to send to both Ports A & C during MIPI encoder disabling sequence. Similarly, TURN ON packet to be sent to both Ports during MIPI encoder enabling sequence. v2: Address review comments by Jani - Used a for loop instead of do-while loop. Signed

[Intel-gfx] [PATCH 05/11] drm/i915: Add support for port enable/disable for dual link configuration

2014-10-29 Thread Gaurav K Singh
For Dual Link MIPI Panels, both Port A and Port C should be enabled during the MIPI encoder enabling sequence. Similarly, during the disabling sequence, both ports needs to be disabled. Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/i915_reg.h|

[Intel-gfx] [PATCH 00/11] BYT DSI Dual Link Support

2014-10-29 Thread Gaurav K Singh
Hi, These set of patches build on top of the existing DSI Video mode support to enable dual link MIPI panels with high resolutions. These patches have been tested on a 25x16 panel and works well. v2: Commit message added to all patches. All review comments of Jani, Nikula have been addressed in t

[Intel-gfx] [PATCH 04/11] drm/i915: Cleanup patch for MIPI regs

2014-10-29 Thread Gaurav K Singh
All macros of MIPI regs now uses port no instead of pipe no.Based on the pipe, port no is determined and used to read or write MIPI regs during enabling & disbling MIPI encoder. Signed-off-by: Gaurav K Singh --- drivers/gpu/drm/i915/intel_dsi.c | 133 ++ driv

[Intel-gfx] [PATCH 08/11] drm/i915: Enable DSI PLL for both DSI0 and DSI1 in case of dual link

2014-10-29 Thread Gaurav K Singh
For Dual link MIPI Panels, dsipll clock for both DSI0 and DSI1 needs to be enabled. v2: Address review comments by Jani - Added wait time for PLL to be locked. Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_dsi_pll.c |9 ++--- 1 file chan

[Intel-gfx] [PATCH 06/11] drm/i915: Pixel Clock changes for DSI dual link

2014-10-29 Thread Gaurav K Singh
For dual link MIPI Panels, each port needs half of pixel clock. Pixel overlap can be enabled if needed by panel, then in that case, pixel clock will be increased for extra pixels. v2 : Address review comments by Jani - Removed the bit mask used for ->dual_link - Used DSI instead of MIPI

[Intel-gfx] [PATCH 11/11] drm/i915: Update the DSI enable path to support dual link panel enabling

2014-10-29 Thread Gaurav K Singh
We need to program both port registers during dual link enable path. v2: Address review comments by Jani - Used a for loop instead of do-while loop. Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_dsi.c | 255 ++

[Intel-gfx] [PATCH 09/11] drm/i915: MIPI Timings related changes for dual link

2014-10-29 Thread Gaurav K Singh
hactive, hfp, hbp, hsync needs to be halved for dual link MIPI Panels. Accordingly timing related mmio regs needs to be programmed for both MIPI Ports. v2: Address review comments by Jani - Used a for loop instead of do-while loop Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar -

[Intel-gfx] [PATCH 10/11] drm/i915: Update the DSI disable path to support dual link panel disabling

2014-10-29 Thread Gaurav K Singh
We need to program both port registers during dual link disable path. v2: Address review comments by Jani - Used a for loop instead of do-while loop. Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_dsi.c | 68 +++--

[Intel-gfx] [PATCH 03/11] drm/i915: Cleanup in i915_reg.h for all MIPI regs.

2014-10-29 Thread Gaurav K Singh
_PORT macro to be used instead of _TRANSCODER macro for all MIPI DSI regs. New macro added for mapping the pipe to MIPI Ports. Signed-off-by: Gaurav K Singh --- drivers/gpu/drm/i915/i915_drv.h |4 ++ drivers/gpu/drm/i915/i915_reg.h | 98 +++ 2 files cha

[Intel-gfx] [PATCH 02/11] drm/i915: MIPI Sequence to be sent to the DSI Controller based on the port no from VBT

2014-10-29 Thread Gaurav K Singh
For dual link MIPI Panels, few packets needs to be sent to Port A or Port C or both. Based on the port no from MIPI Sequence Block#53, these sequences needs to be sent accordingly. Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_dsi.h |1 +

[Intel-gfx] [PATCH 01/11] drm/i915: New functions added for enabling & disabling MIPI Port Ctrl reg

2014-10-29 Thread Gaurav K Singh
This patch is in preparation for the DSI dual link port enable and disable related changes. Signed-off-by: Gaurav K Singh Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_dsi.c | 43 -- 1 file changed, 32 insertions(+), 11 deletions(-) diff --gi

Re: [Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Ville Syrjälä
On Wed, Oct 29, 2014 at 10:23:50AM +0200, Jani Nikula wrote: > On Wed, 29 Oct 2014, Ville Syrjälä wrote: > > On Wed, Oct 29, 2014 at 05:02:50PM +1000, Dave Airlie wrote: > >> From: Dave Airlie > >> > >> Ivybridge + 30" monitor prints a drm error on every modeset, since > >> IVB doesn't support D

Re: [Intel-gfx] [PATCH] drm/i915: Ignore VBT backlight check on Macbook 2, 1

2014-10-29 Thread Jani Nikula
On Tue, 28 Oct 2014, jens stein wrote: > commit c675949ec58ca50d5a3ae3c757892f1560f6e896 > drm/i915: do not setup backlight if not available according to VBT > > prevents backlight setup on Macbook 2,1. Apply quirk to ignore the VBT > check so backlight is set up properly. > > Signed-off-by: J

Re: [Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Jani Nikula
On Wed, 29 Oct 2014, Ville Syrjälä wrote: > On Wed, Oct 29, 2014 at 05:02:50PM +1000, Dave Airlie wrote: >> From: Dave Airlie >> >> Ivybridge + 30" monitor prints a drm error on every modeset, since >> IVB doesn't support DP3 we should even bother trying to use it. >> >> Reviewed-by: Daniel Vet

Re: [Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Ville Syrjälä
On Wed, Oct 29, 2014 at 10:15:01AM +0200, Ville Syrjälä wrote: > On Wed, Oct 29, 2014 at 05:02:50PM +1000, Dave Airlie wrote: > > From: Dave Airlie > > > > Ivybridge + 30" monitor prints a drm error on every modeset, since > > IVB doesn't support DP3 we should even bother trying to use it. > > >

Re: [Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Ville Syrjälä
On Wed, Oct 29, 2014 at 05:02:50PM +1000, Dave Airlie wrote: > From: Dave Airlie > > Ivybridge + 30" monitor prints a drm error on every modeset, since > IVB doesn't support DP3 we should even bother trying to use it. > > Reviewed-by: Daniel Vetter (on irc) > Signed-off-by: Dave Airlie > --- >

Re: [Intel-gfx] [RFC PATCH 3/3] libdrm: user mode helper for ipvr drm driver

2014-10-29 Thread Daniel Vetter
On Tue, Oct 28, 2014 at 04:56:03PM +, Daniel Stone wrote: > Hi, > > On 17 October 2014 01:36, Jiang, Fei wrote: > > > Thanks for Emil's suggestion. You are right, we need make sure structure > > size aligned on 8 bytes, which is important for 32bit-64bit compatible case. > > > While you're

Re: [Intel-gfx] NULL derefs after failed suspend (i915, pm, ext4, slub)

2014-10-29 Thread Johan Hovold
On Tue, Oct 28, 2014 at 05:06:01PM +0200, Jani Nikula wrote: > On Tue, 28 Oct 2014, Johan Hovold wrote: > > Hi, > > > > I have had some problems with crashes involving suspend-to-disk after > > updating to v3.16. > > > > Below is a log with 3.16.6 from a failed suspend attempt after which I > > g

Re: [Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Daniel Vetter
On Wed, Oct 29, 2014 at 05:02:50PM +1000, Dave Airlie wrote: > From: Dave Airlie > > Ivybridge + 30" monitor prints a drm error on every modeset, since > IVB doesn't support DP3 we should even bother trying to use it. > > Reviewed-by: Daniel Vetter (on irc) > Signed-off-by: Dave Airlie This r

Re: [Intel-gfx] [RFC PATCH 3/3] libdrm: user mode helper for ipvr drm driver

2014-10-29 Thread Cheng, Yao
Hi Daniel, we’ve resolved this in patch v2. From: Daniel Stone [mailto:dan...@fooishbar.org] Sent: Wednesday, October 29, 2014 0:56 To: Jiang, Fei Cc: Emil Velikov; Cheng, Yao; intel-gfx@lists.freedesktop.org; Vetter, Daniel; dri-de...@lists.freedesktop.org Subject: Re: [RFC PATCH 3/3] libdrm: us

[Intel-gfx] [PATCH] drm/i915: don't try using training pattern 3 on pre-haswell

2014-10-29 Thread Dave Airlie
From: Dave Airlie Ivybridge + 30" monitor prints a drm error on every modeset, since IVB doesn't support DP3 we should even bother trying to use it. Reviewed-by: Daniel Vetter (on irc) Signed-off-by: Dave Airlie --- drivers/gpu/drm/i915/intel_dp.c | 4 +++- 1 file changed, 3 insertions(+), 1