Message ID | 20230518104857.124265-11-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp397670vqo; Thu, 18 May 2023 03:55:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4eKHAsdbYwF5ie+SPHZ+vHEmZMQloex6GKlJfeGf/vnKNj7z/49F7JV3C5mJHBsdkfU+mn X-Received: by 2002:a17:90a:c24d:b0:253:629e:dc3b with SMTP id d13-20020a17090ac24d00b00253629edc3bmr1773034pjx.44.1684407331258; Thu, 18 May 2023 03:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684407331; cv=none; d=google.com; s=arc-20160816; b=CycnSo13OsgWlib+Eimocnvj0QOCKGHmC5VKiJjobq+OxLR3d1nEYgAWIUbPIyQ+Dx Gqx96tYO9ROY3tn3IvEgmoogyEr+zqgcRVBx95CyGdCED3CXSofW3LZr7YmkJNPQzPEE bPJwqn+zTPlGqMlJRRAHh3NdBCohDJBQxZqxOLseRrAXdBhoTV/tnusIfSH9ShjvIIl0 mirZjKWPXp6/FjsT+4CwOr69Af7jnwEIQsBQVe0k9gbWeYgsxGBiS42aZNscctLo9y1d aE1yEPzgAPa3HIWILg5Az3Q3rDcy38L/n+5lQsZErj2ufnmzjbb5lUmrRho3+s5Snoqt JjwQ== 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 :dkim-signature; bh=rlvJymOWGRZRk99o6Zs+tnpAttf3aWYZmWAsGXVYUDM=; b=qJth++WkP5UmRoK2AUZYMs7uWS3jcvt4RjAfa4tG/TY4aPosCVQdTlsGWtSpGob+5H P2BQNtS6C6r+FzbA6oXENEECFjzpDafdJgR4tGVrxO1DuZ2FCB85LLFimltWtcfKsUdl WAZxpQXNQ8F+C/v8I3oacvllIocGrDpmCqERVL2zVADEtv3K+tMu3CzdwtHWF6Y7Si3U TqwJyqGajk6AJvkrXn39HMuLmMxIPQwyCvbjGOP8CWia9+7pHdez4J0krKrAre2n/kV2 CSIgoVC1vmL1g2VhGvKtFAPiu4YnXg50mF9+U4rZsZBFloiTyaHF7+rCMeHMoaTX/Yps 8v6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nUnU9DLH; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a17090a3cc800b0024d7fdc4778si1477945pjd.32.2023.05.18.03.55.19; Thu, 18 May 2023 03:55:31 -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; dkim=pass header.i=@collabora.com header.s=mail header.b=nUnU9DLH; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231204AbjERKts (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Thu, 18 May 2023 06:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbjERKtN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 18 May 2023 06:49:13 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58271E6E for <linux-kernel@vger.kernel.org>; Thu, 18 May 2023 03:49:12 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (unknown [IPv6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 5E15666059A8; Thu, 18 May 2023 11:49:10 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1684406951; bh=AE9iGK1lfVVDFBdwJsBq/oCrjdgmEivKNGIdMO9796U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nUnU9DLHgyjY+7bF1oLROH/6pCYSR1KrGlUHqccJoPG4gzC+SI/iRW7Qmz68TAHv3 p3sGyyREOMJh0Ct7uPkEHdjGdSEWPClXPKPvdXVrgusuNmpLsXWe5dgFNwk4jAR50I z3Hlol+Mnx+TirsI8L6kETCOXO/JKXkS6BWwvn0g5MYjxJTId00a2b2ywvLCEpglwh JWXRDih6pZp8SHlYHbgCk9Rz2Dz1ugRm8rzzM5IgpjE0SjnvYqB80SMXbjcauoy/RZ v8Wq8WuQ/KHk6vS7GC8i23mqgv6nNtGLv/EUP8c2/5OjYQ4LiZhjgHPbrD3y7V27fY Vwlp3imfz8P9A== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, kernel@collabora.com, "Jason-JH . Lin" <jason-jh.lin@mediatek.com> Subject: [PATCH v4 10/11] drm/mediatek: gamma: Make sure relay mode is disabled Date: Thu, 18 May 2023 12:48:56 +0200 Message-Id: <20230518104857.124265-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230518104857.124265-1-angelogioacchino.delregno@collabora.com> References: <20230518104857.124265-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766229101523685617?= X-GMAIL-MSGID: =?utf-8?q?1766229101523685617?= |
Series |
MediaTek DDP GAMMA - 12-bit LUT support
|
|
Commit Message
AngeloGioacchino Del Regno
May 18, 2023, 10:48 a.m. UTC
Disable relay mode at the end of LUT programming to make sure that the processed image goes through. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> --- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c index 9ae08a2d7da2..ba8a0f93f184 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c @@ -20,6 +20,7 @@ #define DISP_GAMMA_EN 0x0000 #define GAMMA_EN BIT(0) #define DISP_GAMMA_CFG 0x0020 +#define GAMMA_RELAY_MODE BIT(0) #define GAMMA_LUT_EN BIT(1) #define GAMMA_DITHERING BIT(2) #define DISP_GAMMA_SIZE 0x0030 @@ -184,6 +185,9 @@ void mtk_gamma_set_common(struct device *dev, void __iomem *regs, struct drm_crt /* Enable the gamma table */ cfg_val |= FIELD_PREP(GAMMA_LUT_EN, 1); + /* Disable RELAY mode to pass the processed image */ + cfg_val &= ~GAMMA_RELAY_MODE; + writel(cfg_val, regs + DISP_GAMMA_CFG); }