From patchwork Thu Jul 27 12:47:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Gusakov X-Patchwork-Id: 9866731 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 2188460382 for ; Thu, 27 Jul 2017 12:46:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 141BB28815 for ; Thu, 27 Jul 2017 12:46:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08D9C28817; Thu, 27 Jul 2017 12:46:35 +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 B7E0828820 for ; Thu, 27 Jul 2017 12:46:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0862E6ECD5; Thu, 27 Jul 2017 12:46:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x22c.google.com (mail-lf0-x22c.google.com [IPv6:2a00:1450:4010:c07::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id CAA956ECD5 for ; Thu, 27 Jul 2017 12:46:13 +0000 (UTC) Received: by mail-lf0-x22c.google.com with SMTP id g25so75908863lfh.1 for ; Thu, 27 Jul 2017 05:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZSQArH4B9nPeC79TDiWIBJ2UEaIu3ifQCxNth18lYJE=; b=ga+F0iH3hDQIfuntU86BcERgZ8KkXKIIKYX1drl8nxuB5expMlaBrNWp4T/3vYT8vK h+lh/Cvth0tvSHTXRuKQ6BiMS8aAFEXV4av4rMrNWyqhDGZLDczc0tl+cja3yzfzZ/jH MsMit38/vCpWThZWFgVXdCMhNieQKS6D1CMT8MKciaQnHHqs3/VMKzHD7Cw2jzK8ieUa NhsE8gEWvMITAg/OIjNSdwY+qINWMzq3IVPqGixoX8D2EYJXT9CMEGj7XkzyM7NVf97U 05Timl+XT0RKz6F7+XEtCxAh/x4ZWUImyorvw1ymub30PaGZY+s8xV3qhA1/MbRGnZhz mjqQ== 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; bh=ZSQArH4B9nPeC79TDiWIBJ2UEaIu3ifQCxNth18lYJE=; b=GAReKCwUYAlsO0Z08gqny1hOUonMlq0OgV5zpDT8difXML/TZTGMmH3s4ZOQjrHlFL 5Dii2lEhUYxShbMZZRvkbaPmVkdJLfSFvflRy+X4/hqMOlTD1sLnX2XNRHKyLdHxzQQI k5SMlIan3r5Gfqu7HsMlCfEtNtX+zItR+1Oy3UeYAZ+V+t7ovSu/4cAW/f/ftrFjMCaM mDOQnrkJ0shIDSypbJGr5ZZHhh8BmfgX1bgq+MP42QnQMcui+H85Ktq9VdVNZUfr06Ow 7s9NMtG/vdkj82c5zIwMBxNZG0G7pdA6gJfPVG7bJinb779uGDF03/qDLFtZZ3Jj6Vbf NwSQ== X-Gm-Message-State: AIVw110j4BXfbdidJdtgp2KabE2m4DMKzUjzbTKACwiaFx9i9xWjzyj2 C4Uhxmv938dokGg42gDsPQ== X-Received: by 10.46.1.3 with SMTP id 3mr1731821ljb.85.1501159572029; Thu, 27 Jul 2017 05:46:12 -0700 (PDT) Received: from localhost.localdomain (178-16-155-142.obit.ru. [178.16.155.142]) by smtp.gmail.com with ESMTPSA id y10sm3889518lja.49.2017.07.27.05.46.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2017 05:46:11 -0700 (PDT) From: Andrey Gusakov To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/6] drm/bridge: tc358767: filter out too high modes Date: Thu, 27 Jul 2017 15:47:32 +0300 Message-Id: <20170727124736.3854-3-andrey.gusakov@cogentembedded.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170727124736.3854-1-andrey.gusakov@cogentembedded.com> References: <20170727124736.3854-1-andrey.gusakov@cogentembedded.com> Cc: Andrey Gusakov , cphealy@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Minimum pixel clock period is 6.5 nS for DPI. Do not accept modes with lower pixel clock period. Signed-off-by: Andrey Gusakov --- drivers/gpu/drm/bridge/tc358767.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index f605bb7d1aa3..e8008e0c2e88 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1103,7 +1103,10 @@ static bool tc_bridge_mode_fixup(struct drm_bridge *bridge, static int tc_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { - /* Accept any mode */ + /* PCLK limitation = 6.5 nS */ + if (mode->clock > 163000) + return MODE_CLOCK_HIGH; + return MODE_OK; }