Skip to content

Commit a86c75d

Browse files
committed
drm/i915: Start using plane scale factor for relative data rate
BSpec clearly instructs us to use plane scale factor when calculating relative data rate to be used when allocating DDB blocks for each plane. For some reason we use scale factor for data_rate calculation, which is used for BW calculations, however we are not using it for DDB calculations. So lets fix it as described in BSpec 68907. Signed-off-by: Stanislav Lisovskiy <[email protected]> Reviewed-by: Garg, Nemesa <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c5741c5 commit a86c75d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/gpu/drm/i915/display/intel_atomic_plane.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ intel_plane_relative_data_rate(const struct intel_crtc_state *crtc_state,
212212
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
213213
const struct drm_framebuffer *fb = plane_state->hw.fb;
214214
int width, height;
215+
unsigned int rel_data_rate;
215216

216217
if (plane->id == PLANE_CURSOR)
217218
return 0;
@@ -241,7 +242,11 @@ intel_plane_relative_data_rate(const struct intel_crtc_state *crtc_state,
241242
height /= 2;
242243
}
243244

244-
return width * height * fb->format->cpp[color_plane];
245+
rel_data_rate = width * height * fb->format->cpp[color_plane];
246+
247+
return intel_adjusted_rate(&plane_state->uapi.src,
248+
&plane_state->uapi.dst,
249+
rel_data_rate);
245250
}
246251

247252
int intel_plane_calc_min_cdclk(struct intel_atomic_state *state,

0 commit comments

Comments
 (0)