drm/vc4: plane: Optimize the LBM allocation size
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 3 Sep 2020 08:00:37 +0000 (10:00 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 7 Sep 2020 16:02:03 +0000 (18:02 +0200)
commit5630b27ec577953bde59f0e6414c382f0745387a
tree2009bb7ef7e948f96b263aaa112f1f1253c817e3
parent31e0ecb39b592cc836470d3f76a61c7df4b24084
drm/vc4: plane: Optimize the LBM allocation size

The current code is using the maximum of the source line size and the
destination line size to compute the size of the LBM to allocate.

While this is simpler, it starts to be an issue with modes such as 4k with
a quite long that will consume all the available memory, so we no longer
have that luxury.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b9e091883a4f7395c5b6a4f7c6070225934293db.1599120059.git-series.maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_plane.c