drm/i915: Use i915 instead of dev_priv insied the file_priv structure
authorAndi Shyti <andi.shyti@linux.intel.com>
Wed, 22 Mar 2023 00:16:11 +0000 (01:16 +0100)
committerAndi Shyti <andi.shyti@linux.intel.com>
Thu, 23 Mar 2023 00:53:44 +0000 (01:53 +0100)
In the process of renaming all instances of 'dev_priv' to 'i915',
start using 'i915' within the 'drm_i915_file_private' structure.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230322001611.632321-1-andi.shyti@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/i915_drm_client.c
drivers/gpu/drm/i915/i915_file_private.h
drivers/gpu/drm/i915/i915_gem.c

index 6d639ca24dfbb71118c7ac75e2c1d11584adbebd..5402a7bbcb1d14e1c7c976b8f228d5cafa8ea9f8 100644 (file)
@@ -364,7 +364,7 @@ static int set_proto_ctx_vm(struct drm_i915_file_private *fpriv,
                            struct i915_gem_proto_context *pc,
                            const struct drm_i915_gem_context_param *args)
 {
-       struct drm_i915_private *i915 = fpriv->dev_priv;
+       struct drm_i915_private *i915 = fpriv->i915;
        struct i915_address_space *vm;
 
        if (args->size)
@@ -733,7 +733,7 @@ static int set_proto_ctx_engines(struct drm_i915_file_private *fpriv,
                                 struct i915_gem_proto_context *pc,
                                 const struct drm_i915_gem_context_param *args)
 {
-       struct drm_i915_private *i915 = fpriv->dev_priv;
+       struct drm_i915_private *i915 = fpriv->i915;
        struct set_proto_ctx_engines set = { .i915 = i915 };
        struct i915_context_param_engines __user *user =
                u64_to_user_ptr(args->value);
@@ -813,7 +813,7 @@ static int set_proto_ctx_sseu(struct drm_i915_file_private *fpriv,
                              struct i915_gem_proto_context *pc,
                              struct drm_i915_gem_context_param *args)
 {
-       struct drm_i915_private *i915 = fpriv->dev_priv;
+       struct drm_i915_private *i915 = fpriv->i915;
        struct drm_i915_gem_context_param_sseu user_sseu;
        struct intel_sseu *sseu;
        int ret;
@@ -913,7 +913,7 @@ static int set_proto_ctx_param(struct drm_i915_file_private *fpriv,
                break;
 
        case I915_CONTEXT_PARAM_PRIORITY:
-               ret = validate_priority(fpriv->dev_priv, args);
+               ret = validate_priority(fpriv->i915, args);
                if (!ret)
                        pc->sched.priority = args->value;
                break;
@@ -934,12 +934,12 @@ static int set_proto_ctx_param(struct drm_i915_file_private *fpriv,
                if (args->size)
                        ret = -EINVAL;
                else
-                       ret = proto_context_set_persistence(fpriv->dev_priv, pc,
+                       ret = proto_context_set_persistence(fpriv->i915, pc,
                                                            args->value);
                break;
 
        case I915_CONTEXT_PARAM_PROTECTED_CONTENT:
-               ret = proto_context_set_protected(fpriv->dev_priv, pc,
+               ret = proto_context_set_protected(fpriv->i915, pc,
                                                  args->value);
                break;
 
@@ -1770,7 +1770,7 @@ void i915_gem_context_close(struct drm_file *file)
        unsigned long idx;
 
        xa_for_each(&file_priv->proto_context_xa, idx, pc)
-               proto_context_close(file_priv->dev_priv, pc);
+               proto_context_close(file_priv->i915, pc);
        xa_destroy(&file_priv->proto_context_xa);
        mutex_destroy(&file_priv->proto_context_lock);
 
@@ -2206,7 +2206,7 @@ finalize_create_context_locked(struct drm_i915_file_private *file_priv,
 
        lockdep_assert_held(&file_priv->proto_context_lock);
 
-       ctx = i915_gem_create_context(file_priv->dev_priv, pc);
+       ctx = i915_gem_create_context(file_priv->i915, pc);
        if (IS_ERR(ctx))
                return ctx;
 
@@ -2223,7 +2223,7 @@ finalize_create_context_locked(struct drm_i915_file_private *file_priv,
 
        old = xa_erase(&file_priv->proto_context_xa, id);
        GEM_BUG_ON(old != pc);
-       proto_context_close(file_priv->dev_priv, pc);
+       proto_context_close(file_priv->i915, pc);
 
        return ctx;
 }
@@ -2352,7 +2352,7 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
        GEM_WARN_ON(ctx && pc);
 
        if (pc)
-               proto_context_close(file_priv->dev_priv, pc);
+               proto_context_close(file_priv->i915, pc);
 
        if (ctx)
                context_close(ctx);
@@ -2505,7 +2505,7 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data,
                         * GEM_CONTEXT_CREATE starting with graphics
                         * version 13.
                         */
-                       WARN_ON(GRAPHICS_VER(file_priv->dev_priv) > 12);
+                       WARN_ON(GRAPHICS_VER(file_priv->i915) > 12);
                        ret = set_proto_ctx_param(file_priv, pc, args);
                } else {
                        ret = -ENOENT;
index b09d1d3865740378006cc497da2dd3b3bddf60ff..e8fa172ebe5eeee6b94e7983493a6692da46e03b 100644 (file)
@@ -130,7 +130,7 @@ void i915_drm_client_fdinfo(struct seq_file *m, struct file *f)
 {
        struct drm_file *file = f->private_data;
        struct drm_i915_file_private *file_priv = file->driver_priv;
-       struct drm_i915_private *i915 = file_priv->dev_priv;
+       struct drm_i915_private *i915 = file_priv->i915;
        struct i915_drm_client *client = file_priv->client;
        struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
        unsigned int i;
index f4287786969256e3446108f041e798c51573f7d6..c9cb8eecacde02192c35154c97ede24aaba72000 100644 (file)
@@ -15,7 +15,7 @@ struct drm_file;
 struct i915_drm_client;
 
 struct drm_i915_file_private {
-       struct drm_i915_private *dev_priv;
+       struct drm_i915_private *i915;
 
        union {
                struct drm_file *file;
index 35950fa914068497bb2e5e558be3e844703ee433..2ba922fbbd5ff3e65776ea6d43dfef27527cc9e2 100644 (file)
@@ -1313,7 +1313,7 @@ int i915_gem_open(struct drm_i915_private *i915, struct drm_file *file)
        }
 
        file->driver_priv = file_priv;
-       file_priv->dev_priv = i915;
+       file_priv->i915 = i915;
        file_priv->file = file;
        file_priv->client = client;