aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/via/via_mm.c
Commit message (Collapse)AuthorAge
* drm/sis|via: don't return stack garbage from free_mem ioctlDaniel Vetter2012-01-09
| | | | | | | | | Fallout from my "kill drm_sman" refactor. Unfortunately gcc seems to have failed me and not warned about this. Tested-by: Jakob Bornecrantz <wallbraker@gmail.com> (on via) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/via: use drm_mm instead of drm_smanDaniel Vetter2011-12-21
| | | | | | | | | | | | | | 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: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/via: track user->memblock mapping with idrDaniel Vetter2011-12-21
| | | | | | | | | 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: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/sman: rip out owner trackingDaniel Vetter2011-12-21
| | | | | | | | | | | | | | | | | | | | | | | 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: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/via: track obj->drm_fd relations in the driverDaniel Vetter2011-12-21
| | | | | | Exactly like the previous patch for sis. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/via: fixed coding style issues, simplified returnNicolas Kaiser2010-08-01
| | | | | | | | | | | Fixed brace, macro and spacing coding style issues. Simplified -if (ret) return ret; -return 0; +return ret; Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: kill drm_device->irqJesse Barnes2008-10-17
| | | | | | | | | Like the last patch but adds a macro to get at the irq value instead of dereferencing pdev directly. Should make things easier for the BSD guys and if we ever support non-PCI devices. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-13
With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>