History

Merge tag 'vmwgfx-fixes-3.14-2014-03-02' of git://people.freedesktop.org/~thomash/linux into drm-fixes

A couple of minor fixes. Pull request of 2014-03-02 * tag 'vmwgfx-fixes-3.14-2014-03-02' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: avoid null pointer dereference at failure paths drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date. drm/vmwgfx: Remove some unused surface formats

Dave Airlie committed 12 years ago

Commit 49e893b2 parents b044788 6950e234 files · +22 −25Browse files

Unified · Split

4 files
  1. drivers/gpu/drm/vmwgfx/svga3d_reg.h +1 −6
  2. drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +1 −1
  3. drivers/gpu/drm/vmwgfx/vmwgfx_mob.c +19 −16
  4. drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +1 −2
drivers/gpu/drm/vmwgfx/svga3d_reg.h+1−6
@@ -261,12 +261,7 @@ typedef enum SVGA3dSurfaceFormat { · 260 unmodified lines
261 /* Planar video formats. */261 /* Planar video formats. */
262 SVGA3D_YV12 = 121,262 SVGA3D_YV12 = 121,
263 263
264 /* Shader constant formats. */264 SVGA3D_FORMAT_MAX = 122,
265 SVGA3D_SURFACE_SHADERCONST_FLOAT = 122,
266 SVGA3D_SURFACE_SHADERCONST_INT = 123,
267 SVGA3D_SURFACE_SHADERCONST_BOOL = 124,
268
269 SVGA3D_FORMAT_MAX = 125,
270} SVGA3dSurfaceFormat;265} SVGA3dSurfaceFormat;
271 266
272typedef uint32 SVGA3dColor; /* a, r, g, b */267typedef uint32 SVGA3dColor; /* a, r, g, b */
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
40#include <drm/ttm/ttm_module.h>40#include <drm/ttm/ttm_module.h>
41#include "vmwgfx_fence.h"41#include "vmwgfx_fence.h"
42 42
43#define VMWGFX_DRIVER_DATE "20121114"43#define VMWGFX_DRIVER_DATE "20140228"
44#define VMWGFX_DRIVER_MAJOR 244#define VMWGFX_DRIVER_MAJOR 2
45#define VMWGFX_DRIVER_MINOR 545#define VMWGFX_DRIVER_MINOR 5
46#define VMWGFX_DRIVER_PATCHLEVEL 046#define VMWGFX_DRIVER_PATCHLEVEL 0
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c+19−16
@@ -188,18 +188,20 @@ static void vmw_takedown_otable_base(struct vmw_private *dev_priv, · 187 unmodified lines
188 188
189 bo = otable->page_table->pt_bo;189 bo = otable->page_table->pt_bo;
190 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));190 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));
191 if (unlikely(cmd == NULL))191 if (unlikely(cmd == NULL)) {
192 DRM_ERROR("Failed reserving FIFO space for OTable setup.\n");192 DRM_ERROR("Failed reserving FIFO space for OTable "
193 193 "takedown.\n");
194 memset(cmd, 0, sizeof(*cmd));194 } else {
195 cmd->header.id = SVGA_3D_CMD_SET_OTABLE_BASE;195 memset(cmd, 0, sizeof(*cmd));
196 cmd->header.size = sizeof(cmd->body);196 cmd->header.id = SVGA_3D_CMD_SET_OTABLE_BASE;
197 cmd->body.type = type;197 cmd->header.size = sizeof(cmd->body);
198 cmd->body.baseAddress = 0;198 cmd->body.type = type;
199 cmd->body.sizeInBytes = 0;199 cmd->body.baseAddress = 0;
200 cmd->body.validSizeInBytes = 0;200 cmd->body.sizeInBytes = 0;
201 cmd->body.ptDepth = SVGA3D_MOBFMT_INVALID;201 cmd->body.validSizeInBytes = 0;
202 vmw_fifo_commit(dev_priv, sizeof(*cmd));202 cmd->body.ptDepth = SVGA3D_MOBFMT_INVALID;
203 vmw_fifo_commit(dev_priv, sizeof(*cmd));
204 }
203 205
204 if (bo) {206 if (bo) {
205 int ret;207 int ret;
@@ -562,11 +564,12 @@ void vmw_mob_unbind(struct vmw_private *dev_priv, · 356 unmodified lines
562 if (unlikely(cmd == NULL)) {564 if (unlikely(cmd == NULL)) {
563 DRM_ERROR("Failed reserving FIFO space for Memory "565 DRM_ERROR("Failed reserving FIFO space for Memory "
564 "Object unbinding.\n");566 "Object unbinding.\n");
567 } else {
568 cmd->header.id = SVGA_3D_CMD_DESTROY_GB_MOB;
569 cmd->header.size = sizeof(cmd->body);
570 cmd->body.mobid = mob->id;
571 vmw_fifo_commit(dev_priv, sizeof(*cmd));
565 }572 }
566 cmd->header.id = SVGA_3D_CMD_DESTROY_GB_MOB;
567 cmd->header.size = sizeof(cmd->body);
568 cmd->body.mobid = mob->id;
569 vmw_fifo_commit(dev_priv, sizeof(*cmd));
570 if (bo) {573 if (bo) {
571 vmw_fence_single_bo(bo, NULL);574 vmw_fence_single_bo(bo, NULL);
572 ttm_bo_unreserve(bo);575 ttm_bo_unreserve(bo);
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c+1−2
@@ -427,8 +427,7 @@ int vmw_dmabuf_init(struct vmw_private *dev_priv, · 426 unmodified lines
427 INIT_LIST_HEAD(&vmw_bo->res_list);427 INIT_LIST_HEAD(&vmw_bo->res_list);
428 428
429 ret = ttm_bo_init(bdev, &vmw_bo->base, size,429 ret = ttm_bo_init(bdev, &vmw_bo->base, size,
430 (user) ? ttm_bo_type_device :430 ttm_bo_type_device, placement,
431 ttm_bo_type_kernel, placement,
432 0, interruptible,431 0, interruptible,
433 NULL, acc_size, NULL, bo_free);432 NULL, acc_size, NULL, bo_free);
434 return ret;433 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t