From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5954D2E040E for ; Wed, 7 Jan 2026 08:49:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767775795; cv=none; b=lEnFREkwEWMQCmrWKHdeLGoRcqcX67ObRlHl+D2/SvrqlsdtJ6lAE8BzvBYVFQQ5lDbiv7GICZWMtIC1Gil9g2MXgrAXvdOneaU9LaZFSEdG38zk2ypra//PruGOP23J+sY/E3caXpcXGX+MhSzOufyg6iGeFH9zjjwTcUubGHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767775795; c=relaxed/simple; bh=aW4y2GaJFORNXfYkdd0M3p+TJAj8/9h+9U7Er0NMCTM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ouH+5CbQTqOiP9/OxIGSCUqkIEszBDOmDTib7BMR7sxb5oF4tKupA38rZP+npuZAvnbv2D4IsP1wBpz+DsidHCQE1sgTGvrdjkh5Gz5lfKvhGakGY3etH/iGpVW7NtUR7CxvYp1i5Axf9e2Mcf9ythTkBFJESjXNISYGcTZ+MpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=vwXnCqIE; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vwXnCqIE" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-59b6df3d6b4so857101e87.0 for ; Wed, 07 Jan 2026 00:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767775791; x=1768380591; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=FSoaLhIuH1Zi1XVYK4RuIJm0c576Z9PwEYpKMgsWAtA=; b=vwXnCqIEJkF2E3AdUhzXq/2ZQPIBg+qYXVjKDARguqJrK5emV7rqExO7EDwYPYnvFb mIYSvQ5jnFLOvrTupycNuF/5/U98ioXjiTk2iTterSOmW+RdEPEHs8nKi2DE/SZ4+2mR yPaypa1VA939TMyv0qMVoq3psj5aVbJBuQziZgRufQ14vEK0jxxpV+z9mgSFtq3ZFSMu ves9KuPPDckEzA/IO+FJZ+QZefyQl4MQsR+/ImUlRjZkyUv0Lae+h9FECab4/fyEbyZu nAVIynWgH4C/N872Z/wClU+xf3MG8blqxP1ccfWczCll4hxuF3oX9vjCatTTWRqj1OGS RY2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767775791; x=1768380591; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FSoaLhIuH1Zi1XVYK4RuIJm0c576Z9PwEYpKMgsWAtA=; b=O6ZmQJbDefQvzVJuVHbX43uZ5vgpJp7X3V/Q4JNrjb/sDtL8mF+CKWCjiTkS0U8ah4 a2gapPQiceQG1MQRmBZGo4SLfMnnMjXPkJ6v/FHglDlzIQxR9/TCwL6Te6aDEL9u5e6R Mw9MEzd8jY/sI6qEvdqaXbNA6Ths/O/89T9dLTd6SKX+Lb2/VGS5JqIfkAIxsIoNFM9d 6Afws8qWBuOQKGyGYwImXAmOsFRkVmejot0Tfm5VyWUJlIz9TIlu5WB26702Dj8QfPVi JhHRrqeZ587bEG+oJ0tfLrIcJxM7wqSoOnDZpliNXaFweEr5apSsdLhsvO2B2u/XXsTm 50VQ== X-Forwarded-Encrypted: i=1; AJvYcCWqI0uopYxADsFjfhUPBA7LGsBa5tu4mxYO1XUVsZjK0x0vnbS/lfmfkp1d2PmjKN1/Fjp2GLCeqSR8zb0=@vger.kernel.org X-Gm-Message-State: AOJu0YyMm7NveLXKbu9W3MIggN4MOktiF0VhU8kGPNop8jX6r74Xvirh NEYEczZQd7yCp+uoPm/ykjh3Q3pmbaS1hMW+x72MOMdIwCMY3rVtIhvuopPPGjjJchE= X-Gm-Gg: AY/fxX4qX+HyjzWwsJVNEXpGJMI/PvHkZeQBvcD/2GW945PP3flD2vvkP8bXBretXZ3 HWULm/f3FuIsZQwnYIgiVmAGvHPu/48na/gDhEWf68S8kxeFEnZ1WwOeMpBGFht34zBAS/p/crg nz0mOE0/ztlj9YZURXTy2nPmJ/nCZ/jZvxWksP2QP/XUCI690Mjl88l8Hp2XD4CI5wW1eBUoGlJ GRVIexMz7odetvkukKfRyEM/JWqNpfp7oOMeSmO15cxSshdlpD64sPDKEkpJ66AbSdzxEkroZGz oVYwyXmAsMu7Fx2TnzOcP857VpGsBwZ7u9Aykn7Qn0J6xIp1KNBFhd0HnOPtF7tkxnMrptJcg+T b75S1DEbhAZunvtNy9jwUmamiVOgfW5hg2hyPUT227QQ5thhd/jj0Ajnm79rswCM4vVrlh+Pu6m 8nQa8zqEwpOZNDjpHRWEXPC8ZJ1ZUCsryC+AVIVoGQ99aizvoXOSmBgsQ= X-Google-Smtp-Source: AGHT+IHBRlwXMZFBuxQXKLXYYbkgbRfzLpPmGOcIsytMeFZO2+c0XT3T+QaaepM7xLEpCuNQUQL4eg== X-Received: by 2002:a05:6512:3c88:b0:598:ef90:3e87 with SMTP id 2adb3069b0e04-59b6ef0c18dmr524880e87.18.1767775791133; Wed, 07 Jan 2026 00:49:51 -0800 (PST) Received: from nuoska (87-100-249-247.bb.dnainternet.fi. [87.100.249.247]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59b65cea814sm1176668e87.12.2026.01.07.00.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 00:49:50 -0800 (PST) Date: Wed, 7 Jan 2026 10:49:48 +0200 From: Mikko Rapeli To: Thomas Zimmermann Cc: Tomi Valkeinen , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter , Michal Simek , Bill Mills , Ilias Apalodimas Subject: Re: [PATCH 0/2] drm: xlnx: zynqmp_kms: 16 bpp fixes for Xorg startup on AMD KV260 Message-ID: References: <20251205123751.2257694-1-mikko.rapeli@linaro.org> <533168f1-1655-4947-9032-b08463f502d7@ideasonboard.com> <5f570a3b-7bee-43e0-9a36-3d106984fec6@suse.de> <3d214bf3-6b52-4942-95d9-0504fa6f5877@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi, On Wed, Jan 07, 2026 at 09:32:28AM +0100, Thomas Zimmermann wrote: > Am 07.01.26 um 09:00 schrieb Mikko Rapeli: > > On Tue, Jan 06, 2026 at 10:29:37AM +0200, Tomi Valkeinen wrote: > > > On 06/01/2026 09:41, Thomas Zimmermann wrote: > > > > Am 22.12.25 um 09:58 schrieb Mikko Rapeli: > > > > > On Fri, Dec 19, 2025 at 02:30:11PM +0200, Mikko Rapeli wrote: > > > > > > On Fri, Dec 19, 2025 at 01:59:14PM +0200, Tomi Valkeinen wrote: > > > > > > > On 05/12/2025 14:37, Mikko Rapeli wrote: > > > > > > > > Currently on default yocto images Xorg fails to start on AMD KV260 > > > > > > > > because 24/32 color depth gets detected but does not actually work. > > > > > > > > > > > > > > > > These two patches fix the issue and now 16 bpp gets detected > > > > > > > > and Xorg starts and draws on external HDMI display using > > > > > > > > kernel.org based linux-yocto kernel. > > > > > > > > > > > > > > > > Anatoliy Klymenko (1): > > > > > > > >    drm: xlnx: zynqmp_kms: Init fbdev with 16 bit color > > > > > > > > > > > > > > > > Mikko Rapeli (1): > > > > > > > >    drm: xlnx: zynqmp_kms: set preferred_depth to 16 bpp > > > > > > > > > > > > > > > >   drivers/gpu/drm/xlnx/zynqmp_kms.c | 3 ++- > > > > > > > >   1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > > > > > > > > Did you notice the few already sent serieses on the list where the > > > > > > > topic > > > > > > > has been discussed? > > > > > > > [PATCH] drm: xlnx: zynqmp_dp: Support DRM_FORMAT_XRGB8888 > > > > > > > [PATCH 0/3] drm: zynqmp: Make the video plane primary > > > > > > Oh I wasn't aware of these. > > > > > > > > > > > > > Or is there something else on KV260 that messes up the 24 bit color? > > > > > > These look very similar and likely fix the X11 startup. I will give them > > > > > > a try. > > > > > Right, now I've tested: > > > > > > > > > >   * these patches from Anatoliy and me to help X11 use 16bpp mode by > > > > > default > > > > >     and removes the need to manually setup Xorg for 16bpp > > > > >   * "drm: xlnx: zynqmp_dp: Support DRM_FORMAT_XRGB8888" which enables > > > > > the X11 default > > > > >     24bpp to work, no need to set Xorg config to 16bpp > > > > >   * "drm: zynqmp: Make the video plane primary" which also fixes the > > > > > X11 default > > > > >     24bpp to work, no need to set Xorg config to 16bpp > > > > > > > > > > All of these fix HDMI graphics output on AMD KV260 board with yocto > > > > > genericarm64 machine > > > > > and core-image-sato image which includes Xorg. The graphics rendering > > > > > is still > > > > > very slow but I think that is a different problem. > > > > > > > > > > I guess the last series from Sean Anderson is moving forward so I'll > > > > > reply to that thread separately. > > > > Just want to say that the series here improves xlnx and makes it a > > > > 'better' driver. IMHO the changes should be merged independently from > > > > what happens with the other series. > > > I might be missing something, but I don't think I fully agree. Yes, the > > > userspace doesn't seem to be able to cope with the current upstream > > > driver behavior (even if it's not wrong as such, afaics), so in that > > > sense this series is better. But I don't think (almost) anyone really > > > wants to use RGB565 if XRGB8888 is an option? And that's what the other > > > series is trying to achieve, and that series conflicts with this one. > > > > > > So I'd rather try to get a conclusion on Sean's series (or the other one > > > from Mike). If that effort fails, we could go with this series as a backup. > > I did testing of all three different patch series'es on AMD KV260 and > > did not find any performance difference between them. The Xorg > > rendering is still very slow to an external HDMI display. > > > > I don't have an opinion on the graphics formats but just want something > > out to a display by default. I think there is a lot more to fix to get > > the performance into usable state. > > I briefly looked through the xlnx driver and found several things to try. > > * The update code in [1] appears to always update the whole buffer. Setting > drm_plane_enable_fb_damage_clips() for the planes will enable damage > handling. Then flushing only the damaged areas might improve performance. > > * The driver could set drm_device.mode_config.prefer_shadow to make Xorg use > a shadow buffer in user space. This often works for devices with discrete > VRAM.  IDK if non-X compositors also benefit from this. > > * If the hardware supports it, setting non-coherent DMA mappings could > enable caching on the memory buffers. The driver would then have to enable > damage clips and flush caches by itself where necessary. > > Best regards > Thomas > > [1] https://elixir.bootlin.com/linux/v6.18.3/source/drivers/gpu/drm/xlnx/zynqmp_disp.c#L1109 There is also the official AMD/Xilinx kernel tree with a lot more patches which have not been upstreamed yet: https://github.com/Xilinx/linux-xlnx/commits/master/drivers/gpu/drm/xlnx I wasn't sure which of these changes fix the X11 startup issues but came up with the 16bit patches since they are so simple and avoid doing the same in Xorg config file. Would be nice to get these AMD patches upstreamed, for example one subsystem at a time. Cheers, -Mikko