[Intel-gfx] [BUG kernel 3.11+] i915: pipe state doesn't match

2013-09-06 Thread Knut Petersen
Someone might be interested ... kernel 2e032852245b3dcfe5461d7353e34eb6da095ccf. [0.00] Linux version 3.11.0-main+ (k...@linux-ktth.site) (gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux) ) #34 PREEMPT Fri Sep 6 09:46:35 CEST 2013 [2.258908] Linux agpgart in

Re: [Intel-gfx] [PULL] drm-intel-fixes

2013-09-06 Thread Daniel Vetter
On Fri, Sep 06, 2013 at 09:49:06AM +0200, Daniel Vetter wrote: > Blergh, forgotten to cc: mailing lists ... And then Ville pointed out on irc that I'm actually missing the vgacon->fbcon takeover fix. Fail friday it seems, new pull request below. -Daniel The following changes since commit f33bca

[Intel-gfx] [PATCH 08/11] drm/i915: Make i9xx_crtc_clock_get() work for PCH DPLLs

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä Just add the 120MHz reference clock case, and magically the function appears to be ready to for PCH DPLLs. Now, 120MHz might not always be correct, but we're already using hardocoded values for other platforms, so the situation isn't getting much worse. Signed-off-by: Ville

[Intel-gfx] [PATCH v2 02/11] drm/i915: Make adjusted_mode.clock non-pixel multiplied

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä It would be easier if adjusted_mode.clock would be the pipe pixel clock, and it actually is, except for the cases where pixel_multiplier > 1. So let's change intel_sdvo to use port_clock as the multiplied clock, and then we can leave adjusted_mode.clock as pipe pixel clock.

[Intel-gfx] [PATCH 05/11] drm/i915: Make intel_fuzzy_clock_check() take in arbitrary clocks

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä We want to do fuzzy clock checks for other things besides adjusted_mode.clock, so just pass two two clocks to compare to intel_fuzzy_clock_check(). Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 11 --- 1 file chang

[Intel-gfx] [PATCH 09/11] drm/i915: Fix port_clock and adjusted_mode.clock readout all over

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä Now that adjusted_mode.clock no longer contains the pixel_multiplier, we can kill the get_clock() callback and instead do the clock readout in get_pipe_config(). Also i9xx_crtc_clock_get() can now extract the frequency of the PCH DPLL, so use it to populate port_clock accurat

[Intel-gfx] [PATCH 06/11] drm/i915: Add intel_dotclock_calculate()

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä Extract the code to calculate the dotclock from the link clock and M/N values into a new function from ironlake_crtc_clock_get(). The new function can be used to calculate the dotclock for both FDI and DP cases. Also simplify the code a bit along the way. Signed-off-by: Vil

[Intel-gfx] [PATCH v2 11/11] drm/i915: Add fuzzy clock check for port_clock

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä Check and dump for port_clock. v2: Also dump port_clock Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/g

[Intel-gfx] [PATCH v2 10/11] drm/i915: Add PIPE_CONF_CHECK_CLOCK_FUZZY()

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä Add a new pipe config check macro PIPE_CONF_CHECK_CLOCK_FUZZY() to make it trivial and error proof to compare clocks in a fuzzy manner. v2: Drop extra curly braces Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 23

[Intel-gfx] [PATCH 07/11] drm/i915: Make i9xx_crtc_clock_get() use dpll_hw_state

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä We already extract the DPLL state to pipe_config, so let's make use of it in i9xx_crtc_clock_get() and avoid the register reads. This will also make the function closer to being useable with PCH DPLL since the registers for those live in a different address. Also kill the us

[Intel-gfx] [PATCH 04/11] drm/i915: Add state readout and checking for has_dp_encoder and dp_m_n

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä Add functions to read out the CPU and PCH transcoder M/N values, and use them to fill out the pipe config dp_m_n information. And while at it populate has_dp_encoder too. Also refactor ironlake_get_fdi_m_n_config() to simply call the new intel_cpu_transcoder_get_m_n() functio

[Intel-gfx] [PATCH v2 03/11] drm/i915: Add support for pipe_bpp readout

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä On CTG+ read out the pipe bpp setting from hardware and fill it into pipe config. Also check it appropriately. v2: Don't do the pipe_bpp extraction inside the PCH only code block on ILK+. Avoid the PIPECONF read as we already have read it for the PIPECONF_EANBLE c

[Intel-gfx] [PATCH 01/11] drm/i915: Don't factor in pixel multplier when deriving dotclock from link clock and M/N values

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä We feed the non-multiplied clock to intel_link_compute_m_n(), so the opposite operation should use the same order of operations. So we just multiply by pixel_multiplier in the end now. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_dis

[Intel-gfx] [PATCH 00/11] drm/i915: adjusted_mode.clock vs. port_clock v3

2013-09-06 Thread ville . syrjala
Another day, another attempt. This series replaces the earlier attempt: [PATCH 0/8] drm/i915: adjusted_mode.clock vs. port_clock v2 The main new idea is to make it the encoders' responsibility to calculate adjusted_mode.clock. In order to do that I had to add DP M/N extraction and i9xx_crtc_cloc

[Intel-gfx] [i-g-t] Stereo 3D

2013-09-06 Thread Damien Lespiau
://cgit.freedesktop.org/~damien/intel-gpu-tools/log/?h=20130906-stereo-3d -- Damien ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH i-g-t 02/12] lib: Add a helper to paint a PNG using cairo

2013-09-06 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/drmtest.c | 28 lib/drmtest.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index eca792c..f760028 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -1338,6 +1338,34 @@ void kmstest_paint_t

[Intel-gfx] [PATCH i-g-t 09/12] testdisplay: Untangle dump_info() from the main testing loop

2013-09-06 Thread Damien Lespiau
-i is just supposed to show some information about the DRM resources. Right now it works in a quite convoluted way. Untangle this to call dump_info() when -i is given, exit the program and be done with it. Signed-off-by: Damien Lespiau --- tests/testdisplay.c | 30 +++---

[Intel-gfx] [PATCH i-g-t 05/12] testdisplay: Move the code sanitizing depth into main()

2013-09-06 Thread Damien Lespiau
It'll be shared by the set_mode() and set_3d_mode() functions. Signed-off-by: Damien Lespiau --- tests/testdisplay.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 6c39b68..c3a0d04 100644 --- a/tests/testdisplay

[Intel-gfx] [PATCH i-g-t 07/12] testdisplay: Properly handle the life cycle of framebuffers

2013-09-06 Thread Damien Lespiau
When cycling through the modes, let's make sure to free the previous framebuffers. This is the perfect occasion to use kmstest_remove_fb(). Signed-off-by: Damien Lespiau --- tests/testdisplay.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/t

[Intel-gfx] [PATCH i-g-t 06/12] testdisplay: Map the fb inside paint_color_key()

2013-09-06 Thread Damien Lespiau
So the code for this is self-contained. This goes along the way of reducing the number of global variables in testdisplay. Take the opportunity to unmap the fb after use as well. Signed-off-by: Damien Lespiau --- tests/testdisplay.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletion

[Intel-gfx] [PATCH i-g-t 01/12] lib: Dump information about the supported 3D stereo formats

2013-09-06 Thread Damien Lespiau
When dumping the details of a mode, let's add the 3D formats the mode supports. Signed-off-by: Damien Lespiau --- lib/drmtest.c | 37 +++-- lib/drmtest.h | 9 + 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c

[Intel-gfx] [PATCH i-g-t 10/12] testdisplay: Free the array of connectors

2013-09-06 Thread Damien Lespiau
That's an array we allocated earlier in this function. Let's be symetric and free it once done. Signed-off-by: Damien Lespiau --- tests/testdisplay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 3a9eab7..00d777a 100644 --- a/tests/testdisp

[Intel-gfx] [PATCH i-g-t 04/12] lib: Add a helper to write a png from a struct kmstest_fb

2013-09-06 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- lib/drmtest.c | 11 +++ lib/drmtest.h | 1 + 2 files changed, 12 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index 12bd0ff..f7de232 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -1531,6 +1531,17 @@ void kmstest_remove_fb(int fd, struct

[Intel-gfx] [PATCH i-g-t 03/12] lib: Split create_image_surface() out of create_cairo_ctx()

2013-09-06 Thread Damien Lespiau
So we can use it in the next commit. Signed-off-by: Damien Lespiau --- lib/drmtest.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index f760028..12bd0ff 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -1483,9 +1483,8 @@ static

[Intel-gfx] [PATCH i-g-t 12/12] testdisplay: Test the stereo 3D modes

2013-09-06 Thread Damien Lespiau
Now that modes have flags to describe which 3d formats the sink supports, it's time to test them. The new test cycles through the supported 3D formats and paint 3D stereoscopic images taken from publicly available samples: http://www.quantumdata.com/apps/3D/sample_BMP.asp Signed-off-by: Damien

[Intel-gfx] [PATCH i-g-t 11/12] testdisplay: Provide a full path when opening pngs

2013-09-06 Thread Damien Lespiau
This way one doesn't have to be in tests/ for testsdisplay to be able to open pass.png. Signed-off-by: Damien Lespiau --- tests/Makefile.am | 5 - tests/testdisplay.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index dd63bda.

[Intel-gfx] [PATCH i-g-t 08/12] testdisplay: Fix CRTS typo

2013-09-06 Thread Damien Lespiau
Signed-off-by: Damien Lespiau --- tests/testdisplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 6e47ae2..f94e5c4 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -366,7 +366,7 @@ set_mode(struct connector *c)

Re: [Intel-gfx] [PATCH] drm/i915: Fix issues caused from get_clock elimination

2013-09-06 Thread Daniel Vetter
On Fri, Sep 06, 2013 at 04:24:17PM +0300, ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > For non-PCH encoders ironlake_crtc_clock_get() attempts to extract > adjusted_mode.clock from port_clock. But now that we call > ironlake_crtc_clock_get() before the encoders' get_config() tha

Re: [Intel-gfx] [PATCH 2/2] drm/i915: include hangcheck action and score in error_state

2013-09-06 Thread Daniel Vetter
On Fri, Sep 06, 2013 at 04:03:28PM +0300, Mika Kuoppala wrote: > Score and action reveals what all the rings were doing > and why hang was declared. Add idle state so that > we can distinguish between waiting and idle ring. > > v2: - add idle as a hangcheck action > - consensed hangcheck statu

[Intel-gfx] Updated drm-intel-testing

2013-09-06 Thread Daniel Vetter
Hi all, Nothing earth-shattering yet for 3.13, and most of the new stuff is bugfixes for 3.12. Since I've already sent a pull for those to Dave I'll only list the feature stuff here now: - Basic mipi dsi support from Jani. Not yet converted over to drm_bridge since that was too fresh, but the po

[Intel-gfx] [PATCH] drm/i915: Fix issues caused from get_clock elimination

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä For non-PCH encoders ironlake_crtc_clock_get() attempts to extract adjusted_mode.clock from port_clock. But now that we call ironlake_crtc_clock_get() before the encoders' get_config() that no longer works. To fix the problem also call ironlake_crtc_clock_get() before get_con

[Intel-gfx] [PATCH v2] drm/i915: Add support for pipe_bpp readout

2013-09-06 Thread ville . syrjala
From: Ville Syrjälä On CTG+ read out the pipe bpp setting from hardware and fill it into pipe config. Also check it appropriately. v2: Don't do the pipe_bpp extraction inside the PCH only code block on ILK+. Avoid the PIPECONF read as we already have read it for the PIPECONF_EANBLE c

[Intel-gfx] [PATCH 2/2] drm/i915: include hangcheck action and score in error_state

2013-09-06 Thread Mika Kuoppala
Score and action reveals what all the rings were doing and why hang was declared. Add idle state so that we can distinguish between waiting and idle ring. v2: - add idle as a hangcheck action - consensed hangcheck status to single line (Chris) - mark active explicitly when we are making pr

[Intel-gfx] Need expert help overriding malloc/free to solve incompatiblity problem of components built w/ different version of GCC.

2013-09-06 Thread Farrell, Robert L
In VPG HW we are looking to improve our validation coverage by calling fulsim DLL (reference model) from VCS (Verilog simulator). Synopsis only support a specific version of GCC (4.2.2 I think) for their VCS product. Fulsim is using C++11 and requires GCC 4.6+. I can get both version of libc/libs

Re: [Intel-gfx] [PATCH] drm/i915: add support for per-pipe power sequencing on vlv

2013-09-06 Thread Jani Nikula
On Fri, 06 Sep 2013, Daniel Vetter wrote: > On Fri, Sep 06, 2013 at 07:40:05AM +0300, Jani Nikula wrote: >> VLV has per-pipe PP registers. Set up power sequencing on mode set. The >> connector init time setup is problematic, since we don't have a pipe at >> that time. Cook up something. >> >> v2:

Re: [Intel-gfx] [PATCH 1/2] drm/i915: ban badly behaving contexts

2013-09-06 Thread Chris Wilson
On Fri, Aug 30, 2013 at 04:19:28PM +0300, Mika Kuoppala wrote: > Now when we have mechanism in place to track which context > was guilty of hanging the gpu, it is possible to punish > for bad behaviour. > > If context has recently submitted a faulty batchbuffers guilty of > gpu hang and submits an

Re: [Intel-gfx] [PATCH 2/2] drm/i915: add hangcheck action and score to error state

2013-09-06 Thread Chris Wilson
On Fri, Aug 30, 2013 at 04:19:29PM +0300, Mika Kuoppala wrote: > Score and action reveal what the rings were doing > when hang was declared. > > Signed-off-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/i915_drv.h |2 ++ > drivers/gpu/drm/i915/i915_gpu_error.c | 22 ++

Re: [Intel-gfx] [PATCH] drm/i915: add support for per-pipe power sequencing on vlv

2013-09-06 Thread Daniel Vetter
On Fri, Sep 06, 2013 at 07:40:05AM +0300, Jani Nikula wrote: > VLV has per-pipe PP registers. Set up power sequencing on mode set. The > connector init time setup is problematic, since we don't have a pipe at > that time. Cook up something. > > v2: > - use vlv_power_sequencer_pipe() also in _pp_{

Re: [Intel-gfx] [PATCH] drm/i915: Delay disabling of VGA memory until vgacon->fbcon handoff is done

2013-09-06 Thread Daniel Vetter
On Thu, Sep 05, 2013 at 08:40:52PM +0300, ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > When transitioning away from vgacon the system tries to save the > current contents of the VGA memory, so that it can be cleanly handed > off to fbcon (or whatever comes afterwards). > > The

Re: [Intel-gfx] [PATCH] drm/i915: fix gen4 digital port hotplug definitions

2013-09-06 Thread Jan Niggemann
Hi list, Am 26.07.2013 21:46, schrieb Daniel Vetter: On Fri, Jul 26, 2013 at 07:54:22PM +0200, Daniel Vetter wrote: On Fri, Jul 26, 2013 at 01:21:48PM +0300, Jani Nikula wrote: > On Fri, 26 Jul 2013, Daniel Vetter wrote: > > Apparently Bspec is wrong in this case here even for gm45. Note that

Re: [Intel-gfx] [PULL] drm-intel-fixes

2013-09-06 Thread Daniel Vetter
Blergh, forgotten to cc: mailing lists ... -Daniel On Fri, Sep 6, 2013 at 9:48 AM, Daniel Vetter wrote: > Hi Dave, > > Already a decent pile of fixes and a few stragglers for the merge window. > Nothing in here though to appease Linus :( > - Early stolen mem reservation from Jesse in x86 boot cod

Re: [Intel-gfx] [PATCH] drm/i915: name intel dp hooks per platform

2013-09-06 Thread Ville Syrjälä
On Fri, Sep 06, 2013 at 07:38:29AM +0300, Jani Nikula wrote: > In line with the rest of the code base. No functional changes. > > v2: also s/intel_pre_enable_dp/g4x_pre_enable_dp/ for consistency (Ville) > > Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä for the series. > --- > drive

Re: [Intel-gfx] [PATCH] drm/i915: try not to lose backlight CBLV precision

2013-09-06 Thread Daniel Vetter
On Fri, Sep 06, 2013 at 07:53:39AM +0300, Jani Nikula wrote: > > Daniel, ping? Oops, now merged to -fixes, thanks for the poke. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Intel-gfx mail

Re: [Intel-gfx] [PATCH] drm/i915: try not to lose backlight CBLV precision

2013-09-06 Thread Jani Nikula
Daniel, ping? On Fri, 23 Aug 2013, Jani Nikula wrote: > ACPI has _BCM and _BQC methods to set and query the backlight > brightness, respectively. The ACPI opregion has variables BCLP and CBLV > to hold the requested and current backlight brightness, respectively. > > The BCLP variable has range

[Intel-gfx] [PATCH] drm/i915: add support for per-pipe power sequencing on vlv

2013-09-06 Thread Jani Nikula
VLV has per-pipe PP registers. Set up power sequencing on mode set. The connector init time setup is problematic, since we don't have a pipe at that time. Cook up something. v2: - use vlv_power_sequencer_pipe() also in _pp_{ctrl,stat}_reg() - use PANEL_PORT_SELECT_DPC_VLV (Ville) v3: make check

[Intel-gfx] [PATCH] drm/i915: name intel dp hooks per platform

2013-09-06 Thread Jani Nikula
In line with the rest of the code base. No functional changes. v2: also s/intel_pre_enable_dp/g4x_pre_enable_dp/ for consistency (Ville) Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_dp.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drive