Merge "drm/msm: remove msm_gem_free_work"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
c215cee1e0
@@ -795,6 +795,7 @@ static int msm_drm_component_init(struct device *dev)
|
||||
INIT_LIST_HEAD(&priv->client_event_list);
|
||||
INIT_LIST_HEAD(&priv->inactive_list);
|
||||
INIT_LIST_HEAD(&priv->vm_client_list);
|
||||
mutex_init(&priv->mm_lock);
|
||||
|
||||
mutex_init(&priv->vm_client_lock);
|
||||
|
||||
|
@@ -888,8 +888,19 @@ struct msm_drm_private {
|
||||
struct msm_rd_state *hangrd; /* debugfs to dump hanging submits */
|
||||
struct msm_perf_state *perf;
|
||||
|
||||
/* list of GEM objects: */
|
||||
/*
|
||||
* List of inactive GEM objects. Every bo is either in the inactive_list
|
||||
* or gpu->active_list (for the gpu it is active on[1])
|
||||
*
|
||||
* These lists are protected by mm_lock. If struct_mutex is involved, it
|
||||
* should be aquired prior to mm_lock. One should *not* hold mm_lock in
|
||||
* get_pages()/vmap()/etc paths, as they can trigger the shrinker.
|
||||
*
|
||||
* [1] if someone ever added support for the old 2d cores, there could be
|
||||
* more than one gpu object
|
||||
*/
|
||||
struct list_head inactive_list;
|
||||
struct mutex mm_lock;
|
||||
|
||||
struct workqueue_struct *wq;
|
||||
|
||||
|
@@ -1007,11 +1007,15 @@ void msm_gem_describe_objects(struct list_head *list, struct seq_file *m)
|
||||
void msm_gem_free_object(struct drm_gem_object *obj)
|
||||
{
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
struct drm_device *dev = obj->dev;
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
|
||||
/* object should not be on active list: */
|
||||
WARN_ON(is_active(msm_obj));
|
||||
|
||||
mutex_lock(&priv->mm_lock);
|
||||
list_del(&msm_obj->mm_list);
|
||||
mutex_unlock(&priv->mm_lock);
|
||||
|
||||
mutex_lock(&msm_obj->lock);
|
||||
|
||||
@@ -1118,14 +1122,9 @@ static int msm_gem_new_impl(struct drm_device *dev,
|
||||
msm_obj->in_active_list = false;
|
||||
msm_obj->obj_dirty = false;
|
||||
|
||||
if (struct_mutex_locked) {
|
||||
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
|
||||
mutex_lock(&priv->mm_lock);
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
} else {
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
}
|
||||
mutex_unlock(&priv->mm_lock);
|
||||
|
||||
*obj = &msm_obj->base;
|
||||
|
||||
|
@@ -125,6 +125,8 @@ struct msm_gem_object {
|
||||
|
||||
struct list_head vmas; /* list of msm_gem_vma */
|
||||
|
||||
struct llist_node freed;
|
||||
|
||||
/* normally (resv == &_resv) except for imported bo's */
|
||||
struct dma_resv *resv;
|
||||
struct dma_resv _resv;
|
||||
|
Reference in New Issue
Block a user