Re: [Intel-gfx] [PATCH 00/18] i915 HW Context Support

2012-03-18 Thread Ben Widawsky
On Sun, Mar 18, 2012 at 01:39:40PM -0700, Ben Widawsky wrote: > The patches have changed quite a bit since the RFC, and therefore I > didn't feel comfortable trying to do v2 information. I didn't feel > comfortable taking the few r-bs that I had from the RFC except for the > one patch that I applie

Re: [Intel-gfx] VA-API brightness property

2012-03-18 Thread Xiang, Haihao
> Please, can anyone tell me if there is a list for user questions about > VAAPI? I have several questions... The list for VAAPI is li...@lists.freedesktop.org As for brightness property, the driver doesn't support it. Thanks Haihao > > Greets, > Kiste > > > > Am 09.03.2012 08:04, schrieb

Re: [Intel-gfx] Updated -next

2012-03-18 Thread Daniel Vetter
Hi Dave, QA beat on the -next tree in my absence and filed 3 new issue. Afaict they're all new sightings of old issues (hooray for improved test-suites) safe for a very funky sporadic failure on ilk - investigation is still going on this one. Otherwise the missed irq on snb poped up again, but Be

[Intel-gfx] [PATCH 18/18] drm/i915: try to enable rc6 on Ironlake... again

2012-03-18 Thread Ben Widawsky
In some off chance the HW context code and new error check fixes things magically.. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_display.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index

[Intel-gfx] [PATCH 17/18] drm/i915: Ironlake rc6 can use context interfaces

2012-03-18 Thread Ben Widawsky
Use the context interfaces to create the power context. Assuming we have a default context, there should be no need to switch to the render context anymore as the default context should already serve this purpose. As a double cautionary measure we check the CCID to make sure everything looks kosh

[Intel-gfx] [PATCH 16/18] drm/i915/context: anonymous context interfaces

2012-03-18 Thread Ben Widawsky
Ironlake RC6 needs to allocate a power context object which the hardware can automatically switch to. Since the new context code nicely handles contexts, create some interfaces so we can hook up the existing code to the new code. The right way to do this is to move a bunch of code out of intel_dis

[Intel-gfx] [PATCH 15/18] drm/i915/context: add params

2012-03-18 Thread Ben Widawsky
From: Ben Widawsky Parameters tell user space if contexts are available. Signed-off-by: Ben Widawsky Reviewed-by: Eugeni Dodonov Reviewed-by: Eric Anholt --- drivers/gpu/drm/i915/i915_dma.c |3 +++ include/drm/i915_drm.h |1 + 2 files changed, 4 insertions(+) diff --git a/d

[Intel-gfx] [PATCH 14/18] drm/i915/context: switch contexts with execbuf2

2012-03-18 Thread Ben Widawsky
Use the rsvd1 field in execbuf2 to specify the context ID associated with the workload. This will allow the driver to do the proper context switch when/if needed. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_execbuffer.c |6 ++ include/drm/i915_drm.h

[Intel-gfx] [PATCH 13/18] drm/i915/context: create & destroy ioctls

2012-03-18 Thread Ben Widawsky
Add the interfaces to allow user space to create and destroy contexts. Contexts are destroyed automatically if the file descriptor for the dri device is closed. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c |2 + drivers/gpu/drm/i915/i915_drv.h |4 ++ dr

[Intel-gfx] [PATCH 12/18] drm/i915: try to reset the gpu before unload

2012-03-18 Thread Ben Widawsky
paranoia For context support the HW expects the default context to always be available as there is no way to shut off HW contexts once turned on (afaics). This is problematic when unloading the driver as we have no way to prevent the GPU from expecting the BO to still be present once unloaded. Th

[Intel-gfx] [PATCH 11/18] drm/i915: switch to default context on idle

2012-03-18 Thread Ben Widawsky
To keep things as sane as possible, switch to the default context before idling. This should help free context objects, as well as put things in a more well defined state before suspending. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c |6 ++ 1 file changed, 6 insertion

[Intel-gfx] [PATCH 10/18] drm/i915: use the default context

2012-03-18 Thread Ben Widawsky
With the code to do HW context switches in place have the driver load the default context for the render ring when the driver loads. The default context will be an ever present context that is available to switch to at any time for the given ring. Signed-off-by: Ben Widawsky --- drivers/gpu/drm

[Intel-gfx] [PATCH 09/18] drm/i915: possibly invalidate TLB before context switch

2012-03-18 Thread Ben Widawsky
From http://intellinuxgraphics.org/documentation/SNB/IHD_OS_Vol1_Part3.pdf [DevSNB] If Flush TLB invalidation Mode is enabled it’s the driver’s responsibility to invalidate the TLBs at least once after the previous context switch after any GTT mappings changed (including new GTT entries). This ca

[Intel-gfx] [PATCH 08/18] drm/i915: PIPE_CONTROL_TLB_INVALIDATE

2012-03-18 Thread Ben Widawsky
This has showed up in several other patches. It's required for the next context workaround. I tested this one on its own and saw no differences in basic tests (performance or otherwise). Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_reg.h |1 + drivers/gpu/drm/i915/intel

[Intel-gfx] [PATCH 07/18] drm/i915: Ivybridge MI_ARB_ON_OFF context w/a

2012-03-18 Thread Ben Widawsky
The workaround itself applies to gen7 only (according to the docs) and as Eric Anholt points out shouldn't be required since we don't use HW scheduling features, and therefore arbitration. Though since it is a small, and simple addition, and we don't really understand the issue, just do it. Signed

[Intel-gfx] [PATCH 06/18] drm/i915: trace events for contexts

2012-03-18 Thread Ben Widawsky
Recommended by Daniel Vetter. The original code used DRM_DEBUG_DRIVER. With this we track context creation, destruction, and switching. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c |7 +++- drivers/gpu/drm/i915/i915_trace.h | 59

[Intel-gfx] [PATCH 05/18] drm/i915: context switch implementation

2012-03-18 Thread Ben Widawsky
Implement the context switch code as well as the interfaces to do the context switch. This patch also doesn't match 1:1 with the RFC patches. The main difference is that from Daniel's responses the last context object is now stored instead of the last context. This aids in allows us to free the con

[Intel-gfx] [PATCH 04/18] drm/i915: add context information to objects

2012-03-18 Thread Ben Widawsky
Handy mostly for assertions. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h |5 + drivers/gpu/drm/i915/i915_gem.c |1 + drivers/gpu/drm/i915/i915_gem_context.c |3 +++ 3 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 03/18] drm/i915: context basic create & destroy

2012-03-18 Thread Ben Widawsky
This commit doesn't really match up 1:1 with any of the RFC patches. The primary difference in the equivalent logic though is the new use of a reference counter for the context life cycle. This allows us to free the context backing object, and context kernel memory separately. For example if a con

[Intel-gfx] [PATCH 02/18] drm/i915: preliminary context support

2012-03-18 Thread Ben Widawsky
Very basic code for context setup/destruction in the driver. There are 4 entry points into the contexts, load, unload, open, close. The names are self-explanatory except that load can be called during reset, and also during pm thaw/resume. As we expect our context to be preserved across these even

[Intel-gfx] [PATCH 01/18] drm/i915: CXT_SIZE register offsets added

2012-03-18 Thread Ben Widawsky
From: Ben Widawsky The GPUs can have different default context layouts, and the sizes could vary based on platform or BIOS. In order to back the context object with a properly sized BO, we must read this register in order to find out a sufficient size. Thankfully (sarcarm!), the register moves a

[Intel-gfx] [PATCH 00/18] i915 HW Context Support

2012-03-18 Thread Ben Widawsky
The patches have changed quite a bit since the RFC, and therefore I didn't feel comfortable trying to do v2 information. I didn't feel comfortable taking the few r-bs that I had from the RFC except for the one patch that I applied wholesale. Summary: - Completely redid the patch splitting. The n

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add BUG_ON when ring->private is NULL

2012-03-18 Thread Sean Paul
On Sun, Mar 18, 2012 at 2:09 PM, Daniel Vetter wrote: > On Fri, Mar 16, 2012 at 12:43:21PM -0400, Sean Paul wrote: >> I have experienced a number of NULL pointer dereferences on >> suspend/resume where ring->private is NULL. These come from failed >> initialization of the ring buffer. Sincce this

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too

2012-03-18 Thread Takashi Iwai
At Sat, 17 Mar 2012 12:01:17 -0700, Keith Packard wrote: > > <#part sign=pgpmime> > On Sat, 17 Mar 2012 08:59:56 +0100, Takashi Iwai wrote: > > > Well, the LVDS reg data isn't in lvds_dvo_timing but in lvds_fp_timing, > > thus you need to look at a different entry in anyway. > > Right, a parall

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-18 Thread Takashi Iwai
At Sun, 18 Mar 2012 19:01:21 +0100, Andreas Heider wrote: > > Am 18.03.2012 um 18:50 schrieb Daniel Vetter: > > On Fri, Mar 16, 2012 at 09:29:24PM +0100, Takashi Iwai wrote: > >> At Fri, 16 Mar 2012 15:55:52 -0400, > >> Adam Jackson wrote: > >>> > >>> On 3/15/12 10:42 AM, Takashi Iwai wrote: > >>

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-18 Thread Takashi Iwai
At Sun, 18 Mar 2012 18:50:31 +0100, Daniel Vetter wrote: > > On Fri, Mar 16, 2012 at 09:29:24PM +0100, Takashi Iwai wrote: > > At Fri, 16 Mar 2012 15:55:52 -0400, > > Adam Jackson wrote: > > > > > > On 3/15/12 10:42 AM, Takashi Iwai wrote: > > > > > > > diff --git a/drivers/gpu/drm/i915/intel_di

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add BUG_ON when ring->private is NULL

2012-03-18 Thread Daniel Vetter
On Fri, Mar 16, 2012 at 12:43:21PM -0400, Sean Paul wrote: > I have experienced a number of NULL pointer dereferences on > suspend/resume where ring->private is NULL. These come from failed > initialization of the ring buffer. Sincce this doesn't seem to be easily > recoverable, this patch adds a B

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-18 Thread Andreas Heider
Am 18.03.2012 um 18:50 schrieb Daniel Vetter: > On Fri, Mar 16, 2012 at 09:29:24PM +0100, Takashi Iwai wrote: >> At Fri, 16 Mar 2012 15:55:52 -0400, >> Adam Jackson wrote: >>> >>> On 3/15/12 10:42 AM, Takashi Iwai wrote: >>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/g

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add wait_for in init_ring_common

2012-03-18 Thread Daniel Vetter
On Fri, Mar 16, 2012 at 12:43:22PM -0400, Sean Paul wrote: > I have seen a number of "blt ring initialization failed" messages > where the ctl or start registers are not the correct value. Upon further > inspection, if the code just waited a little bit, it would read the > correct value. Adding the

Re: [Intel-gfx] Thinkpad T420 and single/dual channel lvds

2012-03-18 Thread Daniel Vetter
On Fri, Mar 16, 2012 at 09:29:24PM +0100, Takashi Iwai wrote: > At Fri, 16 Mar 2012 15:55:52 -0400, > Adam Jackson wrote: > > > > On 3/15/12 10:42 AM, Takashi Iwai wrote: > > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c > > > b/drivers/gpu/drm/i915/intel_display.c > > > index f851db7.

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Don't do MTRR setup if PAT is enabled

2012-03-18 Thread Daniel Vetter
On Wed, Mar 14, 2012 at 11:22:11AM -0400, Adam Jackson wrote: > Some newer BIOSes are shipping with all MTRRs already populated. These > BIOSes are all on machines with sufficiently new CPUs that the > referenced errata doesn't apply anyway, so just don't try to claim the > MTRR. > > Signed-off-b