1. 22 Dec, 2011 2 commits
    • Daniel Vetter's avatar
      drm/i810: don't acces hw regs in lastclose · 40c34d04
      Daniel Vetter authored
      i810 uses a userspace provided mmio map using the drm core map
      infrastructure. By the time we reach lastclose, this is all gone
      and our mmio_map pointer points at freed memory. Depending upon
      luck that still works, most often it just oopses.
      
      Aside: drm maps aren't refcounted, so userspace can essentially oops
      the kernel any time it wants to. Who cares.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      40c34d04
    • Daniel Vetter's avatar
      drm/i810: cleanup reclaim_buffers · 87499ffd
      Daniel Vetter authored
      My dear old i815 always hits the deadlocked on reclaim_buffers
      warning. Switch over to the idlelock duct-tape on hope that
      works better. I've fired up my i815 and now closing glxgears doesn't
      take 5 seconds anymore. \o/
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      87499ffd
  2. 21 Dec, 2011 17 commits
    • Daniel Vetter's avatar
      drm: kill drm_sman · 7a6e0daa
      Daniel Vetter authored
      No longer used.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7a6e0daa
    • Daniel Vetter's avatar
      drm/sis: use drm_mm instead of drm_sman · be2fb9da
      Daniel Vetter authored
      v2: Smash compile fix from Tormod Volden <debian.tormod@gmail.com> for
      CONFIG_FB_SIS on top of this.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      be2fb9da
    • Daniel Vetter's avatar
      drm/via: use drm_mm instead of drm_sman · 977b4f6e
      Daniel Vetter authored
      To make the transition in a piece-wise and bisectable way possible,
      I've hijacked the ->owner_list from drm_sman. While transitioning, the
      list_add was done by the driver, while the list_del was still done by
      the dying sman code.
      
      Now that we are in full control of ->owner_list, do the list_del
      ourselves.
      
      v2: Better explain the list_del trickery as suggested by Chris Wilson.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      977b4f6e
    • Daniel Vetter's avatar
      drm/sman: kill user_hash_tab · 94e89532
      Daniel Vetter authored
      No longer used.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      94e89532
    • Daniel Vetter's avatar
      6de8a748
    • Daniel Vetter's avatar
      drm/via: track user->memblock mapping with idr · 77ee8f38
      Daniel Vetter authored
      Massive indirection through a hashtable for a simple key->pointer
      look-up actually just adds bloat.
      
      v2: Drop the misleading comment noted by Chris Wilson.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      77ee8f38
    • Daniel Vetter's avatar
      drm/sman: rip out owner tracking · 763240de
      Daniel Vetter authored
      In contrast to kms drivers, sis/via _always_ associated a buffer with
      a drm fd. So by the time we reach lastclose, all open drm fds are gone
      and with them their associated objects.
      
      So when sis/via call drm_sman_cleanup in their lastclose funcs, that
      will free 0 objects.
      
      The owner tracking now serves no purpose at all, hence rip it ou. We
      can't kill the corresponding fields in struct drm_memblock_item yet
      because we hijack these in the new driver private owner tracking. But
      now that drm_sman.c doesn't touch ->owner_list anymore, we need to
      kill the list_move hack and properly add the item to the file_priv
      list.
      
      Also leave the list_del(&obj->owner_list) in drm_sman_free for the
      moment, it will move to the drivers when sman disappears completely.
      
      v2: Remove the redundant INIT_LIST_HEAD as noted by Chris Wilson
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      763240de
    • Daniel Vetter's avatar
      drm/sman: kill owner tracking interface functions · aa38e2e0
      Daniel Vetter authored
      These are now unused.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      aa38e2e0
    • Daniel Vetter's avatar
      drm/via: track obj->drm_fd relations in the driver · c828e204
      Daniel Vetter authored
      Exactly like the previous patch for sis.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c828e204
    • Daniel Vetter's avatar
      drm/sis: track obj->drm_fd relations in the driver · fdc0b8a6
      Daniel Vetter authored
      By attach a driver private struct to each open drm fd.
      
      Because we steal the owner_list from drm_sman until things settle,
      use list_move instead of list_add.
      
      This requires to export a drm_sman function temporarily before
      drm_sman will die for real completely.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      fdc0b8a6
    • Dave Airlie's avatar
      Merge remote-tracking branch 'pfdo/drm-fixes' into drm-core-next · 4cf73129
      Dave Airlie authored
      -next reported a messy merge, so I've merged my upstream pull into
      my -next tree.
      
      Conflicts:
      	drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
      4cf73129
    • Dave Airlie's avatar
      Merge branch 'exynos-drm-next' of... · 3e54f5b7
      Dave Airlie authored
      Merge branch 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung into drm-core-next
      
      * 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung:
        drm/exynos: Add plane support with fimd
        drm/exynos: add runtime pm feature for fimd
        drm/exynos: updated crtc and encoder dpms framework.
        drm/exynos: Use struct drm_mode_fb_cmd2
        drm/exynos: Fix compile errors
      3e54f5b7
    • Joonyoung Shim's avatar
      drm/exynos: Add plane support with fimd · 864ee9e6
      Joonyoung Shim authored
      The exynos fimd supports 5 window overlays. Only one window overlay of
      fimd is used by the crtc, so we need plane feature to use the rest
      window overlays.
      
      This creates one ioctl exynos specific - DRM_EXYNOS_PLANE_SET_ZPOS, it
      is the ioctl to decide for user to assign which window overlay.
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      864ee9e6
    • Joonyoung Shim's avatar
      drm/exynos: add runtime pm feature for fimd · cb91f6a0
      Joonyoung Shim authored
      This adds runtime PM feature for fimd. The runtime PM functions control
      clocks for fimd and prevent to access the register of fimd for vblank
      when clock is turned off by suspend of runtime PM.
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      cb91f6a0
    • Inki Dae's avatar
      drm/exynos: updated crtc and encoder dpms framework. · ec05da95
      Inki Dae authored
      With DPMS ON and OFF requests, crtc dpms would be in charge of
      just only device power such as fimd or hdmi and encoder dpms
      in charge of device setting(mode setting and register updating)
      and also lcd panel and digital TV power.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      ec05da95
    • Joonyoung Shim's avatar
      drm/exynos: Use struct drm_mode_fb_cmd2 · a794d57d
      Joonyoung Shim authored
      The exynos drm also should use struct drm_mode_fb_cmd2 by changes of
      308e5bcb commit(drm: add an fb creation
      ioctl that takes a pixel format v5).
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      a794d57d
    • Joonyoung Shim's avatar
      drm/exynos: Fix compile errors · ac2bdf73
      Joonyoung Shim authored
      This compile errors occur by changes of
      e08e96de commit, so exynos drm should
      apply this changes.
      
        CC      drivers/gpu/drm/exynos/exynos_drm_drv.o
      drivers/gpu/drm/exynos/exynos_drm_drv.c:185: warning: braces around scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:185: warning: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:186: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:186: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:186: warning: initialization from incompatible pointer type
      drivers/gpu/drm/exynos/exynos_drm_drv.c:187: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:187: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:187: warning: excess elements in scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:187: warning: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:188: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:188: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:188: warning: excess elements in scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:188: warning: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:189: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:189: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:189: warning: excess elements in scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:189: warning: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:190: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:190: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:190: warning: excess elements in scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:190: warning: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:191: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:191: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:191: warning: excess elements in scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:191: warning: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:192: error: field name not in record or union initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:192: error: (near initialization for 'exynos_drm_driver.fops')
      drivers/gpu/drm/exynos/exynos_drm_drv.c:192: warning: excess elements in scalar initializer
      drivers/gpu/drm/exynos/exynos_drm_drv.c:192: warning: (near initialization for 'exynos_drm_driver.fops')
      make[4]: *** [drivers/gpu/drm/exynos/exynos_drm_drv.o] Error 1
      make[3]: *** [drivers/gpu/drm/exynos] Error 2
      make[2]: *** [drivers/gpu/drm] Error 2
      make[1]: *** [drivers/gpu] Error 2
      make: *** [drivers] Error 2
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      ac2bdf73
  3. 20 Dec, 2011 21 commits