staging: imgv: remove user buffer ttm wrapping support
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 27 Apr 2012 14:23:58 +0000 (17:23 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:54 +0000 (12:30 +0300)
Part of video hw driver update from UMG.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
drivers/staging/mrst/drv/psb_drv.c
drivers/staging/mrst/drv/psb_drv.h
drivers/staging/mrst/imgv/psb_ttm_glue.c
drivers/staging/mrst/imgv/psb_ttm_placement_user.c
drivers/staging/mrst/imgv/psb_ttm_placement_user.h
drivers/staging/mrst/imgv/psb_ttm_userobj_api.h

index d7ba881..ec0afb5 100644 (file)
@@ -443,8 +443,6 @@ static struct drm_ioctl_desc psb_ioctls[] = {
        DRM_AUTH),
        PSB_IOCTL_DEF(DRM_IOCTL_PSB_TTM_PL_CREATE_UB, psb_pl_ub_create_ioctl,
        DRM_AUTH),
-       PSB_IOCTL_DEF(DRM_IOCTL_PSB_TTM_PL_WRAP_PVR_BUF,
-                     psb_pl_wrap_pvr_buf_ioctl, DRM_AUTH),
        PSB_IOCTL_DEF(DRM_IOCTL_PSB_TTM_FENCE_SIGNALED,
        psb_fence_signaled_ioctl, DRM_AUTH),
        PSB_IOCTL_DEF(DRM_IOCTL_PSB_TTM_FENCE_FINISH, psb_fence_finish_ioctl,
index bceb595..0c5722d 100644 (file)
@@ -1005,8 +1005,6 @@ extern int psb_pl_create_ioctl(struct drm_device *dev, void *data,
                               struct drm_file *file_priv);
 extern int psb_pl_ub_create_ioctl(struct drm_device *dev, void *data,
                               struct drm_file *file_priv);
-extern int psb_pl_wrap_pvr_buf_ioctl(struct drm_device *dev, void *data,
-                               struct drm_file *file_priv);
 extern int psb_extension_ioctl(struct drm_device *dev, void *data,
                               struct drm_file *file_priv);
 extern int psb_ttm_global_init(struct drm_psb_private *dev_priv);
index bc9c6f2..21952b2 100644 (file)
@@ -209,15 +209,6 @@ int psb_pl_ub_create_ioctl(struct drm_device *dev, void *data,
 
 }
 
-int psb_pl_wrap_pvr_buf_ioctl(struct drm_device *dev, void *data,
-                        struct drm_file *file_priv)
-{
-       struct drm_psb_private *dev_priv = psb_priv(dev);
-
-       return ttm_pl_wrap_pvr_buf_ioctl(psb_fpriv(file_priv)->tfile,
-                                   &dev_priv->bdev, &dev_priv->ttm_lock, data);
-}
-
 /**
  * psb_ttm_fault - Wrapper around the ttm fault method.
  *
index 679cce2..7283f67 100644 (file)
@@ -432,52 +432,6 @@ int ttm_pl_ub_create_ioctl(struct ttm_object_file *tfile,
        return pl_create_buf(&cp, lock, rep);
 }
 
-int ttm_pl_wrap_pvr_buf_ioctl(struct ttm_object_file *tfile,
-                       struct ttm_bo_device *bdev,
-                       struct ttm_lock *lock, void *data)
-{
-       union ttm_pl_wrap_pvr_buf_arg *arg = data;
-       struct ttm_pl_wrap_pvr_buf_req *req = &arg->req;
-       struct ttm_pl_rep *rep = &arg->rep;
-       struct ttm_placement pl = pvr_default_placement;
-       struct pvr_buf_info buf_info;
-       uint32_t pl_flags = normalize_placement_flags(req->placement);
-       int ret;
-       struct create_params cp = {
-               .bdev           = bdev,
-               .bo_type        = ttm_bo_type_device,
-               .align          = req->page_alignment,
-               .placement      = &pl,
-               .tfile          = tfile,
-               .shareable      = req->placement & TTM_PL_FLAG_SHARED,
-       };
-
-       if (!fixed_placement_valid(pl_flags))
-               return -EINVAL;
-
-       pl.num_placement = 1;
-       pl.placement = &pl_flags;
-
-       ret = pvr_lookup_dev_buf(req->handle, &buf_info);
-       if (ret < 0)
-               return ret;
-       /*
-        * We set here the ttm pages to point to the fixed pages from the
-        * pvr buffer. Due to TTM_PL_FLAG_NO_SWAP set above and the
-        * busy_placement settings, these will never be swapped or moved to
-        * an IO region and thus never be freed before the buffer itself is
-        * destroyed.
-        */
-       cp.pages = buf_info.pages;
-       cp.size = buf_info.page_cnt;
-
-       ret = pl_create_buf(&cp, lock, rep);
-
-       pvr_put_dev_buf(&buf_info);
-
-       return ret;
-}
-
 int ttm_pl_reference_ioctl(struct ttm_object_file *tfile, void *data)
 {
        union ttm_pl_reference_arg *arg = data;
index 84c1e79..8b7068b 100644 (file)
@@ -78,21 +78,6 @@ struct ttm_pl_create_ub_req {
 };
 
 /**
- * struct ttm_pl_wrap_pvr_buf_req
- *
- * @handle: PVR buffer id
- * @placement: Flags that indicate initial acceptable
- *  placement.
- *
- * Input to the TTM_WRAP_PVR_BUF ioctl.
- */
-struct ttm_pl_wrap_pvr_buf_req {
-       uint32_t handle;
-       uint32_t placement;
-       uint32_t page_alignment;
-};
-
-/**
  * struct ttm_pl_rep
  *
  * @gpu_offset: The current offset into the memory region used.
@@ -252,11 +237,6 @@ union ttm_pl_create_ub_arg {
        struct ttm_pl_rep rep;
 };
 
-union ttm_pl_wrap_pvr_buf_arg {
-       struct ttm_pl_wrap_pvr_buf_req req;
-       struct ttm_pl_rep rep;
-};
-
 /*
  * Ioctl offsets.
  */
@@ -268,6 +248,5 @@ union ttm_pl_wrap_pvr_buf_arg {
 #define TTM_PL_WAITIDLE    0x04
 #define TTM_PL_SETSTATUS   0x05
 #define TTM_PL_CREATE_UB   0x06
-#define TTM_PL_WRAP_PVR_BUF     0x07
 
 #endif
index 468784c..032bcfe 100644 (file)
@@ -44,9 +44,6 @@ extern int ttm_pl_create_ioctl(struct ttm_object_file *tfile,
 extern int ttm_pl_ub_create_ioctl(struct ttm_object_file *tfile,
                                  struct ttm_bo_device *bdev,
                                  struct ttm_lock *lock, void *data);
-extern int ttm_pl_wrap_pvr_buf_ioctl(struct ttm_object_file *tfile,
-                               struct ttm_bo_device *bdev,
-                               struct ttm_lock *lock, void *data);
 extern int ttm_pl_reference_ioctl(struct ttm_object_file *tfile, void *data);
 extern int ttm_pl_unref_ioctl(struct ttm_object_file *tfile, void *data);
 extern int ttm_pl_synccpu_ioctl(struct ttm_object_file *tfile, void *data);