Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6171441rwr; Mon, 1 May 2023 18:10:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xcL0MBFuzqGsF5F1N7gjR568qHicWlzPBho8jjIMfw0z8v5Qrmrs6yswQgsgtA1eWs7eY X-Received: by 2002:a05:6a00:1301:b0:63d:27a1:d578 with SMTP id j1-20020a056a00130100b0063d27a1d578mr20307551pfu.20.1682989808580; Mon, 01 May 2023 18:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682989808; cv=none; d=google.com; s=arc-20160816; b=ylxrVTanoLP6aL5UiMz7NYoEu1udtL1R1VihGRWymXevUCEoo0ua9CzpWqLtO76bpX f5RAZ9hrim2WHVMk2NwvwOYeDbA8m4NVOEUmoI879lAfMoNT2uC6zU4z44g4VTUDxZX5 akzzwJ4ECrcRBzlQl9l25ivYrCCOHMJ2/WP4zQJSyG2AWPQvac8q34vwKfFrn7yCydtl M+7Q8h7Y9q5S1Ooti8ptURxxH+wxd+KnHh2zC3H5gJMRWaGjXjBXM9OBhr13phxvqeB4 sl6n0UrQ7U/vL+Nb1aIlfKpUIZYb2D8v08AoKZdt3570j+R4oenC4su3o6A2Uof/YYeF t3pw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=JWHDFN7Ujs5msRXNgIZk9qHJ9Glg+BaYPkvMRLxbY7E=; b=pJqom+4IDMA3BoCUZsEAQqVY99/BXGzP3fgV4SwNa1En6yMToWGRicRjBQwqlysDtP gUpMUPeYtC0lUL89bmFIW1zQh6aQFjK35vHEA9CaaGtSo3ul7wyWiGtxF9bgSy0azwpO YFA3FzW6E2XXGtCdsYjtwxCpAO7eLNFAxzL3fPmGq2HwhPL7+4QAC7lft3ymqGAwBK8y d9hmsmmNvQn/SzA7mh4BTIn3X9PD6jdv8551sAsz/p8PNC7f/nN2oyRLuGQt7KDPaggV ICoBrSjypOBT6JzoqUISWyYaJ8030lpr0y5K2ZWkQlU1t6prvFuz6In0/f7iVw9UeBQo RILg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lh0V+FG7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l25-20020a656819000000b005285e30a362si18778158pgt.593.2023.05.01.18.09.56; Mon, 01 May 2023 18:10:08 -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=@gmail.com header.s=20221208 header.b=lh0V+FG7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233308AbjEBBIO (ORCPT + 99 others); Mon, 1 May 2023 21:08:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233302AbjEBBIM (ORCPT ); Mon, 1 May 2023 21:08:12 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB013C30 for ; Mon, 1 May 2023 18:08:08 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-760f5070ccfso248396639f.2 for ; Mon, 01 May 2023 18:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682989687; x=1685581687; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JWHDFN7Ujs5msRXNgIZk9qHJ9Glg+BaYPkvMRLxbY7E=; b=lh0V+FG7uHRTs6DVgOJWfpgNz/OJGm/zRrYCEM8miEzWzfgNut+GnLjU/CESuAdZmv DU7zQO6fXNlyiiwRVkp7aq6cuKyUMx7m4VvwDkpiEs/wC7AhV6Bu7Isu1axKZSbeIPw3 YEzZNuXxQyxj2Wkemem/+CB9Bxle3AGEBIFwwf+6X+0M3DiOxhp9Q2Ue+69dFgkB2rJC DhQ0hZAhxs12e6NoRCULOrrpAJfr0GSRzPcWWZBnSGNK7kePayZQ3vy9tHQ+FACj7Vzg tFHKTn5RKMHBvnSzleg7bWFO13DQ2sYTV9LPx8o4UpCCiUzJASoTOBCwxfSHKp69TD2b nJJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682989687; x=1685581687; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JWHDFN7Ujs5msRXNgIZk9qHJ9Glg+BaYPkvMRLxbY7E=; b=FkKmdaS8d2raZkTGJYpJEfFed4lAoR+4ygyOVoJbnPrOV9Kb8iTwbB2wUYtqYA6rrx hn/tEYKfLY9NJRfstAA4ED6LVZOHnSquLyyeGscrzGEJsR5y2ocMcU2IYixHnxwuW1ZW 9IgszuudrOP0dFDA4kp89sv7KoZWC28uyZS0nNOZ/DhyDR9r481SLly8NEIahr2WX/2U hx/PIUofhIhCD32m+/BWBsUV5rY3egEIIipJI9E852hL/3dSMkLfzpvh3/6eHFe3DRwb LXvfOXyU+gFBGgQi8PBN8sMavjCPYlKQAcig80GfnPhAS1o9w6gf4MX+a9S/UZ6+Dajg ZxOw== X-Gm-Message-State: AC+VfDwZzhesvGRVSGhzBlH1vBPEeLyF1V92nCoJ3rid943EQM4y0Trr R1wGS/7Jvry473/YAzfmvCK/k8O/4rU= X-Received: by 2002:a6b:5c0a:0:b0:760:ec21:a8af with SMTP id z10-20020a6b5c0a000000b00760ec21a8afmr12811865ioh.0.1682989687374; Mon, 01 May 2023 18:08:07 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:8257:a536:d7fc:1919]) by smtp.gmail.com with ESMTPSA id f16-20020a056638329000b0040fb5d5429fsm4836329jav.131.2023.05.01.18.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 18:08:06 -0700 (PDT) From: Adam Ford To: dri-devel@lists.freedesktop.org Cc: marex@denx.de, aford@beaconembedded.com, Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Inki Dae , Jagan Teki , Marek Szyprowski , linux-kernel@vger.kernel.org Subject: [PATCH V3 0/7] drm: bridge: samsung-dsim: Support variable clocking Date: Mon, 1 May 2023 20:07:52 -0500 Message-Id: <20230502010759.17282-1-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes the blanking pack size and the PMS calculation. It then adds support to allows the DSIM to dynamically DPHY clocks, and support non-burst mode while allowing the removal of the hard-coded clock values for the PLL for imx8m mini/nano/plus, and it allows the removal of the burst-clock device tree entry when burst-mode isn't supported by connected devices like an HDMI brige. In that event, the HS clock is set to the value requested by the bridge chip. This has been tested on both an i.MX8M Nano and i.MX8M Plus, and should work on i.MX8M Mini as well. Adam Ford (6): drm: bridge: samsung-dsim: Fix PMS Calculator on imx8m[mnp] drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY drm: bridge: samsung-dsim: Dynamically configure DPHY timing drm: bridge: samsung-dsim: Support non-burst mode drm: bridge: samsung-dsim: Let blanking calcuation work in non-burst mode Lucas Stach (1): drm: bridge: samsung-dsim: fix blanking packet size calculation drivers/gpu/drm/bridge/Kconfig | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 150 ++++++++++++++++++++++---- include/drm/bridge/samsung-dsim.h | 5 + 3 files changed, 136 insertions(+), 20 deletions(-) --- V3: When checking if the bust-clock is present, only check for it in the device tree, and don't check the presence of the MIPI_DSI_MODE_VIDEO_BURST flag as it breaks an existing Exynos board. Add a new patch to the series to select GENERIC_PHY_MIPI_DPHY in Kconfig otherwise the build breaks on the 32-bit Exynos. Change vco_min variable name to min_freq Added tested-by from Chen-Yu Tsai V2: Instead of using my packet blanking calculation, this integrates on from Lucas Stach which gets modified later in the series to cache the value of the HS-clock instead of having to do the calucations again. Instead of completely eliminating the PLL clock frequency from the device tree, this makes it optional to avoid breaking some Samsung devices. When the samsung,pll-clock-frequency is not found, it reads the value of the clock named "sclk_mipi" This also maintains backwords compatibility with older device trees. This also changes the DPHY calcuation from a Look-up table, a reverse engineered algorithm which uses phy_mipi_dphy_get_default_config to determine the standard nominal values and calculates the cycles necessary to update the DPHY timings accordingly. -- 2.39.2