diff options
author | Arun R Murthy <[email protected]> | 2022-08-08 09:27:50 +0530 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2022-08-29 10:00:41 -0400 |
commit | 2c4e19f873f4a389c2a557a84909cf4b78d3525a (patch) | |
tree | fbc7f0ae9df2925ee3e55a48eea8939703a7d39a /tools/perf/scripts/python/check-perf-trace.py | |
parent | 875c6d2711f6c97e58c52288b4231f3072711d61 (diff) |
drm/i915/display: avoid warnings when registering dual panel backlight
Commit 20f85ef89d94 ("drm/i915/backlight: use unique backlight device
names") added support for multiple backlight devices on dual panel
systems, but did so with error handling on -EEXIST from
backlight_device_register(). Unfortunately, that triggered a warning in
dmesg all the way down from sysfs_add_file_mode_ns() and
sysfs_warn_dup().
Instead of optimistically always attempting to register with the default
name ("intel_backlight", which we have to retain for backward
compatibility), check if a backlight device with the name exists first,
and, if so, use the card and connector based name.
v2: reworked on top of the patch commit 20f85ef89d94
("drm/i915/backlight: use unique backlight device names")
v3: fixed the ref count leak(Jani N)
Fixes: 20f85ef89d94 ("drm/i915/backlight: use unique backlight device names")
Signed-off-by: Arun R Murthy <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 4234ea30051200fc6016de10e4d58369e60b38f1)
Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions