mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Mikko Rapeli <mikko.rapeli@linaro.org>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Michal Simek <michal.simek@amd.com>,
	Bill Mills <bill.mills@linaro.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Anatoliy Klymenko <anatoliy.klymenko@amd.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/2] drm: xlnx: zynqmp_kms: set preferred_depth to 16 bpp
Date: Tue, 6 Jan 2026 08:38:00 +0100	[thread overview]
Message-ID: <52b59334-9c93-4273-b142-41c14a7a2c3c@suse.de> (raw)
In-Reply-To: <20251205123751.2257694-3-mikko.rapeli@linaro.org>

Hi

Am 05.12.25 um 13:37 schrieb Mikko Rapeli:
> Xorg fails to start with defaults on AMD KV260, /var/log/Xorg.0.log:
>
> [    23.491] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
> [    23.491] (II) Module fbdev: vendor="X.Org Foundation"
> [    23.491]    compiled for 1.21.1.18, module version = 0.5.1
> [    23.491]    Module class: X.Org Video Driver
> [    23.491]    ABI class: X.Org Video Driver, version 25.2
> [    23.491] (II) modesetting: Driver for Modesetting Kernel Drivers:
> kms
> [    23.491] (II) FBDEV: driver for framebuffer: fbdev
> [    23.510] (II) modeset(0): using drv /dev/dri/card1
> [    23.511] (WW) Falling back to old probe method for fbdev
> [    23.511] (II) Loading sub module "fbdevhw"
> [    23.511] (II) LoadModule: "fbdevhw"
> [    23.511] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
> [    23.511] (II) Module fbdevhw: vendor="X.Org Foundation"
> [    23.511]    compiled for 1.21.1.18, module version = 0.0.2
> [    23.511]    ABI class: X.Org Video Driver, version 25.2
> [    23.512] (II) modeset(0): Creating default Display subsection in
> Screen section
>          "Default Screen Section" for depth/fbbpp 24/32
> [    23.512] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
> [    23.512] (==) modeset(0): RGB weight 888
> [    23.512] (==) modeset(0): Default visual is TrueColor
> ...
> [    23.911] (II) Loading sub module "fb"
> [    23.911] (II) LoadModule: "fb"
> [    23.911] (II) Module "fb" already built-in
> [    23.911] (II) UnloadModule: "fbdev"
> [    23.911] (II) Unloading fbdev
> [    23.912] (II) UnloadSubModule: "fbdevhw"
> [    23.912] (II) Unloading fbdevhw
> [    24.238] (==) modeset(0): Backing store enabled
> [    24.238] (==) modeset(0): Silken mouse enabled
> [    24.249] (II) modeset(0): Initializing kms color map for depth 24, 8
> bpc.
> [    24.250] (==) modeset(0): DPMS enabled
> [    24.250] (II) modeset(0): [DRI2] Setup complete
> [    24.250] (II) modeset(0): [DRI2]   DRI driver: kms_swrast
> [    24.250] (II) modeset(0): [DRI2]   VDPAU driver: kms_swrast
> ...
> [    24.770] (II) modeset(0): Disabling kernel dirty updates, not
> required.
> [    24.770] (EE) modeset(0): failed to set mode: Invalid argument
>
> xorg tries to use 24 and 32 bpp which pass on the fb API but which
> don't actually work on AMD KV260 when Xorg starts. As a workaround
> Xorg config can set color depth to 16 using /etc/X11/xorg.conf snippet:
>
> Section "Screen"
>          Identifier     "Default Screen"
>          Monitor        "Configured Monitor"
>          Device         "Configured Video Device"
>          DefaultDepth   16
> EndSection
>
> But this is cumbersome on images meant for multiple different arm64
> devices and boards. So instead set 16 bpp as preferred depth
> in zynqmp_kms fb driver which is used by Xorg in the logic to find
> out a working depth.
>
> Now Xorg startup and bpp query using fb API works and HDMI display
> shows graphics. /var/log/Xorg.0.log shows:
>
> [    23.219] (II) LoadModule: "fbdev"
> [    23.219] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
> [    23.219] (II) Module fbdev: vendor="X.Org Foundation"
> [    23.219]    compiled for 1.21.1.18, module version = 0.5.1
> [    23.219]    Module class: X.Org Video Driver
> [    23.219]    ABI class: X.Org Video Driver, version 25.2
> [    23.219] (II) modesetting: Driver for Modesetting Kernel Drivers:
> kms
> [    23.219] (II) FBDEV: driver for framebuffer: fbdev
> [    23.238] (II) modeset(0): using drv /dev/dri/card1
> [    23.238] (WW) Falling back to old probe method for fbdev
> [    23.238] (II) Loading sub module "fbdevhw"
> [    23.238] (II) LoadModule: "fbdevhw"
> [    23.239] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
> [    23.239] (II) Module fbdevhw: vendor="X.Org Foundation"
> [    23.239]    compiled for 1.21.1.18, module version = 0.0.2
> [    23.239]    ABI class: X.Org Video Driver, version 25.2
> [    23.240] (II) modeset(0): Creating default Display subsection in Screen section
>          "Default Screen Section" for depth/fbbpp 16/16
> [    23.240] (==) modeset(0): Depth 16, (==) framebuffer bpp 16
> [    23.240] (==) modeset(0): RGB weight 565
> [    23.240] (==) modeset(0): Default visual is TrueColor
> ...
> [    24.015] (==) modeset(0): Backing store enabled
> [    24.015] (==) modeset(0): Silken mouse enabled
> [    24.027] (II) modeset(0): Initializing kms color map for depth 16, 6 bpc.
> [    24.028] (==) modeset(0): DPMS enabled
> [    24.028] (II) modeset(0): [DRI2] Setup complete
> [    24.028] (II) modeset(0): [DRI2]   DRI driver: kms_swrast
> [    24.028] (II) modeset(0): [DRI2]   VDPAU driver: kms_swrast
>
> Cc: Bill Mills <bill.mills@linaro.org>
> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Cc: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/gpu/drm/xlnx/zynqmp_kms.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c
> index ccc35cacd10cb..a42192c827af0 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
> @@ -506,6 +506,7 @@ int zynqmp_dpsub_drm_init(struct zynqmp_dpsub *dpsub)
>   	drm->mode_config.min_height = 0;
>   	drm->mode_config.max_width = ZYNQMP_DISP_MAX_WIDTH;
>   	drm->mode_config.max_height = ZYNQMP_DISP_MAX_HEIGHT;
> +	drm->mode_config.preferred_depth = 16;

There is another discussion on-going about rearranging planes. But to 
make user space work correctly, preferred_depth should be set no matter 
what.

Best regards
Thomas

>   
>   	ret = drm_vblank_init(drm, 1);
>   	if (ret)

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



  reply	other threads:[~2026-01-06  7:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 12:37 [PATCH 0/2] drm: xlnx: zynqmp_kms: 16 bpp fixes for Xorg startup on AMD KV260 Mikko Rapeli
2025-12-05 12:37 ` [PATCH 1/2] drm: xlnx: zynqmp_kms: Init fbdev with 16 bit color Mikko Rapeli
2026-01-06  7:35   ` Thomas Zimmermann
2025-12-05 12:37 ` [PATCH 2/2] drm: xlnx: zynqmp_kms: set preferred_depth to 16 bpp Mikko Rapeli
2026-01-06  7:38   ` Thomas Zimmermann [this message]
2025-12-19 11:59 ` [PATCH 0/2] drm: xlnx: zynqmp_kms: 16 bpp fixes for Xorg startup on AMD KV260 Tomi Valkeinen
2025-12-19 12:30   ` Mikko Rapeli
2025-12-22  8:58     ` Mikko Rapeli
2026-01-06  7:41       ` Thomas Zimmermann
2026-01-06  8:29         ` Tomi Valkeinen
2026-01-06  8:42           ` Thomas Zimmermann
2026-01-07  8:00           ` Mikko Rapeli
2026-01-07  8:32             ` Thomas Zimmermann
2026-01-07  8:49               ` Mikko Rapeli

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=52b59334-9c93-4273-b142-41c14a7a2c3c@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=anatoliy.klymenko@amd.com \
    --cc=bill.mills@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mikko.rapeli@linaro.org \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=stable@vger.kernel.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®