From: Hans de Goede <hdegoede@redhat.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
Date: Thu, 23 Nov 2017 17:35:19 +0100 [thread overview]
Message-ID: <a3069732-212e-c729-efd1-fd7e50c68543@redhat.com> (raw)
In-Reply-To: <20171123161428.20215-1-christian.koenig@amd.com>
Hi,
On 23-11-17 17:14, Christian König wrote:
> I missed this driver because it is in the staging area.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Thank you, looks good to me.
Can you please re-send this with Greh KH (the staging maintainer)
added in the To: list and my:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Added?
Regards,
Hans
> ---
> drivers/staging/vboxvideo/vbox_ttm.c | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
> index 4eb410a2a1a8..231c89e0699c 100644
> --- a/drivers/staging/vboxvideo/vbox_ttm.c
> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
> @@ -183,13 +183,6 @@ static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev,
> {
> }
>
> -static int vbox_bo_move(struct ttm_buffer_object *bo,
> - bool evict, bool interruptible,
> - bool no_wait_gpu, struct ttm_mem_reg *new_mem)
> -{
> - return ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem);
> -}
> -
> static void vbox_ttm_backend_destroy(struct ttm_tt *tt)
> {
> ttm_tt_fini(tt);
> @@ -237,7 +230,6 @@ static struct ttm_bo_driver vbox_bo_driver = {
> .init_mem_type = vbox_bo_init_mem_type,
> .eviction_valuable = ttm_bo_eviction_valuable,
> .evict_flags = vbox_bo_evict_flags,
> - .move = vbox_bo_move,
> .verify_access = vbox_bo_verify_access,
> .io_mem_reserve = &vbox_ttm_io_mem_reserve,
> .io_mem_free = &vbox_ttm_io_mem_free,
> @@ -374,6 +366,7 @@ static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo)
>
> int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
> {
> + struct ttm_operation_ctx ctx = { false, false };
> int i, ret;
>
> if (bo->pin_count) {
> @@ -389,7 +382,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
> for (i = 0; i < bo->placement.num_placement; i++)
> bo->placements[i].flags |= TTM_PL_FLAG_NO_EVICT;
>
> - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
> + ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
> if (ret)
> return ret;
>
> @@ -403,6 +396,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
>
> int vbox_bo_unpin(struct vbox_bo *bo)
> {
> + struct ttm_operation_ctx ctx = { false, false };
> int i, ret;
>
> if (!bo->pin_count) {
> @@ -416,7 +410,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
> for (i = 0; i < bo->placement.num_placement; i++)
> bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
>
> - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
> + ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
> if (ret)
> return ret;
>
> @@ -430,6 +424,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
> */
> int vbox_bo_push_sysram(struct vbox_bo *bo)
> {
> + struct ttm_operation_ctx ctx = { false, false };
> int i, ret;
>
> if (!bo->pin_count) {
> @@ -448,7 +443,7 @@ int vbox_bo_push_sysram(struct vbox_bo *bo)
> for (i = 0; i < bo->placement.num_placement; i++)
> bo->placements[i].flags |= TTM_PL_FLAG_NO_EVICT;
>
> - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
> + ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
> if (ret) {
> DRM_ERROR("pushing to VRAM failed\n");
> return ret;
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-11-23 16:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 16:14 [PATCH] staging: vboxvideo: adapt to new TTM interface Christian König
2017-11-23 16:35 ` Hans de Goede [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-24 10:29 Christian König
2017-11-24 10:31 ` Greg KH
2017-11-24 10:35 ` Christian König
2017-11-24 10:32 Christian König
2017-11-24 10:37 ` Greg KH
2017-11-24 12:53 ` Christian König
2017-11-24 13:05 ` Greg KH
2017-11-27 22:23 ` Alex Deucher
2017-12-28 3:35 [PATCH] staging: vboxvideo " Roger He
2017-12-28 4:23 ` Chunming Zhou
2017-12-28 10:21 ` He, Roger
2018-01-02 2:15 ` He, Roger
2018-01-02 9:31 ` Christian König
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=a3069732-212e-c729-efd1-fd7e50c68543@redhat.com \
--to=hdegoede@redhat.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/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