[Intel-gfx] [PATCH v6] drm/i915: respect the VBT minimum backlight brightness again

2015-11-11 Thread Shih-Yuan Lee (FourDollars)
There was a wonderful period after commit 6dda730e55f412a6dfb181cae6784822ba463847 Author: Jani Nikula Date: Tue Jun 24 18:27:40 2014 +0300 drm/i915: respect the VBT minimum backlight brightness The backlight class 0 brightness means the PWM min and it does not turn off the backlight. Aft

[Intel-gfx] [PATCH] drm/i915/skl: Implement DP Aux Mutex framework

2015-11-11 Thread Wayne Boyer
From: "Boyer, Wayne" Beginning with SKL the DP Aux channel communication can be protected using a built in HW mutex. When PSR is enabled the HW takes control on AUX and uses it to control panel exit/entry states. When validating PSR with automated tests, grabbing CRC from sink revealed strange

Re: [Intel-gfx] [PATCH 06/31] drm/i915: Fix IPS disable sequence.

2015-11-11 Thread Vivi, Rodrigo
On Tue, 2015-11-10 at 16:34 +, Daniel Stone wrote: > Hi, > > On 5 November 2015 at 18:49, Rodrigo Vivi > wrote: > > /** > > + * intel_ips_disable_if_alone - Disable IPS if alone in the pipe. > > + * @crtc: intel crtc > > + * > > + * This function should be called when primary plane is being

[Intel-gfx] [PATCH i-g-t] igt/pm_rps: current freq < user specified min is no longer a fail

2015-11-11 Thread Bob Paauwe
Since commit commit aed242ff7ebb697e4dff912bd4dc7ec7192f7581 Author: Chris Wilson Date: Wed Mar 18 09:48:21 2015 + drm/i915: Relax RPS contraints to allows setting minfreq on idle it is now possible that the current frequency will drop below the user specified minimum frequenc

Re: [Intel-gfx] [PATCH] drm/i915/bxt: Broxton doesn't use gen9 scaling for rps frequencies.

2015-11-11 Thread Bob Paauwe
On Tue, 10 Nov 2015 11:04:22 +0200 Mika Kuoppala wrote: > Bob Paauwe writes: > > > Signed-off-by: Bob Paauwe > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92768 > > --- > > drivers/gpu/drm/i915/intel_pm.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff

[Intel-gfx] [PATCH 3/4] drm/i915: PSR: Let's rely more on frontbuffer tracking.

2015-11-11 Thread Rodrigo Vivi
Many reasons here: - Hardware tracking also has hidden corner cases - Frontbuffer tracking is mature and reliable now - Our sw exit by unseting bit 31 is really fast and reliable. Also frontbuffer tracking flush means invalidate and flush. So, let's rely more and do the proper meaning of flush f

[Intel-gfx] [PATCH 2/4] drm/i915: Remove duplicated dpcd write on hsw_psr_enable_sink.

2015-11-11 Thread Rodrigo Vivi
This is wrong since my commit (89251b17). The intention of that commit was to remove this one here that is also wrong anyway, but it was forgotten. Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_psr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ps

[Intel-gfx] [PATCH 0/4] PSR general improvements and stabilization.

2015-11-11 Thread Rodrigo Vivi
Proceeding with the big series split here goes the general PSR improvements and stabilization work. There is no critical fix on this series although I believe it is good to have all of them before we can enable PSR back by default. Rodrigo Vivi (4): drm/i915: Force PSR exit when IRQ_HPD is dete

[Intel-gfx] [PATCH 1/4] drm/i915: Force PSR exit when IRQ_HPD is detected on eDP.

2015-11-11 Thread Rodrigo Vivi
According to VESA spec: "If a Source device receives and IRQ_HPD while in a PSR active state, and cannot identify what caused the IRQ_HPD to be generated, based on Sink device status registers, the Source device can take implementation-specific action. One such action can be to exit and then re-ent

[Intel-gfx] [PATCH 4/4] drm/i915: PSR: Mask LPSP hw tracking back again.

2015-11-11 Thread Rodrigo Vivi
At the beginning it was masked to allow PSR at all. Than it got removed later by my commit 09108b90f040 ("drm/i915: PSR: Remove Low Power HW tracking mask.") in order to trying fixing one case reported at intel-gfx mailing list where we were missing screen updates when runtime_pm was enabled. Howe

[Intel-gfx] [PATCH 0/4] PSR Critical fixes

2015-11-11 Thread Rodrigo Vivi
Let's split critical PSR fixes from the series that contains other reworks, stabilization and improvements. The second patch in this series isn't considered critical in terms of functionality, but it depends on the first one and it can be consider a fix for PSR residency on VLV/CHV. Thanks, Rodri

[Intel-gfx] [PATCH 2/4] drm/i915: Reduce PSR re-activation time for VLV/CHV.

2015-11-11 Thread Rodrigo Vivi
With 'commit 30886c5a ("drm/i915: VLV/CHV PSR: Increase wait delay time before active PSR.")' we fixed a blank screen when first activation was happening immediately after PSR being enabled. There we gave more time for idleness by increasing the delay between re-activating sequences. However, com

[Intel-gfx] [PATCH 1/4] drm/i915: Delay first PSR activation.

2015-11-11 Thread Rodrigo Vivi
When debuging the frozen screen caused by HW tracking with low power state I noticed that if we keep moving the mouse non stop you will miss the screen updates for a while. At least until we stop moving the mouse for a small time and move again. The actual enabling should happen immediately after

[Intel-gfx] [PATCH 4/4] drm/i915: Send TP1 TP2/3 even when panel claims no NO_TRAIN_ON_EXIT.

2015-11-11 Thread Rodrigo Vivi
On the commit 3301d4092106 ("drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT logic")' we already had identified that DP_PSR_NO_TRAIN_ON_EXIT doesn't mean we shouldn't send TPS patterns, however we start sending the minimal TP1 as possible and no TP2. For most of the panels this is ok, but we found a re

[Intel-gfx] [PATCH 3/4] drm/i915: PSR: Don't Skip aux handshake on DP_PSR_NO_TRAIN_ON_EXIT.

2015-11-11 Thread Rodrigo Vivi
Since the beginning there is a confusion on the meaning of this bit. A previous patch had identified this already and fixed it partially: 'commit 3301d409 ("drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT logic") DP_PSR_NO_TRAIN_ON_EXIT means the source doesn't need to do the training, but it doesn't

Re: [Intel-gfx] [PATCH v2 10/12] drm/i915/gen9: Turn DC handling into a power well

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > Handle DC off as a power well where enabling the power well will > prevent > the DMC to enter selected DC states (required around modesets and Aux > A). Disabling the power well will allow DC states again. For now the > highest DC state is

Re: [Intel-gfx] [PATCH 09/12] drm/i915: Explain usage of power well IDs vs bit groups

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > Signed-off-by: Patrik Jakobsson > --- > drivers/gpu/drm/i915/i915_reg.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > b/drivers/gpu/drm/i915/i915_reg.h > index e6d88f5..31b3a84 100644 > ---

Re: [Intel-gfx] [PATCH 07/12] drm/i915: Add a modeset power domain

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > We need a power domain for disabling DC5/DC6 around modesets to > prevent > confusing the DMC. > > Signed-off-by: Patrik Jakobsson Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/i915_debugfs.c | 2 ++ > drivers/gpu/drm/i915/i915_d

Re: [Intel-gfx] [PATCH 06/12] drm/i915: Remove distinction between DDI 2 vs 4 lanes

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > We never make use of the distinction between 2 vs 4 lanes so combine > them into a per port domain instead. This saves us a few bits in the > power domain mask. Change suggested by Ville. > > Signed-off-by: Patrik Jakobsson Reviewed-by:

Re: [Intel-gfx] [PATCH 02/12] drm/i915/gen9: Always set mask memory up when enabling DC5 or DC6

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > Move call to gen9_set_dc_state_debugmask_memory_up() into > gen9_set_dc_state() to prevent us missing it somewhere. > > Signed-off-by: Patrik Jakobsson Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/intel_runtime_pm.c | 35 ++

[Intel-gfx] [PATCH 0/5] Sink CRC stabilization

2015-11-11 Thread Rodrigo Vivi
Let's start spliting that big series that enables PSR with this sink crc stabilization. Also I'm adding Wayne's mutex that stabilizes sink CRC on Skylake. All patches already reviewed and ready to merge. Thank you very much Paulo for the review and Thank you Wayne for the SKL aux mutex. Thanks,

[Intel-gfx] [PATCH 3/5] drm/i915: Stop tracking last calculated Sink CRC.

2015-11-11 Thread Rodrigo Vivi
It was created at 'commit aabc95dcf20 (drm/i915: Dont -ETIMEDOUT on identical new and previous (count, crc).")' becase the counter wasn't reliable. Now that we properly wait for the counter to be reset we can rely a bit more in the counter. Also that patch stopped to return -ETIMEDOUT so the test

[Intel-gfx] [PATCH 2/5] drm/i915: Make Sink crc calculation waiting for counter to reset.

2015-11-11 Thread Rodrigo Vivi
According to VESA DP spec TEST_CRC_COUNT (Bits 3:0) at TEST_SINK_MISC (00246h) is "Reset to 0 when TEST_SINK bit 0 = 0; So let's give few vblanks so we are really sure that this counter is really zeroed on the next sink_crc read. v2: Use DRM_DEBUG_KMS instead of DRM_ERROR as Paulo suggested. Sig

Re: [Intel-gfx] [PATCH 01/12] drm/i915: Don't trust CSR program memory contents

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > Replaces "drm/i915: Force loading of csr program at boot" in the old > series. > > Previously we called blindly into intel_csr_load_program() and > depended > on a check of whether the CSR program memory was cleared or not. > This check i

[Intel-gfx] [PATCH 5/5] drm/i915/skl: implement DP Aux Mutex framework

2015-11-11 Thread Rodrigo Vivi
From: "Boyer, Wayne" Beginning with SKL the DP Aux channel communication can be protected using a built in HW mutex. When PSR is enablabled the HW takes control on AUX and uses it to control panel exit/entry states. When validating PSR with automated tests, grabbing CRC from sink revealed stran

[Intel-gfx] [PATCH 4/5] drm/i915: Rely on TEST_SINK_START instead of tracking Sink CRC state on dev_priv.

2015-11-11 Thread Rodrigo Vivi
Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 14 ++ drivers/gpu/drm/i915/intel_drv.h | 5 - 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 150

[Intel-gfx] [PATCH 1/5] drm/i915: Allow 1 vblank to let Sink CRC calculation to start or stop.

2015-11-11 Thread Rodrigo Vivi
According to VESA DP Spec, setting TEST_SINK_START (bit 0) of TEST_SINK (00270h) "Stop/Start calculating CRC on the next frame" So let's wait at least 1 vblank to really say the calculation stopped or started. Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel

Re: [Intel-gfx] [PATCH v1] drm/i915/guc: Fix a fw content lost issue after it is evicted

2015-11-11 Thread Yu Dai
On 11/11/2015 01:07 AM, Chris Wilson wrote: On Tue, Nov 10, 2015 at 03:27:36PM -0800, yu@intel.com wrote: > From: Alex Dai > > We keep a copy of GuC fw in a GEM obj. However its content is lost > if the GEM obj is swapped (igt/gem_evict_*). Therefore, the later > fw loading during GPU rese

Re: [Intel-gfx] [PATCH v2 11/12] drm/i915/gen9: Add boot parameter for disabling DC6

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > v2: Use _unsafe (Jani) > > Signed-off-by: Patrik Jakobsson > --- > drivers/gpu/drm/i915/i915_drv.h | 1 + > drivers/gpu/drm/i915/i915_params.c | 6 ++ > drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++-- > 3 files change

Re: [Intel-gfx] [PATCH v2 10/12] drm/i915/gen9: Turn DC handling into a power well

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > Handle DC off as a power well where enabling the power well will > prevent > the DMC to enter selected DC states (required around modesets and Aux > A). Disabling the power well will allow DC states again. For now the > highest DC state is

[Intel-gfx] [PATCH i-g-t] lib/kms: Pass fb_id=0 to setcrtc in kmstest_unset_all_crtcs()

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä The setcrtc ioctl ignores the fb_id when there's no mode specified. So passing -1 doens't make much sense. When there is a more, -1 means to preserve the current fb. Signed-off-by: Ville Syrjälä --- lib/igt_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[Intel-gfx] [PATCH i-g-t v2 2/4] tests/kms_flip: Disable all pipes before each test

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Currently kms_flip leaks the state of the pipes from one subtest to the next. Meaning a single pipe test can actually have two or more pipes actually up and running, and similarly a two pipe test can have three pipes running. This is particularly nasty on IVB since one of the

Re: [Intel-gfx] [PATCH 03/12] drm/i915: Clean up AUX power domain handling

2015-11-11 Thread Ville Syrjälä
On Wed, Nov 11, 2015 at 08:22:03PM +0200, Imre Deak wrote: > On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > > From: Ville Syrjälä > > > > Introduce intel_display_port_aux_power_domain() which simply returns > > the appropriate AUX power domain for a specific port, and then > > replac

[Intel-gfx] [PATCH 2/7] drm/i915: Replace the aux ddc name switch statement with kasprintf()

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Use kasprintf() to generate the "DPDDC-" name for the aux helper. To deal with errors properly make intel_dp_aux_init() return something, and adjust the caller to match. It seems we were also missing a intel_dp_mst_encoder_cleanup() call on edp (non-port A) init failures, so

[Intel-gfx] [PATCH 7/7] drm/i915: Model PSR AUX register selection more like the normal AUX code

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä v2: Split up the ctl vs. data reg handling like in the normal AUX code Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/intel_psr.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/d

[Intel-gfx] [PATCH 5/7] drm/i915: Store aux data reg offsets in intel_dp->aux_ch_data_reg[]

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Rather than computing on demand, store also the aux data reg offsets under intel_dp. v2: Duplicate some code to make things less magic (Jani) v3: Use PORT_B registers for invalid ports in g4x_aux_data_reg() Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson --- driver

[Intel-gfx] [PATCH 1/7] drm/i915: Replace aux_ch_ctl_reg check with port check

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Instead of checking what aux_ch_ctl_reg is, we can simply check the port when determining the right timeout value to program. v2: Reorder patches to reduce churn (Chris) Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson (v1) --- drivers/gpu/drm/i915/intel_dp.c | 2 +-

[Intel-gfx] [PATCH 0/7] drm/i915: Reordered AUX patches from type safety series

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Chris requested that I try to reorder the DP AUX patches in the last register type safety series [1] to form a better story. Here is the result. The final code is exactly the same as before (apart from the kasprintf() changes), so I kept the previous r-b's in place, with some

[Intel-gfx] [PATCH 4/7] drm/i915: Remove the magic AUX_CTL is at DP + foo tricks

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Currently we determine the location of the AUX registers in a confusing way. First we assume the PCH registers are used always, but then we override it for everything but HSW/BDW to use DP+0x10. Very confusing. Let's just make it straightforward and simply add a few functions

[Intel-gfx] [PATCH 3/7] drm/i915: Parametrize AUX registers

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä v2: Keep some MISSING_CASE() stuff (Jani) s/-1/-PIPE_B/ in the register macro Fix typo in patch subject v3: Use PORT_B registers for invalid ports in g4x_aux_ctl_reg() (Jani) v4: Reorder patches (Chris) Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula (v3) Revi

[Intel-gfx] [PATCH 6/7] drm/i915: Add dev_priv->psr_mmio_base

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Drop the EDP_PSR_BASE() thing, and just stick the PSR register offset under dev_priv, like we for DSI and GPIO for example. TODO: could probably move a bunch of this kind of stuff into the device info instead... v2: Drop the spurious whitespace change (Jani) Reviewed-by: Ja

Re: [Intel-gfx] [PATCH 03/12] drm/i915: Clean up AUX power domain handling

2015-11-11 Thread Imre Deak
On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote: > From: Ville Syrjälä > > Introduce intel_display_port_aux_power_domain() which simply returns > the appropriate AUX power domain for a specific port, and then > replace > the intel_display_port_power_domain() with calls to the new functio

Re: [Intel-gfx] [PATCH] drm/i915: Reset dpll_hw_state when selecting a new pll on hsw

2015-11-11 Thread Gabriel Feceoru
On 11.11.2015 16:21, Jani Nikula wrote: On Wed, 11 Nov 2015, Ander Conselvan De Oliveira wrote: On Tue, 2015-11-10 at 14:53 +0200, Jani Nikula wrote: Ander, Maarten, where are we with this? Is it horribly wrong to merge the original patch in this ever-growing and diverging thread? I think

Re: [Intel-gfx] [PATCH i-g-t 2/4] tests/kms_flip: Disable all pipes before each test

2015-11-11 Thread Ville Syrjälä
On Wed, Nov 11, 2015 at 07:49:40PM +0200, Ville Syrjälä wrote: > On Wed, Nov 11, 2015 at 03:41:16PM -0200, Paulo Zanoni wrote: > > 2015-11-11 15:32 GMT-02:00 : > > > From: Ville Syrjälä > > > > > > Currently kms_flip leaks the state of the pipes from one subtest to the > > > next. Meaning a singl

Re: [Intel-gfx] [PATCH i-g-t 2/4] tests/kms_flip: Disable all pipes before each test

2015-11-11 Thread Ville Syrjälä
On Wed, Nov 11, 2015 at 03:41:16PM -0200, Paulo Zanoni wrote: > 2015-11-11 15:32 GMT-02:00 : > > From: Ville Syrjälä > > > > Currently kms_flip leaks the state of the pipes from one subtest to the > > next. Meaning a single pipe test can actually have two or more pipes > > actually up and running

Re: [Intel-gfx] [PATCH i-g-t 2/4] tests/kms_flip: Disable all pipes before each test

2015-11-11 Thread Paulo Zanoni
2015-11-11 15:32 GMT-02:00 : > From: Ville Syrjälä > > Currently kms_flip leaks the state of the pipes from one subtest to the > next. Meaning a single pipe test can actually have two or more pipes > actually up and running, and similarly a two pipe test can have three > pipes running. > > This i

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Don't clobber the addfb2 ioctl params

2015-11-11 Thread Chris Wilson
On Wed, Nov 11, 2015 at 07:24:40PM +0200, Ville Syrjälä wrote: > On Wed, Nov 11, 2015 at 05:20:10PM +, Chris Wilson wrote: > > On Wed, Nov 11, 2015 at 07:11:28PM +0200, ville.syrj...@linux.intel.com > > wrote: > > > From: Ville Syrjälä > > > > > > We try to convert the old way of of specifyi

[Intel-gfx] [PATCH i-g-t 3/4] tests/kms_flip: Modeset pipes in reverse order

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä To make more multi-pipe tests run on IVB, do the modesets in the reverse order (ie. pipe C first, pipe A last). This way pipe B can't reserve the 2 shared FDI lanes before pipe C is set up. Signed-off-by: Ville Syrjälä --- tests/kms_flip.c | 2 +- 1 file changed, 1 insertio

[Intel-gfx] [PATCH i-g-t 1/4] tests/kms_flip: Use human readable pipe and connector names

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Print the pipes and connectors in a human readable form instead of using the integer IDs. Signed-off-by: Ville Syrjälä --- tests/kms_flip.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c

[Intel-gfx] [PATCH i-g-t 2/4] tests/kms_flip: Disable all pipes before each test

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Currently kms_flip leaks the state of the pipes from one subtest to the next. Meaning a single pipe test can actually have two or more pipes actually up and running, and similarly a two pipe test can have three pipes running. This is particularly nasty on IVB since one of the

[Intel-gfx] [PATCH i-g-t 4/4] tests/kms_flip: Add a note that the test was skipped when modeset fails

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Signed-off-by: Ville Syrjälä --- tests/kms_flip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 23dadad..af1ccfb 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1449,6 +1449,7 @@ static void run_test_on_crtc_set(struct

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Don't clobber the addfb2 ioctl params

2015-11-11 Thread Ville Syrjälä
On Wed, Nov 11, 2015 at 05:20:10PM +, Chris Wilson wrote: > On Wed, Nov 11, 2015 at 07:11:28PM +0200, ville.syrj...@linux.intel.com wrote: > > From: Ville Syrjälä > > > > We try to convert the old way of of specifying fb tiling (obj->tiling) > > into the new fb modifiers. We store the result

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Don't clobber the addfb2 ioctl params

2015-11-11 Thread Chris Wilson
On Wed, Nov 11, 2015 at 07:11:28PM +0200, ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > We try to convert the old way of of specifying fb tiling (obj->tiling) > into the new fb modifiers. We store the result in the passed in mode_cmd > structure. But that structure comes directly

[Intel-gfx] [PATCH 1/2] drm/i915: Don't clobber the addfb2 ioctl params

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä We try to convert the old way of of specifying fb tiling (obj->tiling) into the new fb modifiers. We store the result in the passed in mode_cmd structure. But that structure comes directly from the addfb2 ioctl, and gets copied back out to userspace, which means we're clobberi

[Intel-gfx] [PATCH i-g-t] tests/kms_addfb_basic: Add clobbered-modifier subtest

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Make sure the kernel doesn't clobber the modifiers when the user didn't pass any. Signed-off-by: Ville Syrjälä --- tests/kms_addfb_basic.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c index d466e4d..73000d

[Intel-gfx] [PATCH 2/2] drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()

2015-11-11 Thread ville . syrjala
From: Ville Syrjälä Drivers shouldn't clobber the passed in addfb ioctl parameters. i915 was doing just that. To prevent it from happening again, pass the struct around as const, starting all the way from internal_framebuffer_create(). Signed-off-by: Ville Syrjälä --- I tried to cross-compile e

[Intel-gfx] [PATCH] drm/i915: fix handling of the disable_power_well module option

2015-11-11 Thread Imre Deak
When this option is 0 (so the power well support is disabled) we are supposed to enable all power wells once and don't disable them unless we system suspend the device. Currently if the option is 0, we can call the power well enable handlers multiple times, whenever their refcount changes from 0->1

[Intel-gfx] [RFC i-g-t] tests/gem_reset_stats.c: prepare for per engine resets

2015-11-11 Thread tim . gore
From: Tim Gore when checking to make sure that the driver has performed the expected number of resets, this test looks at the reset_count, which is incremented each time the GPU is reset. Upcoming changes in the way GPU hangs are handled mean that in most cases (and in all the cases in this test)

[Intel-gfx] [PATCH] drm/i915: Clear DDI pll selection in intel_crtc_compute_config()

2015-11-11 Thread Ander Conselvan de Oliveira
Clear the pipe's dpll_hw_state when choosing the PLL for CRT on DDI platforms. Otherwise stale values might cause the state checker to complain. Should fix errors like below: [drm:intel_pipe_config_compare [i915]] *ERROR* mismatch in dpll_hw_state.wrpll Cc: Gabriel Feceoru Cc: Daniel Vetter Cc:

Re: [Intel-gfx] [PATCH] drm/i915: Clean up LVDS register handling harder

2015-11-11 Thread Jani Nikula
On Thu, 05 Nov 2015, Lukas Wunner wrote: > Minor fixup to d0669d007542 ("drm/i915: Clean up LVDS register > handling") which intended to read lvds_reg just once at the > beginning of intel_lvds_init() and use that throughout the rest > of the function but accidentally missed one register readout.

Re: [Intel-gfx] [PATCH 10/13] drm/i915: fix the CFB size check

2015-11-11 Thread Zanoni, Paulo R
Em Qua, 2015-11-11 às 16:27 +0200, Ville Syrjälä escreveu: > On Tue, Nov 10, 2015 at 02:04:48PM +0100, Maarten Lankhorst wrote: > > Op 10-11-15 om 13:20 schreef Zanoni, Paulo R: > > > Em Ter, 2015-11-10 às 11:22 +0100, Maarten Lankhorst escreveu: > > > > Op 04-11-15 om 20:10 schreef Paulo Zanoni: >

Re: [Intel-gfx] [PATCH i-g-t] tests/gem_buffered_svm_test: New tests for buffered SVM feature

2015-11-11 Thread Tvrtko Ursulin
Hi, On 10/11/15 16:02, Vinay Belgaumkar wrote: v1: These tests exercise the userptr ioctl to create shared buffers Normally we don't put v1 at the beginning of the commit message. between CPU and GPU. They contain error and normal usage scenarios. They also contain a couple of stress tests

[Intel-gfx] [PATCH i-g-t v4] tests/gem_exec_nop: Improved test run time

2015-11-11 Thread Derek Morton
Reduced the Sleep period to 200mS and reduced the repetition count to 7 to decrease the test run time significantly. v2: Changed uS to us v3: removed the output formatting change as the issue will be addressed in a seperate patch from Thomas Wood. v4: mS -> ms Signed-off-by: Derek Morton --- te

[Intel-gfx] [PATCH] drm/i915: Do a better job at disabling primary plane in the noatomic case.

2015-11-11 Thread Maarten Lankhorst
When disable_noatomic is called plane_mask is not reliable yet, and plane_state->visible = true even after disabling the primary plane. Fix this by unsetting plane->visible if it was visible, and calling disable_planes with the primary plane as mask. The other planes are already disabled in intel

Re: [Intel-gfx] [PATCH 10/13] drm/i915: fix the CFB size check

2015-11-11 Thread Ville Syrjälä
On Tue, Nov 10, 2015 at 02:04:48PM +0100, Maarten Lankhorst wrote: > Op 10-11-15 om 13:20 schreef Zanoni, Paulo R: > > Em Ter, 2015-11-10 às 11:22 +0100, Maarten Lankhorst escreveu: > >> Op 04-11-15 om 20:10 schreef Paulo Zanoni: > >>> In function find_compression_threshold() we try to over-allocat

Re: [Intel-gfx] [PATCH 10/13] drm/i915: fix the CFB size check

2015-11-11 Thread Maarten Lankhorst
Op 11-11-15 om 14:39 schreef Zanoni, Paulo R: > Em Ter, 2015-11-10 às 14:04 +0100, Maarten Lankhorst escreveu: >> Op 10-11-15 om 13:20 schreef Zanoni, Paulo R: >>> Em Ter, 2015-11-10 às 11:22 +0100, Maarten Lankhorst escreveu: Op 04-11-15 om 20:10 schreef Paulo Zanoni: > In function find_c

Re: [Intel-gfx] [PATCH] drm/i915: Reset dpll_hw_state when selecting a new pll on hsw

2015-11-11 Thread Jani Nikula
On Wed, 11 Nov 2015, Ander Conselvan De Oliveira wrote: > On Tue, 2015-11-10 at 14:53 +0200, Jani Nikula wrote: >> Ander, Maarten, where are we with this? Is it horribly wrong to merge >> the original patch in this ever-growing and diverging thread? > > I think the patch as is will cause problems

[Intel-gfx] [PATCH v5] drm/i915: Set backlight class max to 100 and respect the VBT minimum again.

2015-11-11 Thread Shih-Yuan Lee (FourDollars)
There was a wonderful period after commit 6dda730e55f412a6dfb181cae6784822ba463847 Author: Jani Nikula Date: Tue Jun 24 18:27:40 2014 +0300 drm/i915: respect the VBT minimum backlight brightness However everything is changed after commit e6755fb78e8f20ecadf2a4080084121336624ad9 Author: J

Re: [Intel-gfx] [PATCH 10/13] drm/i915: fix the CFB size check

2015-11-11 Thread Zanoni, Paulo R
Em Ter, 2015-11-10 às 14:04 +0100, Maarten Lankhorst escreveu: > Op 10-11-15 om 13:20 schreef Zanoni, Paulo R: > > Em Ter, 2015-11-10 às 11:22 +0100, Maarten Lankhorst escreveu: > > > Op 04-11-15 om 20:10 schreef Paulo Zanoni: > > > > In function find_compression_threshold() we try to over- > > > >

Re: [Intel-gfx] [PATCH i-g-t v3] tests/gem_exec_nop: Improved test run time

2015-11-11 Thread Jani Nikula
On Wed, 11 Nov 2015, Derek Morton wrote: > Reduced the Sleep period to 200mS and reduced the repetition count to 7 > to decrease the test run time significantly. > > v2: Changed uS to us The electrical engineer in me insists on v4 changing mS to ms, as we're talking about time, not conductance. ;

[Intel-gfx] [PATCH] drm/i915: Fix SKL i_boost level

2015-11-11 Thread Ander Conselvan de Oliveira
The i_boost level in the DDI translation tables are stored per level. However, skl_ddi_set_iboos() would choose an entry of that table based on the port argument. Cc: Jim Bride Signed-off-by: Ander Conselvan de Oliveira --- I noticed this while reviewing Jim's patch that updates Skylake's DDI

Re: [Intel-gfx] [PATCH v4] drm/i915: Set brightness maximum to a fixed value 100.

2015-11-11 Thread Shih-Yuan Lee (FourDollars)
On Wed, Nov 11, 2015 at 02:05:57PM +0200, Jani Nikula wrote: > On Wed, 11 Nov 2015, "Shih-Yuan Lee (FourDollars)" > wrote: > > Take Dell XPS 13 (2015) as an example. The vbt min 10 out of [0..255]. > > The PWM max is 937 so the corresponding PWM min is 37 (10*937/256). > > This commit makes the s

Re: [Intel-gfx] [PATCH] drm/i915/skl: Update DDI translation tables for SKL

2015-11-11 Thread Ander Conselvan De Oliveira
On Fri, 2015-11-06 at 15:30 -0800, Jim Bride wrote: > While comparing the B-Spec with the code I noticed that several > values in these tables have been updated in the spec, so I > changed the code to match.. > > Cc: Rodrigo Vivi > Signed-off-by: Jim Bride Reviewed-by: Ander Conselvan de Olivei

Re: [Intel-gfx] [PATCH 3/6] drm/i915: Propagating correct error codes to the userspace

2015-11-11 Thread Chris Wilson
On Wed, Nov 11, 2015 at 04:06:10PM +0530, ankitprasad.r.sha...@intel.com wrote: > @@ -4399,14 +4399,15 @@ struct drm_i915_gem_object > *i915_gem_alloc_object(struct drm_device *dev, > struct drm_i915_gem_object *obj; > struct address_space *mapping; > gfp_t mask; > + int ret

Re: [Intel-gfx] [PATCH v4] drm/i915: Set brightness maximum to a fixed value 100.

2015-11-11 Thread Jani Nikula
On Wed, 11 Nov 2015, "Shih-Yuan Lee (FourDollars)" wrote: > Take Dell XPS 13 (2015) as an example. The vbt min 10 out of [0..255]. > The PWM max is 937 so the corresponding PWM min is 37 (10*937/256). > This commit makes the sysfs brightness 1 map to the PWM brightness 37 > and 100 map to the PWM

Re: [Intel-gfx] [Spice-devel] [Patchwork] The infrequent patchwork update #1

2015-11-11 Thread Victor Toso
Hi, On Tue, Sep 29, 2015 at 04:33:07PM +0100, Damien Lespiau wrote: > Hi all, > > You may have noticed already, patchwork.freedesktop.org looks different. > > That new version includes: > - Some re-design. Design is very much an iterative process, thoughts > and comments are welcome, > - S

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Move the fbdev async_schedule() into intel_fbdev.c

2015-11-11 Thread Ville Syrjälä
On Tue, Nov 10, 2015 at 05:27:55PM +0100, Lukas Wunner wrote: > Hi Ville, > > On Mon, Nov 09, 2015 at 01:00:50PM +0200, Ville Syrjälä wrote: > > On Sun, Nov 08, 2015 at 05:44:37PM +0100, Lukas Wunner wrote: > > > Hi Ville, > > > > > > On Fri, Nov 06, 2015 at 03:08:33PM +0200, ville.syrj...@linux.

Re: [Intel-gfx] [PATCH 2/6] drm/i915: Support for creating Stolen memory backed objects

2015-11-11 Thread Chris Wilson
On Wed, Nov 11, 2015 at 04:06:09PM +0530, ankitprasad.r.sha...@intel.com wrote: > From: Ankitprasad Sharma > > Extend the drm_i915_gem_create structure to add support for > creating Stolen memory backed objects. Added a new flag through > which user can specify the preference to allocate the obje

Re: [Intel-gfx] [PATCH 1/6] drm/i915: Clearing buffer objects via CPU/GTT

2015-11-11 Thread Chris Wilson
On Wed, Nov 11, 2015 at 04:06:08PM +0530, ankitprasad.r.sha...@intel.com wrote: > From: Ankitprasad Sharma > > This patch adds support for clearing buffer objects via CPU/GTT. This > is particularly useful for clearing out the non shmem backed objects. > Currently intend to use this only for buff

[Intel-gfx] [PULL] topic/drm-fixes

2015-11-11 Thread Jani Nikula
Hi Dave, I seem to be off-sync with your pulls to Linus... anyway, here's one uapi build fix I've picked up. BR, Jani. The following changes since commit f36203be608a38a5b5523a7aa52cc72f757b9679: drm/dp: Add dp_aux_i2c_speed_khz module param to set the assume i2c bus speed (2015-09-02 16:13:

Re: [Intel-gfx] [PATCH 6/6] drm/i915: Migrate stolen objects before hibernation

2015-11-11 Thread Chris Wilson
On Wed, Nov 11, 2015 at 04:06:13PM +0530, ankitprasad.r.sha...@intel.com wrote: > +swap_pages: > + stolen_pages = obj->pages; > + obj->pages = NULL; > + > + obj->base.filp = file; > + obj->base.read_domains = I915_GEM_DOMAIN_CPU; > + obj->base.write_domain = I915_GEM_DOMAIN_CPU;

[Intel-gfx] [PATCH 4/6] drm/i915: Add support for stealing purgable stolen pages

2015-11-11 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 5/6] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-11-11 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 3/6] drm/i915: Propagating correct error codes to the userspace

2015-11-11 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 6/6] drm/i915: Migrate stolen objects before hibernation

2015-11-11 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH v9 0/6] Support for creating/using Stolen memory backed objects

2015-11-11 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 2/6] drm/i915: Support for creating Stolen memory backed objects

2015-11-11 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 1/6] drm/i915: Clearing buffer objects via CPU/GTT

2015-11-11 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH i-g-t v3] tests/gem_exec_nop: Improved test run time

2015-11-11 Thread Derek Morton
Reduced the Sleep period to 200mS and reduced the repetition count to 7 to decrease the test run time significantly. v2: Changed uS to us v3: removed the output formatting change as the issue will be addressed in a seperate patch from Thomas Wood. Signed-off-by: Derek Morton --- tests/gem_exec_

Re: [Intel-gfx] [PATCH i-g-t] lib: add a environment variable to control output

2015-11-11 Thread Morton, Derek J
Hi Thomas, I have ran with your patches on android. The IGT_PLAIN_OUTPUT environment variable works fine for me. My only comment would be that it should be documented somewhere. I will remove the formatting change from my gem_exec_nop patch as with this I don't think it is needed. //Derek --

Re: [Intel-gfx] [PATCH] drm/i915: Reset dpll_hw_state when selecting a new pll on hsw

2015-11-11 Thread Ander Conselvan De Oliveira
On Tue, 2015-11-10 at 14:53 +0200, Jani Nikula wrote: > On Wed, 14 Oct 2015, Daniel Vetter wrote: > > On Wed, Oct 14, 2015 at 04:58:55PM +0300, Ander Conselvan De Oliveira wrote: > > > On Wed, 2015-10-14 at 14:44 +0200, Daniel Vetter wrote: > > > > On Wed, Oct 14, 2015 at 11:21:46AM +0300, Ander C

Re: [Intel-gfx] [PATCH v1] drm/i915/guc: Fix a fw content lost issue after it is evicted

2015-11-11 Thread Chris Wilson
On Tue, Nov 10, 2015 at 03:27:36PM -0800, yu@intel.com wrote: > From: Alex Dai > > We keep a copy of GuC fw in a GEM obj. However its content is lost > if the GEM obj is swapped (igt/gem_evict_*). Therefore, the later > fw loading during GPU reset will fail. Mark the obj dirty after > copying