* [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error
@ 2012-04-26 18:48 tom.zanussi
2012-04-26 18:48 ` [PATCH 1/1][KERNEL 3.2] bsp/emenlow: initialize lvds backlight only if lvds enabled tom.zanussi
2012-04-26 18:54 ` [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error Bruce Ashfield
0 siblings, 2 replies; 3+ messages in thread
From: tom.zanussi @ 2012-04-26 18:48 UTC (permalink / raw)
To: yocto, bruce.ashfield
From: Tom Zanussi <tom.zanussi@intel.com>
This fixes [YOCTO #310].
Please pull into linux-yocto-3.2.
Thanks,
Tom
The following changes since commit 3ab8e8d9f0e9c2c44b6dbf8df84c0c2b03c4167c:
Tom Zanussi (1):
bsp/emenlow: give up drm_global_mutex on contention in drm_lock()
are available in the git repository at:
git://git.yoctoproject.org/linux-yocto-2.6.37-contrib.git tzanussi/emenlow-i2c-transfer-fix
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/emenlow-i2c-transfer-fix
Tom Zanussi (1):
bsp/emenlow: initialize lvds backlight only if lvds enabled
drivers/gpu/drm-psb/intel_lvds.c | 51 ++++++++++++++++++++-----------------
1 files changed, 28 insertions(+), 23 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1][KERNEL 3.2] bsp/emenlow: initialize lvds backlight only if lvds enabled
2012-04-26 18:48 [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error tom.zanussi
@ 2012-04-26 18:48 ` tom.zanussi
2012-04-26 18:54 ` [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error Bruce Ashfield
1 sibling, 0 replies; 3+ messages in thread
From: tom.zanussi @ 2012-04-26 18:48 UTC (permalink / raw)
To: yocto, bruce.ashfield
From: Tom Zanussi <tom.zanussi@intel.com>
intel_lvds_init() initializes the lvds backlight even if the lvds init
failed. That doesn't make sense, and causes unnecessary error
messages in the kernel log.
Put the backlight init code into a separat function and only call it
if the lvds panel was successfully initialized.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
drivers/gpu/drm-psb/intel_lvds.c | 51 ++++++++++++++++++++-----------------
1 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm-psb/intel_lvds.c b/drivers/gpu/drm-psb/intel_lvds.c
index 218e895..6a55c9b 100644
--- a/drivers/gpu/drm-psb/intel_lvds.c
+++ b/drivers/gpu/drm-psb/intel_lvds.c
@@ -611,6 +611,33 @@ int intel_get_acpi_dod(char *method)
kfree(buffer.pointer);
return found;
}
+
+static void intel_lvds_backlight_init(struct drm_device *dev)
+{
+ if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){
+ struct backlight_properties props;
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.type = BACKLIGHT_RAW;
+ /* add /sys/class/backlight interface as standard */
+ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props);
+ if (psbbl_device){
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+ down(&psbbl_device->sem);
+ psbbl_device->props->max_brightness = BRIGHTNESS_MAX_LEVEL;
+ psbbl_device->props->brightness = lvds_backlight;
+ psbbl_device->props->power = FB_BLANK_UNBLANK;
+ psbbl_device->props->update_status(psbbl_device);
+ up(&psbbl_device->sem);
+#else
+ psbbl_device->props.max_brightness = BRIGHTNESS_MAX_LEVEL;
+ psbbl_device->props.brightness = lvds_backlight;
+ psbbl_device->props.power = FB_BLANK_UNBLANK;
+ backlight_update_status(psbbl_device);
+#endif
+ }
+ }
+}
+
/**
* intel_lvds_init - setup LVDS outputs on this device
* @dev: drm device
@@ -802,29 +829,6 @@ void intel_lvds_init(struct drm_device *dev)
}
}
- if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){
- struct backlight_properties props;
- memset(&props, 0, sizeof(struct backlight_properties));
- props.type = BACKLIGHT_RAW;
- /* add /sys/class/backlight interface as standard */
- psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props);
- if (psbbl_device){
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
- down(&psbbl_device->sem);
- psbbl_device->props->max_brightness = BRIGHTNESS_MAX_LEVEL;
- psbbl_device->props->brightness = lvds_backlight;
- psbbl_device->props->power = FB_BLANK_UNBLANK;
- psbbl_device->props->update_status(psbbl_device);
- up(&psbbl_device->sem);
-#else
- psbbl_device->props.max_brightness = BRIGHTNESS_MAX_LEVEL;
- psbbl_device->props.brightness = lvds_backlight;
- psbbl_device->props.power = FB_BLANK_UNBLANK;
- backlight_update_status(psbbl_device);
-#endif
- }
- }
-
blc_out:
/* Set up the DDC bus. */
@@ -939,6 +943,7 @@ blc_out:
#endif
out:
+ intel_lvds_backlight_init(dev);
return;
failed:
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error
2012-04-26 18:48 [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error tom.zanussi
2012-04-26 18:48 ` [PATCH 1/1][KERNEL 3.2] bsp/emenlow: initialize lvds backlight only if lvds enabled tom.zanussi
@ 2012-04-26 18:54 ` Bruce Ashfield
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2012-04-26 18:54 UTC (permalink / raw)
To: tom.zanussi; +Cc: yocto
On 12-04-26 02:48 PM, tom.zanussi@intel.com wrote:
> From: Tom Zanussi<tom.zanussi@intel.com>
>
> This fixes [YOCTO #310].
>
> Please pull into linux-yocto-3.2.
merging. Will push a batch of kernel updates out later today.
Cheers,
Bruce
>
> Thanks,
>
> Tom
>
> The following changes since commit 3ab8e8d9f0e9c2c44b6dbf8df84c0c2b03c4167c:
> Tom Zanussi (1):
> bsp/emenlow: give up drm_global_mutex on contention in drm_lock()
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/linux-yocto-2.6.37-contrib.git tzanussi/emenlow-i2c-transfer-fix
> http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/emenlow-i2c-transfer-fix
>
> Tom Zanussi (1):
> bsp/emenlow: initialize lvds backlight only if lvds enabled
>
> drivers/gpu/drm-psb/intel_lvds.c | 51 ++++++++++++++++++++-----------------
> 1 files changed, 28 insertions(+), 23 deletions(-)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-26 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 18:48 [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error tom.zanussi
2012-04-26 18:48 ` [PATCH 1/1][KERNEL 3.2] bsp/emenlow: initialize lvds backlight only if lvds enabled tom.zanussi
2012-04-26 18:54 ` [PATCH 0/1][KERNEL 3.2] fix emenlow i2c_transfer error Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.