drm/radeon/kms: fix incorrect comparison in cayman setup code.
authorDave Airlie <airlied@redhat.com>
Thu, 19 May 2011 04:14:40 +0000 (14:14 +1000)
committerDave Airlie <airlied@gmail.com>
Sun, 22 May 2011 10:27:09 +0000 (20:27 +1000)
This was leading to a bogus value being programmed to the backend
routing register.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/ni.c

index 57d3d6c208d857cd51697e3fa49b90f0f1a4166a..4e30e9ebd17c5bf54d06f18b528a9a356e375652 100644 (file)
@@ -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;