Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
cd23492a
Commit
cd23492a
authored
Oct 04, 2012
by
Alex Deucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon: fix compilation with backlight disabled
Signed-off-by:
Alex Deucher
<
alexander.deucher@amd.com
>
parent
a1871936
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
drivers/gpu/drm/radeon/radeon_acpi.c
drivers/gpu/drm/radeon/radeon_acpi.c
+2
-0
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+21
-21
No files found.
drivers/gpu/drm/radeon/radeon_acpi.c
View file @
cd23492a
...
...
@@ -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
,
...
...
@@ -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 */
...
...
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
View file @
cd23492a
...
...
@@ -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
)
{
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment