summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/vc4/vc4_bo.c7
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.h11
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index 87bdab9d7445..c1bae46b9a29 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -109,8 +109,8 @@ static int vc4_gem_one_info(int id, void *ptr, void *data)
{
struct drm_gem_object *obj = (struct drm_gem_object *)ptr;
struct vc4_gem_info_data *gem_info_data = data;
- struct drm_vc4_file_private *file_priv =
- gem_info_data->filp->driver_priv;
+ struct vc4_file *vc4file = gem_info_data->filp->driver_priv;
+ struct drm_vc4_file_private *file_priv = &vc4file->priv;
if (!obj) {
DRM_ERROR("failed to get drm_gem_object\n");
@@ -570,7 +570,8 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size,
static void vc4_gem_register_pid(struct drm_file *file_priv)
{
- struct drm_vc4_file_private *driver_priv = file_priv->driver_priv;
+ struct vc4_file *vc4file = file_priv->driver_priv;
+ struct drm_vc4_file_private *driver_priv = &vc4file->priv;
if (!driver_priv->pid && !driver_priv->tgid) {
driver_priv->pid = task_pid_nr(current);
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
index c2b0773cc3bd..03b022086d1a 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.h
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
@@ -554,6 +554,11 @@ struct vc4_exec_info {
struct vc4_perfmon *perfmon;
};
+struct drm_vc4_file_private {
+ pid_t pid;
+ pid_t tgid;
+};
+
/* Per-open file private data. Any driver-specific resource that has to be
* released when the DRM file is closed should be placed here.
*/
@@ -562,6 +567,7 @@ struct vc4_file {
struct idr idr;
struct mutex lock;
} perfmon;
+ struct drm_vc4_file_private priv;
};
static inline struct vc4_exec_info *
@@ -815,11 +821,6 @@ bool vc4_check_tex_size(struct vc4_exec_info *exec,
struct vc4_validated_shader_info *
vc4_validate_shader(struct drm_gem_cma_object *shader_obj);
-struct drm_vc4_file_private {
- pid_t pid;
- pid_t tgid;
-};
-
int vc4_debugfs_gem_info(struct seq_file *m, void *data);
int vc4_drm_gem_prime_fd_to_handle(struct drm_device *dev,
struct drm_file *file_priv, int prime_fd, uint32_t *handle);