OSDN Git Service

drm/i915/dpcd_bl: Remove redundant AUX backlight frequency calculations
authorLyude Paul <lyude@redhat.com>
Fri, 14 May 2021 18:14:55 +0000 (14:14 -0400)
committerLyude Paul <lyude@redhat.com>
Wed, 9 Jun 2021 17:35:18 +0000 (13:35 -0400)
commit4154fa0e2688118ba3dbc67aa834435463f9ea68
treeda2cdc0dc190a3f689e3b37e999c8f8d5f0b1895
parent241a9e233e7cf1001d09426c9fc520768f8961bf
drm/i915/dpcd_bl: Remove redundant AUX backlight frequency calculations

Noticed this while moving all of the VESA backlight code in i915 over to
DRM helpers: it would appear that we calculate the frequency value we want
to write to DP_EDP_BACKLIGHT_FREQ_SET twice even though this value never
actually changes during runtime. So, let's simplify things by just caching
this value in intel_panel.backlight, and re-writing it as-needed.

Changes since v1:
* Wrap panel->backlight.edp.vesa.pwm_freq_pre_divider in
  DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP check - Jani

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: greg.depoire@gmail.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210514181504.565252-2-lyude@redhat.com
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c