diff mbox

[RFC] drm/radeon/kms: check if card is multi GPU

Message ID 1266448969-4528-1-git-send-email-zajec5@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rafał Miłecki Feb. 17, 2010, 11:22 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index db98924..d00f984 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -887,6 +887,7 @@  struct radeon_device {
 	union radeon_asic_config	config;
 	enum radeon_family		family;
 	unsigned long			flags;
+	bool				multi_gpu;
 	int				usec_timeout;
 	enum radeon_pll_errata		pll_errata;
 	int				num_gb_pipes;
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index fb55faf..7110529 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -714,6 +714,14 @@  int radeon_device_init(struct radeon_device *rdev,
 	 * ignore it */
 	vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode);
 
+	if ((rdev->pdev->device == 0x9441) || /* ATI Radeon HD 4870 x2 */
+	    (rdev->pdev->device == 0x9443) || /* ATI Radeon HD 4850 x2 */
+	    (rdev->pdev->device == 0x944B) || /* ATI Mobility RADEON HD 4850 X2 */
+	    (rdev->pdev->device == 0x9506) || /* ATI Mobility Radeon HD 3850 X2 */
+	    (rdev->pdev->device == 0x9509) || /* ATI Mobility Radeon HD 3870 X2 */
+	    (rdev->pdev->device == 0x950F)) /* ATI Radeon HD3870 X2 */
+		rdev->multi_gpu = true;
+
 	r = radeon_init(rdev);
 	if (r)
 		return r;