drm/radeon: fix active_cu mask on SI and CIK after re-init (v3)
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Aug 2014 15:56:38 +0000 (11:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Aug 2014 16:01:49 +0000 (12:01 -0400)
Need to initialize the mask to 0 on init, otherwise it
keeps increasing.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=82581

v2: also fix cu count
v3: split count fix into separate patch

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/si.c

index 23d56c689e1208549dba374fac8665c7dccddc16..f4e14702639d07e546fb89c319bb65847ecef024 100644 (file)
@@ -3672,6 +3672,7 @@ static void cik_gpu_init(struct radeon_device *rdev)
                     rdev->config.cik.max_sh_per_se,
                     rdev->config.cik.max_backends_per_se);
 
+       rdev->config.cik.active_cus = 0;
        for (i = 0; i < rdev->config.cik.max_shader_engines; i++) {
                for (j = 0; j < rdev->config.cik.max_sh_per_se; j++) {
                        rdev->config.cik.active_cus +=
index c8f359ca64d15ee3903ec0b04cd2968237056afa..a1274a31405c0a207aea2708f28bacbad96d91f4 100644 (file)
@@ -3255,6 +3255,7 @@ static void si_gpu_init(struct radeon_device *rdev)
                     rdev->config.si.max_sh_per_se,
                     rdev->config.si.max_cu_per_sh);
 
+       rdev->config.si.active_cus = 0;
        for (i = 0; i < rdev->config.si.max_shader_engines; i++) {
                for (j = 0; j < rdev->config.si.max_sh_per_se; j++) {
                        rdev->config.si.active_cus +=