From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C277D25B4B for ; Wed, 28 Jan 2026 12:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=psNnqIjPE6U/gL+KopM5Vj73WALfeZwjTPb/1Jd17k4=; b=D9q579fMwbC/XTPDcQaxTCBo8G MBG+c/12Bqm3VjClIs7p1KpnEObnVvWQJid4mNd14TGGYXyHtpIsdXP03trGz8R868fU76k6KJKv+ 7d4aTuZ7h372sxMV+EkxPyS98AC1rQlPV+Pljkh5YT75AApBzzes3ZfTt/ifUWGGveF4rz5p0MVXU YtUlyNlKJDSIZ1zRmkgAJJy/aFY1zij8cHDUqBGeyqG4dZq6KvzEnwNRTg2scN7yUfbWqaqYNUf+C 0flJc8IrOMrax8MB/QPZcBfW6TuX6GD3tNJ3DA2trqyax16KZxl76gGEMFWCWt2jYAY+wScI0JiI5 UDgK3CAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vl4Nn-0000000FyTp-3LM1; Wed, 28 Jan 2026 12:10:51 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vl4Nl-0000000FyTT-2IQG for linux-arm-kernel@lists.infradead.org; Wed, 28 Jan 2026 12:10:50 +0000 Received: from pendragon.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id AB57B581; Wed, 28 Jan 2026 13:10:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769602210; bh=3CU8o5SIomZEvlBUia0x7fjnYkUS20BvcUu2a3r5XVA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gq4edDsBwqCShK2m+Gwl/7VrCb4Uzw1pYzmXkPqpzbbIGGL6urx3E6utCYgxyGh4d SaxVyueiY9D+N7rCTGrL0JV3Wo+oez86MTR18lLRb8e9zQYASkZ1lx+C+YqR3F5mAP V6SH0zIlzo3acHhF6ruMNU7Ivrsjsx9QuMAVmeWo= Date: Wed, 28 Jan 2026 14:10:46 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: Vishal Sagar , Anatoliy Klymenko , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michal Simek , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Dmitry Baryshkov , Pekka Paalanen Subject: Re: [PATCH v7 09/11] drm: xlnx: zynqmp: Add support for Y8 and Y10_P32 Message-ID: <20260128121046.GI2558360@killaraus> References: <20251201-xilinx-formats-v7-0-1e1558adfefc@ideasonboard.com> <20251201-xilinx-formats-v7-9-1e1558adfefc@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251201-xilinx-formats-v7-9-1e1558adfefc@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260128_041049_747637_EB406EC4 X-CRM114-Status: GOOD ( 21.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Tomi, Thank you for the patch. On Mon, Dec 01, 2025 at 02:18:51PM +0200, Tomi Valkeinen wrote: > Add support for Y8 and Y10_P32 formats. We also need to add new csc > matrices for the y-only formats. > > Reviewed-by: Vishal Sagar > Signed-off-by: Tomi Valkeinen > --- > drivers/gpu/drm/xlnx/zynqmp_disp.c | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c > index 1dc77f2e4262..fe111fa8cc13 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c > @@ -307,6 +307,16 @@ static const struct zynqmp_disp_format avbuf_vid_fmts[] = { > .buf_fmt = ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI_10, > .swap = false, > .sf = scaling_factors_101010, > + }, { > + .drm_fmt = DRM_FORMAT_Y8, > + .buf_fmt = ZYNQMP_DISP_AV_BUF_FMT_NL_VID_MONO, > + .swap = false, > + .sf = scaling_factors_888, > + }, { > + .drm_fmt = DRM_FORMAT_Y10_P32, > + .buf_fmt = ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YONLY_10, > + .swap = false, > + .sf = scaling_factors_101010, > }, > }; > > @@ -697,6 +707,16 @@ static const u32 csc_sdtv_to_rgb_offsets[] = { > 0x0, 0x1800, 0x1800 > }; > A comment here to explain why the 1.0 value is in the third column instead of the expected first column would be good. > +static const u16 csc_sdtv_to_rgb_yonly_matrix[] = { > + 0x0, 0x0, 0x1000, > + 0x0, 0x0, 0x1000, > + 0x0, 0x0, 0x1000, > +}; > + > +static const u32 csc_sdtv_to_rgb_yonly_offsets[] = { > + 0x0, 0x0, 0x0 > +}; > + > /** > * zynqmp_disp_blend_set_output_format - Set the output format of the blender > * @disp: Display controller > @@ -846,7 +866,11 @@ static void zynqmp_disp_blend_layer_enable(struct zynqmp_disp *disp, > ZYNQMP_DISP_V_BLEND_LAYER_CONTROL(layer->id), > val); > > - if (layer->drm_fmt->is_yuv) { > + if (layer->drm_fmt->format == DRM_FORMAT_Y8 || > + layer->drm_fmt->format == DRM_FORMAT_Y10_P32) { We could replace is_yuv with a type enum to avoid checking the format here, and use a switch statement. Up to you. With those issues addressed, Reviewed-by: Laurent Pinchart > + coeffs = csc_sdtv_to_rgb_yonly_matrix; > + offsets = csc_sdtv_to_rgb_yonly_offsets; > + } else if (layer->drm_fmt->is_yuv) { > coeffs = csc_sdtv_to_rgb_matrix; > offsets = csc_sdtv_to_rgb_offsets; > } else { -- Regards, Laurent Pinchart