summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bochs/bochs_mm.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/ttm: move fpfn and lpfn into each placement v2Christian König2014-08-271-7/+13
| | | | | | | | | This allows us to more fine grained specify where to place the buffer object. v2: rebased on drm-next, add bochs changes as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/bochs: replace ALIGN(PAGE_SIZE) by PAGE_ALIGNFabian Frederick2014-07-081-1/+1
| | | | | | | use mm.h definition Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
* drm/bochs: Remove unecessary NULL check in gem_freeDaniel Vetter2014-04-221-2/+0
| | | | | | | | | | | | The ->gem_free_object never gets called with a NULL pointer, the check is redundant. Also checking after the upcast allows compilers to elide it anyway. Noticed while chasing coverity reports, somehow this one here was not flagged. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/bochs: Remove unnecessary NULL check in bo_unrefDaniel Vetter2014-04-221-3/+1
| | | | | | | | | | ttm_bo_unref unconditionally calls kref_put on it's argument, so the thing can't be NULL without already causing Oopses. Spotted by coverity. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: init TTM dev_mapping in ttm_bo_device_init()David Herrmann2014-03-161-1/+3
| | | | | | | | | | | | | | With dev->anon_inode we have a global address_space ready for operation right from the beginning. Therefore, there is no need to do a delayed setup with TTM. Instead, set dev_mapping during initialization in ttm_bo_device_init() and remove any "if (dev_mapping)" conditions. Cc: Dave Airlie <airlied@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
* drm: use anon-inode instead of relying on cdevsDavid Herrmann2014-03-161-1/+1
| | | | | | | | | | | | | | | | DRM drivers share a common address_space across all character-devices of a single DRM device. This allows simple buffer eviction and mapping-control. However, DRM core currently waits for the first ->open() on any char-dev to mark the underlying inode as backing inode of the device. This delayed initialization causes ugly conditions all over the place: if (dev->dev_mapping) do_sth(); To avoid delayed initialization and to stop reusing the inode of the char-dev, we allocate an anonymous inode for each DRM device and reset filp->f_mapping to it on ->open(). Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
* drm/bochs: new driverGerd Hoffmann2013-12-231-0/+546
DRM driver for (virtual) vga cards using the bochs dispi interface, such as the qemu standard vga (qemu -vga std). Don't bother supporting anything but 32bpp for now, even though the virtual hardware is able to do that. Known issue: mmap(/dev/fb0) doesn't work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud