Skip to contentSkip to conversation

Fix cursor size for SI

PATCH In review Marek Olšák 3 participants 3 messages Aug 19, 2016 – Aug 22, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix cursor size for SI

From: Marek Olšák <[email protected]>

This doesn't fix the missing cursor, which seems to be a kernel issue, because it's missing with modesetting as well.

---
 src/amdgpu_kms.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
src/amdgpu_kms.c +8 -2
index 9ee48df..d9f15a4 100644
@@ -922,22 +922,28 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 		goto fail;
 	}
 
 	AMDGPUSetupCapabilities(pScrn);
 
 	if (info->drmmode.count_crtcs == 1)
 		pAMDGPUEnt->HasCRTC2 = FALSE;
 	else
 		pAMDGPUEnt->HasCRTC2 = TRUE;
 
-	info->cursor_w = CURSOR_WIDTH_CIK;
-	info->cursor_h = CURSOR_HEIGHT_CIK;
+	if (info->ChipFamily >= CHIP_FAMILY_TAHITI &&
+	    info->ChipFamily <= CHIP_FAMILY_HAINAN) {
+		info->cursor_w = CURSOR_WIDTH;
+		info->cursor_h = CURSOR_HEIGHT;
+	} else {
+		info->cursor_w = CURSOR_WIDTH_CIK;
+		info->cursor_h = CURSOR_HEIGHT_CIK;
+	}
 
 	amdgpu_query_heap_size(pAMDGPUEnt->pDev, AMDGPU_GEM_DOMAIN_GTT,
 				&heap_size, &max_allocation);
 	info->gart_size = heap_size;
 	amdgpu_query_heap_size(pAMDGPUEnt->pDev, AMDGPU_GEM_DOMAIN_VRAM,
 				&heap_size, &max_allocation);
 	info->vram_size = max_allocation;
 
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "mem size init: gart size :%llx vram size: s:%llx visible:%llx\n",
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw
In reply to a message not in the archive

Perhaps a follow up that queries the kernel instead, however better this than broken.

Quoted 34 lines · Marek Olšák

From: Marek Olšák <[email protected]>

This doesn't fix the missing cursor, which seems to be a kernel issue, because it's missing with modesetting as well.

---
 src/amdgpu_kms.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
src/amdgpu_kms.c +8 -2
index 9ee48df..d9f15a4 100644
@@ -922,22 +922,28 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 		goto fail;
 	}
 
 	AMDGPUSetupCapabilities(pScrn);
 
 	if (info->drmmode.count_crtcs == 1)
 		pAMDGPUEnt->HasCRTC2 = FALSE;
 	else
 		pAMDGPUEnt->HasCRTC2 = TRUE;
 
-	info->cursor_w = CURSOR_WIDTH_CIK;
-	info->cursor_h = CURSOR_HEIGHT_CIK;
+	if (info->ChipFamily >= CHIP_FAMILY_TAHITI &&
+	    info->ChipFamily <= CHIP_FAMILY_HAINAN) {
+		info->cursor_w = CURSOR_WIDTH;
+		info->cursor_h = CURSOR_HEIGHT;
+	} else {
+		info->cursor_w = CURSOR_WIDTH_CIK;
+		info->cursor_h = CURSOR_HEIGHT_CIK;
+	}

src/amdgpu_kms.c Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags) · line 949

Quoted 10 lines
src/amdgpu_kms.c +0 -0
 
 	amdgpu_query_heap_size(pAMDGPUEnt->pDev, AMDGPU_GEM_DOMAIN_GTT,
 				&heap_size, &max_allocation);
 	info->gart_size = heap_size;
 	amdgpu_query_heap_size(pAMDGPUEnt->pDev, AMDGPU_GEM_DOMAIN_VRAM,
 				&heap_size, &max_allocation);
 	info->vram_size = max_allocation;
 
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "mem size init: gart size :%llx vram size: s:%llx visible:%llx\n",

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

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · Marek Olšák

From: Marek Olšák <[email protected]>

This doesn't fix the missing cursor, which seems to be a kernel issue, because it's missing with modesetting as well.

With this sentence removed from the commit log,

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