Skip to content

Commit 4e841ec

Browse files
committed
drm/i915: Nuke intel_mode_max_pixclk()
ilk_max_pixel_rate() will now give the "correct" pixel rate for all platforms, so let's rename it to intel_max_pixel_rate() and kill off intel_mode_max_pixclk(). v2: Fix typo in commit message (Ander) Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Ander Conselvan de Oliveira <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a7d1b3f commit 4e841ec

File tree

1 file changed

+6
-35
lines changed

1 file changed

+6
-35
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void ironlake_pfit_disable(struct intel_crtc *crtc, bool force);
122122
static void ironlake_pfit_enable(struct intel_crtc *crtc);
123123
static void intel_modeset_setup_hw_state(struct drm_device *dev);
124124
static void intel_pre_disable_primary_noatomic(struct drm_crtc *crtc);
125-
static int ilk_max_pixel_rate(struct drm_atomic_state *state);
125+
static int intel_max_pixel_rate(struct drm_atomic_state *state);
126126
static int glk_calc_cdclk(int max_pixclk);
127127
static int bxt_calc_cdclk(int max_pixclk);
128128

@@ -6566,40 +6566,11 @@ static int bxt_calc_cdclk(int max_pixclk)
65666566
return 144000;
65676567
}
65686568

6569-
/* Compute the max pixel clock for new configuration. */
6570-
static int intel_mode_max_pixclk(struct drm_device *dev,
6571-
struct drm_atomic_state *state)
6572-
{
6573-
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
6574-
struct drm_i915_private *dev_priv = to_i915(dev);
6575-
struct drm_crtc *crtc;
6576-
struct drm_crtc_state *crtc_state;
6577-
unsigned max_pixclk = 0, i;
6578-
enum pipe pipe;
6579-
6580-
memcpy(intel_state->min_pixclk, dev_priv->min_pixclk,
6581-
sizeof(intel_state->min_pixclk));
6582-
6583-
for_each_crtc_in_state(state, crtc, crtc_state, i) {
6584-
int pixclk = 0;
6585-
6586-
if (crtc_state->enable)
6587-
pixclk = crtc_state->adjusted_mode.crtc_clock;
6588-
6589-
intel_state->min_pixclk[i] = pixclk;
6590-
}
6591-
6592-
for_each_pipe(dev_priv, pipe)
6593-
max_pixclk = max(intel_state->min_pixclk[pipe], max_pixclk);
6594-
6595-
return max_pixclk;
6596-
}
6597-
65986569
static int valleyview_modeset_calc_cdclk(struct drm_atomic_state *state)
65996570
{
66006571
struct drm_device *dev = state->dev;
66016572
struct drm_i915_private *dev_priv = to_i915(dev);
6602-
int max_pixclk = intel_mode_max_pixclk(dev, state);
6573+
int max_pixclk = intel_max_pixel_rate(state);
66036574
struct intel_atomic_state *intel_state =
66046575
to_intel_atomic_state(state);
66056576

@@ -6615,7 +6586,7 @@ static int valleyview_modeset_calc_cdclk(struct drm_atomic_state *state)
66156586
static int bxt_modeset_calc_cdclk(struct drm_atomic_state *state)
66166587
{
66176588
struct drm_i915_private *dev_priv = to_i915(state->dev);
6618-
int max_pixclk = ilk_max_pixel_rate(state);
6589+
int max_pixclk = intel_max_pixel_rate(state);
66196590
struct intel_atomic_state *intel_state =
66206591
to_intel_atomic_state(state);
66216592
int cdclk;
@@ -10315,7 +10286,7 @@ static int bdw_adjust_min_pipe_pixel_rate(struct intel_crtc_state *crtc_state,
1031510286
}
1031610287

1031710288
/* compute the max rate for new configuration */
10318-
static int ilk_max_pixel_rate(struct drm_atomic_state *state)
10289+
static int intel_max_pixel_rate(struct drm_atomic_state *state)
1031910290
{
1032010291
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
1032110292
struct drm_i915_private *dev_priv = to_i915(state->dev);
@@ -10447,7 +10418,7 @@ static int broadwell_modeset_calc_cdclk(struct drm_atomic_state *state)
1044710418
{
1044810419
struct drm_i915_private *dev_priv = to_i915(state->dev);
1044910420
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
10450-
int max_pixclk = ilk_max_pixel_rate(state);
10421+
int max_pixclk = intel_max_pixel_rate(state);
1045110422
int cdclk;
1045210423

1045310424
/*
@@ -10483,7 +10454,7 @@ static int skl_modeset_calc_cdclk(struct drm_atomic_state *state)
1048310454
{
1048410455
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
1048510456
struct drm_i915_private *dev_priv = to_i915(state->dev);
10486-
const int max_pixclk = ilk_max_pixel_rate(state);
10457+
const int max_pixclk = intel_max_pixel_rate(state);
1048710458
int vco = intel_state->cdclk_pll_vco;
1048810459
int cdclk;
1048910460

0 commit comments

Comments
 (0)