[Intel-gfx] [PATCH] drm/i915/skl: Fix a stale comment in the DDB allocation code
Damien Lespiau
damien.lespiau at intel.com
Fri May 8 07:47:19 PDT 2015
'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 at intel.com>
---
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
More information about the Intel-gfx
mailing list