Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp314249pxt; Fri, 6 Aug 2021 02:43:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4iBPM6OQfA/GpDys4NlMAPQHKt67aQUMowJKIOUZKS+tSRwPEQUNd8kG6V8mifHX/VBJo X-Received: by 2002:a6b:fe06:: with SMTP id x6mr753463ioh.38.1628243036988; Fri, 06 Aug 2021 02:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628243036; cv=none; d=google.com; s=arc-20160816; b=goHf18COq1axBNTKbmDx56NMI4NebnOeZ7BYKa/wSgrzaSOfSv7+4FMg7OY1GLGXS7 LYLPMZl/KQGafRv25FJ6/gI/azleYfPpsmMgL7Ng2MCLz9EE+hLGNoIW35bwpoNX7EPU hGfltyMQJzhhGUSRh7mxFgssyzHQX9g5r+ZjkfcVHQX6gSFabDpiDJfoUKBZcZABGPHk iftZmKAHuZ4+WWjJlZgMUlWtsI2rLxDItfmsFHkmBE6ecvic+2L71wBuux7XgBe5J4G6 cEt5eaMvkJtI2rILSgwN9yodNoh4TraVPFKrgBAneHd+CIPBOsykEL1itYeAt8hto7v6 FnuQ== 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=4HPNOHJF+FggNfCJseeN2/kUR7mznmygd2VV7qNoCFg=; b=geY0rIJE6f4Q5lNcPX9gOzkdgfIv3VXtGnnW0EZSUat2Fldyd9p8UWFxQPQt1a2QPr uNU6Pk5w+XTBczXodOD22/Z1A/rhG8mvTZOXfD01QAUeJB9aq8qlzpBVtHowgETQL0UB dsGKCfjR1QOPxU0mbt69RgTbMlmZP9TVtA2+hwtl9uEp+AU0Lr9HnnX8hkdp+kCmqCh4 9MT4Ec040mNJ/P2T9PEznFK2s5fgC2dQUysnvzFLFoeNh7lIR5gTW3WHmpOHG03JJmu7 lcol75+X/IRRWIlKWe3lPMZAFlHtfxMSjx6vgKGd2FlU49MvYIAakkyZhTOhSOUYtvmU temQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SXu8xId+; 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 l41si8880715jac.52.2021.08.06.02.43.43; Fri, 06 Aug 2021 02:43:56 -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=SXu8xId+; 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 S244496AbhHFJmy (ORCPT + 99 others); Fri, 6 Aug 2021 05:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242680AbhHFJmx (ORCPT ); Fri, 6 Aug 2021 05:42:53 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5312C061798 for ; Fri, 6 Aug 2021 02:42:37 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id i10so6358254pla.3 for ; Fri, 06 Aug 2021 02:42:37 -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=4HPNOHJF+FggNfCJseeN2/kUR7mznmygd2VV7qNoCFg=; b=SXu8xId+7S96lozM+9jNDTE8KKNGlgx6uPoKWwz+WwXMvz1d0rTofjoV4SQCFfBnSZ LTuYpkQ0CveluxulWfcAhp7m4fWmgzDpBIdavDKgZxUWtxzkDRb3q8BfjRwEcApD9YHh yJGyg9XNka6qwhtKSbTE7OZ0NRcPB3y6hgI4TbrUCKYm6diWoiNap6rtWPQQ/SmhTcUm BSlATxLy43GGhqInxcGTKxazNRM1Zg//uB/Jj7C4m/JnBpihK0FRyTFLTkq6UjMmbYXo m3jUv43U/G6Dkbjs3xy3kvWsunCj/DdxViD6qYM+wt+FTFCXB+AR2t9X2xTnai+47F9a 0Nrw== 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=4HPNOHJF+FggNfCJseeN2/kUR7mznmygd2VV7qNoCFg=; b=aMbxli9mvvNc+0QmU3AlP3uO1yX+MpUVmoosmAulQbs5A4B/RNsXL9pP4g/67e+Epm 728ZVvpfior782vSa6JKm8odHxZGmIpnWVUyK9+4bunBUZ3lupK0t4Sdahp8DYQqExU/ OpRCSKv/RfiKQSQc+ytCB+cCyzzkev6KTd9MujmXf2CfeAxcrFgzkdb1KFYqrhdjwzmw c3f4Hd95j1THyD3127MYzzn2zgHtfI/Y5k4eAFV2uzFeuqUfM8CcGrJev6/wIj3TArxR FCuCKQdsMegeEs9lyEuir3eoOjwbdwTZnxyF2CVI3tgExtG9brhaYc0I5A3bdnxKQb4E tEvA== X-Gm-Message-State: AOAM533dNXuuuNpe3kXmBalnqnDGW4zZ7BgbjyPxzfS9GUnWSn/mDpuV gLs5HTI+5Na7ytlURuuN9XYrnE/A998XcFtmnkZwCA== X-Received: by 2002:aa7:90c8:0:b029:32c:935f:de5f with SMTP id k8-20020aa790c80000b029032c935fde5fmr9660331pfk.79.1628242957366; Fri, 06 Aug 2021 02:42:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Foss Date: Fri, 6 Aug 2021 11:42:26 +0200 Message-ID: Subject: Re: [PATCH v2 1/1] drm/bridge: anx7625: Tune K value for IVO panel To: Xin Ji Cc: Nicolas Boichat , Andrzej Hajda , Sam Ravnborg , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Dan Carpenter , David Airlie , Daniel Vetter , Boris Brezillon , Hsin-Yi Wang , Torsten Duwe , Vasily Khoruzhick , Marek Szyprowski , Bernie Liang , Qilin Wen , dri-devel , linux-kernel , devel@driverdev.osuosl.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Xin, Thanks for implementing the suggestion so quickly. Can you send this version of the patch out as v2? Versioning is important and both tools and processes break if different versions aren't submitted in different emails. On Fri, 6 Aug 2021 at 11:35, 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. > > Acked-by: Sam Ravnborg > Signed-off-by: Xin Ji > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 24 ++++++++++++++++++++--- > drivers/gpu/drm/bridge/analogix/anx7625.h | 4 +++- > 2 files changed, 24 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > index a3d82377066b..9b9e3984dd38 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -384,6 +384,25 @@ static int anx7625_odfc_config(struct anx7625_data *ctx, > return ret; > } > > +/* > + * The MIPI source video data exist large variation (e.g. 59Hz ~ 61Hz), > + * anx7625 defined K ratio for matching MIPI input video clock and > + * DP output video clock. Increase K value can match bigger video data > + * variation. IVO panel has small variation than DP CTS spec, need > + * decrease the K value. > + */ > +static int anx7625_set_k_value(struct anx7625_data *ctx) > +{ > + 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 +489,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); > + > + 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 >