Re: [Intel-gfx] Macbook Air 2012

2012-08-11 Thread Daniel Vetter
On Sat, Aug 11, 2012 at 04:48:15PM +0200, Paul Menzel wrote: > Dear Daniel, > > > Am Samstag, den 11.08.2012, 16:05 +0200 schrieb Daniel Wagner: > > > I installed on my shiny new Macbook Air 2012 Fedora 17. After adding > > > > intremap=off > > > > to the kernel arguments, I was able to instal

Re: [Intel-gfx] [PATCH] drm/i915: don't grab dev->struct_mutex for userspace forcewak

2012-08-11 Thread Daniel Vetter
On Fri, Aug 10, 2012 at 11:22:15PM +0100, Chris Wilson wrote: > On Thu, 9 Aug 2012 22:33:58 +0200, Daniel Vetter > wrote: > > Since forcewake is now protected by a spinlock, we don't need to grab > > dev->struct_mutex any more. This way we can also get rid of a stale > > comment, noticed by Ben

Re: [Intel-gfx] [PATCH] drm/i915: Apply post-sync write for pipe control invalidates

2012-08-11 Thread Daniel Vetter
On Sat, Aug 11, 2012 at 12:20:19PM -0700, Ben Widawsky wrote: > On Fri, 10 Aug 2012 10:18:10 +0100 > Chris Wilson wrote: > > > When invalidating the TLBs it is documentated as requiring a post-sync > > write. Failure to do so seems to result in a GPU hang. > > > > Exposure to this hang on IVB se

Re: [Intel-gfx] [PATCH] drm/i915: ingore eDP bpc settings

2012-08-11 Thread Daniel Vetter
On Fri, Aug 10, 2012 at 12:24:29PM +0200, Benoit Gschwind wrote: > > Hello, > > I confirm this patch work apply to kernel 3.6-rc1 Ok, I've picked this up for -fixes, with the commit message a bit improved. Let's see whether this blows up anywhere. -Daniel -- Daniel Vetter Mail: dan...@ffwll.ch

Re: [Intel-gfx] [PATCH] drm/i915: Apply post-sync write for pipe control invalidates

2012-08-11 Thread Ben Widawsky
On Fri, 10 Aug 2012 10:18:10 +0100 Chris Wilson wrote: > When invalidating the TLBs it is documentated as requiring a post-sync > write. Failure to do so seems to result in a GPU hang. > > Exposure to this hang on IVB seems to be a result of removing the > extra stalls required for SNB pipecontr

Re: [Intel-gfx] Fan constantly running with Intel Graphics card

2012-08-11 Thread Ben Widawsky
On Fri, 10 Aug 2012 14:28:35 + (UTC) Patrick O'Byrne wrote: > Hi, > > I am having an issue with a new Dell E5520 laptop (Intel(R) Core(TM) > i5-2520 CPU @ 2.5GHz) running Linux Mint 13 (Kernel: Linux > 3.2.0-23-generic (i686)). I am using the graphics driver that ships > with the kernel: >

Re: [Intel-gfx] Macbook Air 2012

2012-08-11 Thread Paul Menzel
Dear Daniel, Am Samstag, den 11.08.2012, 16:05 +0200 schrieb Daniel Wagner: > I installed on my shiny new Macbook Air 2012 Fedora 17. After adding > > intremap=off > > to the kernel arguments, I was able to install the system. The X server > worked out of the box. This was with a 3.3.4 kernel

[Intel-gfx] [PATCH 01/29] drm/i915: Track unbound pages

2012-08-11 Thread Chris Wilson
When dealing with a working set larger than the GATT, or even the mappable aperture when touching through the GTT, we end up with evicting objects only to rebind them at a new offset again later. Moving an object into and out of the GTT requires clflushing the pages, thus causing a double-clflush p

[Intel-gfx] [PATCH 07/29] drm/i915: Extract general object init routine

2012-08-11 Thread Chris Wilson
As we wish to create specialised object constructions in the near future that share the same basic GEM object struct, export the default initializer. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h |1 + drivers/gpu/drm/i915/i915_gem.c | 30 ++ 2

[Intel-gfx] [PATCH 02/29] drm/i915: Show (count, size) of purgeable objects in i915_gem_objects

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index a7eb093..16e8701 100644 --- a/drivers/gpu/drm/i915/i915_d

[Intel-gfx] [PATCH 03/29] drm/i915: Show pin count in debugfs

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 16e8701..229cf27 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i91

[Intel-gfx] [PATCH 04/29] drm/i915: Try harder to allocate an mmap_offset

2012-08-11 Thread Chris Wilson
Given the persistence of an offset for the lifetime of an object, itis easy to contemplate how the mmap space becomes badly fragmented to the point that further allocations fail with ENOSPC. Our only recourse at this point is to try to purge the objects to release some space and reattempt the alloc

[Intel-gfx] [PATCH 05/29] drm/i915: Only pwrite through the GTT if there is space in the aperture

2012-08-11 Thread Chris Wilson
Avoid stalling and waiting for the GPU by checking to see if there is sufficient inactive space in the aperture for us to bind the buffer prior to writing through the GTT. If there is inadequate space we will have to stall waiting for the GPU, and incur overheads moving objects about. Instead, only

[Intel-gfx] [PATCH 09/29] drm/i915: Pin backing pages whilst exporting through a dmabuf vmap

2012-08-11 Thread Chris Wilson
We need to refcount our pages in order to prevent reaping them at inopportune times, such as when they currently vmapped or exported to another driver. However, we also wish to keep the lazy deallocation of our pages so we need to take a pin/unpinned approach rather than a simple refcount. Signed-

[Intel-gfx] [PATCH 10/29] drm/i915: Pin backing pages for pwrite

2012-08-11 Thread Chris Wilson
By using the recently introduced pinning of pages, we can safely drop the mutex in the knowledge that the pages are not going to disappear beneath us, and so we can simplify the code for iterating over the pages. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 37

[Intel-gfx] [PATCH 12/29] drm/i915: Replace the array of pages with a scatterlist

2012-08-11 Thread Chris Wilson
Rather than have multiple data structures for describing our page layout in conjunction with the array of pages, we can migrate all users over to a scatterlist. One major advantage, other than unifying the page tracking structures, this offers is that we replace the vmalloc'ed array (which can be

[Intel-gfx] [PATCH 19/29] drm/i915: Allow objects to be created with no backing pages, but stolen space

2012-08-11 Thread Chris Wilson
In order to accommodate objects that are not backed by struct pages, but instead point into a contiguous region of stolen space, we need to make various changes to avoid dereferencing obj->pages or obj->base.filp. First introduce a marker for the stolen object, that specifies its offset into the s

[Intel-gfx] [PATCH 14/29] drm: Introduce drm_mm_create_block()

2012-08-11 Thread Chris Wilson
To be used later by i915 to preallocate exact blocks of space from the range manager. Signed-off-by: Chris Wilson Cc: Dave Airlie --- drivers/gpu/drm/drm_mm.c | 49 ++ include/drm/drm_mm.h |4 2 files changed, 53 insertions(+) diff --g

[Intel-gfx] [PATCH 16/29] drm/i915: Fix location of stolen memory register for SandyBridge+

2012-08-11 Thread Chris Wilson
A few of the earlier registers where enlarged and so the Base Data of Stolem Memory Register (BDSM) was pushed to 0xb0. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem_stolen.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_

[Intel-gfx] [PATCH 18/29] drm/i915: Delay allocation of stolen space for FBC

2012-08-11 Thread Chris Wilson
As we may wish to wrap regions preallocated by the BIOS, we need to do that before carving out contiguous chunks of stolen space for FBC. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h|1 + drivers/gpu/drm/i915/i915_gem_stolen.c | 114 +--

[Intel-gfx] [PATCH 24/29] drm/i915: Introduce i915_gem_object_create_stolen()

2012-08-11 Thread Chris Wilson
Allow for the creation of GEM objects backed by stolen memory. As these are not backed by ordinary pages, we create a fake dma mapping and store the address in the scatterlist rather than obj->pages. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h|3 + drivers/gpu/drm

[Intel-gfx] [PATCH 20/29] drm/i915: Differentiate between prime and stolen objects

2012-08-11 Thread Chris Wilson
Stolen objects also share the property that they have no backing shmemfs filp, but they can be used with pwrite/pread/gtt-mapping. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h |5 + drivers/gpu/drm/i915/i915_gem.c |4 ++-- 2 files changed, 7 insertions(+), 2 deleti

[Intel-gfx] [PATCH 21/29] drm/i915: Support readback of stolen objects upon error

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_irq.c |8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2ec8ad7..f59eace 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.

[Intel-gfx] [PATCH 28/29] drm/i915: Use a slab for object allocation

2012-08-11 Thread Chris Wilson
The primary purpose of this was to debug some use-after-free memory corruption that was causing an OOPS inside drm/i915. As it turned out the corruption was being caused elsewhere and i915.ko as a major user of many objects was being hit hardest. Indeed as we do frequent the generic kmalloc caches

[Intel-gfx] [PATCH 26/29] drm/i915: Allocate ringbuffers from stolen memory

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_ringbuffer.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 5fdd297..7e6f8f4 100644 --- a/drivers/gpu/drm/i915/intel_rin

[Intel-gfx] [PATCH 23/29] drm/i915: Handle stolen objects for pread

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 175 ++- 1 file changed, 116 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index a2fb2aa..a29c259 100644 --- a/drivers/gpu/drm/i9

[Intel-gfx] [PATCH 25/29] drm/i915: Allocate fbcon from stolen memory

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_fb.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 97f6735..9de9cd9 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i91

[Intel-gfx] [PATCH 29/29] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2012-08-11 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

[Intel-gfx] [PATCH 27/29] drm/i915: Allocate overlay registers from stolen memory

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_overlay.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 7a98459..6982191 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +

[Intel-gfx] [PATCH 22/29] drm/i915: Handle stolen objects in pwrite

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 169 +-- 1 file changed, 111 insertions(+), 58 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 552f95b..a2fb2aa 100644 --- a/drivers/gpu/drm/i9

[Intel-gfx] [PATCH 17/29] drm/i915: Avoid clearing preallocated regions from the GTT

2012-08-11 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h |2 ++ drivers/gpu/drm/i915/i915_gem_gtt.c | 35 --- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a2

[Intel-gfx] [PATCH 15/29] drm/i915: Fix detection of stolen base for gen2

2012-08-11 Thread Chris Wilson
It was not until the G33 refresh, that a PCI config register was introduced that explicitly said where the stolen memory was. Prior to 865G there was not even a register that said where the end of usable low memory was and where the stolen memory began (or ended depending upon chipset). Before then

[Intel-gfx] [PATCH 13/29] drm/i915: Convert the dmabuf object to use the new i915_gem_object_ops

2012-08-11 Thread Chris Wilson
By providing a callback for when we need to bind the pages, and then release them again later, we can shorten the amount of time we hold the foreign pages mapped and pinned, and importantly the dmabuf objects then behave as any other normal object with respect to the shrinker and memory management.

[Intel-gfx] [PATCH 11/29] drm/i915: Pin backing pages for pread

2012-08-11 Thread Chris Wilson
By using the recently introduced pinning of pages, we can safely drop the mutex in the knowledge that the pages are not going to disappear beneath us, and so we can simplify the code for iterating over the pages. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 36

[Intel-gfx] [PATCH 08/29] drm/i915: Introduce drm_i915_gem_object_ops

2012-08-11 Thread Chris Wilson
In order to specialise functions depending upon the type of object, we can attach vfuncs to each object via their obj->driver_private pointer, bringing it back to life! For instance, this will be used in future patches to only bind pages from a dma-buf for the duration that the object is used by t

[Intel-gfx] [PATCH 06/29] drm/i915: Protect private gem objects from truncate (such as imported dmabuf)

2012-08-11 Thread Chris Wilson
If the object has no backing shmemfs filp, then we obviously cannot perform a truncation operation upon it. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/

[Intel-gfx] Stolen pages, with a little surprise

2012-08-11 Thread Chris Wilson
I've reworked and incorporated dmabuf into the grand scheme of things, unifying how we track pages for the various different types of object (shmemfs, dmabuf, stolen) so the series is quite a bit more complicated than it was before. Please review, flame and generally suggest cleaner methods. -Chri

[Intel-gfx] Macbook Air 2012

2012-08-11 Thread Daniel Wagner
Hi, I installed on my shiny new Macbook Air 2012 Fedora 17. After adding intremap=off to the kernel arguments, I was able to install the system. The X server worked out of the box. This was with a 3.3.4 kernel. Then I started to upgrade the installation and a newer kernel was installed 3.5.

[Intel-gfx] Netiquette: No HTML messages please. (was: [ANNOUNCE] glamor 0.5.0)

2012-08-11 Thread Paul Menzel
Dear Zhigang, thank you for the announcement message and congratulations on the release. But please do not send HTML messages to lists [1]! Thanks, Paul [1] http://en.opensuse.org/openSUSE:Mailing_list_netiquette signature.asc Description: This is a digitally signed message part __

Re: [Intel-gfx] [PATCH] drm/i915: ingore eDP bpc settings

2012-08-11 Thread Paul Menzel
Am Freitag, den 10.08.2012, 11:10 +0200 schrieb Daniel Vetter: There is a typo in the commit summary: i*gn*ore. > This has originally been introduced to not oversubscribe the dp links > in > > commit 885a5fb5b120a5c7e0b3baad7b0feb5a89f76c18 > Author: Zhenyu Wang > Date: Tue Jan 12 05:38:31 20