mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
drm/i915: Introduce intel_mode_vdisplay()
The DSB code will need to know the hardware's idea of vertical active, as that is also what defines the start of undelayed vblank. Introduce a helper that gives us that information, in line with the other intel_mode_v*() functions. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -557,6 +557,16 @@ void intel_crtc_update_active_timings(const struct intel_crtc_state *crtc_state,
|
||||
spin_unlock_irqrestore(&i915->drm.vblank_time_lock, irqflags);
|
||||
}
|
||||
|
||||
int intel_mode_vdisplay(const struct drm_display_mode *mode)
|
||||
{
|
||||
int vdisplay = mode->crtc_vdisplay;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
|
||||
vdisplay = DIV_ROUND_UP(vdisplay, 2);
|
||||
|
||||
return vdisplay;
|
||||
}
|
||||
|
||||
int intel_mode_vblank_start(const struct drm_display_mode *mode)
|
||||
{
|
||||
int vblank_start = mode->crtc_vblank_start;
|
||||
|
||||
@@ -20,6 +20,7 @@ struct intel_vblank_evade_ctx {
|
||||
bool need_vlv_dsi_wa;
|
||||
};
|
||||
|
||||
int intel_mode_vdisplay(const struct drm_display_mode *mode);
|
||||
int intel_mode_vblank_start(const struct drm_display_mode *mode);
|
||||
int intel_mode_vblank_end(const struct drm_display_mode *mode);
|
||||
int intel_mode_vtotal(const struct drm_display_mode *mode);
|
||||
|
||||
Reference in New Issue
Block a user