Commit 6ccda157 authored by David Francis's avatar David Francis Committed by Alex Deucher

drm/amd/display: Get backlight controller id from link

[Why]
dc_link_set_backlight_level can be called from a context
where the stream is unknown.  In this case, we can still
find which controller is driving this particular backlight

[How]
Compare links for equality instead of streams
Signed-off-by: default avatarDavid Francis <David.Francis@amd.com>
Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d9672a5b
...@@ -2173,11 +2173,11 @@ bool dc_link_set_backlight_level(const struct dc_link *link, ...@@ -2173,11 +2173,11 @@ bool dc_link_set_backlight_level(const struct dc_link *link,
backlight_pwm_u16_16, backlight_pwm_u16_16); backlight_pwm_u16_16, backlight_pwm_u16_16);
if (dc_is_embedded_signal(link->connector_signal)) { if (dc_is_embedded_signal(link->connector_signal)) {
if (stream != NULL) { for (i = 0; i < MAX_PIPES; i++) {
for (i = 0; i < MAX_PIPES; i++) { if (core_dc->current_state->res_ctx.pipe_ctx[i].stream) {
if (core_dc->current_state->res_ctx. if (core_dc->current_state->res_ctx.
pipe_ctx[i].stream pipe_ctx[i].stream->sink->link
== stream) == link)
/* DMCU -1 for all controller id values, /* DMCU -1 for all controller id values,
* therefore +1 here * therefore +1 here
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment