Skip to contentSkip to conversation

cayman acceleration fixes so far

PATCH In review Dave Airlie 2 participants 6 messages May 19, 2011

Subsystems (2)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

cover cayman acceleration fixes so far

These 4 patches allow me to run piglit to ~1460/1660 tests with my port of r600g to cayman. I still have to track down why the DDX composite accel isn't working though. I suspect we'll need a cayman accel is working flag as well.

Dave.

author maintainer
#1 lore raw

PATCH 1/4 drm/radeon/kms: fix incorrect comparison in cayman setup code.

From: Dave Airlie <[email protected]>

This was leading to a bogus value being programmed to the backend routing register.

---
 drivers/gpu/drm/radeon/ni.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/ni.c +1 -1
index 3d8a763..a38d745 100644
@@ -417,7 +417,7 @@ static u32 cayman_get_tile_pipe_to_backend_map(struct radeon_device *rdev,
 		num_shader_engines = 1;
 	if (num_shader_engines > rdev->config.cayman.max_shader_engines)
 		num_shader_engines = rdev->config.cayman.max_shader_engines;
-	if (num_backends_per_asic > num_shader_engines)
+	if (num_backends_per_asic < num_shader_engines)
 		num_backends_per_asic = num_shader_engines;
 	if (num_backends_per_asic > (rdev->config.cayman.max_backends_per_se * num_shader_engines))
 		num_backends_per_asic = rdev->config.cayman.max_backends_per_se * num_shader_engines;
Signature · 1 line
1.7.1
author maintainer
#2 lore raw

PATCH 2/4 drm/radeon/kms: fix tile_config value reported to userspace on cayman.

In reply to Dave Airlie

From: Dave Airlie <[email protected]>

cayman is reporting the wrong tile config value to userspace, this causes piglit mipmap generation tests to fail.

---
 drivers/gpu/drm/radeon/ni.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/ni.c +1 -1
index a38d745..99f4f40 100644
@@ -829,7 +829,7 @@ static void cayman_gpu_init(struct radeon_device *rdev)
 	rdev->config.cayman.tile_config |=
 		((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4;
 	rdev->config.cayman.tile_config |=
-		(gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT;
+		((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8;
 	rdev->config.cayman.tile_config |=
 		((gb_addr_config & ROW_SIZE_MASK) >> ROW_SIZE_SHIFT) << 12;
 
Signature · 1 line
1.7.1
author maintainer
#3 lore raw

PATCH 3/4 drm/radeon/cayman: setup hdp to invalidate and flush when asked

In reply to Dave Airlie

From: Dave Airlie <[email protected]>

On cayman we need to set the bit to cause HDP flushes to invalidate the HDP cache also.

---
 drivers/gpu/drm/radeon/ni.c  |    4 ++++
 drivers/gpu/drm/radeon/nid.h |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/ni.c +4 -0
index 99f4f40..b205ba1 100644
@@ -931,6 +931,10 @@ static void cayman_gpu_init(struct radeon_device *rdev)
 	WREG32(CB_PERF_CTR3_SEL_0, 0);
 	WREG32(CB_PERF_CTR3_SEL_1, 0);
 
+	tmp = RREG32(HDP_MISC_CNTL);
+	tmp |= HDP_FLUSH_INVALIDATE_CACHE;
+	WREG32(HDP_MISC_CNTL, tmp);
+
 	hdp_host_path_cntl = RREG32(HDP_HOST_PATH_CNTL);
 	WREG32(HDP_HOST_PATH_CNTL, hdp_host_path_cntl);
 
drivers/gpu/drm/radeon/nid.h +2 -0
index 0f9a08b..b2088c1 100644
@@ -136,6 +136,8 @@
 #define	HDP_NONSURFACE_INFO				0x2C08
 #define	HDP_NONSURFACE_SIZE				0x2C0C
 #define HDP_ADDR_CONFIG  				0x2F48
+#define HDP_MISC_CNTL					0x2F4C
+#define 	HDP_FLUSH_INVALIDATE_CACHE			(1 << 0)
 
 #define	CC_SYS_RB_BACKEND_DISABLE			0x3F88
 #define	GC_USER_SYS_RB_BACKEND_DISABLE			0x3F8C
Signature · 1 line
1.7.1
author maintainer
#4 lore raw

PATCH 4/4 drm/radeon/kms: add wait idle ioctl for eg->cayman

In reply to Dave Airlie

From: Dave Airlie <[email protected]>

None of the latest GPUs had this hooked up, this is necessary for correct operation in a lot of cases, however we should test this on a few GPUs in these families as we've had problems in this area before.

---
 drivers/gpu/drm/radeon/radeon_asic.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon_asic.c +4 -0
index ca57619..d948265 100644
@@ -782,6 +782,7 @@ static struct radeon_asic evergreen_asic = {
 	.hpd_fini = &evergreen_hpd_fini,
 	.hpd_sense = &evergreen_hpd_sense,
 	.hpd_set_polarity = &evergreen_hpd_set_polarity,
+	.ioctl_wait_idle = r600_ioctl_wait_idle,
 	.gui_idle = &r600_gui_idle,
 	.pm_misc = &evergreen_pm_misc,
 	.pm_prepare = &evergreen_pm_prepare,
@@ -828,6 +829,7 @@ static struct radeon_asic sumo_asic = {
 	.hpd_fini = &evergreen_hpd_fini,
 	.hpd_sense = &evergreen_hpd_sense,
 	.hpd_set_polarity = &evergreen_hpd_set_polarity,
+	.ioctl_wait_idle = r600_ioctl_wait_idle,
 	.gui_idle = &r600_gui_idle,
 	.pm_misc = &evergreen_pm_misc,
 	.pm_prepare = &evergreen_pm_prepare,
@@ -874,6 +876,7 @@ static struct radeon_asic btc_asic = {
 	.hpd_fini = &evergreen_hpd_fini,
 	.hpd_sense = &evergreen_hpd_sense,
 	.hpd_set_polarity = &evergreen_hpd_set_polarity,
+	.ioctl_wait_idle = r600_ioctl_wait_idle,
 	.gui_idle = &r600_gui_idle,
 	.pm_misc = &evergreen_pm_misc,
 	.pm_prepare = &evergreen_pm_prepare,
@@ -920,6 +923,7 @@ static struct radeon_asic cayman_asic = {
 	.hpd_fini = &evergreen_hpd_fini,
 	.hpd_sense = &evergreen_hpd_sense,
 	.hpd_set_polarity = &evergreen_hpd_set_polarity,
+	.ioctl_wait_idle = r600_ioctl_wait_idle,
 	.gui_idle = &r600_gui_idle,
 	.pm_misc = &evergreen_pm_misc,
 	.pm_prepare = &evergreen_pm_prepare,
Signature · 1 line
1.7.1
Reviewed-by on the v1 series
#5 lore raw
In reply to Dave Airlie
Quoted 4 lines · Dave Airlie

These 4 patches allow me to run piglit to ~1460/1660 tests with my port of r600g to cayman. I still have to track down why the DDX composite accel isn't working though. I suspect we'll need a cayman accel is working flag as well.

For the series,

Quoted 8 lines

Dave.

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