From patchwork Thu Feb 8 17:48:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10207593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48E2A60247 for ; Thu, 8 Feb 2018 17:49:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38C6029142 for ; Thu, 8 Feb 2018 17:49:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BED32959F; Thu, 8 Feb 2018 17:49:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AD37A29142 for ; Thu, 8 Feb 2018 17:49:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 774F76E64B; Thu, 8 Feb 2018 17:49:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x242.google.com (mail-yw0-x242.google.com [IPv6:2607:f8b0:4002:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC9ED6E64B for ; Thu, 8 Feb 2018 17:49:18 +0000 (UTC) Received: by mail-yw0-x242.google.com with SMTP id t129so3195654ywc.3 for ; Thu, 08 Feb 2018 09:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w9YJsONbQVbU2RUAjql9/vvGGJHe0ryMgqbSGAArZQI=; b=U+mIwG9VzIAQ7rWkfMnX09b77JCzn6ZTBDFGvXHYi9MC36EQrKJFP2Tko2lxw9eolc 0Qx44aI0CR+mDw1UfdVHJOpZoUGpk0zLJktZE/8au3BEAvEfMoeqFlAc/bwttrr/teg2 9XAKDR/pV2X+O+77S27fOHoqXQe2my9Fc6IxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w9YJsONbQVbU2RUAjql9/vvGGJHe0ryMgqbSGAArZQI=; b=JifZ3NStU3IU1OEa37mUgd1EyfXW5mkihFTBSlc3zT8mcGHsMMYVksKaL0p2OTSg8p tInPVwiS54EzaQcdBJvQMViky4GitLzUJULsqHBFvkla+g2+SoGKooOiXtdiyhpPSaey pnswBtfnlnLNmmJo7mLCWVu+u4E25oPfdDr/QPSjRw27TxEkjgZxPzzeYVVH35h57OKw +GzG3QdELahGtMi/YA6rlcg6sr2i9wc0810qrX2ohUHxZxGcMA3zhHJIwhYWQpvAgZw+ tM2gqkYcNXw92z+a+MT3JE/qGCewXab8D12VQCun14+BrHig6rLy3/aeLKiW4/9A1R4l qq3w== X-Gm-Message-State: APf1xPDPiNH/FDGqdpznsKFDXOwIlz6d9Du399ueXrXFHmxAlwQ0WiaO fZNjUrHldsa8joW6qX/sO8dOt73AWgA= X-Google-Smtp-Source: AH8x225zBCHLBAI9tcPrYiYL9DSpVWBImdJ5hI/wAJVB59CrOwnURNkX0NvqWiWZ9EilqgQ1oxvk1Q== X-Received: by 10.37.66.83 with SMTP id p80mr17053yba.28.1518112158041; Thu, 08 Feb 2018 09:49:18 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id t73sm177220ywg.10.2018.02.08.09.49.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 09:49:17 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 4/6] drm/panel: simple: Add ability to override typical timing Date: Thu, 8 Feb 2018 12:48:51 -0500 Message-Id: <20180208174855.55620-5-seanpaul@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180208174855.55620-1-seanpaul@chromium.org> References: <20180208174855.55620-1-seanpaul@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Reding , Jeffy Chen , Doug Anderson , Rob Herring , =?UTF-8?q?St=C3=A9phane=20Marchesin?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the ability to override the typical display timing for a given panel. This is useful for devices which have timing constraints that do not apply across the entire display driver (eg: to avoid crosstalk between panel and digitizer on certain laptops). The rules are as follows: - panel must not specify fixed mode (since the override mode will either be the same as the fixed mode, or we'll be unable to check the bounds of the overried) - panel must specify at least one display_timing range which will be used to ensure the override mode fits within its bounds Changes in v2: - Parse the full display-timings node (using the native-mode) (Rob) Changes in v3: - No longer parse display-timings subnode, use panel-timing (Rob) Cc: Doug Anderson Cc: Eric Anholt Cc: Heiko Stuebner Cc: Jeffy Chen Cc: Rob Herring Cc: Stéphane Marchesin Cc: Thierry Reding Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sean Paul Tested-by: Enric Balletbo i Serra --- drivers/gpu/drm/panel/panel-simple.c | 67 +++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 5591984a392b..87488392bca1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -34,6 +34,7 @@ #include #include