drm/radeon/kms: Move radeon_get_clock_info() call out of radeon_clocks_init().
authorMichel Dänzer <daenzer@vmware.com>
Thu, 17 Sep 2009 07:42:28 +0000 (09:42 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 18 Sep 2009 06:04:10 +0000 (16:04 +1000)
Someone on IRC reported problems after commit
95a8f1bf4f48b434c9f839ab5a0773f66b39d7c6 ('drm/radeon/kms: Move
radeon_clocks_init() call back after getting VRAM info.'). And indeed, at least
some ASIC vram_info hooks use the clock info obtained by
radeon_get_clock_info(). So, move that call out of radeon_clocks_init(), ahead
of the radeon_vram_info() call.

[airlied - fixup missing r600/rv770 calls]

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drm/radeon/kms: fix get clock info calls for r600/rv770 init path.

These were missed when it got split out.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/radeon_device.c
drivers/gpu/drm/radeon/rv770.c

index af430d719e7f8000c8798ef7c8bdd820ff4780d6..1e1cab5ef1e4635d1ab796efcf31bf79117226f8 100644 (file)
@@ -1537,6 +1537,7 @@ int r600_init(struct radeon_device *rdev)
        r600_scratch_init(rdev);
        /* Initialize surface registers */
        radeon_surface_init(rdev);
+       radeon_get_clock_info(rdev->ddev);
        r = radeon_clocks_init(rdev);
        if (r)
                return r;
index 0b5014c2ae7f37b9ee871b341157745fbf62354d..8a40c616b534894e5aff553bca13e6f4070348ff 100644 (file)
@@ -386,7 +386,6 @@ int radeon_clocks_init(struct radeon_device *rdev)
 {
        int r;
 
-       radeon_get_clock_info(rdev->ddev);
        r = radeon_static_clocks_init(rdev->ddev);
        if (r) {
                return r;
@@ -617,7 +616,8 @@ int radeon_device_init(struct radeon_device *rdev,
                                radeon_combios_asic_init(rdev->ddev);
                        }
                }
-               /* Get vram informations */
+               /* Get clock & vram information */
+               radeon_get_clock_info(rdev->ddev);
                radeon_vram_info(rdev);
                /* Initialize clocks */
                r = radeon_clocks_init(rdev);
index be2f86539ebcaba80552e08e68b36ceb250fba64..8bab6b4f05d1e553bde4aa46a50285ca1b6ebcb2 100644 (file)
@@ -917,6 +917,7 @@ int rv770_init(struct radeon_device *rdev)
        r600_scratch_init(rdev);
        /* Initialize surface registers */
        radeon_surface_init(rdev);
+       radeon_get_clock_info(rdev->ddev);
        r = radeon_clocks_init(rdev);
        if (r)
                return r;