- 16 3月, 2014 1 次提交
-
-
由 David Herrmann 提交于
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: NDavid Herrmann <dh.herrmann@gmail.com>
-
- 09 10月, 2013 1 次提交
-
-
由 David Herrmann 提交于
All drivers embed gem-objects into their own buffer objects. There is no reason to keep drm_gem_object_alloc(), gem->driver_private and ->gem_init_object() anymore. New drivers are highly encouraged to do the same. There is no benefit in allocating gem-objects separately. Cc: Dave Airlie <airlied@gmail.com> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Ben Skeggs <skeggsb@gmail.com> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NAlex Deucher <alexander.deucher@amd.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
- 19 8月, 2013 1 次提交
-
-
由 Rob Clark 提交于
Signed-off-by: NRob Clark <robdclark@gmail.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
- 07 8月, 2013 1 次提交
-
-
由 Daniel Vetter 提交于
All the gem based kms drivers really want the same function to destroy a dumb framebuffer backing storage object. So give it to them and roll it out in all drivers. This still leaves the option open for kms drivers which don't use GEM for backing storage, but it does decently simplify matters for gem drivers. Acked-by: NInki Dae <inki.dae@samsung.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org> Cc: Ben Skeggs <skeggsb@gmail.com> Reviwed-by: NRob Clark <robdclark@gmail.com> Cc: Alex Deucher <alexdeucher@gmail.com> Acked-by: NPatrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
- 25 7月, 2013 1 次提交
-
-
由 David Herrmann 提交于
Use the new vma manager instead of the old hashtable. Also convert all drivers to use the new convenience helpers. This drops all the (map_list.hash.key << PAGE_SHIFT) non-sense. Locking and access-management is exactly the same as before with an additional lock inside of the vma-manager, which strictly wouldn't be needed for gem. v2: - rebase on drm-next - init nodes via drm_vma_node_reset() in drm_gem.c v3: - fix tegra v4: - remove duplicate if (drm_vma_node_has_offset()) checks - inline now trivial drm_vma_node_offset_addr() calls v5: - skip node-reset on gem-init due to kzalloc() - do not allow mapping gem-objects with offsets (backwards compat) - remove unneccessary casts Cc: Inki Dae <inki.dae@samsung.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Dave Airlie <airlied@redhat.com> Cc: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NPatrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: NDave Airlie <airlied@gmail.com>
-
- 23 7月, 2013 1 次提交
-
-
由 David Herrmann 提交于
drm_gem_object_init() and drm_gem_private_object_init() do exactly the same (except for shmem alloc) so make the first use the latter to reduce code duplication. Also drop the return code from drm_gem_private_object_init(). It seems unlikely that we will extend it any time soon so no reason to keep it around. This simplifies code paths in drivers, too. Last but not least, fix gma500 to call drm_gem_object_release() before freeing objects that were allocated via drm_gem_private_object_init(). That isn't actually necessary for now, but might be in the future. Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: NPatrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: NRob Clark <robdclark@gmail.com> Signed-off-by: NDave Airlie <airlied@gmail.com>
-
- 17 2月, 2013 3 次提交
-
-
由 Rob Clark 提交于
Now that the omapdss interface has been reworked so that omapdrm can use dispc directly, we have been able to fix the remaining functional kms issues with omapdrm. And in the mean time the PM sequencing and many other of that open issues have been solved. So I think it makes sense to finally move omapdrm out of staging. Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Peter Huewe 提交于
Found with coccicheck. The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andy Gross 提交于
Added power management capabilities into the omapdrm and DMM drivers. During suspend, we don't need to do anything to maintain the state of the LUT. We have all the necessary information to recreate the mappings of the GEM object list maintained by the omapdrm driver. On resume, the DMM resume handler will first reprogram the LUT to point to the dummy page. The subsequent resume handler in the omapdrm will call into the DMM and reprogram each of the buffer objects. This will ensure that all of the necessary objects will be pinned into the DMM properly. Order of suspend/resume handlers is done by device creation. We create the DMM device before the omapdrm, so the correct order is maintained. Signed-off-by: NAndy Gross <andy.gross@ti.com> Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 2月, 2013 1 次提交
-
-
由 Joe Perches 提交于
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 30 1月, 2013 1 次提交
-
-
由 Peter Huewe 提交于
Found with coccicheck. The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: NPeter Huewe <peterhuewe@gmx.de> Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 1月, 2013 1 次提交
-
-
由 Andy Gross 提交于
Added power management capabilities into the omapdrm and DMM drivers. During suspend, we don't need to do anything to maintain the state of the LUT. We have all the necessary information to recreate the mappings of the GEM object list maintained by the omapdrm driver. On resume, the DMM resume handler will first reprogram the LUT to point to the dummy page. The subsequent resume handler in the omapdrm will call into the DMM and reprogram each of the buffer objects. This will ensure that all of the necessary objects will be pinned into the DMM properly. Order of suspend/resume handlers is done by device creation. We create the DMM device before the omapdrm, so the correct order is maintained. Signed-off-by: NAndy Gross <andy.gross@ti.com> Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 11月, 2012 3 次提交
-
-
由 YAMANE Toshiaki 提交于
The following errors fixed. - ERROR: space prohibited after that '!' (ctx:BxW) Signed-off-by: NYAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 YAMANE Toshiaki 提交于
The following warnings fixed. - WARNING: braces {} are not necessary for single statement blocks Signed-off-by: NYAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 YAMANE Toshiaki 提交于
The following error fixed. - ERROR: "foo ** bar" should be "foo **bar" Signed-off-by: NYAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 23 10月, 2012 2 次提交
-
-
由 Andy Gross 提交于
Removed usage of the cpu_is_omapXXXX in the DMM driver. This is no longer necessary as we can key off of the omap_dmm pointer that is only non-NULL if the device has been probed successfully. Signed-off-by: NAndy Gross <andy.gross@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Vincent Penquerc'h 提交于
Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NVincent Penquerc'h <vincent.penquerch@collabora.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 9月, 2012 1 次提交
-
-
由 Al Viro 提交于
simplifies a bunch of callers... Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 05 9月, 2012 1 次提交
-
-
由 Emil Goode 提交于
This patch adds fail checks for kmalloc and kzalloc calls and also adds a error path that frees allocated pages by introducing a call to _drm_gem_put_pages. Signed-off-by: NEmil Goode <emilgoode@gmail.com> Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 8月, 2012 1 次提交
-
-
由 Rob Clark 提交于
Use tiled buffers for rotated/reflected scanout, with CRTC and plane properties as the interface for userspace to configure rotation. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 5月, 2012 1 次提交
-
-
由 Rob Clark 提交于
Add support for mmap'ing buffers via dmabuf. For handling mmap of cached buffers correctly, fault handling and PTE shootdown are used to track dirty pages and automagically handle cache flushes before dma access to the buffer. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 11 4月, 2012 1 次提交
-
-
由 Rob Clark 提交于
For now just implementing the exporting APIs, not yet importing. And kmap is rejected on tiled buffers (although the usefulness of that seems questionable, but could be added later if needed). Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 08 3月, 2012 4 次提交
-
-
由 Rob Clark 提交于
Deal with the case of buffers with virtual stride larger than one page in fault_2d(). Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andy Gross 提交于
This patch splits the DMM off into a separate sub-device, in order to utilize the platform device information that was created as part of the OMAP hwmod entry for the DMM. The driver probe function queries the iomem resource and IRQ using standard platform_get functions. The OMAP DRM driver now calls the platform_driver_register() function for the subordinate DMM driver inside its probe function. This guarantees the required order for the DMM and ensures the DMM resources are available for use by the DRM driver. Signed-off-by: NAndy Gross <andy.gross@ti.com> Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rob Clark 提交于
Add some additional debugfs file to aid in tracking buffer usage. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rob Clark 提交于
If fbcon calls us from atomic context, push the work off to the workqueue to avoid calling into the gem/dmm code in an atomic context. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 2月, 2012 2 次提交
-
-
由 Rob Clark 提交于
The create/free mmap offset code must be synchronized. Yet only some callers of omap_gem_mmap_offset() held struct_mutex. Leading to various crashes around drm_mm_insert_helper_range(). (In the free-object path, which is currently the only place we drm_gem_free_mmap_offset(), struct_mutex is already held.) Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Rob Clark 提交于
Add support in framebuffer objects for other color formats and multi- planar YUV (NV12). Since this requires changing the API between the plane and fb for getting scanout information (paddr, etc), take advantage of the opportunity and put in place a way to allow fb's to be unpinned when they are not being scanned out. Now, before start of scanout the plane calls omap_framebuffer_pin() which takes care to pin all the backing bo's, then omap_framebuffer_update_scanout() however many times to update the scanout address(es), etc, and then when finished omap_framebuffer_unpin(). Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 23 12月, 2011 1 次提交
-
-
由 Rob Clark 提交于
Uncached/writecombine buffers need to be clean before creating uc/wc userspace mappings, lest dirty cache lines fall down and corrupt the contents of the buffer. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 17 12月, 2011 1 次提交
-
-
由 Rob Clark 提交于
omap_gem_roll() could be called by fbcon in atomic context or when struct_mutext is held. Avoid aquiring mutex (deadlock), or calling tiler_pin() (which itself is not safe for atomic context) in these cases. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 13 12月, 2011 2 次提交
-
-
由 Rob Clark 提交于
Add support for YWRAP scrolling by shuffling pages around in DMM instead of sw blits. Note that fbcon only utilizes this mode if the y resolution is divided evenly by the font height. So, for example, a 1920x1080 display using a 16 pixel tall font will not utilize this, but a 1280x1024 display would. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Rob Clark 提交于
Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 09 12月, 2011 1 次提交
-
-
由 Rob Clark 提交于
TILER/DMM provides two features for omapdrm GEM objects: 1) providing a physically contiguous view to discontiguous memory for hw initiators that cannot otherwise support discontiguous buffers (DSS scanout, IVAHD video decode/encode, etc) 2) providing untiling for 2d tiled buffers, which are used in some cases to provide rotation and reduce memory bandwidth for hw initiators that tend to access data in 2d block patterns. For 2d tiled buffers, there are some additional complications when it comes to userspace mmap'ings. For non-tiled buffers, the original (potentially physically discontiguous) pages are used to back the mmap. For tiled buffers, we need to mmap via the tiler/dmm region to provide an unswizzled view of the buffer. But (a) the buffer is not necessarily pinned in TILER all the time (it can be unmapped when there is no DMA access to the buffer), and (b) when they are they are pinned, they not necessarily page aligned from the perspective of the CPU. And non-page aligned userspace buffer mapping is evil. To solve this, we reserve one or more small regions in each of the 2d containers when the driver is loaded to use as a "user-GART" where we can create a second page-aligned mapping of parts of the buffer being accessed from userspace. Page faulting is used to evict and remap different regions of whichever buffers are being accessed from user- space. Signed-off-by: NRob Clark <rob@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 27 11月, 2011 1 次提交
-
-
由 Rob Clark 提交于
A DRM display driver for TI OMAP platform. Similar to omapfb (fbdev) and omap_vout (v4l2 display) drivers in the past, this driver uses the DSS2 driver to access the display hardware, including support for HDMI, DVI, and various types of LCD panels. And it implements GEM support for buffer allocation (for KMS as well as offscreen buffers used by the xf86-video-omap userspace xorg driver). The driver maps CRTCs to overlays, encoders to overlay-managers, and connectors to dssdev's. Note that this arrangement might change slightly when support for drm_plane overlays is added. For GEM support, non-scanout buffers are using the shmem backed pages provided by GEM core (In drm_gem_object_init()). In the case of scanout buffers, which need to be physically contiguous, those are allocated with CMA and use drm_gem_private_object_init(). See userspace xorg driver: git://github.com/robclark/xf86-video-omap.git Refer to this link for CMA (Continuous Memory Allocator): http://lkml.org/lkml/2011/8/19/302 Links to previous versions of the patch: v1: http://lwn.net/Articles/458137/ v2: http://patches.linaro.org/4156/ v3: http://patches.linaro.org/4688/ v4: http://patches.linaro.org/4791/ History: v5: move headers from include/drm at Greg KH's request, minor rebasing on 3.2-rc1, pull in private copies of drm_gem_{get,put}_pages() because "drm/gem: add functions to get/put pages" patch is not merged yet v4: bit of rework of encoder/connector _dpms() code, modeset_init() rework to not use nested functions, update TODO.txt v3: minor cleanups, improved error handling for dev_load(), some minor API changes that will be needed later for tiled buffer support v2: replace omap_vram with CMA for scanout buffer allocation, remove unneeded functions, use dma_addr_t for physical addresses, error handling cleanup, refactor attach/detach pages into common drm functions, split non-userspace-facing API into omap_priv.h, remove plugin API v1: original Signed-off-by: NRob Clark <rob@ti.com> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-