Skip to contentSkip to conversation

drm/ttm: zero allocation only for CPU domain

PATCH In review [email protected] 2 participants 3 messages Jan 5, 2016 – Jan 6, 2016

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

PATCH 2/4 drm/ttm: zero allocation only for CPU domain

From: Chunming Zhou <[email protected]>

Change-Id I653d61e32faaa11c39bb978bf90301513a0c35b8
---
 drivers/gpu/drm/ttm/ttm_bo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/ttm/ttm_bo.c +1 -0
index 745e996..0633b65 100644
@@ -301,6 +301,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
 	if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) {
 		if (bo->ttm == NULL) {
 			bool zero = !(old_man->flags & TTM_MEMTYPE_FLAG_FIXED);
+			zero = (mem->mem_type == TTM_PL_SYSTEM) ? zero : false;
 			ret = ttm_bo_add_ttm(bo, zero);
 			if (ret)
 				goto out_err;
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi David,

why is this patch 2/4 if it's just a single patch?

Am Dienstag, den 05.01.2016, 11:55 +0800 schrieb [email protected]:

Quoted 3 lines

From: Chunming Zhou <[email protected]>

Change-Id: I653d61e32faaa11c39bb978bf90301513a0c35b8

This change-id is just pure noise when you submit something upstream.

Please add a proper change log on why the change below is necessary/helpful.

Regards,
Lucas

Quoted 17 lines

---
 drivers/gpu/drm/ttm/ttm_bo.c | 1 +

 1 file changed, 1 insertion(+)
drivers/gpu/drm/ttm/ttm_bo.c +0 -0
index 745e996..0633b65 100644
@@ -301,6 +301,7 @@ static int ttm_bo_handle_move_mem(struct
 ttm_buffer_object *bo,
  	if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) {
  		if (bo->ttm == NULL) {

  bool zero = !(old_man->flags & TTM_MEMTYPE_FLAG_FIXED);

drivers/gpu/drm/ttm/ttm_bo.c +1 -0
+			zero = (mem->mem_type == TTM_PL_SYSTEM) ?
Quoted 4 lines

zero : false;
  ret = ttm_bo_add_ttm(bo, zero); if (ret)
  goto out_err;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

author
#2 lore raw

Thanks for reply, this patch is mainly for performance reason. since TTM is to clear page for all non-fixed memory (GTT and CPU domains), which takes much more CPU overhead. The patch is to remove 'clear page' for GTT domain.
btw: Micheal has rejected this patch.

Regards,
David Zhou (Chunming)

Quoted 21 lines · Lucas Stach

Hi David,

why is this patch 2/4 if it's just a single patch?

Am Dienstag, den 05.01.2016, 11:55 +0800 schrieb [email protected]:

Quoted 3 lines

From: Chunming Zhou <[email protected]>

Change-Id: I653d61e32faaa11c39bb978bf90301513a0c35b8

This change-id is just pure noise when you submit something upstream.

Please add a proper change log on why the change below is necessary/helpful.

Regards,
Lucas

Quoted 5 lines
---
  drivers/gpu/drm/ttm/ttm_bo.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 13 lines
drivers/gpu/drm/ttm/ttm_bo.c +1 -0
index 745e996..0633b65 100644
@@ -301,6 +301,7 @@ static int ttm_bo_handle_move_mem(struct
 ttm_buffer_object *bo,
  	if (!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED)) {
  		if (bo->ttm == NULL) {
  			bool zero = !(old_man->flags &
 TTM_MEMTYPE_FLAG_FIXED);
+			zero = (mem->mem_type == TTM_PL_SYSTEM) ?
 zero : false;
Quoted 3 lines
  			ret = ttm_bo_add_ttm(bo, zero);
  			if (ret)
  				goto out_err;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel