[PATCH 2/7] drm/qxl: fix incorrect use of the lru_lock
Liu, Monk
Monk.Liu at amd.com
Tue Aug 8 08:32:45 UTC 2017
Ack-by: Monk.Liu <monk.liu at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Christian König <deathsimple at vodafone.de>
Sent: Tuesday, August 8, 2017 4:14:46 PM
To: amd-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org; Dave Airlie; Gerd Hoffmann
Subject: Re: [PATCH 2/7] drm/qxl: fix incorrect use of the lru_lock
Hi guys,
can I get an rb or at least an Acked-by for that one?
The code was obviously copied over from radeon where it wasn't correct
in the first place.
Thanks,
Christian.
Am 07.08.2017 um 17:48 schrieb Christian König:
> From: Christian König <christian.koenig at amd.com>
>
> The BO manager has its own lock and doesn't use the lru_lock.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/qxl/qxl_ttm.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 0fdedee..07dc08d 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -454,15 +454,10 @@ void qxl_ttm_fini(struct qxl_device *qdev)
> static int qxl_mm_dump_table(struct seq_file *m, void *data)
> {
> struct drm_info_node *node = (struct drm_info_node *)m->private;
> - struct drm_mm *mm = (struct drm_mm *)node->info_ent->data;
> - struct drm_device *dev = node->minor->dev;
> - struct qxl_device *rdev = dev->dev_private;
> - struct ttm_bo_global *glob = rdev->mman.bdev.glob;
> + struct ttm_mem_type_manager *man = node->info_ent->data;
> struct drm_printer p = drm_seq_file_printer(m);
>
> - spin_lock(&glob->lru_lock);
> - drm_mm_print(mm, &p);
> - spin_unlock(&glob->lru_lock);
> + man->func->debug(man, &p);
> return 0;
> }
> #endif
> @@ -483,9 +478,9 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev)
> qxl_mem_types_list[i].show = &qxl_mm_dump_table;
> qxl_mem_types_list[i].driver_features = 0;
> if (i == 0)
> - qxl_mem_types_list[i].data = qdev->mman.bdev.man[TTM_PL_VRAM].priv;
> + qxl_mem_types_list[i].data = &qdev->mman.bdev.man[TTM_PL_VRAM];
> else
> - qxl_mem_types_list[i].data = qdev->mman.bdev.man[TTM_PL_PRIV].priv;
> + qxl_mem_types_list[i].data = &qdev->mman.bdev.man[TTM_PL_PRIV];
>
> }
> return qxl_debugfs_add_files(qdev, qxl_mem_types_list, i);
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170808/86a57783/attachment-0001.html>
More information about the dri-devel
mailing list