]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/dpcd_bl: Handle drm_dpcd_read/write() return values correctly
authorLyude Paul <lyude@redhat.com>
Fri, 14 May 2021 18:14:56 +0000 (14:14 -0400)
committerLyude Paul <lyude@redhat.com>
Wed, 9 Jun 2021 17:35:18 +0000 (13:35 -0400)
commit0c547811f743d9a3803f38c892bacd813c967049
treecdab0004241653f7b1ce19e374770d431b1eba2e
parentd6e9be36b4053baabe3933086052b55ad125934b
drm/i915/dpcd_bl: Handle drm_dpcd_read/write() return values correctly

This is kind of an annoying aspect of DRM's DP helpers:
drm_dp_dpcd_readb/writeb() return the size of bytes read/written on
success, thus we want to check against that instead of checking if the
return value is less than 0.

I'll probably be fixing this in the near future once I start doing DP work
again, also because I'd rather not mix a tree-wide refactor like that in
with a patch series intended to be around introducing DP backlight helpers.
So, for now let's just handle the return values from each function
correctly.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210514181504.565252-3-lyude@redhat.com
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c