All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	daniel@ffwll.ch, airlied@gmail.com, mripard@kernel.org,
	maarten.lankhorst@linux.intel.com, xinliang.liu@linaro.org,
	tiantao6@hisilicon.com, jstultz@google.com,
	kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com,
	paul.kocialkowski@bootlin.com, airlied@redhat.com,
	kraxel@redhat.com
Cc: dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/7] drm/hisilicon/hibmc: Fix preferred depth and bpp
Date: Fri, 18 Nov 2022 13:52:26 +0100	[thread overview]
Message-ID: <b0421c22-2893-d76a-4cd8-07f5fdb9add1@redhat.com> (raw)
In-Reply-To: <20221116160917.26342-2-tzimmermann@suse.de>

Hello Thomas,

On 11/16/22 17:09, Thomas Zimmermann wrote:
> Set the preferred color depth to 24 bits and the fbdev bpp to 32
> bits. This will signal XRGB8888 as default format to clients.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index 22053c613644a..0c4aa4d9b0a77 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -106,7 +106,7 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
>  	dev->mode_config.max_width = 1920;
>  	dev->mode_config.max_height = 1200;
>  
> -	dev->mode_config.preferred_depth = 32;
> +	dev->mode_config.preferred_depth = 24;

In the cover letter you said "color depth is the number of color and alpha bits
that affect image composition" but it should be "only the number of color bits
excluding the alpha bits" a better description right?

I also wonder if instead of using a 24 magic number, TRUE_COLOR_DEPTH constant
macro or XRGB8888_COLOR_DEPTH could be defined?

>  	dev->mode_config.prefer_shadow = 1;
>  
>  	dev->mode_config.funcs = (void *)&hibmc_mode_funcs;
> @@ -340,7 +340,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
>  		goto err_unload;
>  	}
>  
> -	drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
> +	drm_fbdev_generic_setup(dev, 32);
> 

And same here? Maybe TRUE_COLOR_ALPHA_BPP or XRGB8888_BPP? Can't think of a
good name really for this, but just to avoid using a constant number here.
 
In any case the patch looks good to me:

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  reply	other threads:[~2022-11-18 12:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 16:09 [PATCH 0/7] drm: Fix the color-depth/bpp confusion Thomas Zimmermann
2022-11-16 16:09 ` Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 1/7] drm/hisilicon/hibmc: Fix preferred depth and bpp Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 12:52   ` Javier Martinez Canillas [this message]
2022-11-18 13:18     ` Thomas Zimmermann
2022-11-18 13:18       ` Thomas Zimmermann
2022-11-18 13:31       ` Javier Martinez Canillas
2022-11-16 16:09 ` [PATCH 2/7] drm/logicvc: Fix preferred fbdev cpp Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 13:08   ` Javier Martinez Canillas
2022-11-18 13:22     ` Thomas Zimmermann
2022-11-18 13:22       ` Thomas Zimmermann
2022-11-18 13:41       ` Javier Martinez Canillas
2022-11-18 13:48         ` Thomas Zimmermann
2022-11-18 13:48           ` Thomas Zimmermann
2022-11-18 14:01           ` Javier Martinez Canillas
2022-11-16 16:09 ` [PATCH 3/7] drm/cirrus: Decouple fbdev bpp value from color depth Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 13:44   ` Javier Martinez Canillas
2022-11-16 16:09 ` [PATCH 4/7] drm/ofdrm: Set preferred depth from format of scanout buffer Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 14:06   ` Javier Martinez Canillas
2022-11-16 16:09 ` [PATCH 5/7] drm/simpledrm: " Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 14:07   ` Javier Martinez Canillas
2022-11-16 16:09 ` [PATCH 6/7] drm/solomon: Set preferred color depth and bpp to the correct values Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 14:08   ` Javier Martinez Canillas
2022-11-16 16:09 ` [PATCH 7/7] drm/fb-helper: Don't use the preferred depth for the BPP default Thomas Zimmermann
2022-11-16 16:09   ` Thomas Zimmermann
2022-11-18 14:12   ` Javier Martinez Canillas
2022-11-22 14:43   ` Daniel Vetter
2022-11-22 14:43     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0421c22-2893-d76a-4cd8-07f5fdb9add1@redhat.com \
    --to=javierm@redhat.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jstultz@google.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=puck.chen@hisilicon.com \
    --cc=tiantao6@hisilicon.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xinliang.liu@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.