Displaying 20 results from an estimated 1351 matches for "init_list_head".
2011 Sep 09
1
[PATCH] drm/nouveau: initialize chan->fence.lock before use
.../nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index 85be745..62c09b0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -158,6 +158,7 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
INIT_LIST_HEAD(&chan->nvsw.vbl_wait);
INIT_LIST_HEAD(&chan->nvsw.flip);
INIT_LIST_HEAD(&chan->fence.pending);
+ spin_lock_init(&chan->fence.lock);
/* setup channel's memory and vm */
ret = nouveau_gpuobj_channel_init(chan, vram_handle, gart_handle);
diff --git a/drivers/g...
2009 Aug 26
1
[PATCH] drm/nouveau: init some list_heads
..._bo.c
index 24d6f8f..6b8ef6b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -63,6 +63,8 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
nvbo = kzalloc(sizeof(struct nouveau_bo), GFP_KERNEL);
if (!nvbo)
return -ENOMEM;
+ INIT_LIST_HEAD(&nvbo->head);
+ INIT_LIST_HEAD(&nvbo->entry);
nvbo->mappable = mappable;
nvbo->no_vm = no_vm;
nvbo->tile_mode = tile_mode;
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index 382c5b5..6c31d7f 100644
--- a/drivers/gpu/...
2019 Mar 21
0
Nouveau dmem NULL Pointer deref (SVM)
...nouveau/nouveau_dmem.c
index aa9fec80492d..35b6e83ead8a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c
@@ -593,6 +593,11 @@ nouveau_dmem_init(struct nouveau_drm *drm)
unsigned long i, size;
int ret;
+ mutex_init(&drm->dmem->mutex);
+ INIT_LIST_HEAD(&drm->dmem->chunk_free);
+ INIT_LIST_HEAD(&drm->dmem->chunk_full);
+ INIT_LIST_HEAD(&drm->dmem->chunk_empty);
+
/* This only make sense on PASCAL or newer */
if (drm->client.device.info.family < NV_DEVICE_INFO_V0_PASCAL)
return;
@@ -600,11 +605,6 @@ nouvea...
2005 Sep 09
7
[PATCH 0/6] jbd cleanup
The following 6 patches cleanup the jbd code and kill about 200 lines.
First of 4 patches can apply to 2.6.13-git8 and 2.6.13-mm2.
The rest of them can apply to 2.6.13-mm2.
fs/jbd/checkpoint.c | 179 +++++++++++--------------------------------
fs/jbd/commit.c | 101 ++++++++++--------------
fs/jbd/journal.c | 11 +-
fs/jbd/revoke.c | 158
2019 Sep 25
2
[PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously
...gt; - mstb->tx_slots[0] = NULL;
> - wake_tx = true;
> - }
> - if (mstb->tx_slots[1]) {
> - mstb->tx_slots[1]->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
> - mstb->tx_slots[1] = NULL;
> - wake_tx = true;
> - }
> - mutex_unlock(&mstb->mgr->qlock);
> + INIT_LIST_HEAD(&mstb->destroy_next);
>
> - if (wake_tx)
> - wake_up_all(&mstb->mgr->tx_waitq);
> -
> - drm_dp_mst_put_mstb_malloc(mstb);
> + /*
> + * This can get called under mgr->mutex, so we need to perform the
> + * actual destruction of the mstb in another wor...
2018 Feb 17
3
[PATCH] drm/nouveau/bl: Fix oops on driver unbind
...80f340204e8..f56f60f695e1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -268,13 +268,13 @@ nouveau_backlight_init(struct drm_device *dev)
struct nvif_device *device = &drm->client.device;
struct drm_connector *connector;
+ INIT_LIST_HEAD(&drm->bl_connectors);
+
if (apple_gmux_present()) {
NV_INFO(drm, "Apple GMUX detected: not registering Nouveau backlight interface\n");
return 0;
}
- INIT_LIST_HEAD(&drm->bl_connectors);
-
list_for_each_entry(connector, &dev->mode_config.connector_list,...
2020 Sep 01
0
[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2
...ize = mem.num_pages << PAGE_SHIFT;
mem.page_alignment = bo->mem.page_alignment;
- mem.bus.io_reserved_vm = false;
- mem.bus.io_reserved_count = 0;
mem.bus.base = 0;
mem.bus.offset = 0;
mem.bus.addr = NULL;
@@ -1238,7 +1227,6 @@ int ttm_bo_init_reserved(struct ttm_bo_device *bdev,
INIT_LIST_HEAD(&bo->lru);
INIT_LIST_HEAD(&bo->ddestroy);
INIT_LIST_HEAD(&bo->swap);
- INIT_LIST_HEAD(&bo->io_reserve_lru);
bo->bdev = bdev;
bo->type = type;
bo->num_pages = num_pages;
@@ -1247,8 +1235,6 @@ int ttm_bo_init_reserved(struct ttm_bo_device *bdev,
bo->...
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
...h_work(struct work_struct *work)
> > @@ -502,6 +522,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
> > names[VQ_HIPRIO] = fs->vqs[VQ_HIPRIO].name;
> > INIT_WORK(&fs->vqs[VQ_HIPRIO].done_work, virtio_fs_hiprio_done_work);
> > INIT_LIST_HEAD(&fs->vqs[VQ_HIPRIO].queued_reqs);
> > + INIT_LIST_HEAD(&fs->vqs[VQ_HIPRIO].end_reqs);
> > INIT_DELAYED_WORK(&fs->vqs[VQ_HIPRIO].dispatch_work,
> > virtio_fs_hiprio_dispatch_work);
> > spin_lock_init(&fs-&...
2017 May 04
1
[bug report] drm/nouveau/object: merge with handle
...ine);
290 object->oclass = oclass->base.oclass;
291 object->handle = oclass->handle;
292 object->route = oclass->route;
293 object->token = oclass->token;
294 object->object = oclass->object;
295 INIT_LIST_HEAD(&object->head);
296 INIT_LIST_HEAD(&object->tree);
297 RB_CLEAR_NODE(&object->node);
298 WARN_ON(oclass->engine && !object->engine);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If oclass->engine is non-NULL then...
2018 Mar 14
1
[PATCH] drm/nouveau/bl: Fix oops on driver unbind
...au/nouveau_backlight.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> > @@ -268,13 +268,13 @@ nouveau_backlight_init(struct drm_device *dev)
> > struct nvif_device *device = &drm->client.device;
> > struct drm_connector *connector;
> >
> > + INIT_LIST_HEAD(&drm->bl_connectors);
> > +
> > if (apple_gmux_present()) {
> > NV_INFO(drm, "Apple GMUX detected: not registering Nouveau backlight interface\n");
> > return 0;
> > }
> >
> > - INIT_LIST_HEAD(&drm->bl_connectors);
> &...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
.../mm/zsmalloc.c
> @@ -977,7 +977,9 @@ static void init_zspage(struct size_class *class, struct page *first_page)
> unsigned long off = 0;
> struct page *page = first_page;
>
> - VM_BUG_ON_PAGE(!is_first_page(first_page), first_page);
> + first_page->freelist = NULL;
> + INIT_LIST_HEAD(&first_page->lru);
> + set_zspage_inuse(first_page, 0);
>
> while (page) {
> struct page *next_page;
> @@ -1022,13 +1024,44 @@ static void init_zspage(struct size_class *class, struct page *first_page)
> set_freeobj(first_page, 0);
> }
>
> +static void...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
.../mm/zsmalloc.c
> @@ -977,7 +977,9 @@ static void init_zspage(struct size_class *class, struct page *first_page)
> unsigned long off = 0;
> struct page *page = first_page;
>
> - VM_BUG_ON_PAGE(!is_first_page(first_page), first_page);
> + first_page->freelist = NULL;
> + INIT_LIST_HEAD(&first_page->lru);
> + set_zspage_inuse(first_page, 0);
>
> while (page) {
> struct page *next_page;
> @@ -1022,13 +1024,44 @@ static void init_zspage(struct size_class *class, struct page *first_page)
> set_freeobj(first_page, 0);
> }
>
> +static void...
2019 Sep 27
1
[PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously
...gt; > > - if (mstb->tx_slots[1]) {
> > > - mstb->tx_slots[1]->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
> > > - mstb->tx_slots[1] = NULL;
> > > - wake_tx = true;
> > > - }
> > > - mutex_unlock(&mstb->mgr->qlock);
> > > + INIT_LIST_HEAD(&mstb->destroy_next);
> > >
> > > - if (wake_tx)
> > > - wake_up_all(&mstb->mgr->tx_waitq);
> > > -
> > > - drm_dp_mst_put_mstb_malloc(mstb);
> > > + /*
> > > + * This can get called under mgr->mutex, so we need...
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...g("%s tv_cmd %p resid %u status %#02x\n", __func__,
tv_cmd, se_cmd->residual_count, se_cmd->scsi_status);
@@ -426,7 +409,6 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
pr_err("Unable to allocate struct tcm_vhost_cmd\n");
return ERR_PTR(-ENOMEM);
}
- INIT_LIST_HEAD(&tv_cmd->tvc_completion_list);
tv_cmd->tvc_tag = v_req->tag;
tv_cmd->tvc_task_attr = v_req->task_attr;
tv_cmd->tvc_exp_data_len = exp_data_len;
@@ -859,8 +841,6 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
return -ENOMEM;
vhost_work_init(&...
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...g("%s tv_cmd %p resid %u status %#02x\n", __func__,
tv_cmd, se_cmd->residual_count, se_cmd->scsi_status);
@@ -426,7 +409,6 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
pr_err("Unable to allocate struct tcm_vhost_cmd\n");
return ERR_PTR(-ENOMEM);
}
- INIT_LIST_HEAD(&tv_cmd->tvc_completion_list);
tv_cmd->tvc_tag = v_req->tag;
tv_cmd->tvc_task_attr = v_req->task_attr;
tv_cmd->tvc_exp_data_len = exp_data_len;
@@ -859,8 +841,6 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
return -ENOMEM;
vhost_work_init(&...
2019 Sep 03
0
[PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously
...slots[0]->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
- mstb->tx_slots[0] = NULL;
- wake_tx = true;
- }
- if (mstb->tx_slots[1]) {
- mstb->tx_slots[1]->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
- mstb->tx_slots[1] = NULL;
- wake_tx = true;
- }
- mutex_unlock(&mstb->mgr->qlock);
+ INIT_LIST_HEAD(&mstb->destroy_next);
- if (wake_tx)
- wake_up_all(&mstb->mgr->tx_waitq);
-
- drm_dp_mst_put_mstb_malloc(mstb);
+ /*
+ * This can get called under mgr->mutex, so we need to perform the
+ * actual destruction of the mstb in another worker
+ */
+ mutex_lock(&mgr->dela...
2016 Apr 17
3
[PATCH REBASED 2/2] nouveau/bl: Do not register interface if Apple GMUX detected
...uveau_backlight_init(struct drm_device *dev)
struct nvif_device *device = &drm->device;
struct drm_connector *connector;
+ if (apple_gmux_present()) {
+ NV_INFO(drm, "Apple GMUX detected: not registering Nouveau"
+ " backlight interface");
+ return 0;
+ }
+
INIT_LIST_HEAD(&drm->bl_connectors);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
--
2.8.0
2018 Feb 27
4
[PATCH 4/5] drm/ttm: add ttm_sg_tt_init
...> - ttm->num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
> - ttm->caching_state = tt_cached;
> - ttm->page_flags = page_flags;
> - ttm->state = tt_unpopulated;
> - ttm->swap_storage = NULL;
> + ttm_tt_init_fields(ttm, bdev, size, page_flags);
>
> INIT_LIST_HEAD(&ttm_dma->pages_list);
> if (ttm_dma_tt_alloc_page_directory(ttm_dma)) {
> @@ -275,11 +286,36 @@ int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_bo_device *bdev,
> }
> EXPORT_SYMBOL(ttm_dma_tt_init);
>
> +int ttm_sg_tt_init(struct ttm_dma_tt *ttm_dma, s...
2019 Oct 22
0
[PATCH v5 01/14] drm/dp_mst: Destroy MSTBs asynchronously
...slots[0]->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
- mstb->tx_slots[0] = NULL;
- wake_tx = true;
- }
- if (mstb->tx_slots[1]) {
- mstb->tx_slots[1]->state = DRM_DP_SIDEBAND_TX_TIMEOUT;
- mstb->tx_slots[1] = NULL;
- wake_tx = true;
- }
- mutex_unlock(&mstb->mgr->qlock);
+ INIT_LIST_HEAD(&mstb->destroy_next);
- if (wake_tx)
- wake_up_all(&mstb->mgr->tx_waitq);
-
- drm_dp_mst_put_mstb_malloc(mstb);
+ /*
+ * This can get called under mgr->mutex, so we need to perform the
+ * actual destruction of the mstb in another worker
+ */
+ mutex_lock(&mgr->dela...
2019 Sep 03
0
[PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously
...>rad);
- if (!mstb) {
- DRM_DEBUG_KMS("Got MST reply from unknown device %d\n",
- hdr->lct);
- goto out;
- }
+ up_req = kzalloc(sizeof(*up_req), GFP_KERNEL);
+ if (!up_req) {
+ DRM_ERROR("Not enough memory to process MST up req\n");
+ return -ENOMEM;
}
+ INIT_LIST_HEAD(&up_req->next);
seqno = hdr->seqno;
- drm_dp_sideband_parse_req(&mgr->up_req_recv, &msg);
+ drm_dp_sideband_parse_req(&mgr->up_req_recv, &up_req->msg);
- if (msg.req_type == DP_CONNECTION_STATUS_NOTIFY)
- guid = msg.u.conn_stat.guid;
- else if (msg.req_type...