Re: [Intel-gfx] [PATCH v4 19/27] drm/i915: Read hw state into an atomic state struct, v2.

2015-06-01 Thread Maarten Lankhorst
Op 01-06-15 om 23:47 schreef Matt Roper: > On Mon, Jun 01, 2015 at 12:50:03PM +0200, Maarten Lankhorst wrote: >> From: Ander Conselvan de Oliveira >> >> To make this work we load the new hardware state into the >> atomic_state, then swap it with the sw state. >> >> This lets us change the force re

Re: [Intel-gfx] [PATCH] drm/i915: Don't check modeset state in the hw state force restore path

2015-06-01 Thread shuang . he
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) Task id: 6514 -Summary- Platform Delta drm-intel-nightly Series Applied PNV

Re: [Intel-gfx] [PATCH 9/9] drm/i915: Double the port clock when using double clocked modes with 12bpc

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH 9/9] drm/i915: Double the port clock when using >

Re: [Intel-gfx] [PATCH 8/9] drm/i915: Fix hdmi clock readout with pixel repeat

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH 8/9] drm/i915: Fix hdmi clock readout with pixel >

Re: [Intel-gfx] [PATCH 7/9] drm/i915: Check infoframe state more diligently.

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH 7/9] drm/i915: Check infoframe state more > dilige

Re: [Intel-gfx] [PATCH v2 6/9] drm/i915: Disable all infoframes when turning off the HDMI port

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v2 6/9] drm/i915: Disable all infoframes when > tu

Re: [Intel-gfx] [PATCH v2 3/9] drm/i915: Enable default_phase in GCP when possible

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v2 3/9] drm/i915: Enable default_phase in GCP when

Re: [Intel-gfx] [PATCH v2 2/9] drm/i915: Send GCP infoframes for deep color HDMI sinks

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v2 2/9] drm/i915: Send GCP infoframes for deep > c

Re: [Intel-gfx] [PATCH v2 1/9] drm/i915: Implement WaEnableHDMI8bpcBefore12bpc:snb, ivb

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v2 1/9] drm/i915: Implement > WaEnableHDMI8bpcBefo

Re: [Intel-gfx] [PATCH v2 4/9] drm/i915: Fix HDMI 12bpc TRANSCONF bpc value

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH v2 4/9] drm/i915: Fix HDMI 12bpc TRANSCONF bpc > v

Re: [Intel-gfx] [PATCH v4 19/27] drm/i915: Read hw state into an atomic state struct, v2.

2015-06-01 Thread Matt Roper
On Mon, Jun 01, 2015 at 12:50:03PM +0200, Maarten Lankhorst wrote: > From: Ander Conselvan de Oliveira > > To make this work we load the new hardware state into the > atomic_state, then swap it with the sw state. > > This lets us change the force restore path in setup_hw_state() > to use a singl

Re: [Intel-gfx] [PATCH] drm/i915/skl: Assume no scaling is available when things are not as expected

2015-06-01 Thread shuang . he
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) Task id: 6513 -Summary- Platform Delta drm-intel-nightly Series Applied PNV

Re: [Intel-gfx] [PATCH v2] drm/i915/vlv: fix RC6 residency time calculation

2015-06-01 Thread shuang . he
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) Task id: 6512 -Summary- Platform Delta drm-intel-nightly Series Applied PNV

Re: [Intel-gfx] [PATCH 0/9] drm/i915: HDMI 12bpc fixes

2015-06-01 Thread Konduru, Chandra
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > ville.syrj...@linux.intel.com > Sent: Tuesday, May 05, 2015 7:06 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH 0/9] drm/i915: HDMI 12bpc fixes > > From: Ville S

Re: [Intel-gfx] [PATCH v2] drm/i915/vlv: fix RC6 residency time calculation

2015-06-01 Thread Rodrigo Vivi
On Mon, Jun 1, 2015 at 12:32 AM, Imre Deak wrote: > The divider value to convert from CZ clock rate to ms needs a +1 > adjustment on VLV just like on CHV. This matches both the spec and > the accuracy test by pm_rc6_residency. > > v2: > - simplify logic checking for the CHV 320MHz special case (Ro

Re: [Intel-gfx] [PATCH] drm/atomic: Handle vblank events in atomic ioctl correctly.

2015-06-01 Thread Daniel Stone
Hi, On 1 June 2015 at 19:12, Maarten Lankhorst wrote: > drm_framebuffer_reference(new_fb); > plane->fb = new_fb; > plane->crtc = plane->state->crtc; > + drm_framebuffer_unreference(plane->old_fb)

[Intel-gfx] [PATCH] drm/atomic: Handle vblank events in atomic ioctl correctly.

2015-06-01 Thread Maarten Lankhorst
All users of async updates seem to clear clear crtc_state->event correctly, so move destroying vblank event to crtc_destroy_state. This is better than manually free'ing it in the atomic ioctl, since this code seems to do it wrong. While we're at it handle -EDEADLK from atomic_commit correctly, be

Re: [Intel-gfx] [PATCH 15/21] drm/i915/gtt: Fill scratch page

2015-06-01 Thread Chris Wilson
On Wed, May 27, 2015 at 07:12:02PM +0100, Tomas Elf wrote: > On 22/05/2015 18:05, Mika Kuoppala wrote: > >During review of dynamic page tables series, I was able > >to hit a lite restore bug with execlists. I assume that > >due to incorrect pd, the batch run out of legit address space > >and into t

Re: [Intel-gfx] [PATCH 01/21] drm/i915/gtt: Mark TLBS dirty for gen8+

2015-06-01 Thread Michel Thierry
On 5/22/2015 6:04 PM, Mika Kuoppala wrote: When we touch gen8+ page maps, mark them dirty like we do with previous gens. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem_gtt.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/gp

Re: [Intel-gfx] [PATCH 03/21] drm/i915/gtt: Check va range against vm size

2015-06-01 Thread Joonas Lahtinen
On pe, 2015-05-22 at 20:04 +0300, Mika Kuoppala wrote: > Check the allocation area against the known end > of address space instead of against fixed value. > > v2: Return ENODEV on internal bugs (Chris) > > Signed-off-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 18 ++

Re: [Intel-gfx] [PATCH 01/21] drm/i915/gtt: Mark TLBS dirty for gen8+

2015-06-01 Thread Joonas Lahtinen
On pe, 2015-05-22 at 20:04 +0300, Mika Kuoppala wrote: > When we touch gen8+ page maps, mark them dirty like we > do with previous gens. > > Signed-off-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 21 +++-- > 1 file changed, 11 insertions(+), 10 deletions(-) >

[Intel-gfx] [PATCH 03/24] drm/i915: clean up intel_sanitize_crtc

2015-06-01 Thread Maarten Lankhorst
Apply force if needed. During boot pipe_config->active will be false. On resume no separate modeset is needed when the state gets restored with the sw state anyway. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++-- drivers/gpu/drm/i915/intel_display.c | 84

[Intel-gfx] [PATCH 12/24] drm/i915: Split plane updates of crtc->atomic into a helper.

2015-06-01 Thread Maarten Lankhorst
This makes it easier to verify that no changes are done when calling this from crtc instead. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic_plane.c | 21 +-- drivers/gpu/drm/i915/intel_display.c | 233 +++--- drivers/gpu/drm/i915/intel_drv.h

[Intel-gfx] [PATCH 04/24] drm/i915: Update power domains only on affected crtc's.

2015-06-01 Thread Maarten Lankhorst
Use for_each_crtc_state to only touch affected crtc's. In order to make sure that the initial power is still set correctly we make sure modeset_update_crtc_power_domains is called during the initial modeset. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_drv.c | 3 --- driv

[Intel-gfx] [PATCH 17/24] drm/i915: Update less state during modeset.

2015-06-01 Thread Maarten Lankhorst
No need to repeatedly call update_watermarks, or update_fbc. Down to a single call to update_watermarks in .crtc_enable Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 66 ++-- 1 file changed, 17 insertions(+), 49 deletions(-) diff --g

[Intel-gfx] [PATCH 15/24] drm/i915: clean up plane commit functions

2015-06-01 Thread Maarten Lankhorst
If a plane is part of the state but old_state->fb is null and state->fb is null the update is a noop. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 30 -- drivers/gpu/drm/i915/intel_sprite.c | 36 +--- 2 f

[Intel-gfx] [PATCH 07/24] drm/i915: Add a simple atomic crtc check function.

2015-06-01 Thread Maarten Lankhorst
Move the check for encoder cloning here. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic.c | 5 +- drivers/gpu/drm/i915/intel_display.c | 131 --- 2 files changed, 80 insertions(+), 56 deletions(-) diff --git a/drivers/gpu/drm/i915/intel

[Intel-gfx] [PATCH 22/24] drm/i915: Use full atomic modeset.

2015-06-01 Thread Maarten Lankhorst
Huzzah! \o/ Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic.c | 121 --- drivers/gpu/drm/i915/intel_display.c | 280 ++- drivers/gpu/drm/i915/intel_drv.h | 5 - 3 files changed, 42 insertions(+), 364 deletions(-) diff --g

[Intel-gfx] [PATCH 13/24] drm/i915: move detaching scalers to begin_crtc_commit

2015-06-01 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic.c | 3 --- drivers/gpu/drm/i915/intel_display.c | 5 - drivers/gpu/drm/i915/intel_drv.h | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 20/24] drm/i915: clean up atomic plane check functions

2015-06-01 Thread Maarten Lankhorst
By passing crtc_state to the check_plane functions a lot of duplicated code can be removed. And now that the transitional helpers are gone the crtc_state can be reliably obtained. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic_plane.c | 20 + drivers/gpu/drm/i

[Intel-gfx] [PATCH 08/24] drm/i915: Do not add planes from intel_atomic_setup_scalers.

2015-06-01 Thread Maarten Lankhorst
This may postpone going to HQ mode until the plane is in the drm_atomic_state if it's not using scaler 0, but it does allow moving intel_atomic_setup_scalers to the crtc check function. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic.c | 41 ++-

[Intel-gfx] [PATCH 11/24] drm/i915: Split skl_update_scaler.

2015-06-01 Thread Maarten Lankhorst
It's easier to read separate functions for crtc and plane scaler state. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 162 ++- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 12 +-- drivers/gpu/

[Intel-gfx] [PATCH 19/24] drm/i915: Make setting color key atomic.

2015-06-01 Thread Maarten Lankhorst
By making color key atomic there are no more transitional helpers. The plane check function will reject the color key when a scaler is active. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic_plane.c | 1 + drivers/gpu/drm/i915/intel_display.c | 5 +- drivers/gpu/drm

[Intel-gfx] [PATCH 24/24] drm/i915: always disable irqs in intel_pipe_update_start

2015-06-01 Thread Maarten Lankhorst
This can only fail because of a bug in the code. Suggested-by: Daniel Vetter Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 14 -- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 17 +++-- 3 files changed,

[Intel-gfx] [PATCH 10/24] drm/i915: Do not run most checks when there's no modeset.

2015-06-01 Thread Maarten Lankhorst
The only reason to check anything without modeset was for fastboot audio_changed/infoframe_changed changes. Now that's handled during hw readout parameters shouldn't change any more when all things stay identical. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 27 ++

[Intel-gfx] [PATCH 14/24] drm/i915: Move crtc commit updates to separate functions.

2015-06-01 Thread Maarten Lankhorst
To allow them to be used in intel_set_mode. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 130 +++ 1 file changed, 71 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_disp

[Intel-gfx] [PATCH 02/24] drm/i915: Use crtc state in intel_modeset_pipe_config

2015-06-01 Thread Maarten Lankhorst
Grabbing crtc state from atomic state is a lot more involved, and make sure connectors are added before calling this function. Move check_digital_port_conflicts to intel_modeset_checks, it's only useful to check it on a modeset. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_di

[Intel-gfx] [PATCH 05/24] drm/i915: add fastboot checks for has_audio and has_infoframe

2015-06-01 Thread Maarten Lankhorst
The original commit 206645910b97 "drm/i915: check for audio and infoframe changes across mode sets v2" added checking when has_audio and has_infoframe were changed. It seems the original commit added both checks for the fastboot case. By setting crtc_state->mode_changed the code will disable the c

[Intel-gfx] [PATCH 16/24] drm/i915: atomic plane updates in a nutshell

2015-06-01 Thread Maarten Lankhorst
Now that all planes are added during a modeset we can use the calculated changes before disabling a plane, and then either commit or force disable a plane before disabling the crtc. The code is shared with atomic_begin/flush, except watermark updating and vblank evasion are not used. Signed-off-b

[Intel-gfx] [PATCH 09/24] drm/i915: Assign a new pll from the crtc check function.

2015-06-01 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 60 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 94101d1f784c..c74e353d9152 100644

[Intel-gfx] [PATCH 06/24] drm/i915: Clean up intel_atomic_setup_scalers slightly.

2015-06-01 Thread Maarten Lankhorst
Get rid of a whole lot of ternary operators and assign the index in scaler_id, instead of the id. They're the same thing. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_atomic.c | 21 +++-- drivers/gpu/drm/i915/intel_display.c | 2 -- drivers/gpu/drm/i915/intel

[Intel-gfx] [PATCH 01/24] drm/i915: Always reset in intel_crtc_restore_mode

2015-06-01 Thread Maarten Lankhorst
And get rid of things that are no longer true. This function is only used for forcing a modeset when encoder properties are changed. All the existing state is fine in this case, only setting mode_changed will force a full recalculation here, and take all the state needed. Signed-off-by: Maarten L

[Intel-gfx] [PATCH 18/24] drm/i915: get rid of intel_plane_restore in intel_crtc_page_flip

2015-06-01 Thread Maarten Lankhorst
Use a full atomic call instead. intel_crtc_page_flip will still have to live until async updates are allowed. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i

[Intel-gfx] [PATCH 21/24] drm/i915: remove force argument from disable_plane

2015-06-01 Thread Maarten Lankhorst
The idea was good, but planes can have a fb even though they're disabled. This makes the force argument useless and always true, because only the commit function updates state. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 16 +++- drivers/gpu/drm/i915/i

[Intel-gfx] [PATCH 00/24] Convert to atomic, part 3.

2015-06-01 Thread Maarten Lankhorst
This patch series requires the following prerequisites: "[PATCH v4 00/27] Convert to atomic, part 2" "[PATCH] drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config." Now that suspend/restore is atomic it's time to clean up some remaining issues. First I clean up the suspend code som

[Intel-gfx] [PATCH 23/24] drm/i915: Unify plane updates.

2015-06-01 Thread Maarten Lankhorst
Remove almost all updates from begin/finish crtc commit and call them from intel_atomic_commit. This allows using drm_atomic_helper_commit_planes_on_crtc on modeset. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 50 1 file chang

Re: [Intel-gfx] [PATCH] drm/i915: Don't check modeset state in the hw state force restore path

2015-06-01 Thread Conselvan De Oliveira, Ander
On Mon, 2015-06-01 at 15:41 +0300, Ander Conselvan de Oliveira wrote: > Since the force restore logic will restore the CRTCs state one at a > time, it is possible that the state will be inconsistent until the whole > operation finishes. A call to intel_modeset_check_state() is done once > it's over

[Intel-gfx] [PATCH] drm/i915: Don't check modeset state in the hw state force restore path

2015-06-01 Thread Ander Conselvan de Oliveira
Since the force restore logic will restore the CRTCs state one at a time, it is possible that the state will be inconsistent until the whole operation finishes. A call to intel_modeset_check_state() is done once it's over, so don't check the state multiple times in between. This regression was intr

[Intel-gfx] [PATCH] drm/i915/skl: Assume no scaling is available when things are not as expected

2015-06-01 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Cdclk < crtc_clock is not allowed and suggests a different problem elsewhere. It is more robust and safe to assume no scaling is possible in this case. Signed-off-by: Tvrtko Ursulin Cc: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 inse

Re: [Intel-gfx] [RFC 01/14] drm/i915: allocate gem memory for mipi dbi cmd buffer

2015-06-01 Thread Ville Syrjälä
On Fri, May 29, 2015 at 07:10:53PM +0200, Daniel Vetter wrote: > On Fri, May 29, 2015 at 01:59:01PM +0300, Ville Syrjälä wrote: > > On Fri, May 29, 2015 at 04:06:53PM +0530, Gaurav K Singh wrote: > > > Allocate gem memory for MIPI DBI command buffer. This memory > > > will be used when sending comm

[Intel-gfx] [PATCH v4 18/27] drm/i915: Move cdclk and pll setup to intel_modeset_compute_config(), v2.

2015-06-01 Thread Maarten Lankhorst
From: Ander Conselvan de Oliveira It makes more sense there, since these are computation steps that can fail. Changes since v1: - Rename __intel_set_mode_checks to intel_modeset_checks (Matt Roper) - Move intel_modeset_checks to before check_planes, so it won't have to be moved later. Signed-

[Intel-gfx] [PATCH v4 04/27] drm/i915: use intel_crtc_control everywhere, v3.

2015-06-01 Thread Maarten Lankhorst
Having a single path for everything makes it a lot easier to keep crtc_state->active in sync with intel_crtc->active. A crtc cannot be changed to active when not enabled, because it means no mode is set and no connectors are connected. This should also make intel_crtc->active match crtc_state->ac

[Intel-gfx] [PATCH v4 13/27] drm/i915: Support modeset across multiple pipes

2015-06-01 Thread Maarten Lankhorst
From: Ander Conselvan de Oliveira Compute new pipe_configs for all crtcs in the atomic state. The commit part of the mode set (__intel_set_mode()) is already enabled to support multiple pipes, the only thing missing was calculating a new pipe_config for every crtc. Signed-off-by: Ander Conselvan

[Intel-gfx] [PATCH v4 12/27] drm/i915: calculate primary visibility changes instead of calling from set_config

2015-06-01 Thread Maarten Lankhorst
This should be much cleaner, with the same effects. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 46 ++-- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b

[Intel-gfx] [PATCH v4 02/27] drm/i915: get rid of intel_crtc_disable and related code, v3

2015-06-01 Thread Maarten Lankhorst
Now that the dpll updates are (mostly) atomic, the .off() code is a noop, and intel_crtc_disable does mostly the same as intel_modeset_update_state. Move all logic for connectors_active and setting dpms to that function. Changes since v1: - Move drm_atomic_helper_swap_state up. Changes since v2:

[Intel-gfx] [PATCH v4 11/27] drm/i915: do not wait for vblank when crtc is off

2015-06-01 Thread Maarten Lankhorst
This can happen when turning off a sprite plane. Because the crtc state is not yet always swapped correctly and transitional helpers are used the crtc state cannot be relied on. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[Intel-gfx] [PATCH v4 05/27] drm/i915: Use drm_atomic_helper_update_legacy_modeset_state, v2.

2015-06-01 Thread Maarten Lankhorst
Now that the helper is exported there's no need to duplicate this code any more. Changes since v1: - move intel_modeset_update_staged_output_state call to the right place. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 61 +++

[Intel-gfx] [PATCH v4 16/27] drm/i915: Use drm_atomic_helper_swap_state in intel_atomic_commit.

2015-06-01 Thread Maarten Lankhorst
And update crtc->config to point to the new state. There is no point in swapping only part of the state when the rest of the state should be untouched. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_atomic.c | 44 ++--- 1

[Intel-gfx] [PATCH v4 00/27] drm/i915: Convert to atomic, part 2.

2015-06-01 Thread Maarten Lankhorst
The goal of this patch series is to implement hardware readout using atomic state, and restore sw state with a single call to intel_set_mode. After that's done intel_crtc_control can be safely converted to atomic modeset, because nothing relies on transitional state any more. This patch series sl

[Intel-gfx] [PATCH v4 25/27] drm/i915: Calculate haswell plane workaround, v5.

2015-06-01 Thread Maarten Lankhorst
This needs to be done last after all modesets have been calculated. A modeset first disables all crtc's, so any crtc that undergoes a modeset counts as inactive. If no modeset's done, or > 1 crtc's stay w/a doesn't apply. Apply workaround on the first crtc if 1 crtc stays active. Apply workaround

[Intel-gfx] [PATCH v4 03/27] drm/i915: add intel_display_suspend, v2

2015-06-01 Thread Maarten Lankhorst
This is a function used to disable all crtc's. This makes it clearer to distinguish between when mode needs to be preserved and when it can be trashed. Changes since v1: - Copy power changes from intel_crtc_control. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/drm/i

[Intel-gfx] [PATCH v4 21/27] drm/i915: Make intel_display_suspend atomic, v2.

2015-06-01 Thread Maarten Lankhorst
Calculate all state using a normal transition, but afterwards fudge crtc->state->active back to its old value. This should still allow state restore in setup_hw_state to work properly. Calling intel_set_mode will cause intel_display_set_init_power to be called, make sure init_power gets set again

[Intel-gfx] [PATCH v4 10/27] drm/i915: update plane state during init

2015-06-01 Thread Maarten Lankhorst
Atomic planes updates rely on having a accurate plane_mask. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f93f9

[Intel-gfx] [PATCH v4 14/27] drm/i915: Zap call to drm_plane_helper_disable, v2.

2015-06-01 Thread Maarten Lankhorst
The primary plane can still be configured when crtc is off, furthermore this is also a noop now that affected planes are added on modesets. Changes since v1: - Move commit so no frontbuffer_bits warnings are generated. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/dr

[Intel-gfx] [PATCH v4 07/27] drm/i915: Set mode_changed for audio in intel_modeset_pipe_config()

2015-06-01 Thread Maarten Lankhorst
From: Ander Conselvan de Oliveira A follow up patch will make intel_modeset_compute_config() deal with multiple crtcs, so move crtc specific stuff into the lower level crtc specific function. Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper

[Intel-gfx] [PATCH v4 22/27] drm/i915: move swap state to the right place

2015-06-01 Thread Maarten Lankhorst
This is a preparation for passing crtc state to the helpers. When converting all users of crtc->config to use the old or new state it's easier to find regressions when swap_state is done first. If crtc->config is swapped at the same place as swap_state bugs will never be found. Signed-off-by: Maa

[Intel-gfx] [PATCH v4 17/27] drm/i915: Swap planes on each crtc separately, v2.

2015-06-01 Thread Maarten Lankhorst
Repeated calls to begin_crtc_commit can cause warnings like this: [ 169.127746] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:616 [ 169.127835] in_atomic(): 0, irqs_disabled(): 1, pid: 1947, name: kms_flip [ 169.127840] 3 locks held by kms_flip/1947: [ 169.127843

[Intel-gfx] [PATCH v4 27/27] drm/i915: use calculated state for vblank evasion

2015-06-01 Thread Maarten Lankhorst
crtc->active will be gone eventually, and this check should be just as good. Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gp

[Intel-gfx] [PATCH v4 24/27] drm/i915: Remove use of crtc->config from i915_debugfs.c

2015-06-01 Thread Maarten Lankhorst
crtc->config is updated to always contain to the active crtc_state and only differs from crtc_state during crtc_disable. It will eventually be removed, so start with some low hanging fruit. For crtc->active the situation is the same; it will be removed eventually. Instead use crtc->state->active.

[Intel-gfx] [PATCH v4 20/27] drm/i915: Implement intel_crtc_control using atomic state, v4

2015-06-01 Thread Maarten Lankhorst
Assume the callers lock everything with drm_modeset_lock_all. This change had to be done after converting suspend/resume to use atomic_state so the atomic state is preserved, otherwise all transitional state is erased. Now all callers of .crtc_enable and .crtc_disable go through atomic modeset! :

[Intel-gfx] [PATCH v4 09/27] drm/i915: Make sure all planes and connectors are added on modeset.

2015-06-01 Thread Maarten Lankhorst
Add missing calls to drm_atomic_add_affected_*. This is needed to convert to atomic planes. When converting to atomic all planes are needed on modeset. For good measure make sure all connectors are added too. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 31

[Intel-gfx] [PATCH v4 08/27] drm/i915: Use crtc_state->active instead of crtc_state->enable

2015-06-01 Thread Maarten Lankhorst
crtc_state->enable means a crtc is configured, but it may be turned off for dpms. Until the commit "use intel_crtc_control everywhere" crtc_state->active was not updated on crtc off, but now crtc_state->active should be used for tracking whether a crtc is scanning out or not. A few commits from no

[Intel-gfx] [PATCH v4 26/27] drm/i915: Use atomic state for calculating DVO_2X_MODE on i830.

2015-06-01 Thread Maarten Lankhorst
This is a small behavioral change because it leaves DVO_2X_MODE set between crtc_disable and crtc_enable. This is probably harmless though and if not should be fixed by calculating 2x mode before enable/disable pll. This is needed because intel_crtc->active will be removed eventually. Signed-off-

[Intel-gfx] [PATCH v4 01/27] drm/i915: get rid of put_shared_dpll

2015-06-01 Thread Maarten Lankhorst
Now that the pll updates are staged the put_shared_dpll function consists only of checks that are done in check_shared_dpll_state after a modeset too. The changes to pll->config are overwritten by intel_shared_dpll_commit, so this entire function is a noop. Signed-off-by: Maarten Lankhorst Revie

[Intel-gfx] [PATCH v4 23/27] drm/i915: Use crtc->hwmode for vblanks, v2.

2015-06-01 Thread Maarten Lankhorst
intel_crtc->config will be removed eventually, so use crtc->hwmode. drm_atomic_helper_update_legacy_modeset_state updates hwmode, but crtc->active will eventually be gone too. Set dotclock to zero to indicate the crtc is inactive. Changes since v1: - With the hwmode update in drm*update_legacy_mod

[Intel-gfx] [PATCH v4 06/27] drm/i915: Make __intel_set_mode() take only atomic state as argument

2015-06-01 Thread Maarten Lankhorst
From: Ander Conselvan de Oliveira With the use of drm_atomic_helper_update_legacy_modeset_state the last user of modeset_crtc is removed from this function. Signed-off-by: Ander Conselvan de Oliveira Signed-off-by: Maarten Lankhorst Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_dis

[Intel-gfx] [PATCH v4 19/27] drm/i915: Read hw state into an atomic state struct, v2.

2015-06-01 Thread Maarten Lankhorst
From: Ander Conselvan de Oliveira To make this work we load the new hardware state into the atomic_state, then swap it with the sw state. This lets us change the force restore path in setup_hw_state() to use a single call to intel_mode_set() to restore all the previous state. As a nice bonus th

[Intel-gfx] [PATCH v4 15/27] drm/i915: Use global atomic state for staged pll config, v2.

2015-06-01 Thread Maarten Lankhorst
From: Ander Conselvan de Oliveira Now that we can subclass drm_atomic_state we can also use it to keep track of all the pll settings. atomic_state is a better place to hold all shared state than keeping pll->new_config everywhere. Changes since v1: - Assert connection_mutex is held. Signed-off-

Re: [Intel-gfx] [PATCH v2 1/7] drm/i915/gen8: Add infrastructure to initialize WA batch buffers

2015-06-01 Thread Daniel, Thomas
> > Indeed, allocating an extra scratch page in the context would simplify > vma/mm management. A trick might be to allocate the scratch page at the > start, then offset the lrc regs etc - that would then be consistent > amongst gen and be easy enough to extend if we need more per-context > scratc

[Intel-gfx] [BUG] Again panning problems on i830 chipsets

2015-06-01 Thread Thomas Richter
Hi folks, when playing with the 4.1.0-rc5 kernel coming from the latest intel-drm-nightly branch yesterday, I noted that this branch again introduces problems with panning on i830 based machines. This panning bug seems to be unrelated to the long-ago resolved mis-configuration of the watermark reg

[Intel-gfx] [PATCH i-g-t] gem_userptr_benchmark: Test overlapping bo mmu notifier performance impact

2015-06-01 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Current userptr kernel implementation downgrades tracking VMA ranges (real userspace ones) to an inefficient linear walk for any process which has instantiated overlapping userptr objects. This adds a test which shows the performance cliff on, most visibly, generic userspace

Re: [Intel-gfx] [PATCH v2 1/7] drm/i915/gen8: Add infrastructure to initialize WA batch buffers

2015-06-01 Thread Chris Wilson
On Mon, Jun 01, 2015 at 11:01:08AM +0100, Siluvery, Arun wrote: > On 29/05/2015 19:16, Chris Wilson wrote: > >On Fri, May 29, 2015 at 07:03:19PM +0100, Arun Siluvery wrote: > >>This patch adds functions to setup WA batch buffers but they are not yet > >>enabled in this patch. Some of the WA are to

Re: [Intel-gfx] [PATCH v2 1/7] drm/i915/gen8: Add infrastructure to initialize WA batch buffers

2015-06-01 Thread Siluvery, Arun
On 29/05/2015 19:16, Chris Wilson wrote: On Fri, May 29, 2015 at 07:03:19PM +0100, Arun Siluvery wrote: This patch adds functions to setup WA batch buffers but they are not yet enabled in this patch. Some of the WA are to be applied during context save but before restore and some at the end of c

[Intel-gfx] [PATCH] Fix resume from suspend to RAM on IBM X30 (take two)

2015-06-01 Thread Thomas Richter
Hi Daniel, hi Ville, as suggested, I again checked against the latest drm-intel-nightly branch and indeed, the patch as originally submitted does not apply there. So I recompiled the patch again (see attachment) which works now correctly with the latest branch. As suggested, I made a couple of ad

Re: [Intel-gfx] [PATCH v3 00/22] drm/i915: Convert to atomic, part 2.

2015-06-01 Thread Ander Conselvan De Oliveira
On Wed, 2015-05-20 at 15:38 +0200, Maarten Lankhorst wrote: > The goal of this patch series is to implement hardware readout using > atomic state, and restore sw state with a single call to intel_set_mode. > > After that's done intel_crtc_control can be safely converted to > atomic modeset, becaus

[Intel-gfx] [PATCH v2] drm/i915/vlv: fix RC6 residency time calculation

2015-06-01 Thread Imre Deak
The divider value to convert from CZ clock rate to ms needs a +1 adjustment on VLV just like on CHV. This matches both the spec and the accuracy test by pm_rc6_residency. v2: - simplify logic checking for the CHV 320MHz special case (Rodrigo) Testcase: igt/pm_rc6_residency Signed-off-by: Imre Dea

[Intel-gfx] [PATCH] drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config.

2015-06-01 Thread Maarten Lankhorst
This fixes some regressions in i915 when converting to atomic. set_config failed with -EINVAL, and I received the following warning in dmesg: [drm:drm_atomic_crtc_check] [CRTC:20] active without enabled Solve this by clearing active when a crtc is disabled. Because crtc_state->enable implies tha