- 24 9月, 2015 1 次提交
-
-
由 Christian Engelmayer 提交于
Function vmw_cotable_unbind() uses the uninitialized variable ret as return value. Make the result deterministic and directly return as the variable is unused anyway. Detected by Coverity CID 1324256. Signed-off-by: NChristian Engelmayer <cengelma@gmx.at> Reviewed-by: NSinclair Yeh <syeh@vmware.com> Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
-
- 17 9月, 2015 1 次提交
-
-
由 Thomas Hellstrom 提交于
ioremap_cache() is currently not available on some architectures. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
- 14 9月, 2015 2 次提交
-
-
由 Thomas Hellstrom 提交于
On the guest kernel side, previously the FIFO has been mapped write- combined. This has worked since VMs up to now has not honored the mapping type and mapped the FIFO cached anyway. Since the FIFO is accessed cached by the CPU on the virtual device side, this leads to inconsistent mappings once the guest starts to honor the mapping types. So ask for cached mappings when we map the FIFO. We do this by using ioremap_cache() instead of ioremap_wc(), and remove the MTRR setup. On the TTM side, MOBs, GMRs and VRAM buffers are already requesting cached mappings for kernel- and user-space. Cc: <stable@vger.kernel.org> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
If user space calls unreference on a user_dmabuf it will typically kill the struct ttm_base_object member which is responsible for the user-space visibility. However the dmabuf part may still be alive and refcounted. In some situations, like for shared guest-backed surface referencing/opening, the driver may try to reference the struct ttm_base_object member again, causing an immediate kernel warning and a later kernel NULL pointer dereference. Fix this by always maintaining a reference on the struct ttm_base_object member, in situations where it might subsequently be referenced. Cc: <stable@vger.kernel.org> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
- 01 9月, 2015 1 次提交
-
-
由 Thomas Hellstrom 提交于
Applications like gnome-shell may try to render after dropping master privileges. Since the driver should now be safe against this scenario, allow those applications to use their legacy node like a render node. v2: Add missing return statement. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
- 21 8月, 2015 2 次提交
-
-
由 Thomas Hellstrom 提交于
No need to try to call ttm_bo_device_release twice during module unload. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
When a user-space process writes directly to the fbdev framebuffer, we hit a circular locking dependency. Fix this by introducing a local delayed work callback so that the defio lock can be released before calling into the modesetting code for a dirty update. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
- 14 8月, 2015 1 次提交
-
-
由 Thomas Hellstrom 提交于
This addresses two issues that cause problems with viewperf maya-03 in situation with memory pressure. The first issue causes attempts to unreserve buffers if batched reservation fails due to, for example, a signal pending. While previously the ttm_eu api was resistant against this type of error, it is no longer and the lockdep code will complain about attempting to unreserve buffers that are not reserved. The issue is resolved by avoid calling ttm_eu_backoff_reservation in the buffer reserve error path. The second issue is that the binding_mutex may be held when user-space fence objects are created and hence during memory reclaims. This may cause recursive attempts to grab the binding mutex. The issue is resolved by not holding the binding mutex across fence creation and submission. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com> Cc: <stable@vger.kernel.org> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
- 13 8月, 2015 9 次提交
-
-
由 Sinclair Yeh 提交于
Updating and fixing copyright headers. Bump version minor to signal vgpu10 support. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Sinclair Yeh 提交于
Add support for vgpu10 queries. Functional- and formatting fixes. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Neha Bhende 提交于
Add support for SVGA_3D_CMD_DX_BUFFER_COPY and SVGA_3D_CMD_DX_PRED_COPY_REGION Signed-off-by: NNeha Bhende <nbhende@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Charmaine Lee 提交于
Implement support for a couple of missing commands and fix a command parser error path. Also fix uninitialized devcaps and surface size computation. Signed-off-by: NCharmaine Lee <charmainel@vmware.com> Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Thomas Hellstrom 提交于
Initial DX support. Co-authored with Sinclair Yeh, Charmaine Lee and Jakob Bornecrantz. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NCharmaine Lee <charmainel@vmware.com>
-
由 Sinclair Yeh 提交于
Add DX includes and move all device includes to a separate directory. Co-authored with Thomas Hellstrom, Charmaine Lee and above all, the VMware device team. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Signed-off-by: NCharmaine Lee <charmainel@vmware.com>
-
由 Sinclair Yeh 提交于
This patch fixes two issues. One, when a surface is a proxy for a DMA buffer, it holds an extra reference that needs to be cleared. Two, when fbdev is enabled, we need to unpin the framebuffer before unloading the driver. This is done by a call to vmw_fb_off(). v2 Moved unreferencing surface to from vmw_framebuffer_surface_destroy() to vmw_kms_new_framebuffer() Added "struct vmw_framebuffer *vfb = NULL;" to silence a compiler warning. Removed error checking after calling vmw_surface/dmabuf_reference() Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Thomas Hellstrom 提交于
On older hardware, texture max width and height is not available, so set it to something reasonable, like 8192. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Sinclair Yeh 提交于
For a Screen Target capable display device, the display topology is limited by SVGA_REG_MAX_PRIMARY_BOUNDING_BOX_MEM. Two values are checked against this limit: 1. Size of the bounding box enclosing all the displays, and 2. Size of the total number of displays, e.g. framebuffers The limitations above mean we do not have exact max width and height for the topology. The best current option is to set those to the maximum texture width/height. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
-
- 06 8月, 2015 1 次提交
-
-
由 Viresh Kumar 提交于
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
-
- 05 8月, 2015 22 次提交
-
-
由 Thomas Hellstrom 提交于
Reported by Intel's kbuild robot. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
When the size of dma_addr_t was 32 bits, the compiler warned about the size of the 32 bit shift being larger than the size of the data type. Reported by Intel's kbuild robot. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
We're giving up all attempts to keep cpu- and device byte ordering separate. This silences sparse when compiled using make C=2 CF="-D__CHECK_ENDIAN__" Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Thomas Hellstrom 提交于
The preferred mode typically didn't end up first, since the function drm_mode_connector_list_update() reordered the modes. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
It somehow got lost in a rewrite. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
With screen targets the old legacy display system fbdev doesn't work satisfactory anymore. At best the resolution is severely restricted. Therefore implement fbdev on top of the kms system. With this change, fbdev will be using whatever KMS backend is chosen. There are helpers available for this, so in the future we'd probably want to implement the helper callbacks instead of calling into our KMS implementation directly. v2: Make sure we take the mode_config mutex around modesetting, Also clear the initial framebuffer using vzalloc instead of vmalloc. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
The kernel interface is needed for fbdev, and needs to be free from a file_priv member. To accomplish this, remove the fb surface mutex and list which isn't used anymore, anyway. Finally, make the pin() and unpin() pin the framebuffer for all display system backends, so that fbdev can pin its framebuffer before mapping it. v2: Address review comments: - Fix vmw_framebuffer_unpin() to handle also the surface framebuffer case. - Fix vmw_kms_new_framebuffer() to actually use the only_2d parameter. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
If the command buffer pool is out of space, the code waits until space is available. However since the condition code tries to allocate a range manager node while !TASK_RUNNING we get a kernel warning. Avoid this by pre-allocating the mm node. This will also probably be more efficient. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
Also implements the missing readback function and fixes page flip in case of no event. v2: - Adapt to the work done for screen targets for 2d, in particular Handle proxy surface updates. - Remove execbuf quirks since we now use fifo reserve / commit. - Revert the initial placement of vmw dma buffers. v3: Address review comments. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
This makes it possible to use the same function for surface dirty and present. Also fixes page flip without events. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
We need to make the dirty- and readback functions callable without a struct drm_file pointer. We also need to unify the handling of dirty- and readback cliprects that are now implemented in various places across the kms system, som add helpers to facilitate this. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
v2: Fix dma buffer validation on resource pinning. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Sinclair Yeh 提交于
This patch address the following underlying issues with SurfaceDMA * SurfaceDMA command does not work in a 2D VM, but we can wrap a proxy surface around the same DMA buffer and use the SurfaceCopy command which does work in a 2D VM. * Wrapping a DMA buffer with a proxy surface also gives us an added optimization path for the case when the DMA buf dimensions match the mode. In this case, the DMA buf can be pinned as the display surface, saving an extra copy. This only works in a 2D VM because we won't be doing any rendering operations directly to the display surface. v2 * Moved is_dmabuf_proxy field to vmw_framebuffer_surface * Undone coding style changes * Addressed other issues from review Signed-off-by: NSinclair Yeh <syeh@vmware.com> Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Sinclair Yeh 提交于
Add support for the screen target device interface. Add a getparam parameter and bump minor to signal availability. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Thomas Hellstrom 提交于
For certain surface copies, we don't have a user space handle for the destination surface. In such cases, we are going to trust that our caller is giving us the right surface ID. To do this case, we created a quirk flag that may be useful in the future for handling other cases. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Signed-off-by: NSinclair Yeh <syeh@vmware.com>
-
由 Sinclair Yeh 提交于
Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Sinclair Yeh 提交于
Refactored vmw_gb_surface_define_ioctl() and made the surface definition part a separate function. This way other parts of vmwgfx can use it to allocate kernel-visible GB surfaces. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Sinclair Yeh 提交于
Update device definition headers to support screen targets. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
-
由 Thomas Hellstrom 提交于
For screen targets it appears we need to pin surfaces while they are bound as screen targets, so add a small interface to do that. v2: Always increase pin_count on pin. v3: Add missing reservation sem. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
Fix a circular locking dependency between struct vmw_overlay::mutex and struct vmw_private::reservation_sem Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Add command buffer support. Currently we don't implement preemption or fancy error handling. Tested with a couple of mesa-demos, compiz/unity and viewperf maya-03. v2: - Synchronize with pending work at command buffer manager takedown. - Add an interface to flush the current command buffer for latency-critical command batches and apply it to framebuffer dirtying. v3: - Minor fixes of definitions and typos to address reviews. - Removed new or moved branch predictor hints. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-
由 Thomas Hellstrom 提交于
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NSinclair Yeh <syeh@vmware.com>
-