Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Fix includes and local vars order

Removed duplicate include and fixed comment > 80 chars.

v2: Added newline after system include and between functions

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200522131843.20477-1-stanislav.lisovskiy@intel.com

authored by

Stanislav Lisovskiy and committed by
Chris Wilson
cac91e67 b975abbd

+31 -25
+25 -21
drivers/gpu/drm/i915/display/intel_bw.c
··· 5 5 6 6 #include <drm/drm_atomic_state_helper.h> 7 7 8 - #include "intel_bw.h" 9 - #include "intel_pm.h" 10 - #include "intel_display_types.h" 11 - #include "intel_sideband.h" 12 8 #include "intel_atomic.h" 13 - #include "intel_pm.h" 9 + #include "intel_bw.h" 14 10 #include "intel_cdclk.h" 11 + #include "intel_display_types.h" 12 + #include "intel_pm.h" 13 + #include "intel_sideband.h" 15 14 16 15 /* Parameters for Qclk Geyserville (QGV) */ 17 16 struct intel_qgv_point { ··· 351 352 352 353 return data_rate; 353 354 } 355 + 354 356 void intel_bw_crtc_update(struct intel_bw_state *bw_state, 355 357 const struct intel_crtc_state *crtc_state) 356 358 { ··· 431 431 int skl_bw_calc_min_cdclk(struct intel_atomic_state *state) 432 432 { 433 433 struct drm_i915_private *dev_priv = to_i915(state->base.dev); 434 - int i; 434 + struct intel_bw_state *new_bw_state = NULL; 435 + struct intel_bw_state *old_bw_state = NULL; 435 436 const struct intel_crtc_state *crtc_state; 436 437 struct intel_crtc *crtc; 437 438 int max_bw = 0; 438 439 int slice_id; 439 - struct intel_bw_state *new_bw_state = NULL; 440 - struct intel_bw_state *old_bw_state = NULL; 440 + int i; 441 441 442 442 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) { 443 443 enum plane_id plane_id; ··· 463 463 dbuf_mask |= skl_ddb_dbuf_slice_mask(dev_priv, uv_plane_alloc); 464 464 465 465 /* 466 - * FIXME: To calculate that more properly we probably need to 467 - * to split per plane data_rate into data_rate_y and data_rate_uv 468 - * for multiplanar formats in order not to get accounted those twice 469 - * if they happen to reside on different slices. 470 - * However for pre-icl this would work anyway because we have only single 471 - * slice and for icl+ uv plane has non-zero data rate. 472 - * So in worst case those calculation are a bit pessimistic, which 473 - * shouldn't pose any significant problem anyway. 466 + * FIXME: To calculate that more properly we probably 467 + * need to to split per plane data_rate into data_rate_y 468 + * and data_rate_uv for multiplanar formats in order not 469 + * to get accounted those twice if they happen to reside 470 + * on different slices. 471 + * However for pre-icl this would work anyway because 472 + * we have only single slice and for icl+ uv plane has 473 + * non-zero data rate. 474 + * So in worst case those calculation are a bit 475 + * pessimistic, which shouldn't pose any significant 476 + * problem anyway. 474 477 */ 475 478 for_each_dbuf_slice_in_mask(slice_id, dbuf_mask) 476 479 crtc_bw->used_bw[slice_id] += data_rate; ··· 481 478 482 479 for_each_dbuf_slice(slice_id) { 483 480 /* 484 - * Current experimental observations show that contrary to BSpec 485 - * we get underruns once we exceed 64 * CDCLK for slices in total. 486 - * As a temporary measure in order not to keep CDCLK bumped up all the 487 - * time we calculate CDCLK according to this formula for overall bw 488 - * consumed by slices. 481 + * Current experimental observations show that contrary 482 + * to BSpec we get underruns once we exceed 64 * CDCLK 483 + * for slices in total. 484 + * As a temporary measure in order not to keep CDCLK 485 + * bumped up all the time we calculate CDCLK according 486 + * to this formula for overall bw consumed by slices. 489 487 */ 490 488 max_bw += crtc_bw->used_bw[slice_id]; 491 489 }
+1 -1
drivers/gpu/drm/i915/display/intel_bw.h
··· 9 9 #include <drm/drm_atomic.h> 10 10 11 11 #include "intel_display.h" 12 - #include "intel_global_state.h" 13 12 #include "intel_display_power.h" 13 + #include "intel_global_state.h" 14 14 15 15 struct drm_i915_private; 16 16 struct intel_atomic_state;
+2 -1
drivers/gpu/drm/i915/display/intel_cdclk.c
··· 22 22 */ 23 23 24 24 #include <linux/time.h> 25 + 25 26 #include "intel_atomic.h" 27 + #include "intel_bw.h" 26 28 #include "intel_cdclk.h" 27 29 #include "intel_display_types.h" 28 30 #include "intel_sideband.h" 29 - #include "intel_bw.h" 30 31 31 32 /** 32 33 * DOC: CDCLK / RAWCLK
+1
drivers/gpu/drm/i915/display/intel_cdclk.h
··· 7 7 #define __INTEL_CDCLK_H__ 8 8 9 9 #include <linux/types.h> 10 + 10 11 #include "i915_drv.h" 11 12 #include "intel_display.h" 12 13 #include "intel_global_state.h"
+1 -1
drivers/gpu/drm/i915/intel_pm.c
··· 33 33 #include <drm/drm_plane_helper.h> 34 34 35 35 #include "display/intel_atomic.h" 36 + #include "display/intel_bw.h" 36 37 #include "display/intel_display_types.h" 37 38 #include "display/intel_fbc.h" 38 39 #include "display/intel_sprite.h" ··· 44 43 #include "i915_fixed.h" 45 44 #include "i915_irq.h" 46 45 #include "i915_trace.h" 47 - #include "display/intel_bw.h" 48 46 #include "intel_pm.h" 49 47 #include "intel_sideband.h" 50 48 #include "../../../platform/x86/intel_ips.h"
+1 -1
drivers/gpu/drm/i915/intel_pm.h
··· 8 8 9 9 #include <linux/types.h> 10 10 11 + #include "display/intel_bw.h" 11 12 #include "display/intel_global_state.h" 12 13 13 14 #include "i915_reg.h" 14 - #include "display/intel_bw.h" 15 15 16 16 struct drm_device; 17 17 struct drm_i915_private;