[Intel-gfx] intel(0): switch to mode spamming Xorg.0.log?

2014-04-24 Thread Felix Miata
http://fm.no-ip.com/Tmp/Linux/Xorg/xorg.0.log-intel30git has a lot of intel(0): switch to mode in sequence. Is this normal/expected behavior? Known bug? -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg.

Re: [Intel-gfx] [PATCH V4 3/6] drm/i915:Initialize the second BSD ring on BDW GT3 machine

2014-04-24 Thread Zhao Yakui
On Tue, 2014-04-22 at 13:52 -0600, Daniel Vetter wrote: > On Thu, Apr 17, 2014 at 10:37:37AM +0800, Zhao Yakui wrote: > > Based on the hardware spec, the BDW GT3 machine has two independent > > BSD ring that can be used to dispatch the video commands. > > So just initialize it. > > > > V3->V4: Fol

Re: [Intel-gfx] [PATCH V4 3/6] drm/i915:Initialize the second BSD ring on BDW GT3 machine

2014-04-24 Thread Zhao Yakui
On Thu, 2014-04-24 at 09:21 -0600, Daniel Vetter wrote: > On Thu, Apr 17, 2014 at 10:37:37AM +0800, Zhao Yakui wrote: > > Based on the hardware spec, the BDW GT3 machine has two independent > > BSD ring that can be used to dispatch the video commands. > > So just initialize it. > > > > V3->V4: Fol

Re: [Intel-gfx] [PATCH] mm: Throttle shrinkers harder

2014-04-24 Thread Dave Hansen
On 04/24/2014 08:39 AM, Chris Wilson wrote: > On Thu, Apr 24, 2014 at 08:21:58AM -0700, Dave Hansen wrote: >> Is it possible that there's still a get_page() reference that's holding >> those pages in place from the graphics code? > > Not from i915.ko. The last resort of our shrinker is to drop all

Re: [Intel-gfx] [bisect result] Re: 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Jiri Kosina
On Fri, 25 Apr 2014, Pavel Machek wrote: > > > And we have a winner here :-) > > > > > > Ok, it was not as painfull as I feared. > > > > > > It does not revert cleanly, but doing it by hand was not that bad. > > > > Oh my. That is bizarre, can you check whether you have > > > > commit 9991ae78

Re: [Intel-gfx] [bisect result] Re: 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Pavel Machek
> On Thu, Apr 24, 2014 at 09:40:38PM +0200, Pavel Machek wrote: > > Hi! > > > > > And if you can indeed reliably reproduce this a bisect could be really > > > useful. > > > > And we have a winner here :-) > > > > Ok, it was not as painfull as I feared. > > > > It does not revert cleanly, but d

Re: [Intel-gfx] [bisect result] Re: 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Pavel Machek
Hi! > > > And if you can indeed reliably reproduce this a bisect could be really > > > useful. > > > > And we have a winner here :-) > > > > Ok, it was not as painfull as I feared. > > > > It does not revert cleanly, but doing it by hand was not that bad. > > Oh my. That is bizarre, can you c

[Intel-gfx] [PATCH 65/66] drm/i915: Only touch WRPLL hw state in enable/disable hooks

2014-04-24 Thread Daniel Vetter
To be able to do this we need to separately keep track of how many crtcs need a given WRPLL and how many actually actively use it. The common shared dpll framework already has all this, including massive state readout and cross checking. Which allows us to do this switch in a fairly small patch. S

[Intel-gfx] [PATCH 66/66] drm/i915: runtime PM support for DPMS

2014-04-24 Thread Daniel Vetter
Keeping track of the power domains is a bit messy since crtc->active is currently updated by the platform hooks, but we need to be aware of which state transition exactly is going on. Maybe we simply need to shovel all the power domain handling down into platform code to simplify this. But doing th

[Intel-gfx] [PATCH 61/66] drm/i915: State readout support for WRPLLs

2014-04-24 Thread Daniel Vetter
Still tacked onto the side, but slowly getting there. v2: Don't forget the debugfs file. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ddi.c |

[Intel-gfx] [PATCH 57/66] drm/i915: State readout and cross-checking for ddi_pll_sel

2014-04-24 Thread Daniel Vetter
To make things a bit more manageable extract a new function for reading out common ddi port state. This means a bit of duplication between encoders and the core since both look at the same registers, but doesn't seem worth to make a fuzz about. We can also remove the state readout code in intel_dd

[Intel-gfx] [PATCH 64/66] drm/i915: Switch to common shared dpll framework for WRPLLs

2014-04-24 Thread Daniel Vetter
Mostly this patch is one big excersize in deleting code and asserts which are no longer needed. Note that we still abuse the shared dpll framework a bit since we call the enable/disable functions from the crtc mode_set and off hooks. But changing the actual hardware sequence will be done in the nex

[Intel-gfx] [PATCH 63/66] drm/i915: ->enable hook for WRPLLs

2014-04-24 Thread Daniel Vetter
This time around another cute hack to pre-fill the pll->hw_state with the right values. And also remove a bunch of checks which will be replaced by lots more checks in the common framework. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_ddi.c | 51 +++

[Intel-gfx] [PATCH 54/66] drm/i915: Move SPLL disabling into hsw_crt_post_disable

2014-04-24 Thread Daniel Vetter
Similar to how the ->crtc_mode_set hook should touch the hardware to enable anything the ->crtc_off hook should disable anything in the hardware. Otherwise runtime pm for dpms will not work. Currently the only things left int the haswell_crtc_off hook is disabling the ddi plls. We can't move the W

[Intel-gfx] [PATCH 58/66] drm/i915: Precompute static ddi_pll_sel values in encoders

2014-04-24 Thread Daniel Vetter
This way only the dynamic WRPLL selection for hdmi ddi mode is done in intel_ddi_pll_select. v2: Don't clobber the precomputed values when selecting clocks fro hdmi encoders. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_crt.c | 4 +++- drivers/gpu/drm/i915/intel_ddi.c | 34 +++--

[Intel-gfx] [PATCH 50/66] drm/i915: Move the pch fifo underrun handling into hsw_crt_disable

2014-04-24 Thread Daniel Vetter
Yet another pch encoder special case quenched from haswell modeset code. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_crt.c | 11 ++- drivers/gpu/drm/i915/intel_display.c | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/inte

[Intel-gfx] [PATCH 47/66] drm/i915: Move pch fifo underrun report enabling to hsw_crt_pre_enable

2014-04-24 Thread Daniel Vetter
With this all the pch pre-enable work has been moved into the special hsw crt encoder functions. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_crt.c | 4 drivers/gpu/drm/i915/intel_display.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[Intel-gfx] [PATCH 62/66] drm/i915: ->disable hook for WRPLLs

2014-04-24 Thread Daniel Vetter
Currently still with a redudant WARN_ON in there, the common shared dpll code will take care of this in the future. Also we need to flip the switch for the transitional hack now to make sure that we disable the right pll. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_ddi.c | 2

[Intel-gfx] [PATCH 55/66] drm/i915: Add a debugfs file for the shared dpll state

2014-04-24 Thread Daniel Vetter
Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 1e83ae45041c..c99951fdc572 100644 --- a/drivers/gpu/drm/i915/i915_d

[Intel-gfx] [PATCH 53/66] drm/i915: Move the hsw fdi disabling into hsw_crt_post_disable

2014-04-24 Thread Daniel Vetter
With this all the pch encoder specific code is now gone from the haswell ->crtc_disable function. Which finally readies the stage for the last piece of all the hsw crt encoder rework, namely also moving the SPLL disabling into the encoder post_disable function. Which the next patch will do. Signed

[Intel-gfx] [PATCH 48/66] drm/i915: Move the SPLL enabling into hsw_crt_pre_enable

2014-04-24 Thread Daniel Vetter
The call to intel_ddi_pll_enable in haswell_crtc_mode_set is the only function that still touches the hardware state from the crtc mode_set callback on hsw. Since the SPLL isn't ever shared we can easily take it out into the hsw crt encoder functions. Temporarily we'll loose a bit of WARN_ON cover

[Intel-gfx] [PATCH 60/66] drm/i915: Document that the pll->mode_set hook is optional

2014-04-24 Thread Daniel Vetter
The WRPLLs won't use them. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index babeb7e92ee4..b01ee265310f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/

[Intel-gfx] [PATCH 56/66] drm/i915: Move ddi_pll_sel into the pipe config

2014-04-24 Thread Daniel Vetter
Just boring sed job for preparation. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_crt.c | 4 ++-- drivers/gpu/drm/i915/intel_ddi.c | 30 +++--- drivers/gpu/drm/i915/intel_drv.h | 5 +++-- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH 59/66] drm/i915: Basic shared dpll support for WRPLLs

2014-04-24 Thread Daniel Vetter
Just filing in names and ids, but not yet officially registering them so that the hw state cross checker doesn't completely freak out about them. Still since we do already read out and cross check config->shared_dpll the basics are now there to flesh out the wrpll shared dpll implementation. The i

[Intel-gfx] [PATCH 49/66] drm/i915: Move lpt_pch_enable int hsw_crt_enable

2014-04-24 Thread Daniel Vetter
Unfortunately this requires a bunch of exports for pch handling functions, but there's been various plans floating around to extract them all into an intel_pch.c helper library anyway. In any case haswell_crtc_enable is now pch encoder free. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 51/66] drm/i915: Move lpt_disable_pch_transcoder into the hsw crt encoder

2014-04-24 Thread Daniel Vetter
We can just create a ->post_disable hook to shovel all the fdi/pch specific code into it - it's all only used by the crt encoder anyway. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_crt.c | 26 ++ drivers/gpu/drm/i915/intel_display.c | 18 --

[Intel-gfx] [PATCH 52/66] drm/i915: Move pch fifo underrun report re-enabling into hsw_crt_post_disable

2014-04-24 Thread Daniel Vetter
Step 2 in pimping the hsw_crt_post_disable hook. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_crt.c | 2 ++ drivers/gpu/drm/i915/intel_display.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_c

[Intel-gfx] [PATCH 28/66] drm/i915: Inline set_base into crtc_mode_set

2014-04-24 Thread Daniel Vetter
A lot of the code in set_base is uncessary when the crtc is off, so we can get rid of it all. Also, we don't need to call the fbc/psr update functions since the crtc enable/disable hooks do that already. The only things we really need are: - Pin the new framebuffer and potentially unpin the old fr

[Intel-gfx] [PATCH 46/66] drm/i915: Move hsw_fdi_link_train into intel_crt.c

2014-04-24 Thread Daniel Vetter
The pch encoder case really isn't anything generic on hsw: - It's for the vga port only and - the vga port does only exist on some hsw platforms. Imo it helps the generic code flow a lot if we shovel all this into hsw specific enable/disable hooks. A bonus is that some of our largest files (intel_

[Intel-gfx] [PATCH 45/66] drm/i915: Unexport intel_ddi_connector_get_hw_state

2014-04-24 Thread Daniel Vetter
The connector->get_hw_state function is actually platform dependent. So move it out of the shared connector init functions. This allows us to drop another intel_ddi.c export. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_ddi.c | 10 +++--- drivers/gpu/drm/i915/intel_dp.c |

[Intel-gfx] [PATCH 33/66] drm/i915: Shovel hw setup code out of hsw_crtc_mode_set

2014-04-24 Thread Daniel Vetter
Again the same story: This code just transform sw state from the pipe config into hardware state. And again we can't move the pll code, but this time around because the state isn't properly tracked in the pipe config. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 47 +++

[Intel-gfx] [PATCH 21/66] drm/i915/lvds: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
All the hard work was already done, only thing left to do is remove the empty callback. And a now rather misleading comment I've spotted while reading through code. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_lvds.c | 14 -- 1 file changed, 14 deletions(-) diff --git

[Intel-gfx] [PATCH 30/66] drm/i915: Shovel hw setup code out of i9xx_crtc_mode_set

2014-04-24 Thread Daniel Vetter
All these functions simply convert sw state as encoded in the pipe config or primary framebuffer into hardware state. So we can move them all into the crtc enable hook. Unfortunately this means a little bit of duplication between the i9xx and vlv functions, but since we already have highly refactor

[Intel-gfx] [PATCH 38/66] drm/i915: s/ironlake_/intel_ for the enable_share_dpll function

2014-04-24 Thread Daniel Vetter
Besides the fairly useless BUG_ON the logic is completely generic and cane be used on any platform what wants to reuse the shared dpll support code. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/d

[Intel-gfx] [PATCH 29/66] drm/i915: Move fb pinning into __intel_set_mode

2014-04-24 Thread Daniel Vetter
Our two ->crtc_mode_set callbacks really don't care whether the fb is pinned and set up already or not - all the state computation and handling which originally looked at the framebuffer is already using the indirection through the pipe configuration. Eventually we want to move this up a bit more,

[Intel-gfx] [PATCH 35/66] drm/i915: Extract vlv_prepare_pll

2014-04-24 Thread Daniel Vetter
With this all hw writes are also gone from the ->crtc_mode_set hook on vlv. I wondered whether we should track more of the pll state in the pipe config, but otoh as long as we don't have shared plls that's not really useful - the cross-checking of the port clock should be sufficient. While at it a

[Intel-gfx] [PATCH 31/66] drm/i915: Move lowfreq_avail around a bit in ilk/hsw_crtc_mode_set

2014-04-24 Thread Daniel Vetter
Now this really should be in the pipe config somewhere, but till now it isn't. We can at least move it up a bit next to all the other pll code since intel_dp_set_m_n really doesn't depend upon this. This is just prep work so that moving all the hw frobbing code from ->crtc_mode_set to ->crtc_enabl

[Intel-gfx] [PATCH 20/66] drm/i915/hdmi: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
Similar to dp the only thing we do is call intel_write_eld and prepare a bit of state for the enable hooks. The only difference is that we write that to the hardware instead of keeping track of it somewhere in software. Still we can just move all this to the very first enable hook. Signed-off-by:

[Intel-gfx] [PATCH 22/66] drm/i915/ddi: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
A bit more care required here since there are some very few things between the call to encoder->mode_set and encoder->pre_enable. But they're either book-keeping or only matter for the vga port on the pch. So of no concern. Note that with the new sequence we write the infoframes after selecting th

[Intel-gfx] [PATCH 42/66] drm/i915: Make intel_wait_for_pipe_off static

2014-04-24 Thread Daniel Vetter
Noticed while reading around. Signed-off-by: Daniel Vetter --- 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

[Intel-gfx] [PATCH 44/66] drm/i915: Pass port explicitly to intel_ddi_get_hw_state

2014-04-24 Thread Daniel Vetter
Well, the newly created intel_ddi_get_port_state. In general intel_ddi.c has way too intimate knowledge with everyone else as exemplified with all the encoder/connector noodling and the massive exported function list. As a first step explictly pass around the port, first in the encoder callback.

[Intel-gfx] [PATCH 25/66] drm/i915: Make ->update_primary_plane infallible

2014-04-24 Thread Daniel Vetter
Way back we've used this to reject framebuffers with unsupported pixel formats. But since the modesetting reorg with the compute config stage we reject those much earlier and just BUG() in this callback. So switch to a void return type. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_

[Intel-gfx] [PATCH 40/66] drm/i915: Remove spll_refcount for hsw

2014-04-24 Thread Daniel Vetter
SPLL would be a reference clock we could potentially share, especially if we want to use the SSC mode. But currently we don't, so let's rip out this complexity for a simpler conversion to the new display pll framework. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.h | 1 - dri

[Intel-gfx] [PATCH 23/66] drm/i915/dsi: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
Looking at our current dsi driver I note that: - We don't have any slave driver right now. - There's zero support for the hardware state readout and cross check code. - All the modeset state seems to be tracked in the intel_dsi structure instead of the pipe config. Given all that I can't prope

[Intel-gfx] [PATCH 32/66] drm/i915: Shovel hw setup code out of ilk_crtc_mode_set

2014-04-24 Thread Daniel Vetter
Again this code just transforms sw state from the pipe config into hardware state, so we can just move it around. Unfortunately again a few forward declarations since intel_display.c is becoming a bit of a mess. Note that both for i9xx and ironlake code the only things remaining in the ->crtc_mode

[Intel-gfx] [PATCH 39/66] drm/i915: Check hw state in assert_can_disable_lcpll

2014-04-24 Thread Daniel Vetter
All the other checks also check hw state, so checking our software refcounts for the plls looks a bit odd. Also this will simplify the conversion over to the shared dpll framework, which itself has massive amounts of checks to make sure that we never leave a display pll enabled when we shouldn't.

[Intel-gfx] [PATCH 37/66] drm/i915: Extract intel_prepare_shared_dpll

2014-04-24 Thread Daniel Vetter
This is the last piece of code which write state to the hardware in the ironalake ->crtc_mode_set callback. I think we could merge this with the pll->enable hook, but otoh the ordering requirements with the ldvs port are really tricky. Doing the FP0/1 writes up-front before we even prepare the lvd

[Intel-gfx] [PATCH 41/66] drm/i915: Clean up WRPLL/SPLL #defines

2014-04-24 Thread Daniel Vetter
Luckily the bit definitions match, but it's still confusing to use one when handling the other. So sprinkle some OCD over the #defines to make them match and use the right version in each place. Maybe we should unify these definitions completely, but that can always be done sometime in the future.

[Intel-gfx] [PATCH 43/66] drm/i915: Disable pipe before ports on ilk

2014-04-24 Thread Daniel Vetter
The modeset sequence docs are very clear that we should disable the pipe before we switch off any ports, for both pch ports and the cpu edp port. In practice it doesn't seem to matter too much since for non-DP pch ports it only matters that the pch transcoder is still on. And for cpu edp ports it

[Intel-gfx] [PATCH 26/66] drm/i915: More cargo-culted locking for intel_update_fbc

2014-04-24 Thread Daniel Vetter
Just for consistency, this patch won't fix anything really. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b3bd25109ea3..2f46658d6d5

[Intel-gfx] [PATCH 34/66] drm/i915: Extract i9xx_set_pll_dividers

2014-04-24 Thread Daniel Vetter
These two writes are the very last hw writes from the ->crtc_modeset_callback on pre-gen5 hardware. As usual vlv is a bit different, so this here is just warm-up. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 16 +++- 1 file changed, 11 insertions(+), 5 dele

[Intel-gfx] [PATCH 27/66] drm/i915: Sprinkle intel_edp_psr_update over crtc_enable/disable

2014-04-24 Thread Daniel Vetter
My plan here is to split up set_base into a prepare step, which does the pinning, and a commit stage, which updates the hw state. Eventually we should be able to move the prepare step at the beginning of any atomic update. For now I only want to move the commit step into the crtc_enable callbacks.

[Intel-gfx] [PATCH 36/66] drm/i915: Only update shared dpll state when needed

2014-04-24 Thread Daniel Vetter
Instead of every time it isn't active: We only need to do that when the pll is currently unused, i.e. when pll->refcount == 0. For paranoia add a warning for the ibx case where plls have a fixed mapping and hence should always be unused after the call to intel_put_shared_dpll. Signed-off-by: Danie

[Intel-gfx] [PATCH 17/66] drm/i915/dp: Move port A pll setup to g4x_pre_enable_dp

2014-04-24 Thread Daniel Vetter
Only ilk/snb/ivb need the port A pll setup, so move it to the pre_enable hook for those platforms. We can savely do this since on those platforms there's nothing that touches the hardware between the encoder->mode_set and the encoder->pre_enable calls. Also add a comment that port A is ilk+ only.

[Intel-gfx] [PATCH 18/66] drm/i915/dp: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
With all the preceding refactoring the dp mode_set callback only computes a bit of state (all derived from the pipe config) and also writes the eld. As long as we do that before we enable the audio bit or depend upon the correct value in intel_dp->DP we'll be fine. No other hw state is touched. W

[Intel-gfx] [PATCH 15/66] drm/i915: Simplify audio handling on DDI ports

2014-04-24 Thread Daniel Vetter
There's no need to check whether audio is enabled (which for ddi ports is done through the crtc->eld_vld flag) since at the cost of a potentially unecessary register rmw cycle we can unconditionally do this. Note that the edp check is just paranoia since we won't ever call the write_eld function f

[Intel-gfx] [PATCH 13/66] drm/i915: state readout and cross checking for limited_color_range

2014-04-24 Thread Daniel Vetter
At least on those platforms which have a simple bit and don't rely on the fully programmable CSC unit to do this. Note that with the current code this includes CHV, but I guess that platform will match BYT. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 9 + dri

[Intel-gfx] [PATCH 19/66] drm/i915/hdmi: Remove redundant IS_VLV checks

2014-04-24 Thread Daniel Vetter
Those functions are only used on vlv platforms, so no need to check. Especially if we're not too consistent about it. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_hdmi.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i

[Intel-gfx] [PATCH 12/66] drm/i915/sdvo: Use pipe_config->limited_color_range consistently

2014-04-24 Thread Daniel Vetter
We in the pre_enable hook we should only rely on the pipe config and not on some other state set through properties or detect functions. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_sdvo.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/

[Intel-gfx] [PATCH 16/66] drm/i915: Track has_audio in the pipe config

2014-04-24 Thread Daniel Vetter
Including state readout and cross-checking. This allows us to get rid of crtc->eld_vld on hsw+. It also means that fastboot will be unhappy if the BIOS hasn't set up the audio routing like we want it too. Wrt fastboot and external screens I see a few options: - Don't. - Try to fix up eld, infofram

[Intel-gfx] [PATCH 10/66] drm/i915/hdmi: Enable hdmi mode on g4x, too

2014-04-24 Thread Daniel Vetter
For compliance we really should be sending NULL infoframes always when we detect a hdmi capable monitor. Also remove the now redudant setting for the has_audio case and enforce that audio is only possible with a hdmi sink. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_hdmi.c | 5 ++

[Intel-gfx] [PATCH 24/66] drm/i915: Stop calling encoder->mode_set

2014-04-24 Thread Daniel Vetter
All the callbacks are gone now. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 33 ++--- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f8ebe9b5

[Intel-gfx] [PATCH 01/66] drm/i915: Make encoder->mode_set callbacks optional

2014-04-24 Thread Daniel Vetter
For a bunch of reasons we want to move away from the ->mode_set callbacks: All hw state setup needs to move into ->enable hooks (so that DOMS can do runtime pm) and all the configuration setup needs to move into the compute_config functions. To start with this make the enocer->mode_set callback op

[Intel-gfx] [PATCH 09/66] drm/i915/sdvo: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
SDVO is used by both crtcs using the i9xx_ and the ironlake_ functions. For both cases there is nothing between the encoder->mode_set and the encoder->pre_enable calls that touches the hardware. The vlv_ functions are different since they enable the pll before the ->pre_enable hook. But SDVO isn't

[Intel-gfx] [PATCH 07/66] drm/i915/tv: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
Currently for the i9xx crtc hooks there's nothing between the call to encoder->mode_set and encoder->pre_enable which touches the hardware. Therefore, since tv is only used on gen3/4, we can just move the hook. Yay for easy cases! The only other important thing to check is that the new ->pre_enab

[Intel-gfx] [PATCH 03/66] drm/i915/tv: extract set_tv_mode_timings

2014-04-24 Thread Daniel Vetter
intel_tv_mode_set is just too big. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_tv.c | 111 ++-- 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index bafe92e317d5

[Intel-gfx] [PATCH 05/66] drm/i915/tv: De-magic device check

2014-04-24 Thread Daniel Vetter
We only support TV-out on gen3/4 mobile platforms, and i915gm is the only one that matches. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_tv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index

[Intel-gfx] [PATCH 04/66] drm/i915/tv: extract set_color_conversion

2014-04-24 Thread Daniel Vetter
intel_tv_mode_set is still too bug. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_tv.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 04bf8caaac0c..a6a

[Intel-gfx] [PATCH 11/66] drm/i915: Track hdmi mode in the pipe config

2014-04-24 Thread Daniel Vetter
Also add state readout and cross-check support. The only invasive change is wiring up the new flag to the ->set_infoframes callbacks. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_ddi.c | 9 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.

[Intel-gfx] [PATCH 08/66] drm/i915/crt: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
We only set a few bits in the ADPA register, which we then read back in the enable/disable hooks. So we can just move that bit of state computation code to the place where we need it since setting these bits without enabling the CRT encoder has no effects. The only exceptions are the hotplug bits

[Intel-gfx] [PATCH 06/66] drm/i915/tv: Rip out pipe-disabling nonsense from ->mode_set

2014-04-24 Thread Daniel Vetter
The pipe and plane _are_ disabled when we call this. So replace it all with the corresponding assert (as self-documenting code) and rip out all the lore. Checking for a disabled plane would require us to export those macros from intel_display.c, but if the pipe is off the plane isn't working eithe

[Intel-gfx] [PATCH 14/66] drm/i915/sdvo: use config->has_hdmi_sink

2014-04-24 Thread Daniel Vetter
This way we can rely on the state cross-checker to have a bit assurance that we'll get it right. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_sdvo.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu

[Intel-gfx] [PATCH 02/66] drm/i915/dvo: Remove ->mode_set callback

2014-04-24 Thread Daniel Vetter
Currently for the i9xx crtc hooks there's nothing between the call to encoder->mode_set and encoder->pre_enable which touches the hardware. Therefore, since dvo is only used on gen2, we can just move the hook. Yay for easy cases! The only other important thing to check is that the new ->pre_enabl

[Intel-gfx] [PATCH 00/66] runtime pm for DPMS

2014-04-24 Thread Daniel Vetter
Hi all, So this is a little patch series that started very innocently as a small cleanup in prep for some of the bigger features and then got out of hand. It now implements runtime pm support for DPMS on everything that supports it. Still rather lightly tested because of too many distractions thi

[Intel-gfx] [PATCH 1/2] lib: extract kmstest_set_connector_dpms

2014-04-24 Thread Daniel Vetter
Signed-off-by: Daniel Vetter --- lib/igt_kms.c | 28 lib/igt_kms.h | 1 + tests/kms_flip.c| 36 tests/testdisplay.c | 36 4 files changed, 37 insertions(+), 64 deletions(-) dif

[Intel-gfx] [PATCH 2/2] tests/pm_pc8: subtests for runtime pm for dpms

2014-04-24 Thread Daniel Vetter
Very basic since I lack a bit ideas. After all with the latest patches runtime pm doesn't make much a difference between dpms off and disabling the outputs completely with SetCrtc. Signed-off-by: Daniel Vetter --- tests/pm_pc8.c | 22 +- 1 file changed, 21 insertions(+), 1 de

Re: [Intel-gfx] [PATCH v2 23/25] drm/i915: add various missing GTI/Gunit register definitions

2014-04-24 Thread Imre Deak
On Thu, 2014-04-24 at 18:17 -0300, Rodrigo Vivi wrote: > Honestly I don't like patches that adds regs definitions without > actually using them. I usually add them too in the patch using them first. In this case I thought that since there are quite a lot of them, it's easier for the reviewer since

Re: [Intel-gfx] [PATCH] drm/i915: Do not access stolen memory directly by the CPU, even for error capture

2014-04-24 Thread Ben Widawsky
On Wed, Feb 12, 2014 at 07:18:40PM +, Chris Wilson wrote: > For stolen pages, since it is verboten to access them directly on many > architectures, we have to read them through the GTT aperture. If they > are not accessible through the aperture, then we have to abort. > > This was complicated

[Intel-gfx] [PATCH 3/3] drm/i915: add i915.dp_link_train_policy option

2014-04-24 Thread Paulo Zanoni
From: Paulo Zanoni We still have way too many bugs with DP link training. We keep switching between "narrow and fast" and "wide and slow", we recently added 5GHz support, and whenever there's a bug report, we have to ask people to apply patches and test them. Wouldn't it be so much better if we

[Intel-gfx] [PATCH 2/3] drm/i915: extract intel_dp_compute_link_config

2014-04-24 Thread Paulo Zanoni
From: Paulo Zanoni Extract this function to make the input and output parameters more clear to the code reader. I also have plans to allow ways to change the current parameters, so the code will get even more complicated without the refactor. I also have plans to add alternative implementations

[Intel-gfx] [PATCH 1/3] drm/i915: consider the source max DP lane count too

2014-04-24 Thread Paulo Zanoni
From: Paulo Zanoni Even if the panel claims it can support 4 lanes, there's the possibility that the HW can't, so consider this while selecting the max lane count. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 20 ++-- 1 file changed, 18 insertions(+), 2 del

Re: [Intel-gfx] [PATCH v2 23/25] drm/i915: add various missing GTI/Gunit register definitions

2014-04-24 Thread Rodrigo Vivi
Honestly I don't like patches that adds regs definitions without actually using them. But also, On Mon, Apr 14, 2014 at 2:24 PM, Imre Deak wrote: > Needed by the VLV S0ix context save/restore helpers. > > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/i915/i915_reg.h | 43 > +

Re: [Intel-gfx] [PATCH v2 10/25] drm/i915: gen2: move error capture of IER to its correct place

2014-04-24 Thread Rodrigo Vivi
Although there are more work to be done I don't see any issue or damage by putting it already to the correct place. So, feel free to use: Reviewed-by: Rodrigo Vivi On Wed, Apr 16, 2014 at 9:57 AM, Imre Deak wrote: > On Wed, 2014-04-16 at 15:22 +0300, Ville Syrjälä wrote: >> On Mon, Apr 14, 2014

Re: [Intel-gfx] [PATCH v2 01/25] drm/i915: vlv: clean up GTLC wake control/status register macros

2014-04-24 Thread Rodrigo Vivi
Apparently Ville already Reviewed this one, but since I was checking the doc and it was right feel free to also use: Reviewed-by: Rodrigo Vivi same for next 2 patches. On Mon, Apr 14, 2014 at 2:24 PM, Imre Deak wrote: > These will be needed by the upcoming VLV RPM helpers. > > Signed-off-by: Im

Re: [Intel-gfx] [PATCH v4] drm/i915: get a runtime PM ref for the deferred GPU reset work

2014-04-24 Thread Rodrigo Vivi
Makes sense for me, so Reviewed-by: Rodrigo Vivi On Tue, Apr 22, 2014 at 7:09 PM, Imre Deak wrote: > Atm we can end up in the GPU reset deferred work in D3 state if the last > runtime PM reference is dropped between detecting a hang/scheduling the > work and executing the work. At least one such

Re: [Intel-gfx] [bisect result] Re: 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Chris Wilson
On Thu, Apr 24, 2014 at 09:40:38PM +0200, Pavel Machek wrote: > Hi! > > > And if you can indeed reliably reproduce this a bisect could be really > > useful. > > And we have a winner here :-) > > Ok, it was not as painfull as I feared. > > It does not revert cleanly, but doing it by hand was no

[Intel-gfx] [PATCH] fix i915 regression: only top 20% of screen works in X

2014-04-24 Thread Pavel Machek
Fix regression where only 20% of screen works in X. This is manual revert of a51435a3137ad8ae75c288c39bd2d8b2696bae8f. Signed-off-by: Pavel Machek diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 6bc68bd..cf63c67 100644 --- a/drivers/gpu/drm

[Intel-gfx] [bisect result] Re: 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Pavel Machek
Hi! > And if you can indeed reliably reproduce this a bisect could be really useful. And we have a winner here :-) Ok, it was not as painfull as I feared. It does not revert cleanly, but doing it by hand was not that bad. Best regards, P

[Intel-gfx] [partial bisect] Re: 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Pavel Machek
Hi! > And if you can indeed reliably reproduce this a bisect could be > really useful It seems reliable, yes. So far I got: Pavel git bisect start # good: [455c6fdbd219161bd09b1165f11699d6d73de11c] Linux 3.14 git bisect good 455c6f

Re: [Intel-gfx] [RFC 0/3] render state initialization (bdw rc6)

2014-04-24 Thread Kristen Carlson Accardi
On Tue, 22 Apr 2014 20:19:41 +0300 Mika Kuoppala wrote: > Hi, > > Here are patches to initialize first render context to a hopefully, > valid state. If pipeline/context is not initialized and we enter rc6 on bdw, > the render ring can hung on the first batch submitted. That is atleast > the hyp

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Do not call retire_requests from wait_for_rendering

2014-04-24 Thread Volkin, Bradley D
On Thu, Apr 24, 2014 at 02:22:39AM -0700, Chris Wilson wrote: > On Fri, Mar 28, 2014 at 03:58:25PM -0700, Volkin, Bradley D wrote: > > On Mon, Mar 17, 2014 at 05:21:55AM -0700, Chris Wilson wrote: > > > @@ -1949,58 +1956,58 @@ static unsigned long > > > __i915_gem_shrink(struct drm_i915_private *d

Re: [Intel-gfx] [PATCH 3/3] tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact

2014-04-24 Thread Volkin, Bradley D
Reviewed-by: Brad Volkin On Thu, Apr 24, 2014 at 10:07:32AM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > This adds a small benchmark for the new userptr functionality. > > Apart from basic surface creation and destruction, also tested is the > impact of having userptr surfaces in th

Re: [Intel-gfx] [PATCH 07/14] drm/i915: Validate BDB section before reading

2014-04-24 Thread Kumar, Shobhit
On 4/19/2014 2:34 AM, Rodrigo Vivi wrote: From: Chris Wilson Make sure that the whole BDB section is within the MMIO region prior to accessing it contents. That we don't read outside of the secion is left up to the individual section parsers. Signed-off-by: Chris Wilson Signed-off-by: Rodrigo

Re: [Intel-gfx] [PATCH 06/14] drm/i915: Validate VBT header before trusting it

2014-04-24 Thread Kumar, Shobhit
On 4/19/2014 2:34 AM, Rodrigo Vivi wrote: From: Chris Wilson Be we read and chase pointers from the VBT, it is prudent to make sure that those accesses are wholly contained within the MMIO region, or else we may cause a kernel panic during boot. Signed-off-by: Chris Wilson Signed-off-by: Rodr

Re: [Intel-gfx] [PATCH] mm: Throttle shrinkers harder

2014-04-24 Thread Chris Wilson
On Thu, Apr 24, 2014 at 08:21:58AM -0700, Dave Hansen wrote: > On 04/23/2014 10:58 PM, Chris Wilson wrote: > > [ 4756.750938] Node 0 DMA free:14664kB min:32kB low:40kB high:48kB > > active_anon:0kB inactive_anon:1024kB active_file:0kB inactive_file:4kB > > unevictable:0kB isolated(anon):0kB isola

Re: [Intel-gfx] [PATCH] mm: Throttle shrinkers harder

2014-04-24 Thread Dave Hansen
On 04/23/2014 10:58 PM, Chris Wilson wrote: > [ 4756.750938] Node 0 DMA free:14664kB min:32kB low:40kB high:48kB > active_anon:0kB inactive_anon:1024kB active_file:0kB inactive_file:4kB > unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15992kB > managed:15908kB mlocked:0kB dirty:0k

Re: [Intel-gfx] [PATCH V4 0/6] drm/i915: Add the support of dual BSD rings on BDW GT3

2014-04-24 Thread Daniel Vetter
On Thu, Apr 17, 2014 at 10:37:34AM +0800, Zhao Yakui wrote: > This is the patch set that tries to add the support of dual BSD rings on BDW > GT3. Based on hardware spec, the BDW GT3 has two independent BSD rings, which > can be used to process the video commands. To be simpler, it is transparent >

Re: [Intel-gfx] [PATCH V4 3/6] drm/i915:Initialize the second BSD ring on BDW GT3 machine

2014-04-24 Thread Daniel Vetter
On Thu, Apr 17, 2014 at 10:37:37AM +0800, Zhao Yakui wrote: > Based on the hardware spec, the BDW GT3 machine has two independent > BSD ring that can be used to dispatch the video commands. > So just initialize it. > > V3->V4: Follow Imre's comment to do some minor updates. For example: > more com

Re: [Intel-gfx] 3.15-rc2: i915 regression: only top 20% of screen works in X

2014-04-24 Thread Jiri Kosina
On Thu, 24 Apr 2014, Pavel Machek wrote: > > That says that i915.ko failed to initialise the GPU (or rather the GPU > > wasn't responding) and bailed during module load. The key line here is > > > [drm:init_ring_common] *ERROR* render ring initialization failed ctl > > 0001f001 head 2034 tai

Re: [Intel-gfx] [PATCH 2/4] drm/i915: add intel_encoder_power_get/put

2014-04-24 Thread Daniel Vetter
On Thu, Apr 24, 2014 at 05:11:10PM +0300, Ville Syrjälä wrote: > On Thu, Apr 24, 2014 at 10:49:28AM -0300, Paulo Zanoni wrote: > > From: Paulo Zanoni > > > > This was suggested by Chris on his review to the first version of > > "drm/i915: get power domain in case the BIOS enabled eDP VDD". Well,

  1   2   >