[PATCH 07/32] drm/amd/display: Support new VA page table block size

Zaeem Mohamed zaeem.mohamed at amd.com
Fri May 31 16:51:20 UTC 2024


From: Chris Park <chris.park at amd.com>

[Why]
Page table definition increased up to 2MB.

[How]
Define new use case of page table for VA.

Reviewed-by: Alvin Lee <alvin.lee2 at amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed at amd.com>
Signed-off-by: Chris Park <chris.park at amd.com>
---
 .../display/dc/hubbub/dcn20/dcn20_hubbub.c    | 27 ++++++++++++++++---
 .../gpu/drm/amd/display/dc/inc/hw/dchubbub.h  |  9 ++++++-
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c b/drivers/gpu/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
index c6f859871d11..8901bd80f7d1 100644
--- a/drivers/gpu/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
+++ b/drivers/gpu/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
@@ -339,15 +339,36 @@ static enum dcn_hubbub_page_table_block_size page_table_block_size_to_hw(unsigne
 	case 4096:
 		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_4KB;
 		break;
-	case 65536:
-		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_64KB;
+	case 8192:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_8KB;
+		break;
+	case 16384:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_16KB;
 		break;
 	case 32768:
 		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_32KB;
 		break;
+	case 65536:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_64KB;
+		break;
+	case 131072:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_128KB;
+		break;
+	case 262144:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_256KB;
+		break;
+	case 524288:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_512KB;
+		break;
+	case 1048576:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_1024KB;
+		break;
+	case 2097152:
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_2048KB;
+		break;
 	default:
 		ASSERT(false);
-		block_size = page_table_block_size;
+		block_size = DCN_PAGE_TABLE_BLOCK_SIZE_4KB;
 		break;
 	}
 
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
index 1511400fc56b..a73cb8f731b3 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
@@ -74,8 +74,15 @@ enum dcn_hubbub_page_table_depth {
 
 enum dcn_hubbub_page_table_block_size {
 	DCN_PAGE_TABLE_BLOCK_SIZE_4KB = 0,
+	DCN_PAGE_TABLE_BLOCK_SIZE_8KB = 1,
+	DCN_PAGE_TABLE_BLOCK_SIZE_16KB = 2,
+	DCN_PAGE_TABLE_BLOCK_SIZE_32KB = 3,
 	DCN_PAGE_TABLE_BLOCK_SIZE_64KB = 4,
-	DCN_PAGE_TABLE_BLOCK_SIZE_32KB = 3
+	DCN_PAGE_TABLE_BLOCK_SIZE_128KB = 5,
+	DCN_PAGE_TABLE_BLOCK_SIZE_256KB = 6,
+	DCN_PAGE_TABLE_BLOCK_SIZE_512KB = 7,
+	DCN_PAGE_TABLE_BLOCK_SIZE_1024KB = 8,
+	DCN_PAGE_TABLE_BLOCK_SIZE_2048KB = 9
 };
 
 struct dcn_hubbub_phys_addr_config {
-- 
2.34.1



More information about the amd-gfx mailing list