Re: [Intel-gfx] [PATCH] drm/i915/ringbuffer: exclude last 2 cachelines on 845g on all callpaths

2012-10-30 Thread Daniel Vetter
On Mon, Oct 29, 2012 at 04:59:26PM +0200, Mika Kuoppala wrote: > Make intel_render_ring_init_dri and intel_init_ring_buffer symmetrical > with regards of workaround introduced by: > > commit 27c1cbd06a7620b354cbb363834f3bb8df4f410d > Author: Chris Wilson > Date: Mon Apr 9 13:59:46 2012 +0100 >

Re: [Intel-gfx] [PATCH 3/3] drm/i915: don't rewrite the GTT on resume v2

2012-10-30 Thread Jesse Barnes
On Tue, 30 Oct 2012 21:32:17 + Chris Wilson wrote: > On Tue, 30 Oct 2012 18:59:31 +0100, Daniel Vetter wrote: > > On Fri, Oct 26, 2012 at 10:08:38AM -0700, Jesse Barnes wrote: > > > The BIOS shouldn't be touching this memory across suspend/resume, so > > > just leave it alone. This saves us

Re: [Intel-gfx] [PATCH 3/3] drm/i915: don't rewrite the GTT on resume v2

2012-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2012 at 10:32 PM, Chris Wilson wrote: > On Tue, 30 Oct 2012 18:59:31 +0100, Daniel Vetter wrote: >> On Fri, Oct 26, 2012 at 10:08:38AM -0700, Jesse Barnes wrote: >> > The BIOS shouldn't be touching this memory across suspend/resume, so >> > just leave it alone. This saves us ~50m

Re: [Intel-gfx] [PATCH 9/9] drm/i915: create the DDI encoder

2012-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2012 at 12:51:11PM +, Damien Lespiau wrote: > On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > > From: Paulo Zanoni > > > > Now intel_ddi_init is just like intel_hdmi_init and intel_dp_init: it > > inits the encoder and then calls the proper init_connector functions. >

Re: [Intel-gfx] [PATCH 3/3] drm/i915: don't rewrite the GTT on resume v2

2012-10-30 Thread Chris Wilson
On Tue, 30 Oct 2012 18:59:31 +0100, Daniel Vetter wrote: > On Fri, Oct 26, 2012 at 10:08:38AM -0700, Jesse Barnes wrote: > > The BIOS shouldn't be touching this memory across suspend/resume, so > > just leave it alone. This saves us ~50ms on resume on my T420. > > > > v2: change gtt restore defa

Re: [Intel-gfx] [PATCH] drm/i915: Fix HSW power well control state read

2012-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2012 at 07:16:34PM +0800, Zhenyu Wang wrote: > Fix power well control state by reading real register offset. > > Signed-off-by: Zhenyu Wang Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffw

Re: [Intel-gfx] [PATCH] drm/i915: Flush using only the correct base address register

2012-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2012 at 09:01:57AM -0200, Paulo Zanoni wrote: > Hi > > 2012/10/29 Damien Lespiau : > > From: Damien Lespiau > > > > We were writing DSP_ADDR and DSP_SURF unconditionally. This did not > > trigger an unclaimed write before HSW as the address of DSP_ADDR has > > been repurposed as D

[Intel-gfx] [PATCH 2/2] drm/i915: add async flip support on gen7

2012-10-30 Thread Jesse Barnes
Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/i915_drv.h |3 ++- drivers/gpu/drm/i915/i915_reg.h |2 ++ drivers/gpu/drm/i915/intel_display.c | 30 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_d

[Intel-gfx] [PATCH 1/2] drm: add flags argument to crtc page_flip callback

2012-10-30 Thread Jesse Barnes
This lets us pass down flags the drivers might be interested in, e.g. async. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/drm_crtc.c|2 +- drivers/gpu/drm/exynos/exynos_drm_crtc.c |5 +++-- drivers/gpu/drm/i915/intel_display.c |3 ++- drivers/gpu/drm/nouveau/

[Intel-gfx] [RFC] Async flips

2012-10-30 Thread Jesse Barnes
The hw supports async flips through the render ring, so why not expose it? It gives us one more "tear me harder" option we can use in the DDX and for other cases where simply flipping to the latest buffer is more important than visual quality. Jesse ___

Re: [Intel-gfx] [PATCH 3/3] drm/i915: don't rewrite the GTT on resume v2

2012-10-30 Thread Daniel Vetter
On Fri, Oct 26, 2012 at 10:08:38AM -0700, Jesse Barnes wrote: > The BIOS shouldn't be touching this memory across suspend/resume, so > just leave it alone. This saves us ~50ms on resume on my T420. > > v2: change gtt restore default on pre-gen4 (Chris) > move needs_gtt_restore flag into dev_p

Re: [Intel-gfx] [PATCH 2/3] drm/i915: put ring frequency and turbo setup into a work queue v2

2012-10-30 Thread Daniel Vetter
On Fri, Oct 26, 2012 at 7:08 PM, Jesse Barnes wrote: > Communicating via the mailbox registers with the PCU can take quite > awhile. And updating the ring frequency or enabling turbo is not > something that needs to happen synchronously, so take it out of our init > and resume paths to speed thin

Re: [Intel-gfx] [PATCH 2/3] drm/i915: put ring frequency and turbo setup into a work queue v2

2012-10-30 Thread Daniel Vetter
On Tue, Oct 30, 2012 at 6:03 PM, Rodrigo Vivi wrote: > I was here trying to cheking init values and change forcewake set > during init, etc and nothing was getting RC6 running after resume > besides that msleep(50) workaround after setting CACHE_MODE_0... > > Now with your patch my RC6 is back to

Re: [Intel-gfx] [PATCH 2/3] drm/i915: put ring frequency and turbo setup into a work queue v2

2012-10-30 Thread Rodrigo Vivi
I was here trying to cheking init values and change forcewake set during init, etc and nothing was getting RC6 running after resume besides that msleep(50) workaround after setting CACHE_MODE_0... Now with your patch my RC6 is back to life after resume: RC6 35.8% :D Well, but when looking at BSPe

Re: [Intel-gfx] [PATCH 2/3] drm/i915: put ring frequency and turbo setup into a work queue v2

2012-10-30 Thread Jesse Barnes
On Tue, 30 Oct 2012 14:53:15 -0200 Rodrigo Vivi wrote: > Reviewed and tested on My SNB fixing bug: > https://bugs.freedesktop.org/show_bug.cgi?id=54089 > > Reviewed-by: Rodrigo Vivi > Tested-by: Rodrigo Vivi Cool, thanks for testing. It really fixed that bug? I had my doubts. :) -- Jesse

Re: [Intel-gfx] [PATCH 1/3] drm/i915: don't block resume on fb console resume

2012-10-30 Thread Rodrigo Vivi
Reviewed-by: Rodrigo Vivi On Fri, Oct 26, 2012 at 3:08 PM, Jesse Barnes wrote: > The console lock can be contended, so rather than prevent other drivers > after us from being held up, queue the console suspend into the global > work queue that can happen anytime. I've measured this to take arou

[Intel-gfx] [PATCH] intel: Allocate swrast buffer (#54782)

2012-10-30 Thread Frederic Plourde
From: Tomeu Vizoso When i915 driver decides to fallback to software, the texture's Map gets replaced by its Buffer attribute, which is NULL because the texture hasn't been allocated by swrast yet. The attached patch makes sure that the image buffer for the texture gets allocated --- src/mesa/

Re: [Intel-gfx] [PATCH 2/3] drm/i915: put ring frequency and turbo setup into a work queue v2

2012-10-30 Thread Rodrigo Vivi
Reviewed and tested on My SNB fixing bug: https://bugs.freedesktop.org/show_bug.cgi?id=54089 Reviewed-by: Rodrigo Vivi Tested-by: Rodrigo Vivi On Fri, Oct 26, 2012 at 3:08 PM, Jesse Barnes wrote: > Communicating via the mailbox registers with the PCU can take quite > awhile. And updating the

Re: [Intel-gfx] [PATCH 9/9] drm/i915: create the DDI encoder

2012-10-30 Thread Damien Lespiau
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > Now intel_ddi_init is just like intel_hdmi_init and intel_dp_init: it > inits the encoder and then calls the proper init_connector functions. > Notice that for non-eDP ports we call both HDMI and DP connector init, > s

Re: [Intel-gfx] [PATCH 8/9] drm/i915: add intel_ddi_connector_get_hw_state

2012-10-30 Thread Damien Lespiau
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > We need this since now on DDI we will have 2 connectors on each > encoder. > > Signed-off-by: Paulo Zanoni Reviewed-by: Damien Lespiau -- Damien ___ Intel-gfx mailing li

Re: [Intel-gfx] [PATCH 7/9] drm/i915: add port field to intel_digital_port

2012-10-30 Thread Damien Lespiau
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > Both "intel_dp" and "intel_hdmi" structs had a "port" field, which > always had the same value. It makes more sense to move this to > intel_digital_port, so we can know the port independently of the > connector type. >

Re: [Intel-gfx] [PATCH 6/9] drm/i915: reset intel_encoder->type when DP or HDMI is detected

2012-10-30 Thread Damien Lespiau
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > When intel_hdmi_detect detects a monitor, set intel_encoder->type with > INTEL_OUTPUT_HDMI. Same for DP. > > This should not break the current code because these variables never > change. This will be used after we cre

Re: [Intel-gfx] [PATCH 5/9] drm/i915: split intel_dp_init into encoder and connector pieces

2012-10-30 Thread Lespiau, Damien
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > Same reason as the previous HDMI commit: the DDI code will have its > own encoder init function but still use the DP and HDMI connectors. > > Signed-off-by: Paulo Zanoni > +intel_dp_init(struct drm_device *dev, int o

Re: [Intel-gfx] [PATCH 4/9] drm/i915: split intel_hdmi_init into encoder and connector pieces

2012-10-30 Thread Lespiau, Damien
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > We want to split the HDMI connector and encoder initialization because > in the future the DDI code will have its own "encoder init" function, > but it will still call intel_hdmi_init_connector. The DDI encoder will >

Re: [Intel-gfx] [PATCH 3/9] drm/i915: create intel_digital_port and use it

2012-10-30 Thread Lespiau, Damien
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > The goal is to have one single encoder capable of controlling both DP > and HDMI outputs. This patch just adds the initial infrastructure, no > functional changes. > > Previously, both intel_dp and intel_hdmi were inte

Re: [Intel-gfx] [PATCH 2/9] drm/i915: add intel_dp_to_dev and intel_hdmi_to_dev

2012-10-30 Thread Lespiau, Damien
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > When we add struct intel_digital_port, there will be no direct way of > going from intel_{dp,hdmi} to drm_device: we will need to call > container_of(). > > This patch adds functions to go from intel_{dp,hdmi} to drm_d

Re: [Intel-gfx] [PATCH 1/9] drm/i915: simplify assignments inside intel_dp.c

2012-10-30 Thread Lespiau, Damien
On Fri, Oct 26, 2012 at 10:05 PM, Paulo Zanoni wrote: > From: Paulo Zanoni > > - Replace container_of with enc_to_intel_dp. > - Walk through less structures when making assignments. > - Rename some variables to keep our naming standards. > > As a bonus, this will reduce the usage of "struct in

Re: [Intel-gfx] [PATCH] drm/i915: Flush using only the correct base address register

2012-10-30 Thread Paulo Zanoni
Hi 2012/10/29 Damien Lespiau : > From: Damien Lespiau > > We were writing DSP_ADDR and DSP_SURF unconditionally. This did not > trigger an unclaimed write before HSW as the address of DSP_ADDR has > been repurposed as DSP_LINOFF. > > On HSW, though, DSP_LINOFF has been removed and then writting t

Re: [Intel-gfx] [PATCH 1/2] drm: add helper to sort panels to the head of the connector list

2012-10-30 Thread Laurent Pinchart
Hi Daniel, Thanks for the patch. On Saturday 27 October 2012 15:52:04 Daniel Vetter wrote: > Userspace seems to like this, see > > commit cb0953d734348e8862d6d7edc666cfb3bf6d8fae > Author: Adam Jackson > Date: Fri Jul 16 14:46:29 2010 -0400 > > drm/i915: Initialize LVDS and eDP outputs b

[Intel-gfx] [PATCH] drm/i915: Fix HSW power well control state read

2012-10-30 Thread Zhenyu Wang
Fix power well control state by reading real register offset. Signed-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/intel_pm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 838d67d..3bcaad6 100644 ---