Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6816050rwn; Tue, 13 Sep 2022 09:20:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM55xOqWrLsafrTYSd/DAQLbEfbeiSvdQ2A9oYuzyIkkaYyvuB5dhLCmmOI0HVwaHYTZWjHk X-Received: by 2002:a17:90b:4b51:b0:202:aa27:ceb4 with SMTP id mi17-20020a17090b4b5100b00202aa27ceb4mr62362pjb.131.1663086043929; Tue, 13 Sep 2022 09:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663086043; cv=none; d=google.com; s=arc-20160816; b=Yj0rbK5SGYgRUxAYnlk3j7Pa22zJEqySTIZ+At8fErmwLJLw8jVHhU/+1nqPqFiGoN iqd7X9Q+FF3fzIM0NSf7U2TlK+M7tFA6aTewQrkjp1aRtcqamLDzmmseQgPLF8uFI9n2 acTkomtXZet5NORl9cwF0GPB8ABdcTJ1XueP7fjzQGSRQq6QUBeY3ogwd2s1f6SBbUZu 27aEl5TrzKJe3Lt6EvAVs6xqsMOzVqTPgiIMBhY4w/0n7fPXdEYdEv4X50leFLNXrf2R 3DPmgldIlUiO4Y2XABZ5AcZPjf1o85lf0Be7+dqYvIQyl1R3a8ayvjFwSuXxZt9ZNVCi PB4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wdQvN2T0vs79TR3Edpb7BxJxaabOJakT0Mpn3Ta55bQ=; b=s3WEwYxI97eQgXCB/WqiFdvXnBBWYab6+zIIqHmLZyzhlzIp1p7IVUlKVMKZpTyscF nAG/gFNoGFNBRaGeGyU3RoL+3Qg37PJ4/TBL1v6splpqguQANW0gKDMlpNx5wDXNHn9o ZNCcbYKiyeHt7B4AcbjfpQkvAie+dHtmDORJ+dDNjdA7cKfoJ6lQn5+FdFTzeNroQbn0 07DH5s1CsGyfjpwm3dq37LEXH7emdKaR4zTrsBHWu7uI/GTyiZcxnPCkUFWpdeQ7t/dd IRo2GplbFt2eMaj1orlADzi6p9KYlKJ+CDETtKukEwauzopHH8iaG1DQX6hgGXgDbSFc Hvgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id je15-20020a170903264f00b00174af354ba5si11896413plb.69.2022.09.13.09.20.32; Tue, 13 Sep 2022 09:20:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232077AbiIMPsG (ORCPT + 99 others); Tue, 13 Sep 2022 11:48:06 -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: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 format) .vsub = 2, .is_yuv = true }, { .format = DRM_FORMAT_Q410, .depth = 0, .num_planes = 3, .char_per_block = { 2, 2, 2 }, - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, - .vsub = 0, .is_yuv = true }, + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, + .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_Q401, .depth = 0, .num_planes = 3, .char_per_block = { 2, 2, 2 }, - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, - .vsub = 0, .is_yuv = true }, + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, + .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2, .char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true}, -- 2.25.1