mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-04 11:32:41 +00:00
drm/i915: Relocate is_in_vrr_range()
Move is_in_vrr_range() into intel_vrr.c in anticipation of more users, and rename it accordingly. Cc: Manasi Navare <navaremanasi@chromium.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230901130440.2085-8-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare <navaremanasi@chromium.org> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
This commit is contained in:
parent
b4ac591b8e
commit
f0f7ec743d
@ -59,15 +59,6 @@ intel_panel_preferred_fixed_mode(struct intel_connector *connector)
|
||||
struct drm_display_mode, head);
|
||||
}
|
||||
|
||||
static bool is_in_vrr_range(struct intel_connector *connector, int vrefresh)
|
||||
{
|
||||
const struct drm_display_info *info = &connector->base.display_info;
|
||||
|
||||
return intel_vrr_is_capable(connector) &&
|
||||
vrefresh >= info->monitor_range.min_vfreq &&
|
||||
vrefresh <= info->monitor_range.max_vfreq;
|
||||
}
|
||||
|
||||
static bool is_best_fixed_mode(struct intel_connector *connector,
|
||||
int vrefresh, int fixed_mode_vrefresh,
|
||||
const struct drm_display_mode *best_mode)
|
||||
@ -81,8 +72,8 @@ static bool is_best_fixed_mode(struct intel_connector *connector,
|
||||
* vrefresh, which we can then reduce to match the requested
|
||||
* vrefresh by extending the vblank length.
|
||||
*/
|
||||
if (is_in_vrr_range(connector, vrefresh) &&
|
||||
is_in_vrr_range(connector, fixed_mode_vrefresh) &&
|
||||
if (intel_vrr_is_in_range(connector, vrefresh) &&
|
||||
intel_vrr_is_in_range(connector, fixed_mode_vrefresh) &&
|
||||
fixed_mode_vrefresh < vrefresh)
|
||||
return false;
|
||||
|
||||
@ -224,8 +215,8 @@ int intel_panel_compute_config(struct intel_connector *connector,
|
||||
* Assume that we shouldn't muck about with the
|
||||
* timings if they don't land in the VRR range.
|
||||
*/
|
||||
is_vrr = is_in_vrr_range(connector, vrefresh) &&
|
||||
is_in_vrr_range(connector, fixed_mode_vrefresh);
|
||||
is_vrr = intel_vrr_is_in_range(connector, vrefresh) &&
|
||||
intel_vrr_is_in_range(connector, fixed_mode_vrefresh);
|
||||
|
||||
if (!is_vrr) {
|
||||
/*
|
||||
|
||||
@ -42,6 +42,15 @@ bool intel_vrr_is_capable(struct intel_connector *connector)
|
||||
info->monitor_range.max_vfreq - info->monitor_range.min_vfreq > 10;
|
||||
}
|
||||
|
||||
bool intel_vrr_is_in_range(struct intel_connector *connector, int vrefresh)
|
||||
{
|
||||
const struct drm_display_info *info = &connector->base.display_info;
|
||||
|
||||
return intel_vrr_is_capable(connector) &&
|
||||
vrefresh >= info->monitor_range.min_vfreq &&
|
||||
vrefresh <= info->monitor_range.max_vfreq;
|
||||
}
|
||||
|
||||
void
|
||||
intel_vrr_check_modeset(struct intel_atomic_state *state)
|
||||
{
|
||||
|
||||
@ -14,6 +14,7 @@ struct intel_connector;
|
||||
struct intel_crtc_state;
|
||||
|
||||
bool intel_vrr_is_capable(struct intel_connector *connector);
|
||||
bool intel_vrr_is_in_range(struct intel_connector *connector, int vrefresh);
|
||||
void intel_vrr_check_modeset(struct intel_atomic_state *state);
|
||||
void intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user