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
261261 /* Planar video formats. */
262262 SVGA3D_YV12 = 121,
263263
264− /* Shader constant formats. */
265− SVGA3D_SURFACE_SHADERCONST_FLOAT = 122,
266− SVGA3D_SURFACE_SHADERCONST_INT = 123,
267− SVGA3D_SURFACE_SHADERCONST_BOOL = 124,
268−
269− SVGA3D_FORMAT_MAX = 125,
264+ SVGA3D_FORMAT_MAX = 122,
270265 } SVGA3dSurfaceFormat;
271266
272267 typedef uint32 SVGA3dColor; /* a, r, g, b */
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 #include <drm/ttm/ttm_module.h>
4141 #include "vmwgfx_fence.h"
4242
43−#define VMWGFX_DRIVER_DATE "20121114"
43+#define VMWGFX_DRIVER_DATE "20140228"
4444 #define VMWGFX_DRIVER_MAJOR 2
4545 #define VMWGFX_DRIVER_MINOR 5
4646 #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
188188
189189 bo = otable->page_table->pt_bo;
190190 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));
191− if (unlikely(cmd == NULL))
192− DRM_ERROR("Failed reserving FIFO space for OTable setup.\n");
193−
194− memset(cmd, 0, sizeof(*cmd));
195− cmd->header.id = SVGA_3D_CMD_SET_OTABLE_BASE;
196− cmd->header.size = sizeof(cmd->body);
197− cmd->body.type = type;
198− cmd->body.baseAddress = 0;
199− cmd->body.sizeInBytes = 0;
200− cmd->body.validSizeInBytes = 0;
201− cmd->body.ptDepth = SVGA3D_MOBFMT_INVALID;
202− vmw_fifo_commit(dev_priv, sizeof(*cmd));
191+ if (unlikely(cmd == NULL)) {
192+ DRM_ERROR("Failed reserving FIFO space for OTable "
193+ "takedown.\n");
194+ } else {
195+ memset(cmd, 0, sizeof(*cmd));
196+ cmd->header.id = SVGA_3D_CMD_SET_OTABLE_BASE;
197+ cmd->header.size = sizeof(cmd->body);
198+ cmd->body.type = type;
199+ cmd->body.baseAddress = 0;
200+ cmd->body.sizeInBytes = 0;
201+ cmd->body.validSizeInBytes = 0;
202+ cmd->body.ptDepth = SVGA3D_MOBFMT_INVALID;
203+ vmw_fifo_commit(dev_priv, sizeof(*cmd));
204+ }
203205
204206 if (bo) {
205207 int ret;
@@ -562,11 +564,12 @@ void vmw_mob_unbind(struct vmw_private *dev_priv, · 356 unmodified lines
562564 if (unlikely(cmd == NULL)) {
563565 DRM_ERROR("Failed reserving FIFO space for Memory "
564566 "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));
565572 }
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));
570573 if (bo) {
571574 vmw_fence_single_bo(bo, NULL);
572575 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
427427 INIT_LIST_HEAD(&vmw_bo->res_list);
428428
429429 ret = ttm_bo_init(bdev, &vmw_bo->base, size,
430− (user) ? ttm_bo_type_device :
431− ttm_bo_type_kernel, placement,
430+ ttm_bo_type_device, placement,
432431 0, interruptible,
433432 NULL, acc_size, NULL, bo_free);
434433 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