summaryrefslogtreecommitdiff
path: root/drm_context.c
diff options
context:
space:
mode:
authorSinclair Yeh <syeh@vmware.com>2017-05-19 22:57:06 -0700
committerSinclair Yeh <syeh@vmware.com>2017-06-14 19:39:41 +0200
commit3c5a89bce93a6b19eb4580411196c04abff094bf (patch)
tree2b671166ad6ee92d523809b33211313b802c3eb4 /drm_context.c
parent90732761ce998497c52a0997721e244a942b88ec (diff)
vmwgfx: Update stand alone to v4.11
* Skipped update to drm_mm and drm_vma_manager because the switch to using interval tree makes porting difficult. * Added memdup_user_nul(), but replaced kmalloc_track_caller() with kmalloc() due to a compilation error. * Removed building and usage of debugfs_crc * VMWGFX_COMPAT_NO_VAF no longer seems to be required * Tested on CentOS 6.5, RHEL 6.8: 2.6.32-696 RHEL 7.3: 3.10.0-514 Ubuntu 14.04: 4.2.0-35 Ubuntu 16.04: 4.4.0-78 Ubuntu 16.04: 4.12-rc1 Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drm_context.c')
-rw-r--r--drm_context.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drm_context.c b/drm_context.c
index fb39735..4fdbed2 100644
--- a/drm_context.c
+++ b/drm_context.c
@@ -54,7 +54,7 @@ struct drm_ctx_list {
void drm_legacy_ctxbitmap_free(struct drm_device * dev, int ctx_handle)
{
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return;
mutex_lock(&dev->struct_mutex);
@@ -71,7 +71,7 @@ void drm_legacy_ctxbitmap_free(struct drm_device * dev, int ctx_handle)
* Allocate a new idr from drm_device::ctx_idr while holding the
* drm_device::struct_mutex lock.
*/
-static int drm_legacy_ctxbitmap_next(struct drm_device *dev)
+static int drm_legacy_ctxbitmap_next(struct drm_device * dev)
{
int ret;
@@ -94,7 +94,7 @@ static int drm_legacy_ctxbitmap_next(struct drm_device *dev)
void drm_legacy_ctxbitmap_init(struct drm_device * dev)
{
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return;
idr_init(&dev->ctx_idr);
@@ -111,7 +111,7 @@ void drm_legacy_ctxbitmap_init(struct drm_device * dev)
void drm_legacy_ctxbitmap_cleanup(struct drm_device * dev)
{
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return;
mutex_lock(&dev->struct_mutex);
@@ -136,7 +136,7 @@ void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm_file *file)
struct drm_ctx_list *pos, *tmp;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return;
mutex_lock(&dev->ctxlist_mutex);
@@ -182,7 +182,7 @@ int drm_legacy_getsareactx(struct drm_device *dev, void *data,
struct drm_map_list *_entry;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
mutex_lock(&dev->struct_mutex);
@@ -230,7 +230,7 @@ int drm_legacy_setsareactx(struct drm_device *dev, void *data,
struct drm_map_list *r_list = NULL;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
mutex_lock(&dev->struct_mutex);
@@ -334,7 +334,7 @@ int drm_legacy_resctx(struct drm_device *dev, void *data,
int i;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
if (res->count >= DRM_RESERVED_CONTEXTS) {
@@ -368,7 +368,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data,
struct drm_ctx *ctx = data;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
ctx->handle = drm_legacy_ctxbitmap_next(dev);
@@ -415,7 +415,7 @@ int drm_legacy_getctx(struct drm_device *dev, void *data,
struct drm_ctx *ctx = data;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
/* This is 0, because we don't handle any context flags */
@@ -441,7 +441,7 @@ int drm_legacy_switchctx(struct drm_device *dev, void *data,
struct drm_ctx *ctx = data;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
DRM_DEBUG("%d\n", ctx->handle);
@@ -465,7 +465,7 @@ int drm_legacy_newctx(struct drm_device *dev, void *data,
struct drm_ctx *ctx = data;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
DRM_DEBUG("%d\n", ctx->handle);
@@ -491,7 +491,7 @@ int drm_legacy_rmctx(struct drm_device *dev, void *data,
struct drm_ctx *ctx = data;
if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
- drm_core_check_feature(dev, DRIVER_MODESET))
+ !drm_core_check_feature(dev, DRIVER_LEGACY))
return -EINVAL;
DRM_DEBUG("%d\n", ctx->handle);