dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
	thomas@shipmail.org, David Airlie <airlied@linux.ie>,
	ckoenig.leichtzumerken@gmail.com,
	intel-gfx@lists.freedesktop.org,
	open list <linux-kernel@vger.kernel.org>,
	VMware Graphics <linux-graphics-maintainer@vmware.com>,
	bskeggs@redhat.com, tzimmermann@suse.de,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH v6 12/17] drm/vmwgfx: switch driver from bo->resv to bo->base.resv
Date: Mon,  5 Aug 2019 16:01:14 +0200	[thread overview]
Message-ID: <20190805140119.7337-13-kraxel@redhat.com> (raw)
In-Reply-To: <20190805140119.7337-1-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c     | 4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c       | 8 ++++----
 drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c  | 4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 +++---
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c b/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
index 703786e3d579..6c01ad2785dd 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_blit.c
@@ -459,9 +459,9 @@ int vmw_bo_cpu_blit(struct ttm_buffer_object *dst,
 
 	/* Buffer objects need to be either pinned or reserved: */
 	if (!(dst->mem.placement & TTM_PL_FLAG_NO_EVICT))
-		reservation_object_assert_held(dst->resv);
+		reservation_object_assert_held(dst->base.resv);
 	if (!(src->mem.placement & TTM_PL_FLAG_NO_EVICT))
-		reservation_object_assert_held(src->resv);
+		reservation_object_assert_held(src->base.resv);
 
 	if (dst->ttm->state == tt_unpopulated) {
 		ret = dst->ttm->bdev->driver->ttm_tt_populate(dst->ttm, &ctx);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index 5739c6c49c99..369034c0de31 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -342,7 +342,7 @@ void vmw_bo_pin_reserved(struct vmw_buffer_object *vbo, bool pin)
 	uint32_t old_mem_type = bo->mem.mem_type;
 	int ret;
 
-	reservation_object_assert_held(bo->resv);
+	reservation_object_assert_held(bo->base.resv);
 
 	if (pin) {
 		if (vbo->pin_count++ > 0)
@@ -690,7 +690,7 @@ static int vmw_user_bo_synccpu_grab(struct vmw_user_buffer_object *user_bo,
 		long lret;
 
 		lret = reservation_object_wait_timeout_rcu
-			(bo->resv, true, true,
+			(bo->base.resv, true, true,
 			 nonblock ? 0 : MAX_SCHEDULE_TIMEOUT);
 		if (!lret)
 			return -EBUSY;
@@ -1007,10 +1007,10 @@ void vmw_bo_fence_single(struct ttm_buffer_object *bo,
 
 	if (fence == NULL) {
 		vmw_execbuf_fence_commands(NULL, dev_priv, &fence, NULL);
-		reservation_object_add_excl_fence(bo->resv, &fence->base);
+		reservation_object_add_excl_fence(bo->base.resv, &fence->base);
 		dma_fence_put(&fence->base);
 	} else
-		reservation_object_add_excl_fence(bo->resv, &fence->base);
+		reservation_object_add_excl_fence(bo->base.resv, &fence->base);
 }
 
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
index 71e901bbed68..7984f172ec4a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
@@ -169,7 +169,7 @@ static int vmw_cotable_unscrub(struct vmw_resource *res)
 	} *cmd;
 
 	WARN_ON_ONCE(bo->mem.mem_type != VMW_PL_MOB);
-	reservation_object_assert_held(bo->resv);
+	reservation_object_assert_held(bo->base.resv);
 
 	cmd = VMW_FIFO_RESERVE(dev_priv, sizeof(*cmd));
 	if (!cmd)
@@ -311,7 +311,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res,
 		return 0;
 
 	WARN_ON_ONCE(bo->mem.mem_type != VMW_PL_MOB);
-	reservation_object_assert_held(bo->resv);
+	reservation_object_assert_held(bo->base.resv);
 
 	mutex_lock(&dev_priv->binding_mutex);
 	if (!vcotbl->scrubbed)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index 303d2c7d9ab3..701643b7b0c4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -402,14 +402,14 @@ void vmw_resource_unreserve(struct vmw_resource *res,
 
 	if (switch_backup && new_backup != res->backup) {
 		if (res->backup) {
-			reservation_object_assert_held(res->backup->base.resv);
+			reservation_object_assert_held(res->backup->base.base.resv);
 			list_del_init(&res->mob_head);
 			vmw_bo_unreference(&res->backup);
 		}
 
 		if (new_backup) {
 			res->backup = vmw_bo_reference(new_backup);
-			reservation_object_assert_held(new_backup->base.resv);
+			reservation_object_assert_held(new_backup->base.base.resv);
 			list_add_tail(&res->mob_head, &new_backup->res_list);
 		} else {
 			res->backup = NULL;
@@ -691,7 +691,7 @@ void vmw_resource_unbind_list(struct vmw_buffer_object *vbo)
 		.num_shared = 0
 	};
 
-	reservation_object_assert_held(vbo->base.resv);
+	reservation_object_assert_held(vbo->base.base.resv);
 	list_for_each_entry_safe(res, next, &vbo->res_list, mob_head) {
 		if (!res->func->unbind)
 			continue;
-- 
2.18.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-08-05 14:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 14:01 [PATCH v6 00/17] drm/ttm: make ttm bo a gem bo subclass Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 01/17] drm/ttm: add gem base object Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 02/17] drm/vram: use embedded gem object Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 03/17] drm/qxl: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 04/17] drm/radeon: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 05/17] drm/amdgpu: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 06/17] drm/nouveau: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 07/17] drm/ttm: use gem reservation object Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 09/17] drm/ttm: set both resv and base.resv pointers Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 10/17] drm/ttm: switch ttm core from bo->resv to bo->base.resv Gerd Hoffmann
     [not found] ` <20190805140119.7337-1-kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-08-05 14:01   ` [PATCH v6 08/17] drm/ttm: use gem vma_node Gerd Hoffmann
2019-08-13 15:11     ` [Intel-gfx] " Thierry Reding
2019-08-14  5:58       ` Gerd Hoffmann
2019-08-14  9:35         ` Thierry Reding
2019-08-14 10:14           ` [Intel-gfx] " Gerd Hoffmann
2019-08-21  6:33             ` [Nouveau] " Ben Skeggs
     [not found]               ` <CACAvsv5Rar9F=Wf-9HBpndY4QaQZcGCx05j0esvV9pitM=JoGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-08-21 11:55                 ` Thierry Reding
2019-09-08  1:58                   ` Ilia Mirkin
2019-09-10 21:52                     ` [Nouveau] " Thierry Reding
2019-09-16  4:45                       ` Ben Skeggs
2019-08-05 14:01   ` [PATCH v6 11/17] drm/radeon: switch driver from bo->resv to bo->base.resv Gerd Hoffmann
2019-08-05 14:01 ` Gerd Hoffmann [this message]
2019-08-05 14:01 ` [PATCH v6 13/17] drm/amdgpu: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 14/17] drm/nouveau: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 15/17] drm/qxl: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 16/17] drm/virtio: " Gerd Hoffmann
2019-08-05 14:01 ` [PATCH v6 17/17] drm/ttm: drop ttm_buffer_object->resv Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190805140119.7337-13-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thellstrom@vmware.com \
    --cc=thomas@shipmail.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).