From nobody Sun Feb 8 20:29:10 2026 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69D4C31BC90 for ; Thu, 13 Nov 2025 20:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763066264; cv=none; b=pEtqIAH2p2jApFRsuWNu43li7l9bM39GH4nWU+X6Bn3GCDe9NdXg40K9F9b4WnhvhirBhfGQNoL4ygXGZbl6wAT4aSV60YxmYqqFzMc+LQKE0mR7ZKpjwdhUUIsFKbocJlhvNYNuMFHDD/TrsTv++wpBRBobRY0L74pbHwB0Qmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763066264; c=relaxed/simple; bh=YeWpCDeY55QOC7VEGSkbstJ96N3g9b7EuRAO2g8jFNs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R4iOYeH5WoK531MP95Q2A3+nll7nTOcyHwHAvecOur2lrrhLWFV7fpcAjFlg+w/XFWjDRmE0XnkLQysmw692A6v02xi4lDokOStVALqMDDv6RD6GxvebnkiIMt/jVOunAyjaG36+ZYfNErQGmaS8fr0maQssM1jQLhs89d4vsTw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=w8X9Xq+j; arc=none smtp.client-ip=95.215.58.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="w8X9Xq+j" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763066260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ocCd5w26fdc1J8cjXCJJ44FOPQqL/aFGod/qtI7VzAQ=; b=w8X9Xq+jerxDx0SSpkQri6sf4OS6D6LncLOPZkPgFHpWLI0Y1tBCDTlAPa0MLvZSla5ZeH 4HkuOPyiGf7h2L7hcXg1hDiLMJQye7l/8fPwykUjfmKKCQAe6Dar7aoDkyNnxMZvdfAi1f XpkKEre7Q2GWyU4Sjh9SCtX0e1vv2XM= From: Sean Anderson To: Laurent Pinchart , Tomi Valkeinen , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Mike Looijmans , David Airlie , Thomas Zimmermann , Maarten Lankhorst , Anatoliy Klymenko , Maxime Ripard , linux-arm-kernel@lists.infradead.org, Simona Vetter , Michal Simek , Sean Anderson Subject: [PATCH 2/3] drm: zynqmp: Make the video plane primary Date: Thu, 13 Nov 2025 15:37:13 -0500 Message-Id: <20251113203715.2768107-3-sean.anderson@linux.dev> In-Reply-To: <20251113203715.2768107-1-sean.anderson@linux.dev> References: <20251113203715.2768107-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" The zynqmp has two planes: "video" and "graphics". The video plane - Is on the bottom (zpos=3D0) (except when chroma keying as the master plan= e) - Supports "live" input (e.g. from an external source) - Supports RGB, YUV, and YCbCr formats, including XRGB8888 - Does not support transparency, except via chroma keying (colorkey) - Must cover the entire screen (translation/resizing not supported) The graphics plane - Is on the top (zpos=3D1) - Supports "live" input (e.g. from an external source) - Supports RGB and YUV444 formats, but not XRGB8888 - Supports transparency either via - Global alpha channel, which disables per-pixel alpha when enabled - Per-pixel alpha, which cannot be used with global alpha - Chroma keying (colorkey) - Must cover the entire screen (translation/resizing not supported) Currently the graphics plane is the primary plane. Make the video plane the primary plane: - The video plane supports XRGB8888, which is the default 24-bit colorspace for X. This results in improved performance when compared to RGB565. - The graphics plane can be used as an overlay because it has a higher z-pos and supports a per-pixel alpha channel. Unfortunately, clients like weston cannot currently take advantage of this because they expect overlay planes to support translation/resizing. One downside to this approach could be that the graphics plane has worse support for YUV and YCBCr, so it may be more difficult to compose video streams into the window of a media player. However, no existing software could rely on this because there is no way to enable the per-pixel alpha channel when the graphics plane is enabled. This makes it impossible to "carve out" an area in the graphics plane where the video plane shows through. This limitation is addressed in the next patch, but it means we do not need to worry about compatibility in this area. An alternate approach could be to pretend that the graphics plane supports XRGB8888 by using the supported ARGB8888 mode instead and enabling the global alpha channel. However, this would rule out ever using the per-pixel alpha channel. Signed-off-by: Sean Anderson --- drivers/gpu/drm/xlnx/zynqmp_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqm= p_kms.c index c80a2d4034f3..456ada9ac003 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_kms.c +++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c @@ -161,8 +161,8 @@ static int zynqmp_dpsub_create_planes(struct zynqmp_dps= ub *dpsub) if (!formats) return -ENOMEM; =20 - /* Graphics layer is primary, and video layer is overlay. */ - type =3D i =3D=3D ZYNQMP_DPSUB_LAYER_VID + /* Graphics layer is overlay, and video layer is primary. */ + type =3D i =3D=3D ZYNQMP_DPSUB_LAYER_GFX ? DRM_PLANE_TYPE_OVERLAY : DRM_PLANE_TYPE_PRIMARY; ret =3D drm_universal_plane_init(&dpsub->drm->dev, plane, 0, &zynqmp_dpsub_plane_funcs, @@ -322,7 +322,7 @@ static const struct drm_crtc_funcs zynqmp_dpsub_crtc_fu= ncs =3D { =20 static int zynqmp_dpsub_create_crtc(struct zynqmp_dpsub *dpsub) { - struct drm_plane *plane =3D &dpsub->drm->planes[ZYNQMP_DPSUB_LAYER_GFX]; + struct drm_plane *plane =3D &dpsub->drm->planes[ZYNQMP_DPSUB_LAYER_VID]; struct drm_crtc *crtc =3D &dpsub->drm->crtc; int ret; =20 --=20 2.35.1.1320.gc452695387.dirty