From nobody Sun Apr 5 22:50:21 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DBEBC6FA82 for ; Tue, 13 Sep 2022 15:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236683AbiIMPsI (ORCPT ); Tue, 13 Sep 2022 11:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236675AbiIMPrc (ORCPT ); Tue, 13 Sep 2022 11:47:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 09AFE70E40 for ; Tue, 13 Sep 2022 07:50:00 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 14C5C106F; Tue, 13 Sep 2022 07:43:25 -0700 (PDT) Received: from 000377403353.arm.com (000377403353.arm.com [10.2.13.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE8A43F73B; Tue, 13 Sep 2022 07:43:16 -0700 (PDT) From: Brian Starkey To: ville.syrjala@linux.intel.com, butterflyhuangxx@gmail.com Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, ben.davis@arm.com, Liviu.Dudau@arm.com, jonas@kwiboo.se, George Kennedy Subject: [PATCH] drm/fourcc: Fix vsub/hsub for Q410 and Q401 Date: Tue, 13 Sep 2022 15:43:06 +0100 Message-Id: <20220913144306.17279-1-brian.starkey@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" These formats are not subsampled, but that means hsub and vsub should be 1, not 0. Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") Reported-by: George Kennedy Reported-by: butt3rflyh4ck Signed-off-by: Brian Starkey Reviewed-by: Liviu Dudau --- drivers/gpu/drm/drm_fourcc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Sorry, I lost track of this - I thought it got fixed after the previous thread[1]. -Brian [1] https://lore.kernel.org/all/26fdb955-10c8-a5d6-07b6-85a4374e7754@oracle= .com/ diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 07741b678798..6768b7d18b6f 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -263,12 +263,12 @@ const struct drm_format_info *__drm_format_info(u32 f= ormat) .vsub =3D 2, .is_yuv =3D true }, { .format =3D DRM_FORMAT_Q410, .depth =3D 0, .num_planes =3D 3, .char_per_block =3D { 2, 2, 2 }, - .block_w =3D { 1, 1, 1 }, .block_h =3D { 1, 1, 1 }, .hsub =3D 0, - .vsub =3D 0, .is_yuv =3D true }, + .block_w =3D { 1, 1, 1 }, .block_h =3D { 1, 1, 1 }, .hsub =3D 1, + .vsub =3D 1, .is_yuv =3D true }, { .format =3D DRM_FORMAT_Q401, .depth =3D 0, .num_planes =3D 3, .char_per_block =3D { 2, 2, 2 }, - .block_w =3D { 1, 1, 1 }, .block_h =3D { 1, 1, 1 }, .hsub =3D 0, - .vsub =3D 0, .is_yuv =3D true }, + .block_w =3D { 1, 1, 1 }, .block_h =3D { 1, 1, 1 }, .hsub =3D 1, + .vsub =3D 1, .is_yuv =3D true }, { .format =3D DRM_FORMAT_P030, .depth =3D 0, .num_planes =3D= 2, .char_per_block =3D { 4, 8, 0 }, .block_w =3D { 3, 3, 0 }, .block_h = =3D { 1, 1, 0 }, .hsub =3D 2, .vsub =3D 2, .is_yuv =3D true}, --=20 2.25.1