From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-op-o10.zoho.com (sender4-op-o10.zoho.com [136.143.188.10]) (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 24C9121ABB9 for ; Mon, 26 Jan 2026 18:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769451862; cv=pass; b=TAL1/rvitW+rl6qO3CVifeYOzwj03d6+RmZlfP3SAoKc3QhRjIasFBQTrdJ5/9edg4cVxmCsk8k7Z9ib6PBQ99CHR+cpj4c9knTEJGW7ehcMfjYQFVDureeJOzqaTYpI0tMR5LaSKHyl8ywhN9i53Zgi6waaqi1PXSz3Db789mI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769451862; c=relaxed/simple; bh=4FR3xIdP73odYp/F3Nnu6lFMttOsQSoyVr671IfnQYw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=u7uDgVfvOsgi7GV7RLhlc2Uv1dsoFheXPpaNrUkL8dNMJ+ZXP9cJzepDw6UV8wTT562XI3fD+3l0Ph3NuLKF09I/6jNzLHuE0BFKLyX/LvdRD9OW4srP1UFYNW2l+Jfx/brV2/PCIoHT0LsLPuqdM2EMXFXeI2IuWwqnLFdsazk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nfraprado@collabora.com header.b=lMJVcvAP; arc=pass smtp.client-ip=136.143.188.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nfraprado@collabora.com header.b="lMJVcvAP" ARC-Seal: i=1; a=rsa-sha256; t=1769451824; cv=none; d=zohomail.com; s=zohoarc; b=SARI57JCNzYUUJvgh5eiMna3J/xzOo986mBnMyrAONQhI5Ckq1wW+md4pBj1D04wWCFgQk+ASsX/JkWViCpLqa8+V75LsyVjSPilsQawwi0Xtndi5X94D+e6u9/S4+x2xtyeI06vlzxIEZgwx+Zi6tc94erz6MvOOLJxT26Sg2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769451824; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=BCcFyc82BL5NjswhEby+qpxccQGrfqrQSMirNpyrbzw=; b=NzZXtJEyPvI5ud8vMlfP/9ZgKDH/t2ffp68CjMpG8UGpyZSflFkvJFa1K2wyk/V/qTvudZu8j+JhGHcnX25rENNSrDJ1BoD0HjYoepXHybwB+UXYD9Lt/RnRQoIQcBouG8XKLI92QgtQ1VtO4qfbk9aT+ptTzdY9lo+FPQguJjw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nfraprado@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1769451824; s=zohomail; d=collabora.com; i=nfraprado@collabora.com; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=BCcFyc82BL5NjswhEby+qpxccQGrfqrQSMirNpyrbzw=; b=lMJVcvAPA4rxh1kwJCUc8CEOB2ucn9J16f4xqryuUecWSHSQ05a8RjLJ7VVfmpnM x4zAGt0gsDnHAsXY3WNm7f2sjzEejobAv+luekczVyTceEi1b8865LHIlOxl2Cs4KC0 xKYI3BQKMVIjVuFFVD+l+dEOxI5BTunLnlAAhlRU= Received: by mx.zohomail.com with SMTPS id 176945182249825.35003191071928; Mon, 26 Jan 2026 10:23:42 -0800 (PST) Message-ID: <1425ed35a21bcd9633524d4fc747b71a17068363.camel@collabora.com> Subject: Re: [PATCH v4 2/4] drm: Add CRTC background color property From: =?ISO-8859-1?Q?N=EDcolas?= "F. R. A. Prado" To: Cristian Ciocaltea , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sandy Huang , Heiko =?ISO-8859-1?Q?St=FCbner?= , Andy Yan , Louis Chauvet , Haneen Mohammed , Melissa Wen Cc: Robert Mader , kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Matt Roper Date: Mon, 26 Jan 2026 15:23:35 -0300 In-Reply-To: <20251219-rk3588-bgcolor-v4-2-2ff1127ea757@collabora.com> References: <20251219-rk3588-bgcolor-v4-0-2ff1127ea757@collabora.com> <20251219-rk3588-bgcolor-v4-2-2ff1127ea757@collabora.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ZohoMailClient: External On Fri, 2025-12-19 at 23:46 +0200, Cristian Ciocaltea wrote: > Some display controllers can be hardware programmed to show non-black > colors for pixels that are either not covered by any plane or are > exposed through transparent regions of higher planes.=C2=A0 This feature > can > help reduce memory bandwidth usage, e.g. in compositors managing a UI > with a solid background color while using smaller planes to render > the > remaining content. >=20 > To support this capability, introduce the BACKGROUND_COLOR standard > DRM > mode property, which can be attached to a CRTC through the > drm_crtc_attach_background_color_property() helper function. >=20 > Additionally, define a 64-bit ARGB format value to be built with the > help of a couple of dedicated DRM_ARGB64_PREP*() helpers.=C2=A0 Individua= l > color components can be extracted with desired precision using the > corresponding DRM_ARGB64_GET*() macros. >=20 > Co-developed-by: Matt Roper > Signed-off-by: Matt Roper > Signed-off-by: Cristian Ciocaltea > --- > =C2=A0drivers/gpu/drm/drm_atomic_state_helper.c |=C2=A0 1 + > =C2=A0drivers/gpu/drm/drm_atomic_uapi.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0 4 ++ > =C2=A0drivers/gpu/drm/drm_blend.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 39 ++++++++++++++++-- > =C2=A0drivers/gpu/drm/drm_mode_config.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0 6 +++ > =C2=A0include/drm/drm_blend.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 = 4 +- > =C2=A0include/drm/drm_crtc.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 12 = ++++++ > =C2=A0include/drm/drm_mode_config.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 5 +++ > =C2=A0include/uapi/drm/drm_mode.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 67 > +++++++++++++++++++++++++++++++ > =C2=A08 files changed, 133 insertions(+), 5 deletions(-) You should also add a dump for this property in drm_atomic_crtc_print_state(). >=20 > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index 66278ffeebd6..d99a74258d3d 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -274,6 +274,18 @@ struct drm_crtc_state { > =C2=A0 */ > =C2=A0 struct drm_property_blob *gamma_lut; > =C2=A0 > + /** > + * @background_color: > + * > + * RGB value representing the pipe's background color.=C2=A0 The > background > + * color (aka "canvas color") of a pipe is the color that > will be used > + * for pixels not covered by a plane, or covered by > transparent pixels > + * of a plane.=C2=A0 The value here should be built using > DRM_ARGB64_PREP*() > + * helpers, while the individual color components can be > extracted with > + * desired precision via the DRM_ARGB64_GET*() macros. > + */ > + u64 background_color; > + /s/pipe/CRTC/ . pipe is an intel term but this is a generic CRTC property. Other than that, Reviewed-by: N=C3=ADcolas F. R. A. Prado --=20 Thanks, N=C3=ADcolas