Skip to content

Commit 927167f

Browse files
committed
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: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
1 parent cbb8a79 commit 927167f

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

drivers/gpu/drm/i915/display/intel_crtc.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915,
5454
return NULL;
5555
}
5656

57-
struct intel_crtc *intel_crtc_for_plane(struct drm_i915_private *i915,
58-
enum i9xx_plane_id i9xx_plane)
59-
{
60-
struct intel_plane *plane;
61-
62-
for_each_intel_plane(&i915->drm, plane) {
63-
if (plane->id == PLANE_PRIMARY &&
64-
plane->i9xx_plane == i9xx_plane)
65-
return intel_crtc_for_pipe(i915, plane->pipe);
66-
}
67-
68-
return NULL;
69-
}
70-
7157
void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc)
7258
{
7359
drm_crtc_wait_one_vblank(&crtc->base);

drivers/gpu/drm/i915/display/intel_crtc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ void intel_wait_for_vblank_workers(struct intel_atomic_state *state);
3232
struct intel_crtc *intel_get_first_crtc(struct drm_i915_private *i915);
3333
struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915,
3434
enum pipe pipe);
35-
struct intel_crtc *intel_crtc_for_plane(struct drm_i915_private *i915,
36-
enum i9xx_plane_id plane);
3735
void intel_wait_for_vblank_if_active(struct drm_i915_private *i915,
3836
enum pipe pipe);
3937
void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc);

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,20 @@ static void i965_update_wm(struct drm_i915_private *dev_priv)
23362336

23372337
#undef FW_WM
23382338

2339+
static struct intel_crtc *intel_crtc_for_plane(struct drm_i915_private *i915,
2340+
enum i9xx_plane_id i9xx_plane)
2341+
{
2342+
struct intel_plane *plane;
2343+
2344+
for_each_intel_plane(&i915->drm, plane) {
2345+
if (plane->id == PLANE_PRIMARY &&
2346+
plane->i9xx_plane == i9xx_plane)
2347+
return intel_crtc_for_pipe(i915, plane->pipe);
2348+
}
2349+
2350+
return NULL;
2351+
}
2352+
23392353
static void i9xx_update_wm(struct drm_i915_private *dev_priv)
23402354
{
23412355
const struct intel_watermark_params *wm_info;

0 commit comments

Comments
 (0)