summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu-panel.c
diff options
context:
space:
mode:
authorRobert Morell <rmorell@nvidia.com>2011-08-17 16:03:55 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:25 -0800
commitc2e448ca31d40ca2faf100ab16e47d39dbe3e9ca (patch)
treeb4be677c0ddaa01a2abffed811d138bd2d9ff150 /arch/arm/mach-tegra/board-cardhu-panel.c
parent98887a0a55333ee2e2582123fbca50158188d5e0 (diff)
arm: tegra: Fix backlight toggling on cardhu/fb0
Cardhu has both an internal panel (on fb0) and external HDMI (on fb1). One of the devices might be blanked while another is unblanked. In order for the backlight blanking logic to know whether to turn off the backlight for a particular framebuffer's blanking notification, it needs to be able to check if a given framebuffer device corresponds to the backlight. This implements a check_fb pwm_backlight hook to make the internal panel's backlight only toggle on fb0 blank changes. Bug 864592 Original-Change-Id: Ieafb8269c8bf5e030181b332d965b40d374efc1e Reviewed-on: http://git-master/r/47637 Tested-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Chetan Hooli <chooli@nvidia.com> Tested-by: Chetan Hooli <chooli@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com> Rebase-Id: R989fd6e64a339d3efec360789805e4392e8468af
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-panel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c
index 3a4a6e298616..e0c149616661 100644
--- a/arch/arm/mach-tegra/board-cardhu-panel.c
+++ b/arch/arm/mach-tegra/board-cardhu-panel.c
@@ -216,6 +216,8 @@ static int cardhu_backlight_notify(struct device *unused, int brightness)
return brightness;
}
+static int cardhu_disp1_check_fb(struct device *dev, struct fb_info *info);
+
static struct platform_pwm_backlight_data cardhu_backlight_data = {
.pwm_id = 0,
.max_brightness = 255,
@@ -224,6 +226,8 @@ static struct platform_pwm_backlight_data cardhu_backlight_data = {
.init = cardhu_backlight_init,
.exit = cardhu_backlight_exit,
.notify = cardhu_backlight_notify,
+ /* Only toggle backlight on fb blank notifications for disp1 */
+ .check_fb = cardhu_disp1_check_fb,
};
static struct platform_device cardhu_backlight_device = {
@@ -903,6 +907,11 @@ static struct nvhost_device cardhu_disp1_device = {
},
};
+static int cardhu_disp1_check_fb(struct device *dev, struct fb_info *info)
+{
+ return info->device == &cardhu_disp1_device.dev;
+}
+
static struct nvhost_device cardhu_disp2_device = {
.name = "tegradc",
.id = 1,