From patchwork Wed Jun 17 23:14:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 6632161 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C3EDAC0433 for ; Thu, 18 Jun 2015 00:32:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1FC9C207A4 for ; Thu, 18 Jun 2015 00:32:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9009D207B9 for ; Thu, 18 Jun 2015 00:32:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF2426E5E9; Wed, 17 Jun 2015 17:32:26 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by gabe.freedesktop.org (Postfix) with ESMTP id BEC696E0DC for ; Wed, 17 Jun 2015 16:14:18 -0700 (PDT) Received: by igboe5 with SMTP id oe5so5401163igb.1 for ; Wed, 17 Jun 2015 16:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=shcAVyGQNzlyWUGmpkvMUWs2U5F9Dl+VaFqfr73oH1E=; b=S2ka7J3r+N4zsBLWbAd/9eoUwR0i/mQcRoqnlAR/2pk/WRup4YU3v3idcyEgNFkWwr d2LTTiZKtA+cZYujJw/+pD+Iwue3b/sH8Hemf05DnR8cE3KF0THI0QMXUNzukEMQKNcD Ol5QfwPvfg792e4j566vs2vEtrPtWXa0YY7R0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=shcAVyGQNzlyWUGmpkvMUWs2U5F9Dl+VaFqfr73oH1E=; b=RbD01eStqX+5hIHT+ZuF+rp7K5G5JOy/10fY2lIHCE3pbu5QK572g5aHfXqpbWfj4m 1LOMjdyBF1DXWCckEBqCYoTOHUqObP8b+ub0vueFaIPANqiTrXutfwTRFw54cmXa6Y1a RUL0/HK5T3zr19N/y0O6IH2lhmH3H/mMSUa4CY2mvzsAp++cmgsoZf9G5Ddy1hYyVKK/ bJeC0OQFmpe/mg5KIjuKqaILpw9zK47LFGVEL9aPUG9D6JrnwkqrPUPN2M1eva6uZ2Th aYv+eysuELv9/NbpAGVlcV9ph5dSpktUfcGx8BSyutfFbOYYuxMzuwJPWgsHuzFSjiJ1 18/Q== X-Gm-Message-State: ALoCoQkX6IluVCVfChAf6AmtmGBMouuM8Kt5zAnoFYFR1X9bEJrv3AbE83Q9MXkAaiZQFu4R3RvI X-Received: by 10.107.168.150 with SMTP id e22mr6269179ioj.9.1434582858437; Wed, 17 Jun 2015 16:14:18 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id o2sm4183136igr.9.2015.06.17.16.14.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Jun 2015 16:14:17 -0700 (PDT) From: Doug Anderson To: Philipp Zabel , Russell King , Thierry Reding Subject: [PATCH] drm: bridge/dw_hdmi: Filter modes > 165MHz for DVI Date: Wed, 17 Jun 2015 16:14:07 -0700 Message-Id: <1434582847-713-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.4.3.573.g4eafbef X-Mailman-Approved-At: Wed, 17 Jun 2015 17:32:24 -0700 Cc: Fabio Estevam , Doug Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yakir Yang , Andy Yan 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-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If you plug in a DVI monitor to your HDMI port, you need to filter out clocks > 165MHz. That's because 165MHz is the maximum clock rate that we can run single-link DVI at. If you want to run high resolutions to DVI, you'd need some type of an active adapter that pretended that it was HDMI, interpreted the signal, and produced a new dual link DVI signal at a lower clock rate. Signed-off-by: Doug Anderson --- Note: this patch was tested against a 3.14 kernel with backports. It was only compile tested against linuxnext, but the code is sufficiently similar that I'm convinced it will work there. drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 816d104..48b8532 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1421,8 +1421,12 @@ dw_hdmi_connector_mode_valid(struct drm_connector *connector, { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); + struct hdmi_vmode *vmode = &hdmi->hdmi_data.video_mode; enum drm_mode_status mode_status = MODE_OK; + if (mode->clock > 165000 && vmode->mdvi) + return MODE_BAD; + if (hdmi->plat_data->mode_valid) mode_status = hdmi->plat_data->mode_valid(connector, mode);