drm/i915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT...
authorLyude Paul <lyude@redhat.com>
Fri, 14 May 2021 18:15:00 +0000 (14:15 -0400)
committerLyude Paul <lyude@redhat.com>
Wed, 9 Jun 2021 17:35:21 +0000 (13:35 -0400)
commit17917ff62443414569ea76e151e7a7ef44812264
tree31e1a98cc49f3d9cf9ec23f2291659f44473d341
parentade673bb2ba496a66250c5c2006c502c3d734ea2
drm/i915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT_COUNT

If we can't read DP_EDP_PWMGEN_BIT_COUNT in
intel_dp_aux_vesa_calc_max_backlight() but do have a valid PWM frequency
defined in the VBT, we'll keep going in the function until we inevitably
fail on reading DP_EDP_PWMGEN_BIT_COUNT_CAP_MIN. There's not much point in
doing this, so just return early.

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-7-lyude@redhat.com
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c