Skip to contentSkip to conversation

drm/amdgpu: fix typo in amdgpu_vce_validate_bo

PATCH In review Christian König 4 participants 4 messages Jan 16, 2018 – Jan 17, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix typo in amdgpu_vce_validate_bo

Otherwise buffer placement is very restrictive and might fail.

Fixes "drm/amdgpu: fix VCE buffer placement restrictions v2"
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2 -2
index 55a726a322e3..d274ae535530 100644
@@ -585,8 +585,8 @@ static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx,
 
 	for (i = 0; i < bo->placement.num_placement; ++i) {
 		bo->placements[i].fpfn = max(bo->placements[i].fpfn, fpfn);
-		bo->placements[i].lpfn = bo->placements[i].fpfn ?
-			min(bo->placements[i].fpfn, lpfn) : lpfn;
+		bo->placements[i].lpfn = bo->placements[i].lpfn ?
+			min(bo->placements[i].lpfn, lpfn) : lpfn;
 	}
 	return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
 }
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180116100323.13798-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 16 lines · Christian König

Otherwise buffer placement is very restrictive and might fail.

Fixes "drm/amdgpu: fix VCE buffer placement restrictions v2"
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +0 -0
index 55a726a322e3..d274ae535530 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx, · line 592

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2 -2
@@ -585,8 +585,8 @@ static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx,
 
 	for (i = 0; i < bo->placement.num_placement; ++i) {
 		bo->placements[i].fpfn = max(bo->placements[i].fpfn, fpfn);
-		bo->placements[i].lpfn = bo->placements[i].fpfn ?
-			min(bo->placements[i].fpfn, lpfn) : lpfn;
+		bo->placements[i].lpfn = bo->placements[i].lpfn ?
+			min(bo->placements[i].lpfn, lpfn) : lpfn;
 	}
 	return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
 }

Good catch.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw
In reply to a message not in the archive
Quoted 15 lines · Christian König

Otherwise buffer placement is very restrictive and might fail.

Fixes "drm/amdgpu: fix VCE buffer placement restrictions v2"
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +0 -0
index 55a726a322e3..d274ae535530 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx, · line 592

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2 -2
@@ -585,8 +585,8 @@ static int amdgpu_vce_validate_bo(struct amdgpu_cs_parser *p, uint32_t ib_idx,
 
  	for (i = 0; i < bo->placement.num_placement; ++i) {
  		bo->placements[i].fpfn = max(bo->placements[i].fpfn, fpfn);
-		bo->placements[i].lpfn = bo->placements[i].fpfn ?
-			min(bo->placements[i].fpfn, lpfn) : lpfn;
+		bo->placements[i].lpfn = bo->placements[i].lpfn ?
+			min(bo->placements[i].lpfn, lpfn) : lpfn;
  	}
  	return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
  }

This fixes VCE for me, also with this I can again test

https://bugs.freedesktop.org/show_bug.cgi?id=102296

which also seems good now. I'll close that after I am sure I am testing correctly.

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): b7eb5f27-1224-ba36-c12a-5c41d73712e5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#5 lore raw
Quoted 38 lines

-----Original Message-----
From: Andy Furniss [mailto:[email protected]]
Sent: Wednesday, January 17, 2018 2:06 AM
To: Christian König <[email protected]>; amd- [email protected]; Deng, Emily <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: fix typo in amdgpu_vce_validate_bo

Quoted 26 lines · Christian König

Otherwise buffer placement is very restrictive and might fail.

Fixes "drm/amdgpu: fix VCE buffer placement restrictions v2"
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2 -2
index 55a726a322e3..d274ae535530 100644
@@ -585,8 +585,8 @@ static int amdgpu_vce_validate_bo(struct
 amdgpu_cs_parser *p, uint32_t ib_idx,
 
  	for (i = 0; i < bo->placement.num_placement; ++i) {
  		bo->placements[i].fpfn = max(bo->placements[i].fpfn, fpfn);
-		bo->placements[i].lpfn = bo->placements[i].fpfn ?
-			min(bo->placements[i].fpfn, lpfn) : lpfn;
+		bo->placements[i].lpfn = bo->placements[i].lpfn ?
+			min(bo->placements[i].lpfn, lpfn) : lpfn;
  	}
  	return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
Quoted 1 line
  }

This fixes VCE for me, also with this I can again test

Quoted 5 lines

https://bugs.freedesktop.org/show_bug.cgi?id=102296

which also seems good now. I'll close that after I am sure I am testing correctly.

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx