From patchwork Wed Oct 16 11:08:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Te Yuan X-Patchwork-Id: 13838211 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 821DDD1AD43 for ; Wed, 16 Oct 2024 11:10:30 +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:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=l4u1X+4asBMPU91TR1WAl6Ub71JuEkCWwBm90GJmfMc=; b=USwKwY5Eaimxj+EWk52D8NzOEX 37oOYkTq/P28rnR717gXFpeBziKZV68XZzH9gbpDGXVCsNlV61ljO8cOwERhtEN4ovXDgw7PX1LfW ZHkXVSdv+YfFvHN9DW+NefIrJCD5gevfBehAnFAdyhHyF3lsLs02HiSZEasI3JEv5JBfPxDBPVVv+ vVST8VPbmdeOGL6Z6Dml+G70D9NC2+xNZcq+PqmLK7iftOUYrWS+dv+tJ71l8u5nQlCE0Y0DoCCCG ZfTx7dtCQq5VURVJ1dYL1UWfzQjm3AYaLkie4CuJkpniQfFC/UKPahbkvobYoS7vY0a0nk96Mb8o7 ga66oazg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t11v0-0000000BYnR-368C; Wed, 16 Oct 2024 11:10:18 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t11tZ-0000000BYXU-2ajz for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 11:08:51 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7ea8d7341e6so2259328a12.3 for ; Wed, 16 Oct 2024 04:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1729076927; x=1729681727; darn=lists.infradead.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=l4u1X+4asBMPU91TR1WAl6Ub71JuEkCWwBm90GJmfMc=; b=l+BuR8IyzMOZyUg14I3b0wCCZEz0Cl1w29Pn6oVGNrCio7eKblDkkYYdD8kZzQPmlM IOZj+VegNchx5Rzq25OE2zq3hnPhh33J8NZ6fISBzeSqrl5oQRJyK4zq7RcKwxFYoou3 5mZh7KBFZjPPDX5UWtvZcWOGjSMY0fMzKciWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729076927; x=1729681727; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l4u1X+4asBMPU91TR1WAl6Ub71JuEkCWwBm90GJmfMc=; b=PhAITCsVgnkdeXQAkoOVt2yFup5hnOyfoIfOIxtik6fiByJ7S7dWknJ6l9SbNegNDU LGURDUQV/DMxWY/+f1je0Y+ySL8UN5t6cTjjSB/Dgw5ZdBY9Oqkq52uWR6uznUDQxu6c s07wsSBXExEDzxm+Berq97FYe0P9k0ZpEWXOdGv/eR1nWLOkJMsJNt+u0zyhF7o7k6wC m7Qy/gWecsnF5gD3YPesvDdtAFIQ0kk0En/WPDFoTSrq+SfqSNY8TUdD4ZS+7rOO9ZcZ uIHaSvMb1C/q1V5CHUa4wlmglq3TfmnlJerOZnhy7m/14P/jFZJH9LvoVaCFFktrbJ5O GzqA== X-Forwarded-Encrypted: i=1; AJvYcCWoIAkohKO9Mi7YVEbZ+5Pq8mKZ2KA4HPpObqQImtrxGuT4J7HAMhAu7noWohG0OPDZkhhkvTYmtdu6bBLfT4aK@lists.infradead.org X-Gm-Message-State: AOJu0YxomaESBP1aYrBGh//M6OgndCEBZjNMtc+Uy1Km3BBQpkNFqa7S fIZMTXCFNznscXEEMpfvIwltziM4P/eppLeoS57TOOw864L7KBdp6JrljtFyHA== X-Google-Smtp-Source: AGHT+IGbiRRm9/GVZ2H2pkAbe5Hh0MuXI6tyXwqFg8lOcZTaM/hUsZa8Rxc3qKSg6bWgPyMziv1sPw== X-Received: by 2002:a05:6a20:d504:b0:1d9:542:8d40 with SMTP id adf61e73a8af0-1d905e99a58mr5466764637.5.1729076927053; Wed, 16 Oct 2024 04:08:47 -0700 (PDT) Received: from yuanhsinte.c.googlers.com (176.220.194.35.bc.googleusercontent.com. [35.194.220.176]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e773b13a0sm2826188b3a.77.2024.10.16.04.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 04:08:46 -0700 (PDT) From: Hsin-Te Yuan Date: Wed, 16 Oct 2024 11:08:39 +0000 Subject: [PATCH v2] drm/mediatek: Fix color format MACROs in OVL MIME-Version: 1.0 Message-Id: <20241016-color-v2-1-46db5c78a54f@chromium.org> X-B4-Tracking: v=1; b=H4sIALeeD2cC/13MQQrCMBCF4auUWRvJxKaKK+8hXaRx2gzYRiYal JK7G7t0+T8e3wqJhCnBuVlBKHPiuNQwuwZ8cMtEim+1wWjTokarfLxHUWS0paMdutY5qN+H0Mj vzbn2tQOnZ5TPxmb8rf9CRoXqYAeNo9PuZLqLDxJnfs37KBP0pZQvRosOf50AAAA= X-Change-ID: 20241015-color-e205e75b64aa To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dianders@chromium.org, Hsin-Te Yuan X-Mailer: b4 0.15-dev-7be4f X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_040849_663457_6AD9F18D X-CRM114-Status: GOOD ( 13.80 ) 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 In commit 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL"), some new color formats are defined in the MACROs to make the switch statement more concise. That commit was intended to be a no-op cleanup. However, there are typos in these formats MACROs, which cause the return value to be incorrect. Fix the typos to ensure the return value remains unchanged. Fixes: 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL") Signed-off-by: Hsin-Te Yuan Reviewed-by: Matthias Brugger --- Changes in v2: - Clarify that the commit get fixed was intended to be a no-op cleanup - Fix the typo in tag - Link to v1: https://lore.kernel.org/r/20241015-color-v1-1-35b01fa0a826@chromium.org --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- base-commit: 75b607fab38d149f232f01eae5e6392b394dd659 change-id: 20241015-color-e205e75b64aa Best regards, diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 89b439dcf3a6af9f5799487fdc0f128a9b5cbe4a..1632ac5c23d87e1cdc41013a9cf7864728dcb63b 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -65,8 +65,8 @@ #define OVL_CON_CLRFMT_RGB (1 << 12) #define OVL_CON_CLRFMT_ARGB8888 (2 << 12) #define OVL_CON_CLRFMT_RGBA8888 (3 << 12) -#define OVL_CON_CLRFMT_ABGR8888 (OVL_CON_CLRFMT_RGBA8888 | OVL_CON_BYTE_SWAP) -#define OVL_CON_CLRFMT_BGRA8888 (OVL_CON_CLRFMT_ARGB8888 | OVL_CON_BYTE_SWAP) +#define OVL_CON_CLRFMT_ABGR8888 (OVL_CON_CLRFMT_ARGB8888 | OVL_CON_BYTE_SWAP) +#define OVL_CON_CLRFMT_BGRA8888 (OVL_CON_CLRFMT_RGBA8888 | OVL_CON_BYTE_SWAP) #define OVL_CON_CLRFMT_UYVY (4 << 12) #define OVL_CON_CLRFMT_YUYV (5 << 12) #define OVL_CON_MTX_YUV_TO_RGB (6 << 16)