Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2466382rda; Wed, 25 Oct 2023 03:45:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkG66WEQ800JV5LhmfCfoeSawDoTKJNtcNp4qIASsepDdFAff1PzEnTpu5E17KaydNqUxM X-Received: by 2002:a25:44:0:b0:d9d:38cd:e054 with SMTP id 65-20020a250044000000b00d9d38cde054mr13370215yba.13.1698230701272; Wed, 25 Oct 2023 03:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230701; cv=none; d=google.com; s=arc-20160816; b=0+nIIWjwYokaDMQO4lQcdS8Czl/3G11SHLWmMd3h8o1yeZrBbG4P9fgnJhI8MI4YAg W5V7umhOO1pQWPL/UQ2qC/Mdy6NwBlvjGN+QzXVn2G5gVXIoMWpvJAkNOd8PGR9dqzkT nSLh/iEB8GSBpH8rSu+gr1qfRx+Xb34LKxMFDNhmDbrNAcp2wkX3giGYavZm6IHjtIse 8pgdmwDSqpUrHkkDz2LLjy6u6ymbR0C26vPPfLTL8I8BHKUO7LgG0sus69u+7dV6dV2Y EQfVxhQX6q8Nu9zCb37PyM4fglDpByZM8Kn/H43KLtlS8Zfwr22JATODxSllsiwlpMyA Iq3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EFq4+IhDI1n/B7VDq7okaZnYpuS7hgwgV5bc6PPBPmE=; fh=B6tdsQsE6Vld1lv+/IQzPfRMbet7N3325r+LPtNcL/E=; b=dgd/kcSfQ9ph7FzSQx9A9V6b5e4OQ5pramGnKxwkrwdhUFW15utRCqcpKj5iPzeQ0l BXAarguLppbJ7FTHdBT6ms4DnnyRc7nTSmKLdeoreycmHl64f0csgOt7uGs1qwCHt1e3 5/CiixAfRYJCigH/90qhK2iG6XPQj9AeefF/TbEnEzULJm3RJrzE8H9kRAeuiS2aT+i5 +O0kpG60LrbobGMKUI55orRfOu0Mq2BMoZSuXdtEt2nsEAtw6dNeTeV7dUzpmqHiF9JZ jNH0pIOeMbOEQpbEDmMi1FgCE/EJj+0+BcRKa+BqSWBmwUfOdK1oDyWyB1BmuN4Zvk5t urJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XI7u9gf0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 63-20020a250442000000b00da037caea46si3959501ybe.680.2023.10.25.03.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:45:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XI7u9gf0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5EFA880BA7E8; Wed, 25 Oct 2023 03:44:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234614AbjJYKon (ORCPT + 99 others); Wed, 25 Oct 2023 06:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343790AbjJYKoW (ORCPT ); Wed, 25 Oct 2023 06:44:22 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0ECC199A for ; Wed, 25 Oct 2023 03:43:58 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 18E2B660731F; Wed, 25 Oct 2023 11:43:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698230636; bh=KegdeqPbnKJB0aXxxCWgYWenpZQb07bWKdSj7ee2iMI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XI7u9gf0OAbCguafvBwC9JursKCw9D0kI70ypY0d1agiM/u6bYeonsjdz14tizBsx qsdlCHlkcOmHPpI+WA9PZHLRKGcAxBGRz/RxPepIYwEkBjhBdx84E0mzh6+gwo2EN2 TW92p+2uUGGF/ir0WbEqubWmjvsJeJTUBovpkckCywt6Od6lQYe+d9V+5WCxbK4GI0 kt+fHID6uYvrNjWqMp1xxNRejnEpzGUf0zkkDne2eRiuDhT0LhYq07gLTKZyZqZ+9q DOYiAQeXVn6sJgn6KcWpZ+OUmGeW6tc/5WybzQv03BPfKZPzs5/DyLu7GvsnRE+P9h ou6QLq05MJRXw== Message-ID: <7d50a061-dd73-40e4-af7d-ac8252bcea25@collabora.com> Date: Wed, 25 Oct 2023 12:43:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 08/16] drm/mediatek: De-commonize disp_aal/disp_gamma gamma_set functions Content-Language: en-US To: =?UTF-8?B?Q0sgSHUgKOiDoeS/iuWFiSk=?= , "chunkuang.hu@kernel.org" Cc: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "wenst@chromium.org" , "kernel@collabora.com" , "dri-devel@lists.freedesktop.org" , "ehristev@collabora.com" , "linux-arm-kernel@lists.infradead.org" , "matthias.bgg@gmail.com" , "nfraprado@collabora.com" References: <20231012095736.100784-1-angelogioacchino.delregno@collabora.com> <20231012095736.100784-9-angelogioacchino.delregno@collabora.com> <36cdd47a7016cfb8814e65b341db83006af9cdd8.camel@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <36cdd47a7016cfb8814e65b341db83006af9cdd8.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:44:55 -0700 (PDT) Il 13/10/23 06:07, CK Hu (胡俊光) ha scritto: > Hi, Angelo: > > On Thu, 2023-10-12 at 11:57 +0200, AngeloGioacchino Del Regno wrote: >> In preparation for adding a 12-bits gamma support for the DISP_GAMMA >> IP, remove the mtk_gamma_set_common() function and move the relevant >> bits in mtk_gamma_set() for DISP_GAMMA and mtk_aal_gamma_set() for >> DISP_AAL: since the latter has no more support for gamma manipulation >> (being moved to a different IP) in newer revisions, those functions >> are about to diverge and it makes no sense to keep a common one (with >> all the complications of passing common data and making exclusions >> for device driver data) for just a few bits. >> >> This commit brings no functional changes. > > Reviewed-by: CK Hu > >> >> Signed-off-by: AngeloGioacchino Del Regno < >> angelogioacchino.delregno@collabora.com> ..snip.. >> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c >> b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c >> index 81c04518a5eb..0929f8830d6d 100644 >> --- a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c >> +++ b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c >> @@ -69,41 +69,28 @@ unsigned int mtk_gamma_get_lut_size(struct device >> *dev) >> return 0; >> } >> >> -void mtk_gamma_set_common(struct device *dev, void __iomem *regs, >> struct drm_crtc_state *state) >> +void mtk_gamma_set(struct device *dev, struct drm_crtc_state *state) >> { ..snip.. >> >> - cfg_val = readl(regs + DISP_GAMMA_CFG); >> + cfg_val = readl(gamma->regs + DISP_GAMMA_CFG); >> >> /* Enable the gamma table */ >> cfg_val |= FIELD_PREP(GAMMA_LUT_EN, 1); >> >> - writel(cfg_val, regs + DISP_GAMMA_CFG); >> -} >> - >> -void mtk_gamma_set(struct device *dev, struct drm_crtc_state *state) >> -{ >> - struct mtk_disp_gamma *gamma = dev_get_drvdata(dev); >> - >> - mtk_gamma_set_common(dev, gamma->regs, state); >> + writel(cfg_val, gamma->regs + DISP_GAMMA_CFG); Hello CK, something went wrong while you applied this patch: this writel became a readl, breaking mtk_disp_gamma entirely. Please check: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/gpu/drm/mediatek/mtk_disp_gamma.c?h=next-20231025&id=a6b39cd248f3321dbf066f95f95a9841f891229e Thanks, Angelo