From patchwork Tue Mar 25 01:44:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?St=C3=A9phane_Marchesin?= X-Patchwork-Id: 3885071 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2A6F59F2E8 for ; Tue, 25 Mar 2014 01:44:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4445F2022F for ; Tue, 25 Mar 2014 01:44:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 64D9B201BC for ; Tue, 25 Mar 2014 01:44:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 784F76E00D; Mon, 24 Mar 2014 18:44:21 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 9BE656E00D for ; Mon, 24 Mar 2014 18:44:20 -0700 (PDT) Received: by mail-pd0-f176.google.com with SMTP id r10so6074814pdi.21 for ; Mon, 24 Mar 2014 18:44:20 -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:mime-version:content-type :content-transfer-encoding; bh=T5PEqzsHK3ZCFeDNqUGwsHT93UUZZbXLJ7OZ+bs8/dQ=; b=nXsHYYHZkXO9mz9dSz6FT+mKIYixDlqKlvDs0H6ioYKAUts7M4TY0QhxphkX3paqph FVEcKGF8zEeVI4V9m8HpttKDWW1R4y2Ug0cDkSAovP5erGFsybE5P4/7uiFNzhB2d/RH apE+/NL/J7WSstLE8Shir4BGTHjTWGOEOMmSc= 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:mime-version :content-type:content-transfer-encoding; bh=T5PEqzsHK3ZCFeDNqUGwsHT93UUZZbXLJ7OZ+bs8/dQ=; b=MRlk1iTFIDPRv2d6BsdKCwyNBht2FwMSjCBEniiH9NBsuzRGU7jwc9ZOHPWIRtU4UO g+or8AuAeAP5MI2nHDF9SLqf3Ds+hQqK6DM71Gq4s7wH+07VCZLDTM0sX5FIAjdqY/yE riwUxUExT92gOOeFEXs1n5mhyf1uCt7mJAOePllPagCGsLeN+/2DL+GG9kO7ReTTg/il 5to4Z7ObiOlR3mcBST21g+pcRy5FSYGnhtqNsAU9b2wLQmzYnSNkvZOy8IgKMYkIcDQW +G3zGnUYjuLMT+BXUTUeph05i37uA9xzmrLbvIL40rQfjs8Jsy4OxOrWz16cFsnjCd2g ow9Q== X-Gm-Message-State: ALoCoQnC83E0pCnhsdtsHrY8rhb3SR88l+2JCh820v0bPwDFg3vGW68Bk/BaU6HwM1eBVSxcvj2g X-Received: by 10.66.11.66 with SMTP id o2mr7391594pab.142.1395711860154; Mon, 24 Mar 2014 18:44:20 -0700 (PDT) Received: from localhost ([2620:0:1000:1b01:82c1:6eff:fef8:b068]) by mx.google.com with ESMTPSA id sy2sm37304207pbc.28.2014.03.24.18.44.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 24 Mar 2014 18:44:18 -0700 (PDT) From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= To: intel-gfx@lists.freedesktop.org Date: Mon, 24 Mar 2014 18:44:15 -0700 Message-Id: <1395711855-27904-1-git-send-email-marcheu@chromium.org> X-Mailer: git-send-email 1.9.1.423.g4596e3a MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: Use the DVI clock limit in DVI mode X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 When using HDMI, the 300MHz clock is legal, but when in DVI mode it's definitely not. This causes issues when we send a 300MHz signal over a DVI cable which is specced for 165MHz only. So when in DVI mode let's limit the clock to 165MHz. Signed-off-by: Stéphane Marchesin --- drivers/gpu/drm/i915/intel_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index dd4fa35..0ac69f1 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -806,6 +806,10 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi) { struct drm_device *dev = intel_hdmi_to_dev(hdmi); + /* If we are in DVI mode, the limit is 165MHz */ + if (!hdmi->has_hdmi_sink) + return 165000; + if (IS_G4X(dev)) return 165000; else if (IS_HASWELL(dev))