1. 02 Aug, 2010 4 commits
    • Nicolas Kaiser's avatar
      drm/i810: fixed coding style issues · aca791c2
      Nicolas Kaiser authored
      Fixed brace, macro and spacing coding style issues, and a C99 comment.
      Signed-off-by: default avatarNicolas Kaiser <nikai@nikai.net>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      aca791c2
    • Chris Wilson's avatar
      drm: Free devname along with master->unique · 6e35023f
      Chris Wilson authored
      The device name is tightly coupled and created at the same time as the
      master->unique address, so we need to free it with the master. Currently
      we overwrite it each time we create a new master:
      
      unreferenced object 0xe32c54b0 (size 32):
        comm "Xorg", pid 1455, jiffies 4294721798 (age 3196.879s)
        hex dump (first 32 bytes):
          69 39 31 35 40 70 63 69 3a 30 30 30 30 3a 30 30  i915@pci:0000:00
          3a 30 32 2e 30 00 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  :02.0.kkkkkkkkk.
        backtrace:
          [<c04e5657>] create_object+0x124/0x1f1
          [<c07cf0f0>] kmemleak_alloc+0x4c/0x90
          [<c04db84c>] __kmalloc+0x155/0x175
          [<f8316665>] drm_setversion+0x11d/0x1b1 [drm]
          [<f83148d4>] drm_ioctl+0x29a/0x356 [drm]
          [<c04f27c4>] vfs_ioctl+0x33/0x91
          [<c04f31cf>] do_vfs_ioctl+0x46b/0x496
          [<c04f3240>] sys_ioctl+0x46/0x66
          [<c040325f>] sysenter_do_call+0x12/0x38
          [<ffffffff>] 0xffffffff
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      6e35023f
    • Chris Wilson's avatar
      drm: Free the idr layers before calling idr_destroy() · ddd3d069
      Chris Wilson authored
      /* A typical clean-up sequence for objects stored in an idr tree, will
       * use idr_for_each() to free all objects, if necessary, then
       * idr_remove_all() to remove all ids, and idr_destroy() to free
       * up the cached idr_layers.
       */
      
      We were missing the vital idr_rmove_all() step and so were leaking
      the used layers for every dri client:
      
      unreferenced object 0xf32133c0 (size 148):
        comm "plymouthd", pid 131, jiffies 4294678490 (age 2308.030s)
        hex dump (first 32 bytes):
          04 00 00 00 00 00 00 00 00 00 00 00 00 40 19 f3  .............@..
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<c04e5657>] create_object+0x124/0x1f1
          [<c07cf100>] kmemleak_alloc+0x4c/0x90
          [<c04db6a9>] kmem_cache_alloc+0xee/0x13c
          [<c05c3d25>] idr_pre_get+0x24/0x61
          [<f8315c9c>] drm_gem_handle_create+0x27/0x7f [drm]
          [<f89925b2>] i915_gem_create_ioctl+0x4f/0x71 [i915]
          [<f83148ac>] drm_ioctl+0x272/0x356 [drm]
          [<c04f27c4>] vfs_ioctl+0x33/0x91
          [<c04f31cf>] do_vfs_ioctl+0x46b/0x496
          [<c04f3240>] sys_ioctl+0x46/0x66
          [<c040325f>] sysenter_do_call+0x12/0x38
          [<ffffffff>] 0xffffffff
      
      Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15803Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      ddd3d069
    • Chris Wilson's avatar
      drm/vmgfx: operation on ‘par->dirty.y1’ may be undefined · c39721c7
      Chris Wilson authored
      Trivial fix to set y1 = y2 = 0.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jakob Bornecrantz <jakob@vmware.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      c39721c7
  2. 21 Jul, 2010 2 commits
    • Chris Wilson's avatar
      drm: Return EBUSY if the framebuffer is unbound when flipping. · 90c1efdd
      Chris Wilson authored
      It looks like there is a race condition between unbinding a framebuffer
      on a hotplug event and user space trying to flip:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
      IP: [<ffffffffa008c7d3>] intel_crtc_page_flip+0xc9/0x39c [i915]
      PGD 114724067 PUD 1145bd067 PMD 0
      Oops: 0000 [#1] SMP
      Pid: 10954, comm: X Not tainted 2.6.35-rc5_stable_20100714+ #1
      P5Q-EM/P5Q-EM
      RIP: 0010:[<ffffffffa008c7d3>]  [<ffffffffa008c7d3>]
      intel_crtc_page_flip+0xc9/0x39c [i915]
      RSP: 0018:ffff880114927cc8  EFLAGS: 00010282
      RAX: 0000000000000000 RBX: ffff88012df48320 RCX: ffff88010c945600
      RDX: ffff880001a109c8 RSI: ffff88010c945840 RDI: ffff88012df48320
      RBP: ffff880114927d18 R08: ffff88012df48280 R09: ffff88012df48320
      R10: 0000000003c2e0b0 R11: 0000000000003246 R12: ffff88010c945840
      R13: ffff88012df48000 R14: 0000000000000060 R15: ffff88012dbb8000
      FS:  00007f9e6078e830(0000) GS:ffff880001a00000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000058 CR3: 00000001177a8000 CR4: 00000000000406f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process X (pid: 10954, threadinfo ffff880114926000, task
      ffff88012a4a1690)
      Stack:
       ffff88010c945600 ffff880115b176c0 ffff88012db10000 0000000000000246
      <0> fffffff40006101c ffff88010c945600 00000000ffffffea ffff88010c945600
      <0> ffff88012df48320 ffff88011b4b6780 ffff880114927d78 ffffffffa003bd0e
      Call Trace:
       [<ffffffffa003bd0e>] drm_mode_page_flip_ioctl+0x1bc/0x214 [drm]
       [<ffffffffa00311fc>] drm_ioctl+0x25e/0x35e [drm]
       [<ffffffffa003bb52>] ? drm_mode_page_flip_ioctl+0x0/0x214 [drm]
       [<ffffffff810f1c3c>] vfs_ioctl+0x2a/0x9e
       [<ffffffff810f227e>] do_vfs_ioctl+0x531/0x565
       [<ffffffff810f2307>] sys_ioctl+0x55/0x77
       [<ffffffff810e56d6>] ? sys_read+0x47/0x6f
       [<ffffffff81002a2b>] system_call_fastpath+0x16/0x1b
      Code: 45 d4 f4 ff ff ff 0f 84 e0 02 00 00 48 8b 4d b0 49 8d 9d 20 03 00 00 48
      89 df 49 89 4c 24 38 49 8b 07 49 89 44 24 20 49 8b 47 20 <48> 8b 40 58 49 c7 04
      24 00 00 00 00 49 c7 44 24 18 a9 a5 08 a0
      RIP  [<ffffffffa008c7d3>] intel_crtc_page_flip+0xc9/0x39c [i915]
       RSP <ffff880114927cc8>
      CR2: 0000000000000058
      
      References:
      
        Bug 28811 - [page-flipping] GPU hang when modeset after unplugging
                    another monitor (under compiz)
        https://bugs.freedesktop.org/show_bug.cgi?id=28811Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      90c1efdd
    • Ben Skeggs's avatar
      drm: add "auto" dithering method · 92897b5c
      Ben Skeggs authored
      There's no convenient/reliable way for drivers to both obey the dithering
      mode property, and to be able to attempt to provide a good default in all
      cases.
      
      This commit adds an "auto" method to the property which drivers can default
      to if they wish, whilst still allowing the user to override the choice as
      they do now.
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      92897b5c
  3. 16 Jul, 2010 1 commit
  4. 12 Jul, 2010 1 commit
  5. 08 Jul, 2010 1 commit
  6. 07 Jul, 2010 14 commits
  7. 05 Jul, 2010 8 commits
  8. 04 Jul, 2010 1 commit
    • Will Deacon's avatar
      ARM: 6205/1: perf: ensure counter delta is treated as unsigned · 446a5a8b
      Will Deacon authored
      Hardware performance counters on ARM are 32-bits wide but atomic64_t
      variables are used to represent counter data in the hw_perf_event structure.
      
      The armpmu_event_update function right-shifts a signed 64-bit delta variable
      and adds the result to the event count. This can lead to shifting in sign-bits
      if the MSB of the 32-bit counter value is set. This results in perf output
      such as:
      
       Performance counter stats for 'sleep 20':
      
       18446744073460670464  cycles             <-- 0xFFFFFFFFF12A6000
              7783773  instructions             #      0.000 IPC
                  465  context-switches
                  161  page-faults
              1172393  branches
      
         20.154242147  seconds time elapsed
      
      This patch ensures that the delta value is treated as unsigned so that the
      right shift sets the upper bits to zero.
      
      Cc: <stable@kernel.org>
      Acked-by: default avatarJamie Iles <jamie.iles@picochip.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      446a5a8b
  9. 03 Jul, 2010 1 commit
  10. 02 Jul, 2010 7 commits