dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer
@ 2019-03-06 14:02 Maxime Ripard
  2019-03-06 15:06 ` Paul Kocialkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maxime Ripard @ 2019-03-06 14:02 UTC (permalink / raw)
  To: Eric Anholt
  Cc: eben, Maxime Ripard, dri-devel, Paul Kocialkowski, Sean Paul,
	Thomas Petazzoni, linux-arm-kernel

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 <maxime.ripard@bootlin.com>
---
 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;
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer
  2019-03-06 14:02 [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer Maxime Ripard
@ 2019-03-06 15:06 ` Paul Kocialkowski
  2019-03-06 17:32 ` Eric Anholt
  2019-03-07 12:14 ` Maxime Ripard
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Kocialkowski @ 2019-03-06 15:06 UTC (permalink / raw)
  To: Maxime Ripard, Eric Anholt
  Cc: eben, dri-devel, Sean Paul, Thomas Petazzoni, linux-arm-kernel

On Wed, 2019-03-06 at 15:02 +0100, Maxime Ripard wrote:
> 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 <maxime.ripard@bootlin.com>

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> ---
>  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;
>  
-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer
  2019-03-06 14:02 [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer Maxime Ripard
  2019-03-06 15:06 ` Paul Kocialkowski
@ 2019-03-06 17:32 ` Eric Anholt
  2019-03-07 12:14 ` Maxime Ripard
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2019-03-06 17:32 UTC (permalink / raw)
  Cc: eben, Maxime Ripard, dri-devel, Paul Kocialkowski, Sean Paul,
	Thomas Petazzoni, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 727 bytes --]

Maxime Ripard <maxime.ripard@bootlin.com> writes:

> 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.

Reviewed-by: Eric Anholt <eric@anholt.net>

This matches the defaults used by the bcm2708 fbdev driver that we're
trying to get people to switch off of.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer
  2019-03-06 14:02 [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer Maxime Ripard
  2019-03-06 15:06 ` Paul Kocialkowski
  2019-03-06 17:32 ` Eric Anholt
@ 2019-03-07 12:14 ` Maxime Ripard
  2 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2019-03-07 12:14 UTC (permalink / raw)
  To: Eric Anholt
  Cc: eben, dri-devel, Paul Kocialkowski, Sean Paul, Thomas Petazzoni,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 803 bytes --]

On Wed, Mar 06, 2019 at 03:02:45PM +0100, Maxime Ripard wrote:
> 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 <maxime.ripard@bootlin.com>

Applied with Eric and Paul Reviewed-by

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-07 12:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 14:02 [PATCH] drm/vc4: Use 16bpp by default for the fbdev buffer Maxime Ripard
2019-03-06 15:06 ` Paul Kocialkowski
2019-03-06 17:32 ` Eric Anholt
2019-03-07 12:14 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).