Skip to content

Commit 1940e7a

Browse files
jannaumarcan
authored andcommitted
drm/apple: Use backlight_get_brightness()
Backlight drivers are expected to use this instead of accessing backlight properties. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent b867570 commit 1940e7a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/gpu/drm/apple/dcp_backlight.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,11 @@ static int dcp_set_brightness(struct backlight_device *bd)
168168
int ret = 0;
169169
struct apple_dcp *dcp = bl_get_data(bd);
170170
struct drm_modeset_acquire_ctx ctx;
171-
172-
if (bd->props.state & BL_CORE_SUSPENDED)
173-
return 0;
171+
int brightness = backlight_get_brightness(bd);
174172

175173
DRM_MODESET_LOCK_ALL_BEGIN(dcp->crtc->base.dev, ctx, 0, ret);
176174

177-
dcp->brightness.dac = calculate_dac(dcp, bd->props.brightness);
175+
dcp->brightness.dac = calculate_dac(dcp, brightness);
178176
dcp->brightness.update = true;
179177

180178
/*

0 commit comments

Comments
 (0)