[PATCH] drm/i915/skl: Fix a stale comment in the DDB allocation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'available' was the name for a variable in the previous version of that
code. Also add the reason why being < alloc_size is important: it's
because the result will indeed fit into plane_blocks.

Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index a7516ed..e7f72e0 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2735,7 +2735,8 @@ skl_allocate_pipe_ddb(struct drm_crtc *crtc,
 
 		/*
 		 * promote the expression to 64 bits to avoid overflowing, the
-		 * result is < available as data_rate / total_data_rate < 1
+		 * result is < alloc_size as data_rate / total_data_rate < 1
+		 * and so fits into plane_blocks (a uint16_t).
 		 */
 		plane_blocks = minimum[plane];
 		plane_blocks += div_u64((uint64_t)alloc_size * data_rate,
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux