Skip to content

Commit 4cee6a9

Browse files
committed
drm/radeon: move bl encoder assignment into bl init
So that the bl encoder will be null if the GPU does not control the backlight. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 22ca7ca commit 4cee6a9

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

drivers/gpu/drm/radeon/atombios_encoders.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
237237
backlight_update_status(bd);
238238

239239
DRM_INFO("radeon atom DIG backlight initialized\n");
240+
rdev->mode_info.bl_encoder = radeon_encoder;
240241

241242
return;
242243

drivers/gpu/drm/radeon/radeon_encoders.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ static void radeon_encoder_add_backlight(struct radeon_encoder *radeon_encoder,
194194
radeon_atom_backlight_init(radeon_encoder, connector);
195195
else
196196
radeon_legacy_backlight_init(radeon_encoder, connector);
197-
rdev->mode_info.bl_encoder = radeon_encoder;
198197
}
199198
}
200199

drivers/gpu/drm/radeon/radeon_legacy_encoders.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
441441
backlight_update_status(bd);
442442

443443
DRM_INFO("radeon legacy LVDS backlight initialized\n");
444+
rdev->mode_info.bl_encoder = radeon_encoder;
444445

445446
return;
446447

0 commit comments

Comments
 (0)