Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp53954pxt; Thu, 5 Aug 2021 17:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU8XTzc/jpP2THntHyn/tmNwR9PXB78hPmJ4PgcnBl3oPseH3+xnoivvozgeP7Ej9pnI5N X-Received: by 2002:a05:6402:78f:: with SMTP id d15mr9853805edy.233.1628210711523; Thu, 05 Aug 2021 17:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628210711; cv=none; d=google.com; s=arc-20160816; b=ZuSl4OXX2MS7GSl74Y84UTvLmdTUfb0icpzGrw9BZ8gyUEgqcAs0f7KmyntT/0T2zP m2fQlGwZF9svMQduSOzpJJJ9vn+8pAh8OsdwmTHoQKfiSUIpB3MdTOouSiYJwYN8Qjr+ dTORM6ZZ3MXMYFdiOaBnAo3SyRMgXYvJu++pA1iGUOMx/qqR/p8oSRMBGdLwAJ4mxp8v QsDw0WSzea3YXhuWWTkMlmfjDsGjIa5BHI6ERawfhwhXKb8avcTr3o/tnmlMqMtpD/Yy Aa+393YmW++TK80w8WT87Fyz54yWYsVfp4Fjr6ZddUQ4eNd8tZbt5tc/m/rTlNSnb3FY hXTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2ZFFq7OM5nVkToszzdtX9QSlNl/eY89U4a4AO5gbJ0c=; b=gqni5X8f96hD4PBmqzDtPeMaLU++2S8re5pJCwL6NLrbro59l3y4vnohvjYdUUW3Dl aVlBNtG5w103EzuhRe458nu1t5xs+IFndVuD4QAaJtGDSxWZ3i2BedOp/6OR5To/3oqg nIaAbP44rMQbjVVhdDQcnLp8eqlFPhzPd7BNzMEIrC9oCIh6ZwPXXGTF1ps9WYYsogL5 BkRdpVTjd+F1JbA/AJ8tzR5Dc83ulbJK7G7mJ5FfxXeEd18Xt3HgooR1A2QzBBRyy5V/ 4qRgOGjtBN8sGGWfzt4KrXbXKcRFsE0AhNpUo1Hbx3YS/e5EKo3q9sjY4/RUHSEGS7fE j6Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgxIBWU0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si6627425eds.503.2021.08.05.17.44.48; Thu, 05 Aug 2021 17:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgxIBWU0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239010AbhHETFz (ORCPT + 99 others); Thu, 5 Aug 2021 15:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232116AbhHETFz (ORCPT ); Thu, 5 Aug 2021 15:05:55 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD09C061765 for ; Thu, 5 Aug 2021 12:05:40 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id e2-20020a17090a4a02b029016f3020d867so11880128pjh.3 for ; Thu, 05 Aug 2021 12:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2ZFFq7OM5nVkToszzdtX9QSlNl/eY89U4a4AO5gbJ0c=; b=dgxIBWU0u0EHXfPQrJsNfrQ8leeNYIxMblGPZfdM3Ua7Qj+jQjx5zoz/UaSUmzqj6q tIX67J0aXI+Av+ptQljjWXFQeGYLxwdbj2qhFwEWL90k+N25uxQ1rDEDrKiPb4wqRVe3 rT23r+cBkDJ9g8JijWw84nFgPxCSpV4PQn+iMphpfz4y04ObSCyLuI60Z07KnNlfZ+oj NY/2x7Jo2MqimtJzymKazggA5aIuIkvFjUWcsmy7w2hBG3tGQFpqsSt6Hkknt5XLIM/T +rW8B1o1WfkgB4tUvMQfipkFb2KUbdd/DxggqQFa/z8Ii/CpEAG2KWbvZi0Sw8VZXi/R Bq0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2ZFFq7OM5nVkToszzdtX9QSlNl/eY89U4a4AO5gbJ0c=; b=V4a+KaePAc0jtahUtNHF0Iur+4b1xebk3Xd8eU+kV+WrTcyGtlMQZndD7OpVMUqkxf ujCcgBKV07KoEY+o5/mhRjd73KQ9dWEP+hmcQKfXkHhFAZ1XNN0fGyoZnxHkbsu88+sn 8lvQm8htMqVBM0hG7aWzCt033g/y/7vr1Czmhv/KZdJ/bK4XwBdgY+WsQfyhqaUxxjyY dRKw/JeQYZQbVll4ErYUno2Ehsq+rsYtZVpf3wFgpjaG9klHpTfc9KR6SCyflWlpIlk2 B5vQoF4UbrZ5PCH2uVZAbJOq/IF750iBYkCIeSUOWVnEMaA6C/Rt/PEpG8GNMQXdX0JH 6pGw== X-Gm-Message-State: AOAM532AX5lBIoKg1mzanmxS8QjetBMpg4CevzIhYS0AdDyslJhMF1hz dA7V6WVuZmnxa7sxwt4MJjsJWZyYrrCrxJ3d9VHm8g== X-Received: by 2002:aa7:90c8:0:b029:32c:935f:de5f with SMTP id k8-20020aa790c80000b029032c935fde5fmr6578542pfk.79.1628190340250; Thu, 05 Aug 2021 12:05:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Foss Date: Thu, 5 Aug 2021 21:05:29 +0200 Message-ID: Subject: Re: [PATCH v1 1/1] drm/bridge: anx7625: Tune K value for IVO panel To: Xin Ji Cc: Nicolas Boichat , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Dan Carpenter , David Airlie , Daniel Vetter , Boris Brezillon , Sam Ravnborg , Hsin-Yi Wang , Torsten Duwe , Vasily Khoruzhick , Marek Szyprowski , Bernie Liang , dri-devel , linux-kernel , devel@driverdev.osuosl.org, Qilin Wen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Xin, Thanks for submitting this. On Thu, 5 Aug 2021 at 09:31, Xin Ji wrote: > > IVO panel require less input video clock variation than video clock > variation in DP CTS spec. > > This patch decreases the K value of ANX7625 which will shrink eDP Tx > video clock variation to meet IVO panel's requirement. > > Signed-off-by: Xin Ji > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 17 ++++++++++++++--- > drivers/gpu/drm/bridge/analogix/anx7625.h | 4 +++- > 2 files changed, 17 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > index a3d82377066b..ceed1c7f3f28 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -384,6 +384,18 @@ static int anx7625_odfc_config(struct anx7625_data *ctx, > return ret; > } > > +static int anx7625_set_k_value(struct anx7625_data *ctx) Pardon my ignorance, but I don't know what a K-value is. Could you add a comment detailing what the K-value does? > +{ > + struct edid *edid = (struct edid *)ctx->slimport_edid_p.edid_raw_data; > + > + if (edid->mfg_id[0] == IVO_MID0 && edid->mfg_id[1] == IVO_MID1) > + return anx7625_reg_write(ctx, ctx->i2c.rx_p1_client, > + MIPI_DIGITAL_ADJ_1, 0x3B); > + > + return anx7625_reg_write(ctx, ctx->i2c.rx_p1_client, > + MIPI_DIGITAL_ADJ_1, 0x3D); > +} > + > static int anx7625_dsi_video_timing_config(struct anx7625_data *ctx) > { > struct device *dev = &ctx->client->dev; > @@ -470,9 +482,8 @@ static int anx7625_dsi_video_timing_config(struct anx7625_data *ctx) > MIPI_PLL_N_NUM_15_8, (n >> 8) & 0xff); > ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p1_client, MIPI_PLL_N_NUM_7_0, > (n & 0xff)); > - /* Diff */ > - ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p1_client, > - MIPI_DIGITAL_ADJ_1, 0x3D); > + /* Diff and K value */ With a proper comment above, this comment is no longer needed. > + anx7625_set_k_value(ctx); > > ret |= anx7625_odfc_config(ctx, post_divider - 1); > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.h b/drivers/gpu/drm/bridge/analogix/anx7625.h > index 034c3840028f..6dcf64c703f9 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.h > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.h > @@ -210,7 +210,9 @@ > #define MIPI_VIDEO_STABLE_CNT 0x0A > > #define MIPI_LANE_CTRL_10 0x0F > -#define MIPI_DIGITAL_ADJ_1 0x1B > +#define MIPI_DIGITAL_ADJ_1 0x1B > +#define IVO_MID0 0x26 > +#define IVO_MID1 0xCF > > #define MIPI_PLL_M_NUM_23_16 0x1E > #define MIPI_PLL_M_NUM_15_8 0x1F > -- > 2.25.1 > LGTM with the above fix. Reviewed-by: Robert Foss