Commit 927167f3 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Relocate intel_crtc_for_plane()

Move intel_crtc_for_plane() next to its only user. No one
else should ever use this.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211203112029.1057-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent cbb8a795
...@@ -54,20 +54,6 @@ struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915, ...@@ -54,20 +54,6 @@ struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915,
return NULL; return NULL;
} }
struct intel_crtc *intel_crtc_for_plane(struct drm_i915_private *i915,
enum i9xx_plane_id i9xx_plane)
{
struct intel_plane *plane;
for_each_intel_plane(&i915->drm, plane) {
if (plane->id == PLANE_PRIMARY &&
plane->i9xx_plane == i9xx_plane)
return intel_crtc_for_pipe(i915, plane->pipe);
}
return NULL;
}
void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc) void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc)
{ {
drm_crtc_wait_one_vblank(&crtc->base); drm_crtc_wait_one_vblank(&crtc->base);
......
...@@ -32,8 +32,6 @@ void intel_wait_for_vblank_workers(struct intel_atomic_state *state); ...@@ -32,8 +32,6 @@ void intel_wait_for_vblank_workers(struct intel_atomic_state *state);
struct intel_crtc *intel_get_first_crtc(struct drm_i915_private *i915); struct intel_crtc *intel_get_first_crtc(struct drm_i915_private *i915);
struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915, struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915,
enum pipe pipe); enum pipe pipe);
struct intel_crtc *intel_crtc_for_plane(struct drm_i915_private *i915,
enum i9xx_plane_id plane);
void intel_wait_for_vblank_if_active(struct drm_i915_private *i915, void intel_wait_for_vblank_if_active(struct drm_i915_private *i915,
enum pipe pipe); enum pipe pipe);
void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc); void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc);
......
...@@ -2336,6 +2336,20 @@ static void i965_update_wm(struct drm_i915_private *dev_priv) ...@@ -2336,6 +2336,20 @@ static void i965_update_wm(struct drm_i915_private *dev_priv)
#undef FW_WM #undef FW_WM
static struct intel_crtc *intel_crtc_for_plane(struct drm_i915_private *i915,
enum i9xx_plane_id i9xx_plane)
{
struct intel_plane *plane;
for_each_intel_plane(&i915->drm, plane) {
if (plane->id == PLANE_PRIMARY &&
plane->i9xx_plane == i9xx_plane)
return intel_crtc_for_pipe(i915, plane->pipe);
}
return NULL;
}
static void i9xx_update_wm(struct drm_i915_private *dev_priv) static void i9xx_update_wm(struct drm_i915_private *dev_priv)
{ {
const struct intel_watermark_params *wm_info; const struct intel_watermark_params *wm_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment