Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334391
b: refs/heads/master
c: cd23492
h: refs/heads/master
i:
  334389: 56153e9
  334387: 4d5f120
  334383: da0cab4
v: v3
  • Loading branch information
Alex Deucher committed Oct 15, 2012
1 parent 6f452e9 commit f24d151
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1871936c0f4f10850a5671c5deb1a92fcca1155
refs/heads/master: cd23492af3d4401c02c48a4bebe5995c9498eac5
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ int radeon_atif_handler(struct radeon_device *rdev,

radeon_set_backlight_level(rdev, enc, req.backlight_level);

#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
if (rdev->is_atom_bios) {
struct radeon_encoder_atom_dig *dig = enc->enc_priv;
backlight_force_update(dig->bl_dev,
Expand All @@ -379,6 +380,7 @@ int radeon_atif_handler(struct radeon_device *rdev,
backlight_force_update(dig->bl_dev,
BACKLIGHT_UPDATE_HOTKEY);
}
#endif
}
}
/* TODO: check other events */
Expand Down
42 changes: 21 additions & 21 deletions trunk/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,27 +269,6 @@ static const struct drm_encoder_helper_funcs radeon_legacy_lvds_helper_funcs = {
.disable = radeon_legacy_encoder_disable,
};

#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)

static uint8_t radeon_legacy_lvds_level(struct backlight_device *bd)
{
struct radeon_backlight_privdata *pdata = bl_get_data(bd);
uint8_t level;

/* Convert brightness to hardware level */
if (bd->props.brightness < 0)
level = 0;
else if (bd->props.brightness > RADEON_MAX_BL_LEVEL)
level = RADEON_MAX_BL_LEVEL;
else
level = bd->props.brightness;

if (pdata->negative)
level = RADEON_MAX_BL_LEVEL - level;

return level;
}

u8
radeon_legacy_get_backlight_level(struct radeon_encoder *radeon_encoder)
{
Expand Down Expand Up @@ -331,6 +310,27 @@ radeon_legacy_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 leve
radeon_legacy_lvds_update(&radeon_encoder->base, dpms_mode);
}

#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)

static uint8_t radeon_legacy_lvds_level(struct backlight_device *bd)
{
struct radeon_backlight_privdata *pdata = bl_get_data(bd);
uint8_t level;

/* Convert brightness to hardware level */
if (bd->props.brightness < 0)
level = 0;
else if (bd->props.brightness > RADEON_MAX_BL_LEVEL)
level = RADEON_MAX_BL_LEVEL;
else
level = bd->props.brightness;

if (pdata->negative)
level = RADEON_MAX_BL_LEVEL - level;

return level;
}

static int radeon_legacy_backlight_update_status(struct backlight_device *bd)
{
struct radeon_backlight_privdata *pdata = bl_get_data(bd);
Expand Down

0 comments on commit f24d151

Please sign in to comment.