Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26791164rwd; Mon, 3 Jul 2023 15:12:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlE59Wo0pj3gcMPa5Ubywv07OU/JpJnvQlE14LdEwbbMG8mW8tkJoDmVCfgxKGLBmwYam2Be X-Received: by 2002:a17:902:a502:b0:1b8:69f:f169 with SMTP id s2-20020a170902a50200b001b8069ff169mr8564263plq.30.1688422341710; Mon, 03 Jul 2023 15:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688422341; cv=none; d=google.com; s=arc-20160816; b=TquaWb44s6PVNjKsnLcq9THRuSLVSMbp8cHAEosLPdnOPAHdZozPbj9FqO1VPMXMtL NAd+p7SxsSeYKldPC/zQKcyP7AQxgHMWr36cdlKsacpwp4dN1JO6ZmzTmkLjGaKDti/R RTl5G23qJcWlvuZwb1mKJHNX51A9A5jBZzGj2yu0ZwJaRt4IWDoozIWvYSSHo9eJ/SUR +46NDGoihIZweWQOtRQ87JrSQD2tt5LhfCaDMhw/YgNHOsNcgfetfsTqS7raGfLOQ80f EDDsrDYqSq/aEpBHuITvTM3Zat+M6kbSBvHt+tN2GxbzPmCtA/HxUCCZMgOxSqUOrizy A9Ew== 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=4oLQCPLjN8l2YTID6H0ryGT8g2PPvTf/0QShunooQsw=; fh=ZGUIriixHxc1iGKObIsgEzb0Ckv+dumFOC4kNAscsoI=; b=W3ZH/QZTzQVRtY1LMednKU1+/SwY+DfN6U768pBp+YuoykD6HO0sQigObxdhTw3Qgh XIO/1Ado6p+RsxE9+MYlrCQOL2xaxTEjO8kthq/jILTiVUvs9cVYIIeMtzyutKpd+BEn zMItnZhP13SzgpEkpumWigRij6YWqjuWYo3dBxWnWC0Eb0oo4zttT0YAy7ZpmAsm4eOZ 4aa9ZzrJeCMEc+GjDcEttNZ6Mse1xYkmlqF8DGXf4sGca3gfpfFjg/y2q2hjSIXi2iay m7fFeq+uNJgkhP40kgvFK5MCjTlf5kViSfTFYq0fTyt2KdqvoExKTkEUnmMnWeBrCve8 ffWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=zuFEIjlO; 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=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a170902a51200b001b8a2a800dasi888791plq.131.2023.07.03.15.12.08; Mon, 03 Jul 2023 15:12:21 -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=@crapouillou.net header.s=mail header.b=zuFEIjlO; 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=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231267AbjGCVrm (ORCPT + 99 others); Mon, 3 Jul 2023 17:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbjGCVrk (ORCPT ); Mon, 3 Jul 2023 17:47:40 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2428610CB; Mon, 3 Jul 2023 14:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1688420844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4oLQCPLjN8l2YTID6H0ryGT8g2PPvTf/0QShunooQsw=; b=zuFEIjlOtnxkYeTqQUiaRC/fqJuLVJwfE+bRXOBfTf9OUPSyrvsjIHB9wVh7TrYrgdu3j4 JlsBd7qukg5cl5unEybkMpTXIK9th0e6VmcSeDbQFfmtS6Nz/Z17b5ACWufyCLDl6k/1se ie6uqAoSeR+sgWPIYTKK2w9cdyquDEU= From: Paul Cercueil To: Krzysztof Kozlowski , Rob Herring , Conor Dooley , Alim Akhtar , Neil Armstrong , Sam Ravnborg Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Paul Cercueil Subject: [PATCH 1/3] drm/panel: ld9040: Use better magic values Date: Mon, 3 Jul 2023 23:47:13 +0200 Message-Id: <20230703214715.623447-2-paul@crapouillou.net> In-Reply-To: <20230703214715.623447-1-paul@crapouillou.net> References: <20230703214715.623447-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes 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_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org I have no idea what the prior magic values mean, and I have no idea what my replacement (extracted from [1]) magic values mean. What I do know, is that these new values result in a much better picture, where the blacks are really black (as you would expect on an AMOLED display) instead of grey-ish. [1] https://github.com/dorimanx/Dorimanx-SG2-I9100-Kernel/blob/master-jelly-bean/arch/arm/mach-exynos/u1-panel.h Signed-off-by: Paul Cercueil --- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-ld9040.c b/drivers/gpu/drm/panel/panel-samsung-ld9040.c index 01eb211f32f7..7fd9444b42c5 100644 --- a/drivers/gpu/drm/panel/panel-samsung-ld9040.c +++ b/drivers/gpu/drm/panel/panel-samsung-ld9040.c @@ -180,17 +180,18 @@ static void ld9040_init(struct ld9040 *ctx) { ld9040_dcs_write_seq_static(ctx, MCS_USER_SETTING, 0x5a, 0x5a); ld9040_dcs_write_seq_static(ctx, MCS_PANEL_CONDITION, - 0x05, 0x65, 0x96, 0x71, 0x7d, 0x19, 0x3b, 0x0d, - 0x19, 0x7e, 0x0d, 0xe2, 0x00, 0x00, 0x7e, 0x7d, - 0x07, 0x07, 0x20, 0x20, 0x20, 0x02, 0x02); + 0x05, 0x5e, 0x96, 0x6b, 0x7d, 0x0d, 0x3f, 0x00, + 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x05, 0x1f, 0x1f, 0x1f, 0x00, 0x00); ld9040_dcs_write_seq_static(ctx, MCS_DISPCTL, - 0x02, 0x08, 0x08, 0x10, 0x10); + 0x02, 0x06, 0x0a, 0x10, 0x10); ld9040_dcs_write_seq_static(ctx, MCS_MANPWR, 0x04); ld9040_dcs_write_seq_static(ctx, MCS_POWER_CTRL, 0x0a, 0x87, 0x25, 0x6a, 0x44, 0x02, 0x88); - ld9040_dcs_write_seq_static(ctx, MCS_ELVSS_ON, 0x0d, 0x00, 0x16); + ld9040_dcs_write_seq_static(ctx, MCS_ELVSS_ON, 0x0f, 0x00, 0x16); ld9040_dcs_write_seq_static(ctx, MCS_GTCON, 0x09, 0x00, 0x00); ld9040_brightness_set(ctx); + ld9040_dcs_write_seq_static(ctx, MIPI_DCS_EXIT_SLEEP_MODE); ld9040_dcs_write_seq_static(ctx, MIPI_DCS_SET_DISPLAY_ON); } -- 2.40.1