diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-04-12 16:21:53 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-18 21:25:24 -0400 |
commit | 1b5331d9c6ae1f68db6359d227531ec42bc40d47 (patch) | |
tree | 89edc65764d5d6ec0bcc92a6d5a0ded41a279d44 | |
parent | b73c5f8b2f85a7041e045e0009d046780416948d (diff) |
drm/radeon/kms: print GPU family and device id when loading
This will help figuring out GPU when looking at bugs log.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 53 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_family.h | 3 |
2 files changed, 54 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 60ec47b71642..5e03b14931ef 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -35,6 +35,54 @@ | |||
35 | #include "radeon.h" | 35 | #include "radeon.h" |
36 | #include "atom.h" | 36 | #include "atom.h" |
37 | 37 | ||
38 | static const char radeon_family_name[][16] = { | ||
39 | "R100", | ||
40 | "RV100", | ||
41 | "RS100", | ||
42 | "RV200", | ||
43 | "RS200", | ||
44 | "R200", | ||
45 | "RV250", | ||
46 | "RS300", | ||
47 | "RV280", | ||
48 | "R300", | ||
49 | "R350", | ||
50 | "RV350", | ||
51 | "RV380", | ||
52 | "R420", | ||
53 | "R423", | ||
54 | "RV410", | ||
55 | "RS400", | ||
56 | "RS480", | ||
57 | "RS600", | ||
58 | "RS690", | ||
59 | "RS740", | ||
60 | "RV515", | ||
61 | "R520", | ||
62 | "RV530", | ||
63 | "RV560", | ||
64 | "RV570", | ||
65 | "R580", | ||
66 | "R600", | ||
67 | "RV610", | ||
68 | "RV630", | ||
69 | "RV670", | ||
70 | "RV620", | ||
71 | "RV635", | ||
72 | "RS780", | ||
73 | "RS880", | ||
74 | "RV770", | ||
75 | "RV730", | ||
76 | "RV710", | ||
77 | "RV740", | ||
78 | "CEDAR", | ||
79 | "REDWOOD", | ||
80 | "JUNIPER", | ||
81 | "CYPRESS", | ||
82 | "HEMLOCK", | ||
83 | "LAST", | ||
84 | }; | ||
85 | |||
38 | /* | 86 | /* |
39 | * Clear GPU surface registers. | 87 | * Clear GPU surface registers. |
40 | */ | 88 | */ |
@@ -525,7 +573,6 @@ int radeon_device_init(struct radeon_device *rdev, | |||
525 | int r; | 573 | int r; |
526 | int dma_bits; | 574 | int dma_bits; |
527 | 575 | ||
528 | DRM_INFO("radeon: Initializing kernel modesetting.\n"); | ||
529 | rdev->shutdown = false; | 576 | rdev->shutdown = false; |
530 | rdev->dev = &pdev->dev; | 577 | rdev->dev = &pdev->dev; |
531 | rdev->ddev = ddev; | 578 | rdev->ddev = ddev; |
@@ -537,6 +584,10 @@ int radeon_device_init(struct radeon_device *rdev, | |||
537 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; | 584 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; |
538 | rdev->gpu_lockup = false; | 585 | rdev->gpu_lockup = false; |
539 | rdev->accel_working = false; | 586 | rdev->accel_working = false; |
587 | |||
588 | DRM_INFO("initializing kernel modesetting (%s 0x%04X:0x%04X).\n", | ||
589 | radeon_family_name[rdev->family], pdev->vendor, pdev->device); | ||
590 | |||
540 | /* mutex initialization are all done here so we | 591 | /* mutex initialization are all done here so we |
541 | * can recall function without having locking issues */ | 592 | * can recall function without having locking issues */ |
542 | mutex_init(&rdev->cs_mutex); | 593 | mutex_init(&rdev->cs_mutex); |
diff --git a/drivers/gpu/drm/radeon/radeon_family.h b/drivers/gpu/drm/radeon/radeon_family.h index 93c7d5d41914..e329066dcabd 100644 --- a/drivers/gpu/drm/radeon/radeon_family.h +++ b/drivers/gpu/drm/radeon/radeon_family.h | |||
@@ -36,7 +36,7 @@ | |||
36 | * Radeon chip families | 36 | * Radeon chip families |
37 | */ | 37 | */ |
38 | enum radeon_family { | 38 | enum radeon_family { |
39 | CHIP_R100, | 39 | CHIP_R100 = 0, |
40 | CHIP_RV100, | 40 | CHIP_RV100, |
41 | CHIP_RS100, | 41 | CHIP_RS100, |
42 | CHIP_RV200, | 42 | CHIP_RV200, |
@@ -99,4 +99,5 @@ enum radeon_chip_flags { | |||
99 | RADEON_IS_PCI = 0x00800000UL, | 99 | RADEON_IS_PCI = 0x00800000UL, |
100 | RADEON_IS_IGPGART = 0x01000000UL, | 100 | RADEON_IS_IGPGART = 0x01000000UL, |
101 | }; | 101 | }; |
102 | |||
102 | #endif | 103 | #endif |