]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/msm: Remove obj->gpu
authorRob Clark <robdclark@chromium.org>
Fri, 23 Oct 2020 16:51:18 +0000 (09:51 -0700)
committerRob Clark <robdclark@chromium.org>
Thu, 5 Nov 2020 00:00:56 +0000 (16:00 -0800)
It cannot be atomically updated with obj->active_count, and the only
purpose is a useless WARN_ON() (which becomes a buggy WARN_ON() once
retire_submits() is not serialized with incoming submits via
struct_mutex)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gem.h
drivers/gpu/drm/msm/msm_gpu.c

index 084131db89d2dae93cee54061c45f33fb0113570..dd3c21bb87402af0df1ea34da253d5508ceda92c 100644 (file)
@@ -774,7 +774,6 @@ void msm_gem_active_get(struct drm_gem_object *obj, struct msm_gpu *gpu)
 
        if (!atomic_fetch_inc(&msm_obj->active_count)) {
                mutex_lock(&priv->mm_lock);
-               msm_obj->gpu = gpu;
                list_del_init(&msm_obj->mm_list);
                list_add_tail(&msm_obj->mm_list, &gpu->active_list);
                mutex_unlock(&priv->mm_lock);
@@ -790,7 +789,6 @@ void msm_gem_active_put(struct drm_gem_object *obj)
 
        if (!atomic_dec_return(&msm_obj->active_count)) {
                mutex_lock(&priv->mm_lock);
-               msm_obj->gpu = NULL;
                list_del_init(&msm_obj->mm_list);
                list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
                mutex_unlock(&priv->mm_lock);
index 2f289c436dddb4b7a770d974fd20491a3e591b7f..f4e73c6f07bfa2b3b8630190a6891f029c0d9325 100644 (file)
@@ -64,7 +64,6 @@ struct msm_gem_object {
         *
         */
        struct list_head mm_list;
-       struct msm_gpu *gpu;     /* non-null if active */
 
        /* Transiently in the process of submit ioctl, objects associated
         * with the submit are on submit->bo_list.. this only lasts for
index a69f6cb388380987f70d7f28eda7aa241bec2b6c..ee1eae7a02bb63897401cbb299274dae4cd983de 100644 (file)
@@ -805,11 +805,6 @@ void msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
                struct drm_gem_object *drm_obj = &msm_obj->base;
                uint64_t iova;
 
-               /* can't happen yet.. but when we add 2d support we'll have
-                * to deal w/ cross-ring synchronization:
-                */
-               WARN_ON(is_active(msm_obj) && (msm_obj->gpu != gpu));
-
                /* submit takes a reference to the bo and iova until retired: */
                drm_gem_object_get(&msm_obj->base);
                msm_gem_get_and_pin_iova_locked(&msm_obj->base, submit->aspace, &iova);