diff --git a/drm-vc4-Use-16bpp-by-default-for-the-fbdev-buffer.patch b/drm-vc4-Use-16bpp-by-default-for-the-fbdev-buffer.patch new file mode 100644 index 0000000..c6ee9f4 --- /dev/null +++ b/drm-vc4-Use-16bpp-by-default-for-the-fbdev-buffer.patch @@ -0,0 +1,46 @@ +From patchwork Wed Mar 6 14:02:45 2019 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: drm/vc4: Use 16bpp by default for the fbdev buffer +From: Maxime Ripard +X-Patchwork-Id: 290632 +Message-Id: <20190306140245.21973-1-maxime.ripard@bootlin.com> +To: Eric Anholt +Cc: eben@raspberrypi.org, Maxime Ripard , + dri-devel@lists.freedesktop.org, + Paul Kocialkowski , + Sean Paul , + Thomas Petazzoni , + linux-arm-kernel@lists.infradead.org +Date: Wed, 6 Mar 2019 15:02:45 +0100 + +The preferred bpp for the fbdev emulation buffer has been 32 so far, which +means that by default we will allocate an 8MB buffer with a 1920x1080 +resolution. + +Worse this memory will be allocated from the CMA pool, and will never be +freed even if we don't use the fbdev emulation. Therefore, reducing it is a +big deal, and switching to 16bpp by default will gain us around 4MB at +1920x1080, while keeping decent color depth. And users still have the +option to switch to 32bpp using the kernel command line. + +Signed-off-by: Maxime Ripard +Reviewed-by: Paul Kocialkowski +--- + drivers/gpu/drm/vc4/vc4_drv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 52576dee809e..c38cf64837e1 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -286,7 +286,7 @@ static int vc4_drm_bind(struct device *dev) + + vc4_kms_load(drm); + +- drm_fbdev_generic_setup(drm, 32); ++ drm_fbdev_generic_setup(drm, 16); + + return 0; + diff --git a/kernel.spec b/kernel.spec index 7a81286..8a310d8 100644 --- a/kernel.spec +++ b/kernel.spec @@ -584,7 +584,10 @@ Patch312: arm64-rock960-enable-tsadc.patch Patch330: bcm2837-dts-add-Raspberry-Pi-3-A.patch # https://www.spinics.net/lists/arm-kernel/msg699583.html -Patch332: ARM-dts-bcm283x-Several-DTS-improvements.patch +Patch331: ARM-dts-bcm283x-Several-DTS-improvements.patch + +# https://patchwork.freedesktop.org/patch/290632/ +Patch332: drm-vc4-Use-16bpp-by-default-for-the-fbdev-buffer.patch Patch339: bcm2835-cpufreq-add-CPU-frequency-control-driver.patch