1. 27 5月, 2010 2 次提交
  2. 11 5月, 2010 1 次提交
  3. 08 5月, 2010 1 次提交
  4. 24 4月, 2010 1 次提交
  5. 23 4月, 2010 1 次提交
  6. 20 4月, 2010 5 次提交
  7. 19 4月, 2010 1 次提交
    • D
      drm/i915: fix tiling limits for i915 class hw v2 · c36a2a6d
      Daniel Vetter 提交于
      Current code is definitely crap: Largest pitch allowed spills into
      the TILING_Y bit of the fence registers ... :(
      
      I've rewritten the limits check under the assumption that 3rd gen hw
      has a 3d pitch limit of 8kb (like 2nd gen). This is supported by an
      otherwise totally misleading XXX comment.
      
      This bug mostly resulted in tiling-corrupted pixmaps because the kernel
      allowed too wide buffers to be tiled. Bug brought to the light by the
      xf86-video-intel 2.11 release because that unconditionally enabled
      tiling for pixmaps, relying on the kernel to check things. Tiling for
      the framebuffer was not affected because the ddx does some additional
      checks there ensure the buffer is within hw-limits.
      
      v2: Instead of computing the value that would be written into the
      hw fence registers and then checking the limits simply check whether
      the stride is above the 8kb limit. To better document the hw, add
      some WARN_ONs in i915_write_fence_reg like I've done for the i830
      case (using the right limits).
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27449Tested-by: NAlexander Lam <lambchop468@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NEric Anholt <eric@anholt.net>
      c36a2a6d
  8. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  9. 26 3月, 2010 1 次提交
  10. 18 3月, 2010 3 次提交
  11. 27 2月, 2010 10 次提交
  12. 23 2月, 2010 3 次提交
  13. 17 2月, 2010 2 次提交
  14. 11 2月, 2010 3 次提交
  15. 05 2月, 2010 1 次提交
  16. 28 1月, 2010 1 次提交
    • C
      drm/i915: Selectively enable self-reclaim · 4bdadb97
      Chris Wilson 提交于
      Having missed the ENOMEM return via i915_gem_fault(), there are probably
      other paths that I also missed. By not enabling NORETRY by default these
      paths can run the shrinker and take memory from the system (but not from
      our own inactive lists because our shrinker can not run whilst we hold
      the struct mutex) and this may allow the system to survive a little longer
      whilst our drivers consume all available memory.
      
      References:
        OOM killer unexpectedly called with kernel 2.6.32
        http://bugzilla.kernel.org/show_bug.cgi?id=14933
      
      v2: Pass gfp into page mapping.
      v3: Use new read_cache_page_gfp() instead of open-coding.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4bdadb97
  17. 26 1月, 2010 1 次提交
    • C
      drm/i915: Prevent use of uninitialized pointers along error path. · 0ce907f8
      Chris Wilson 提交于
      X.org hang with [drm:i915_gem_do_execbuffer] *ERROR* in dmesg
        http://bugzilla.kernel.org/show_bug.cgi?id=15114
      
      Matej found he was hitting an error path within i915_gem_do_execbuffer()
      that led to the attempt to dereference an uninitialised pointer during
      cleanup. This path used to be safe as we used to calloc the object
      lists, but this was changed in c8e0f93a. Daniel Vetter had also spotted
      this error and proposed a similar patch.
      
      [ 6379.732892] [drm:i915_gem_do_execbuffer] *ERROR* Object ffff880098cd6540 appears more than once in object list
      [ 6379.740976] [drm:i915_gem_do_execbuffer] *ERROR* Object ffff880098cd6540 appears more than once in object list
      [ 6379.740995] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a0
      [ 6379.740998] IP: [<ffffffff8122ddb5>] i915_gem_do_execbuffer+0xba5/0x1260
      [ 6379.741006] PGD babab067 PUD bb435067 PMD 0
      [ 6379.741010] Oops: 0002 [#1] PREEMPT SMP
      [ 6379.741014] last sysfs file: /sys/devices/pci0000:00/0000:00:1c.2/0000:06:00.0/ieee80211/phy0/rfkill0/state
      [ 6379.741017] CPU 1
      [ 6379.741021] Pid: 2186, comm: X Not tainted 2.6.33-rc4-00399-g24bc7347 #142 M11D/ESPRIMO Mobile M9400
      [ 6379.741023] RIP: 0010:[<ffffffff8122ddb5>] [<ffffffff8122ddb5>] i915_gem_do_execbuffer+0xba5/0x1260
      [ 6379.741027] RSP: 0018:ffff8800b9047b78  EFLAGS: 00213206
      [ 6379.741029] RAX: 0000000000000000 RBX: 000000000000004f RCX: ffff880098cac800
      [ 6379.741032] RDX: ffff880098caca78 RSI: ffff8800b9047c98 RDI: ffff880098cd6540
      [ 6379.741034] RBP: ffff8800b9047c78 R08: ffffffff814b96b5 R09: 0000000000000006
      [ 6379.741036] R10: 0000000000000000 R11: 0000000000000003 R12: 000000000000004e
      [ 6379.741038] R13: 00000000fffffff7 R14: 0000000000000000 R15: 0000000000000001
      [ 6379.741041] FS:  0000000000000000(0000) GS:ffff880001900000(0063) knlGS:00000000f72636c0
      [ 6379.741043] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
      [ 6379.741041] FS:  0000000000000000(0000) GS:ffff880001900000(0063) knlGS:00000000f72636c0
      [ 6379.741043] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
      [ 6379.741045] CR2: 00000000000000a0 CR3: 00000000b9000000 CR4: 00000000000006e0
      [ 6379.741048] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 6379.741050] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [ 6379.741052] Process X (pid: 2186, threadinfo ffff8800b9046000, task ffff8800bb5d8000)
      [ 6379.741054] Stack:
      [ 6379.741055]  ffffc90023f57000 ffffc90023f56fff ffffc90023f56fff ffffc90023f55000
      [ 6379.741059] <0> ffff8800b9047c98 ffff8800bb43c840 ffff8800bf1de800 ffff8800bf1de820
      [ 6379.741063] <0> ffff8800b9047bd8 ffff880098cac800 0000000000000000 0000000000000002
      [ 6379.741068] Call Trace:
      [ 6379.741072]  [<ffffffff8122e6cb>] ?  i915_gem_execbuffer+0x6b/0x370
      [ 6379.741077]  [<ffffffff810a5f52>] ? __vmalloc_node+0xa2/0xb0
      [ 6379.741080]  [<ffffffff8122e6cb>] ?  i915_gem_execbuffer+0x6b/0x370
      [ 6379.741083]  [<ffffffff8122e816>] i915_gem_execbuffer+0x1b6/0x370
      [ 6379.741086]  [<ffffffff8120cd55>] drm_ioctl+0x1d5/0x460
      [ 6379.741089]  [<ffffffff8122e660>] ?  i915_gem_execbuffer+0x0/0x370
      [ 6379.741093]  [<ffffffff81248c35>] i915_compat_ioctl+0x45/0x50
      [ 6379.741097]  [<ffffffff810f1659>] compat_sys_ioctl+0xa9/0x1570
      [ 6379.741102]  [<ffffffff810b1d5c>] ? vfs_read+0x13c/0x1a0
      [ 6379.741106]  [<ffffffff81028424>] sysenter_dispatch+0x7/0x2b
      [ 6379.741108] Code: 08 85 c0 74 52 31 db 0f 1f 80 00 00 00 00 48 63 c3 48 8b
      8d 68 ff ff ff 48 8d 14 c1 48 8b 02 48 85 c0 74 25 48 8b 80 80 00 00 00 <c7> 80
      a0 00 00 00 00 00 00 00 48 8b 3a 48 85 ff 74 0c 48 c7 c6
      [ 6379.741142] RIP  [<ffffffff8122ddb5>] i915_gem_do_execbuffer+0xba5/0x1260
      [ 6379.741145]  RSP <ffff8800b9047b78>
      [ 6379.741147] CR2: 00000000000000a0
      [ 6379.741159] ---[ end trace 0598809afa4c31db ]---
      Reported-by: NMatej Laitl <strohel@gmail.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      0ce907f8
  18. 16 1月, 2010 1 次提交
  19. 13 1月, 2010 1 次提交