Skip to content

Rework ironlake_crtc_mode_set

Paulo Zanoni intel-gfx 1 version Applied

Status from this message: Queued for -next, thanks for the patch. I've checked the gmch code and

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8drm/i915: extract ironlake_set_pipeconf form ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+52 -361 reply
2/8drm/i915: extract LVDS-specific code from ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_drv.h drivers/gpu/drm/i915/intel_lvds.c+48 -351 reply
3/8drm/i915: extract set_pipe_timings from ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+46 -363 replies
4/8drm/i915: simplify setting DSPCNTR inside ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+3 -51 reply
5/8drm/i915: extract set_m_n from ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+89 -631 reply
6/8drm/i915: extract compute_clocks from ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+66 -292 replies
7/8drm/i915: extract pch_pll_set from ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+153 -1073 replies
8/8drm/i915: remove unused variables from ironlake_crtc_mode_setdrivers/gpu/drm/i915/intel_display.c+3 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] Rework ironlake_crtc_mode_set

From: Paulo Zanoni <[email protected]>

Every time I have to change ironlake_crtc_mode_set I get scared by the fact that it has 404 lines. I feel way more confident when I'm changing small functions that do specific self-contained things.

Thus, the goal of this patch series is to extract from ironlake_crtc_mode_set sub-functions that do specific things. The goal of the series is to only change the coding style, not changing the functionality.

The order that code executes was slightly changed in a few cases, but I don't expect this to break anything. I tested this series on a SNB with LVDS, HDMI, DP and VGA and everything worked. I don't have access to more machines right now, but once I get to my office again I will test more.

Also, I did a quick check on i9xx_crtc_mode_set and concluded we won't be able to reuse any of the ironlake functions on it, although we can try to split i9xx_crtc_mode_set in a similar way. Still, I'm not sure we want to do that.

After these changes I'll be able to properly and sanely fix the Haswell/LPT case (since Haswell/LPT is currently running ironlake_crtc_mode_set):
- fork a haswell_crtc_mode_set function
- create haswell-specific versions of functions that should be different on Haswell
- run IBX/CPT-specific code only on IBX/CPT, same for LPT

Paulo Zanoni (8):
drm/i915: extract ironlake_set_pipeconf form ironlake_crtc_mode_set drm/i915: extract LVDS-specific code from ironlake_crtc_mode_set drm/i915: extract set_pipe_timings from ironlake_crtc_mode_set drm/i915: simplify setting DSPCNTR inside ironlake_crtc_mode_set drm/i915: extract set_m_n from ironlake_crtc_mode_set drm/i915: extract compute_clocks from ironlake_crtc_mode_set drm/i915: extract pch_pll_set from ironlake_crtc_mode_set drm/i915: remove unused variables from ironlake_crtc_mode_set

 drivers/gpu/drm/i915/intel_display.c |  575 +++++++++++++++++++---------------
 drivers/gpu/drm/i915/intel_drv.h     |    3 +
 drivers/gpu/drm/i915/intel_lvds.c    |   43 +++
 3 files changed, 374 insertions(+), 247 deletions(-)
Signature · 1 line
1.7.10.4