diff options
author | Robert Morell <rmorell@nvidia.com> | 2011-08-17 16:03:55 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-08-19 15:35:19 -0700 |
commit | a24ac894d58d19060288dfd3b1ca1c12794e48aa (patch) | |
tree | a2b1171d54a5e2cd827995ca7ade0c4f971bb1fa /arch | |
parent | 8fb2e1c9960c9375398f0fb6deab737c74a9dc44 (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
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 9 |
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 036aa5ce638a..522ecf221e10 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -217,6 +217,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, @@ -225,6 +227,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 = { @@ -904,6 +908,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, |