66883f9
From patchwork Wed Mar  6 14:02:45 2019
66883f9
Content-Type: text/plain; charset="utf-8"
66883f9
MIME-Version: 1.0
66883f9
Content-Transfer-Encoding: 7bit
66883f9
Subject: drm/vc4: Use 16bpp by default for the fbdev buffer
66883f9
From: Maxime Ripard <maxime.ripard@bootlin.com>
66883f9
X-Patchwork-Id: 290632
66883f9
Message-Id: <20190306140245.21973-1-maxime.ripard@bootlin.com>
66883f9
To: Eric Anholt <eric@anholt.net>
66883f9
Cc: eben@raspberrypi.org, Maxime Ripard <maxime.ripard@bootlin.com>,
66883f9
 dri-devel@lists.freedesktop.org,
66883f9
 Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
66883f9
 Sean Paul <seanpaul@chromium.org>,
66883f9
 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
66883f9
 linux-arm-kernel@lists.infradead.org
66883f9
Date: Wed,  6 Mar 2019 15:02:45 +0100
66883f9
66883f9
The preferred bpp for the fbdev emulation buffer has been 32 so far, which
66883f9
means that by default we will allocate an 8MB buffer with a 1920x1080
66883f9
resolution.
66883f9
66883f9
Worse this memory will be allocated from the CMA pool, and will never be
66883f9
freed even if we don't use the fbdev emulation. Therefore, reducing it is a
66883f9
big deal, and switching to 16bpp by default will gain us around 4MB at
66883f9
1920x1080, while keeping decent color depth. And users still have the
66883f9
option to switch to 32bpp using the kernel command line.
66883f9
66883f9
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
66883f9
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
66883f9
---
66883f9
 drivers/gpu/drm/vc4/vc4_drv.c | 2 +-
66883f9
 1 file changed, 1 insertion(+), 1 deletion(-)
66883f9
66883f9
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
66883f9
index 52576dee809e..c38cf64837e1 100644
66883f9
--- a/drivers/gpu/drm/vc4/vc4_drv.c
66883f9
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
66883f9
@@ -286,7 +286,7 @@ static int vc4_drm_bind(struct device *dev)
66883f9
 
66883f9
 	vc4_kms_load(drm);
66883f9
 
66883f9
-	drm_fbdev_generic_setup(drm, 32);
66883f9
+	drm_fbdev_generic_setup(drm, 16);
66883f9
 
66883f9
 	return 0;
66883f9