From patchwork Wed Dec 10 23:53:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5473371 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C1AEABEEA8 for ; Wed, 10 Dec 2014 23:54:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 097462018E for ; Wed, 10 Dec 2014 23:54:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 31947201C7 for ; Wed, 10 Dec 2014 23:54:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A7B1D6E71D; Wed, 10 Dec 2014 15:54:18 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 83B796E71D for ; Wed, 10 Dec 2014 15:54:17 -0800 (PST) Received: by mail-pa0-f47.google.com with SMTP id kq14so3814059pab.20 for ; Wed, 10 Dec 2014 15:54:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lIYDDS2DU+3jHwxJ/mdUTMfD1t7Rb3xQZhWz8r8raZs=; b=maLBVj32VUk7vUFd4iFcIG8dAjD5Mz4BtneCYQCkztbNkYvkz3AX1rVd7nigreEn+f JjMRxsbZmmAJ9TnwIi9x9t443/kh379402CQUNX7WbsOC13aqLA6B09WuPt6O8SGSuXD NbHmDK5QaWDv9D/qqtIZe5xVPxWU7dzwPj3Omn+Txv+x5la1RWxA9sOccLsg3fQnLYRQ XQN9t5jCJDen2EozqXQKLhAes+Pxu5BOh9kWSLu6/CDuQukeBUgHNFtQQ8gO9sXwe3Nk abGtRQrm7HMjWdf65pzXftctY9ENRuWfJtaypfxbMkG/ix5GbHbJOgVqb0WwzXAC6GhD LT6Q== X-Received: by 10.66.163.196 with SMTP id yk4mr11312191pab.57.1418255657423; Wed, 10 Dec 2014 15:54:17 -0800 (PST) Received: from localhost.localdomain (ip68-3-234-27.ph.ph.cox.net. [68.3.234.27]) by mx.google.com with ESMTPSA id gy10sm5164958pbd.67.2014.12.10.15.54.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Dec 2014 15:54:16 -0800 (PST) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Wed, 10 Dec 2014 16:53:12 -0700 Message-Id: <1418255597-4716-13-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418255597-4716-1-git-send-email-tprevite@gmail.com> References: <1418255597-4716-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 12/17] drm/i915: Update intel_dp_compute_config() to handle compliance test requests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Adds provisions in intel_dp_compute_config() to accommodate compliance testing. Mostly this invovles circumventing the automatic link configuration parameters and allowing the compliance code to set those parameters as required by the tests. Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/intel_dp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 2a13124..4a55ca6 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1189,6 +1189,21 @@ intel_dp_compute_config(struct intel_encoder *encoder, pipe_config->has_drrs = false; pipe_config->has_audio = intel_dp->has_audio; + /* Compliance testing should skip most of this function */ + if (!is_edp(intel_dp) && intel_dp->compliance_testing_active) { + bpp = intel_dp->compliance_config.bits_per_pixel; + lane_count = intel_dp->compliance_config.lane_count; + clock = intel_dp->compliance_config.link_rate >> 3; + /* Assign here and skip at the end - ensures correct values */ + intel_dp->link_bw = bws[clock]; + intel_dp->lane_count = lane_count; + pipe_config->pipe_bpp = bpp; + pipe_config->port_clock = + drm_dp_bw_code_to_link_rate(intel_dp->link_bw); + + goto compliance_exit; + } + if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) { intel_fixed_panel_mode(intel_connector->panel.fixed_mode, adjusted_mode); @@ -1275,6 +1290,7 @@ found: DRM_DEBUG_KMS("DP link bw required %i available %i\n", mode_rate, link_avail); +compliance_exit: intel_link_compute_m_n(bpp, lane_count, adjusted_mode->crtc_clock, pipe_config->port_clock,