From patchwork Wed Oct 16 14:17:14 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: 13838537 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 56C7AD206B4 for ; Wed, 16 Oct 2024 14:19:03 +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=EVKER3hv6evoPvIqFuw9dG82LeQOTjgI9oXF+N5WCUE=; b=oltqrxm9MRB/XBc1tDfjQaDf5Z 3CuO+sRajf/bqi5teJ0uBgHyQvmL+bwNXlvHq6aOMXg8Bj0UlF8/VmHKbDAvaiwe3t4LCYqWXwG68 SF6HYeoRwJujz4qq3+ljViLMGy2/sJZ1eZK/NhXJOJa/WHc54o78godPFNEhMw8ispW3cFcQ7uZDR qjW/tEehpOFiVkFKCcnKVYF8dUGk3HiulUyo/zmvQDeeCFEC2/jQvMKEty3U2Od/B5Tuz4qOgs3eq LlnZHwSbMi3w8xyHRSftJq+/g9eJwOI4gE4TtoFGLYx6Ti9v2aNNIk+zwtVIZMrzh5NlQ77Z0ydkZ MhN8FlhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t14rS-0000000C35a-21UN; Wed, 16 Oct 2024 14:18:50 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t14q0-0000000C2lD-1917 for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 14:17:21 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-20cb7088cbcso38488445ad.0 for ; Wed, 16 Oct 2024 07:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1729088239; x=1729693039; 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=EVKER3hv6evoPvIqFuw9dG82LeQOTjgI9oXF+N5WCUE=; b=lWSYEn8xXjztW+WLVRSDwJlO1oOD2LBGkk/dFcgNBBEAk1M8gux2Tmv/kL/V7p5sZr +WDO9Qt56OsYfo5yuskk1peB+q6Zo2nMUItB3Jzk9vQFnEj9wzQFnn+u5TlYYHlyCzmU docu4zUMO3YsD9lRiOfvFXUu/n4/cmPMzurnc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729088239; x=1729693039; 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=EVKER3hv6evoPvIqFuw9dG82LeQOTjgI9oXF+N5WCUE=; b=d6X4zyG4BzVUqjlF+r+M2Yvk4wX43Pi79v+apVgbjDGqUNTlo+Fx5Soh5rXE0WXP22 7nXnk/MGnHs1n2PKwFoCTQSVI7woMqVD9xAZQVuC7I9gM6e4j7hOHXedTIP+E9BSOtHL xrBHJR7ijp3TKegyGKkxSwYZg09YKErrdLweQb85m0ms85y7HV4RKmMtCGgfXIPWbt5w tLncHLFg4xlKUc6b93c0mKhBC7/4HrPGk6rSD9uKWNKsf7IxP/kPEAZHM5m9oSsSxEr8 FUzHjtDATdkf7EyrNlgns4D3uup319FMGfdwEKoXTlJdz+tcMik63N31YSNOwKj1BFCG TBJw== X-Forwarded-Encrypted: i=1; AJvYcCWdVI2ccvK0XRKl5NSCcozgoGqyLdYW3Z7i2YKqztEqiZK/yvbu2E2CoST1GMVIfQ4F5qSoDIDJQWGgybA/T4nu@lists.infradead.org X-Gm-Message-State: AOJu0Yxa4rTcMniEaBKHbG7P7orKXUVgypSh5NfPiuv8adEM6VHcCQ8g mFNqSeBasUKivMTKwD/iJp3orKS/PA17VMQ+iuhs/nvnS56sR2gSrRbq8VzxN2n3oFt7cNSvJAo = X-Google-Smtp-Source: AGHT+IGZHtq9NBH/rxgUzuhq/wqmFAtg/Km4mXJX3jx3iEj2labIFGH9kDPhLj3+H6UaQUaFSyyVpg== X-Received: by 2002:a17:902:ec83:b0:20c:5404:ed69 with SMTP id d9443c01a7336-20ca167bbbbmr242478095ad.31.1729088239049; Wed, 16 Oct 2024 07:17:19 -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 d9443c01a7336-20d17f844ecsm29243015ad.14.2024.10.16.07.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 07:17:18 -0700 (PDT) From: Hsin-Te Yuan Date: Wed, 16 Oct 2024 14:17:14 +0000 Subject: [PATCH v3] drm/mediatek: Fix color format MACROs in OVL MIME-Version: 1.0 Message-Id: <20241016-color-v3-1-e0f5f44a72d8@chromium.org> X-B4-Tracking: v=1; b=H4sIAOnKD2cC/12MwQqDMBAFf0X23JQkJlF66n+UHmJcdaEaSdrQI v57o1AoHufxZhaIGAgjXIoFAiaK5KcM5akAN9ipR0ZtZpBcKsGFZs4/fGAoucZKN0ZZC/k7B+z ovXdu98wDxacPnz2bxLYeC0kwwUrdcNFZbmtprm4IfqTXePahhy2S5L9ofqLMojJto11VW626g 7iu6xcSdymQ1gAAAA== 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_071720_372425_EBFE2FA5 X-CRM114-Status: GOOD ( 13.91 ) 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") Reviewed-by: Douglas Anderson Reviewed-by: Matthias Brugger Signed-off-by: Hsin-Te Yuan Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu --- Changes in v3: - Add missing Reviewed-by tag - Link to v2: https://lore.kernel.org/r/20241016-color-v2-1-46db5c78a54f@chromium.org 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)