From patchwork Tue Nov 7 16:56:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Gusakov X-Patchwork-Id: 10047019 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 BE6306032D for ; Tue, 7 Nov 2017 16:57:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE5A5291BC for ; Tue, 7 Nov 2017 16:57:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2E612A2BD; Tue, 7 Nov 2017 16:57:01 +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 64660291BC for ; Tue, 7 Nov 2017 16:57:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 48A8A6E590; Tue, 7 Nov 2017 16:57:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 42D196E58B for ; Tue, 7 Nov 2017 16:56:58 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id a16so15314602lfk.0 for ; Tue, 07 Nov 2017 08:56:57 -0800 (PST) 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=BPd0G/1SGHcj5WNUxaa6uWhGM1k3tjLR4rkEjG0fON8=; b=1Sat641nXOiH47ucTgfH65q51O7kJ+F0Noo67r21IQG8yr4/PfGog/UBKYPBcDBzTh EdDuOP5TYuSjYzmxWuVs3PyU7++TyC7fNXdghnozgbcHih1nNPOqFRLg08tLwjIaZ7OJ fkbMttyS3cyKywgQ2S/jtR98GrF0JhgCiCjjVxQAsEwsJoTd6obJ2dEj2aQ5hm/N+8Il aAEg3VZ+Kaa8x4LsSVRLR2DGFviKWtVvkxia9HuxSh/I0cpsKOAyQvZLdki8MMc/9gLM EMPHnEzUdEQE2J93SSb98ttYWQVFE/SbGlWsPHBLuR+P4BkLq54d3tEiR4ElFBy0IrEi sTmQ== 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=BPd0G/1SGHcj5WNUxaa6uWhGM1k3tjLR4rkEjG0fON8=; b=a+xcmPGe4RJJTqWqfM00Sc07ocLod7cks0kEjUk8CKv/GcmA8l+/gg7pTsdZr94iVn IF4cLb2eZ5YZmp64kHS7ZfJYTjDqqyz7Oa/GLcQblMPE2v0Es/E0YJ8ewSXbQSWvCWlU 6mUhZgjZkYJJbsIrP7OwvNOn5Ca8mdId7e9q7Cb6Wz7VfXzYh7rRVO/oKmZSeRwEwhGy SUWfHaoeGnkU18H/uRwS5Uogkv9F7OHvOJm8d2EkTrkqFwqTB887/EI50BKPMCZDjTeS mU0ivPuSbc1L/XtUXLhoJuZTliKaxNtb86EDO9ZG5EX4Z/5Yu6BO7TIFRqwSamfbCfwc 2DGw== X-Gm-Message-State: AMCzsaUkGbX5qnULoqA8AW5ijNsYSg64ajV+7McTyKg+FHB7VrFdrQyv k11t+LXSxbKqtr41S9IkOWoNWsMu6vI= X-Google-Smtp-Source: ABhQp+S3FqRDMOiAXB2HCyno5BGGHzDt/iuNGdJQI20U/Cg0elsoDYVRjEEAzSQ9Be7a7qn+ZRIC2Q== X-Received: by 10.46.48.6 with SMTP id w6mr8704017ljw.16.1510073816284; Tue, 07 Nov 2017 08:56:56 -0800 (PST) Received: from localhost.localdomain (178-16-155-142.obit.ru. [178.16.155.142]) by smtp.gmail.com with ESMTPSA id r90sm330202ljb.64.2017.11.07.08.56.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 08:56:55 -0800 (PST) From: Andrey Gusakov To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 2/7] drm/bridge: tc358767: filter out too high modes Date: Tue, 7 Nov 2017 19:56:20 +0300 Message-Id: <1510073785-16108-3-git-send-email-andrey.gusakov@cogentembedded.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1510073785-16108-1-git-send-email-andrey.gusakov@cogentembedded.com> References: <1510073785-16108-1-git-send-email-andrey.gusakov@cogentembedded.com> Cc: andrey.gusakov@cogentembedded.com, 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 Pixel clock limitation for DPI is 154 MHz. Do not accept modes with higher pixel clock rate. Reviewed-by: Andrzej Hajda 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 d52cd41..948a486 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 */ + /* DPI interface clock limitation: upto 154 MHz */ + if (mode->clock > 154000) + return MODE_CLOCK_HIGH; + return MODE_OK; }