* [PATCH] staging: vboxvideo: adapt to new TTM interface
@ 2017-11-23 16:14 Christian König
2017-11-23 16:35 ` Hans de Goede
0 siblings, 1 reply; 15+ messages in thread
From: Christian König @ 2017-11-23 16:14 UTC (permalink / raw)
To: hdegoede, dri-devel
I missed this driver because it is in the staging area.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
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;
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-23 16:14 Christian König
@ 2017-11-23 16:35 ` Hans de Goede
0 siblings, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2017-11-23 16:35 UTC (permalink / raw)
To: Christian König, dri-devel
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] staging: vboxvideo: adapt to new TTM interface
@ 2017-11-24 10:29 Christian König
2017-11-24 10:31 ` Greg KH
0 siblings, 1 reply; 15+ messages in thread
From: Christian König @ 2017-11-24 10:29 UTC (permalink / raw)
To: hdegoede, dri-devel, greg
I missed this driver because it is in the staging area.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
---
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;
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-24 10:29 [PATCH] staging: vboxvideo: " Christian König
@ 2017-11-24 10:31 ` Greg KH
2017-11-24 10:35 ` Christian König
0 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2017-11-24 10:31 UTC (permalink / raw)
To: Christian König; +Cc: hdegoede, dri-devel
On Fri, Nov 24, 2017 at 11:29:27AM +0100, Christian König wrote:
> I missed this driver because it is in the staging area.
What does this changelog text mean???
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/staging/vboxvideo/vbox_ttm.c | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
Please provide something that makes sense when reading the changelog
text on its own.
thanks,
greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] staging: vboxvideo: adapt to new TTM interface
@ 2017-11-24 10:32 Christian König
2017-11-24 10:37 ` Greg KH
2017-11-27 22:23 ` Alex Deucher
0 siblings, 2 replies; 15+ messages in thread
From: Christian König @ 2017-11-24 10:32 UTC (permalink / raw)
To: hdegoede, dri-devel, greg
Fixes interface changes done in the following commits:
drm/ttm: add operation ctx to ttm_bo_validate v2
drm/ttm: add context to driver move callback as well
I missed this driver because it is in the staging area.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
---
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;
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-24 10:31 ` Greg KH
@ 2017-11-24 10:35 ` Christian König
0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2017-11-24 10:35 UTC (permalink / raw)
To: Greg KH; +Cc: hdegoede, dri-devel
Am 24.11.2017 um 11:31 schrieb Greg KH:
> On Fri, Nov 24, 2017 at 11:29:27AM +0100, Christian König wrote:
>> I missed this driver because it is in the staging area.
> What does this changelog text mean???
Sorry for the confusion, the patch was originally part of a larger series.
Just send it out again with an updated commit message.
>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/staging/vboxvideo/vbox_ttm.c | 17 ++++++-----------
>> 1 file changed, 6 insertions(+), 11 deletions(-)
> Please provide something that makes sense when reading the changelog
> text on its own.
Done, but please note that I'm not sure if the interface this breaks has
already reached any of the relevant upstream repositories.
I just added you to the list of recipients because Hans suggested to do so.
Regards,
Christian.
>
> thanks,
>
> greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-24 10:32 [PATCH] staging: vboxvideo: adapt to new TTM interface Christian König
@ 2017-11-24 10:37 ` Greg KH
2017-11-24 12:53 ` Christian König
2017-11-27 22:23 ` Alex Deucher
1 sibling, 1 reply; 15+ messages in thread
From: Greg KH @ 2017-11-24 10:37 UTC (permalink / raw)
To: Christian König; +Cc: hdegoede, dri-devel
On Fri, Nov 24, 2017 at 11:32:59AM +0100, Christian König wrote:
> Fixes interface changes done in the following commits:
> drm/ttm: add operation ctx to ttm_bo_validate v2
> drm/ttm: add context to driver move callback as well
Any hints on the git commit ids in Linus's tree?
And does this mean the driver's build is now broken? Should this go
through the staging tree, or is it to go through the drm tree?
thanks,
greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-24 10:37 ` Greg KH
@ 2017-11-24 12:53 ` Christian König
2017-11-24 13:05 ` Greg KH
0 siblings, 1 reply; 15+ messages in thread
From: Christian König @ 2017-11-24 12:53 UTC (permalink / raw)
To: Greg KH; +Cc: hdegoede, dri-devel
Am 24.11.2017 um 11:37 schrieb Greg KH:
> On Fri, Nov 24, 2017 at 11:32:59AM +0100, Christian König wrote:
>> Fixes interface changes done in the following commits:
>> drm/ttm: add operation ctx to ttm_bo_validate v2
>> drm/ttm: add context to driver move callback as well
> Any hints on the git commit ids in Linus's tree?
Those haven't arrived in Linus tree yet.
> And does this mean the driver's build is now broken?
Yes, it broke the build. Sorry that was my fault, didn't had this
staging driver activated in the config nor noticed that there is an user
of ttm outside the drm directory.
> Should this go through the staging tree, or is it to go through the drm tree?
The DRM tree I think. We should probably squash this patch into the
original change which broke the driver in the DRM tree.
Regards,
Christian.
>
> thanks,
>
> greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-24 12:53 ` Christian König
@ 2017-11-24 13:05 ` Greg KH
0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2017-11-24 13:05 UTC (permalink / raw)
To: christian.koenig; +Cc: hdegoede, dri-devel
On Fri, Nov 24, 2017 at 01:53:16PM +0100, Christian König wrote:
> Am 24.11.2017 um 11:37 schrieb Greg KH:
> > On Fri, Nov 24, 2017 at 11:32:59AM +0100, Christian König wrote:
> > > Fixes interface changes done in the following commits:
> > > drm/ttm: add operation ctx to ttm_bo_validate v2
> > > drm/ttm: add context to driver move callback as well
> > Any hints on the git commit ids in Linus's tree?
>
> Those haven't arrived in Linus tree yet.
>
> > And does this mean the driver's build is now broken?
>
> Yes, it broke the build. Sorry that was my fault, didn't had this staging
> driver activated in the config nor noticed that there is an user of ttm
> outside the drm directory.
>
> > Should this go through the staging tree, or is it to go through the drm tree?
>
> The DRM tree I think. We should probably squash this patch into the original
> change which broke the driver in the DRM tree.
That's fine with me, thanks for the patch:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo: adapt to new TTM interface
2017-11-24 10:32 [PATCH] staging: vboxvideo: adapt to new TTM interface Christian König
2017-11-24 10:37 ` Greg KH
@ 2017-11-27 22:23 ` Alex Deucher
1 sibling, 0 replies; 15+ messages in thread
From: Alex Deucher @ 2017-11-27 22:23 UTC (permalink / raw)
To: Christian König; +Cc: Hans de Goede, Maling list - DRI developers, Greg KH
On Fri, Nov 24, 2017 at 5:32 AM, Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
> Fixes interface changes done in the following commits:
> drm/ttm: add operation ctx to ttm_bo_validate v2
> drm/ttm: add context to driver move callback as well
>
> I missed this driver because it is in the staging area.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Alex
> ---
> 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;
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] staging: vboxvideo adapt to new TTM interface
@ 2017-12-28 3:35 Roger He
2017-12-28 4:23 ` Chunming Zhou
0 siblings, 1 reply; 15+ messages in thread
From: Roger He @ 2017-12-28 3:35 UTC (permalink / raw)
To: dri-devel; +Cc: hdegoede, Roger He, Christian.Koenig, gregkh
Fixes interface change done in the following commit:
eb86c98 drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver
i missed this driver because it is in staging dir.
Signed-off-by: Roger He <Hongbo.He@amd.com>
---
drivers/staging/vboxvideo/vbox_ttm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
index 231c89e..55f14c9 100644
--- a/drivers/staging/vboxvideo/vbox_ttm.c
+++ b/drivers/staging/vboxvideo/vbox_ttm.c
@@ -213,9 +213,10 @@ static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
return tt;
}
-static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
+static int vbox_ttm_tt_populate(struct ttm_tt *ttm,
+ struct ttm_operation_ctx *ctx)
{
- return ttm_pool_populate(ttm);
+ return ttm_pool_populate(ttm, ctx);
}
static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo adapt to new TTM interface
2017-12-28 3:35 [PATCH] staging: vboxvideo " Roger He
@ 2017-12-28 4:23 ` Chunming Zhou
2017-12-28 10:21 ` He, Roger
0 siblings, 1 reply; 15+ messages in thread
From: Chunming Zhou @ 2017-12-28 4:23 UTC (permalink / raw)
To: Roger He, dri-devel; +Cc: hdegoede, Christian.Koenig, gregkh
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
On 2017年12月28日 11:35, Roger He wrote:
> Fixes interface change done in the following commit:
> eb86c98 drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver
>
> i missed this driver because it is in staging dir.
>
> Signed-off-by: Roger He <Hongbo.He@amd.com>
> ---
> drivers/staging/vboxvideo/vbox_ttm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
> index 231c89e..55f14c9 100644
> --- a/drivers/staging/vboxvideo/vbox_ttm.c
> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
> @@ -213,9 +213,10 @@ static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
> return tt;
> }
>
> -static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
> +static int vbox_ttm_tt_populate(struct ttm_tt *ttm,
> + struct ttm_operation_ctx *ctx)
> {
> - return ttm_pool_populate(ttm);
> + return ttm_pool_populate(ttm, ctx);
> }
>
> static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH] staging: vboxvideo adapt to new TTM interface
2017-12-28 4:23 ` Chunming Zhou
@ 2017-12-28 10:21 ` He, Roger
2018-01-02 2:15 ` He, Roger
0 siblings, 1 reply; 15+ messages in thread
From: He, Roger @ 2017-12-28 10:21 UTC (permalink / raw)
To: dri-devel@lists.freedesktop.org, Bridgman, John, Gregory, Robert,
Khan, Tahir, Shamim, Zafar
Cc: hdegoede@redhat.com, Koenig, Christian,
gregkh@linuxfoundation.org
Seems I have no permission to push the patch into amd-staging-drm-next.
Needs Whitelisted.
http://git.amd.com:8080/#/c/124051/1
anyone can help?
Thanks
Roger(Hongbo.He)
-----Original Message-----
From: Zhou, David(ChunMing)
Sent: Thursday, December 28, 2017 12:24 PM
To: He, Roger <Hongbo.He@amd.com>; dri-devel@lists.freedesktop.org
Cc: hdegoede@redhat.com; gregkh@linuxfoundation.org; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>
Subject: Re: [PATCH] staging: vboxvideo adapt to new TTM interface
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
On 2017年12月28日 11:35, Roger He wrote:
> Fixes interface change done in the following commit:
> eb86c98 drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver
>
> i missed this driver because it is in staging dir.
>
> Signed-off-by: Roger He <Hongbo.He@amd.com>
> ---
> drivers/staging/vboxvideo/vbox_ttm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
> index 231c89e..55f14c9 100644
> --- a/drivers/staging/vboxvideo/vbox_ttm.c
> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
> @@ -213,9 +213,10 @@ static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
> return tt;
> }
>
> -static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
> +static int vbox_ttm_tt_populate(struct ttm_tt *ttm,
> + struct ttm_operation_ctx *ctx)
> {
> - return ttm_pool_populate(ttm);
> + return ttm_pool_populate(ttm, ctx);
> }
>
> static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH] staging: vboxvideo adapt to new TTM interface
2017-12-28 10:21 ` He, Roger
@ 2018-01-02 2:15 ` He, Roger
2018-01-02 9:31 ` Christian König
0 siblings, 1 reply; 15+ messages in thread
From: He, Roger @ 2018-01-02 2:15 UTC (permalink / raw)
To: He, Roger, dri-devel@lists.freedesktop.org, Bridgman, John,
Gregory, Robert, Khan, Tahir, Shamim, Zafar
Cc: Deucher, Alexander, hdegoede@redhat.com, Koenig, Christian,
gregkh@linuxfoundation.org
+Alex
Do you know who can help about it?
Thanks
Roger(Hongbo.He)
-----Original Message-----
From: dri-devel [mailto:dri-devel-bounces@lists.freedesktop.org] On Behalf Of He, Roger
Sent: Thursday, December 28, 2017 6:21 PM
To: dri-devel@lists.freedesktop.org; Bridgman, John <John.Bridgman@amd.com>; Gregory, Robert <Robert.Gregory@amd.com>; Khan, Tahir <Tahir.Khan@amd.com>; Shamim, Zafar <Zafar.Shamim@amd.com>
Cc: hdegoede@redhat.com; Koenig, Christian <Christian.Koenig@amd.com>; gregkh@linuxfoundation.org
Subject: RE: [PATCH] staging: vboxvideo adapt to new TTM interface
Seems I have no permission to push the patch into amd-staging-drm-next.
Needs Whitelisted.
http://git.amd.com:8080/#/c/124051/1
anyone can help?
Thanks
Roger(Hongbo.He)
-----Original Message-----
From: Zhou, David(ChunMing)
Sent: Thursday, December 28, 2017 12:24 PM
To: He, Roger <Hongbo.He@amd.com>; dri-devel@lists.freedesktop.org
Cc: hdegoede@redhat.com; gregkh@linuxfoundation.org; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>
Subject: Re: [PATCH] staging: vboxvideo adapt to new TTM interface
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
On 2017年12月28日 11:35, Roger He wrote:
> Fixes interface change done in the following commit:
> eb86c98 drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver
>
> i missed this driver because it is in staging dir.
>
> Signed-off-by: Roger He <Hongbo.He@amd.com>
> ---
> drivers/staging/vboxvideo/vbox_ttm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
> index 231c89e..55f14c9 100644
> --- a/drivers/staging/vboxvideo/vbox_ttm.c
> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
> @@ -213,9 +213,10 @@ static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
> return tt;
> }
>
> -static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
> +static int vbox_ttm_tt_populate(struct ttm_tt *ttm,
> + struct ttm_operation_ctx *ctx)
> {
> - return ttm_pool_populate(ttm);
> + return ttm_pool_populate(ttm, ctx);
> }
>
> static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] staging: vboxvideo adapt to new TTM interface
2018-01-02 2:15 ` He, Roger
@ 2018-01-02 9:31 ` Christian König
0 siblings, 0 replies; 15+ messages in thread
From: Christian König @ 2018-01-02 9:31 UTC (permalink / raw)
To: He, Roger, dri-devel@lists.freedesktop.org, Bridgman, John,
Gregory, Robert, Khan, Tahir, Shamim, Zafar
Cc: Deucher, Alexander, hdegoede@redhat.com,
gregkh@linuxfoundation.org
Hi Roger,
you already pinged the right persons, just be a bit more patience about it.
They are probably just on vacation.
Regards,
Christian.
PS: Happy new year!
Am 02.01.2018 um 03:15 schrieb He, Roger:
> +Alex
>
> Do you know who can help about it?
>
>
> Thanks
> Roger(Hongbo.He)
>
> -----Original Message-----
> From: dri-devel [mailto:dri-devel-bounces@lists.freedesktop.org] On Behalf Of He, Roger
> Sent: Thursday, December 28, 2017 6:21 PM
> To: dri-devel@lists.freedesktop.org; Bridgman, John <John.Bridgman@amd.com>; Gregory, Robert <Robert.Gregory@amd.com>; Khan, Tahir <Tahir.Khan@amd.com>; Shamim, Zafar <Zafar.Shamim@amd.com>
> Cc: hdegoede@redhat.com; Koenig, Christian <Christian.Koenig@amd.com>; gregkh@linuxfoundation.org
> Subject: RE: [PATCH] staging: vboxvideo adapt to new TTM interface
>
> Seems I have no permission to push the patch into amd-staging-drm-next.
> Needs Whitelisted.
>
> http://git.amd.com:8080/#/c/124051/1
> anyone can help?
>
> Thanks
> Roger(Hongbo.He)
> -----Original Message-----
> From: Zhou, David(ChunMing)
> Sent: Thursday, December 28, 2017 12:24 PM
> To: He, Roger <Hongbo.He@amd.com>; dri-devel@lists.freedesktop.org
> Cc: hdegoede@redhat.com; gregkh@linuxfoundation.org; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>
> Subject: Re: [PATCH] staging: vboxvideo adapt to new TTM interface
>
> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
>
>
> On 2017年12月28日 11:35, Roger He wrote:
>> Fixes interface change done in the following commit:
>> eb86c98 drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver
>>
>> i missed this driver because it is in staging dir.
>>
>> Signed-off-by: Roger He <Hongbo.He@amd.com>
>> ---
>> drivers/staging/vboxvideo/vbox_ttm.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c
>> index 231c89e..55f14c9 100644
>> --- a/drivers/staging/vboxvideo/vbox_ttm.c
>> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
>> @@ -213,9 +213,10 @@ static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
>> return tt;
>> }
>>
>> -static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
>> +static int vbox_ttm_tt_populate(struct ttm_tt *ttm,
>> + struct ttm_operation_ctx *ctx)
>> {
>> - return ttm_pool_populate(ttm);
>> + return ttm_pool_populate(ttm, ctx);
>> }
>>
>> static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2018-01-02 9:47 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-24 10:32 [PATCH] staging: vboxvideo: adapt to new TTM interface 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
-- strict thread matches above, loose matches on Subject: below --
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
2017-11-24 10:29 [PATCH] staging: vboxvideo: " Christian König
2017-11-24 10:31 ` Greg KH
2017-11-24 10:35 ` Christian König
2017-11-23 16:14 Christian König
2017-11-23 16:35 ` Hans de Goede
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.