mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/amd/display: Avoid NULL pointer in set_backlight when ABM is NULL
[Why] On ASIC without ABM support (most dGPU) we run into a null pointer dereference when attempting to set the backlight level. [How] This function requires ABM, so fix up the condition to only allow DMCU to be optional. Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Wyatt Wood <Wyatt.Wood@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
39063de95c
commit
f1029e7ead
|
|
@ -2462,8 +2462,7 @@ bool dc_link_set_backlight_level(const struct dc_link *link,
|
|||
int i;
|
||||
DC_LOGGER_INIT(link->ctx->logger);
|
||||
|
||||
if ((dmcu == NULL && abm == NULL) ||
|
||||
(abm->funcs->set_backlight_level_pwm == NULL))
|
||||
if (abm == NULL || (abm->funcs->set_backlight_level_pwm == NULL))
|
||||
return false;
|
||||
|
||||
if (dmcu)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user