Merge drm/drm-fixes into drm-misc-fixes
authorMaxime Ripard <maxime@cerno.tech>
Tue, 3 Jan 2023 07:32:12 +0000 (08:32 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 3 Jan 2023 07:32:12 +0000 (08:32 +0100)
Let's start the fixes cycle.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
1  2 
drivers/dma-buf/dma-buf-sysfs-stats.c
drivers/dma-buf/dma-buf.c

Simple merge
index eb6b59363c4f589a1100a5301bd99d4458793acb,b6c36914e7c611c848f51afcfa57725657c372eb..e6528767efc7c340a51d6aa9e8bd05b6c3615936
@@@ -655,24 -658,23 +660,23 @@@ struct dma_buf *dma_buf_export(const st
        init_waitqueue_head(&dmabuf->poll);
        dmabuf->cb_in.poll = dmabuf->cb_out.poll = &dmabuf->poll;
        dmabuf->cb_in.active = dmabuf->cb_out.active = 0;
-       mutex_init(&dmabuf->lock);
 +      INIT_LIST_HEAD(&dmabuf->attachments);
  
        if (!resv) {
 -              resv = (struct dma_resv *)&dmabuf[1];
 -              dma_resv_init(resv);
 +              dmabuf->resv = (struct dma_resv *)&dmabuf[1];
 +              dma_resv_init(dmabuf->resv);
 +      } else {
 +              dmabuf->resv = resv;
        }
 -      dmabuf->resv = resv;
  
 -      file = dma_buf_getfile(dmabuf, exp_info->flags);
 -      if (IS_ERR(file)) {
 -              ret = PTR_ERR(file);
 +      ret = dma_buf_stats_setup(dmabuf, file);
 +      if (ret)
                goto err_dmabuf;
 -      }
  
 +      file->private_data = dmabuf;
 +      file->f_path.dentry->d_fsdata = dmabuf;
        dmabuf->file = file;
  
 -      INIT_LIST_HEAD(&dmabuf->attachments);
 -
        mutex_lock(&db_list.lock);
        list_add(&dmabuf->list_node, &db_list.head);
        mutex_unlock(&db_list.lock);