Patchwork [03/12] drm/radeon: track whether the GPU controls the backlight (v2)

login
register
mail settings
Submitter Alex Hung
Date Feb. 5, 2013, 7:06 p.m.
Message ID <1360091193-12323-4-git-send-email-alex.hung@canonical.com>
Download mbox | patch
Permalink /patch/218567/
State New
Headers show

Comments

Alex Hung - Feb. 5, 2013, 7:06 p.m.
From: Alex Deucher <alexander.deucher@amd.com>

A table in the vbios tells us whether the GPU backlight controller
is used or not.  If the bit is set, the GPU backlight controller is
used; if it is not set, an off-chip backlight controller is used.

v2: store all the firmware flags, not just BL control

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/radeon_atombios.c |    4 ++++
 drivers/gpu/drm/radeon/radeon_mode.h     |    2 ++
 2 files changed, 6 insertions(+)

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index d67d4f3..e368b30 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1254,6 +1254,10 @@  bool radeon_atom_get_clock_info(struct drm_device *dev)
 		if (rdev->clock.max_pixel_clock == 0)
 			rdev->clock.max_pixel_clock = 40000;
 
+		/* not technically a clock, but... */
+		rdev->mode_info.firmware_flags =
+			le16_to_cpu(firmware_info->info.usFirmwareCapability.susAccess);
+
 		return true;
 	}
 
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index d569789..806140d 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -252,6 +252,8 @@  struct radeon_mode_info {
 
 	/* pointer to fbdev info structure */
 	struct radeon_fbdev *rfbdev;
+	/* firmware flags */
+	u16 firmware_flags;
 };
 
 #define MAX_H_CODE_TIMING_LEN 32