From patchwork Thu Oct 9 15:38:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5058981 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 A2C88C11AC for ; Thu, 9 Oct 2014 15:39:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1E722013D for ; Thu, 9 Oct 2014 15:39:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 10C3B2017D for ; Thu, 9 Oct 2014 15:39:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8860D6E386; Thu, 9 Oct 2014 08:39:00 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yh0-f51.google.com (mail-yh0-f51.google.com [209.85.213.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 64E726E386 for ; Thu, 9 Oct 2014 08:38:59 -0700 (PDT) Received: by mail-yh0-f51.google.com with SMTP id t59so856852yho.38 for ; Thu, 09 Oct 2014 08:38:59 -0700 (PDT) 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=KXqbZyc+lFejP5TQPfPJQomWloCbVj1bXHgFYYZFf5c=; b=t6PWIUEsvCXE0EBWUt/YY78057jJEZkyuR6/ounlYRllBxpIDloRJmxaiWW40if5sz YwMl1jCPqFGI8WUsu3eUdc9koQ/9ZDTFWYX0zF/vaPgzNZ8k+bIpI6FBwXH+6tx7kfK4 sf/mJjG1j9XtGAYQbqJKFBxehNxAtl5ESuNqhzqPp5jpOYnx67a1ZNQlYT5q8KPBGBnY DyPL+gISVz+3TCsQJh24HiURPTr8DYb1czur9YI76LcIpVqJK0d6Aqzy5XwvglZS1gkq MFV1TsY9stFsAr6MfQKZu1bDtVPd+7lN2hQ6l8CO2GtT7ZRrGk5xJATfZvtYOB6miEou ulhg== X-Received: by 10.68.209.138 with SMTP id mm10mr538933pbc.88.1412869138770; Thu, 09 Oct 2014 08:38:58 -0700 (PDT) Received: from localhost.localdomain (ip72-201-95-47.ph.ph.cox.net. [72.201.95.47]) by mx.google.com with ESMTPSA id y1sm844710pbw.89.2014.10.09.08.38.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Oct 2014 08:38:57 -0700 (PDT) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Thu, 9 Oct 2014 08:38:09 -0700 Message-Id: <1412869090-48010-10-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412869090-48010-1-git-send-email-tprevite@gmail.com> References: <1412869090-48010-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 09/10] drm/i915: Update intel_dp_compute_config() to respond to Displayport compliance test requests appropriately 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: , 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 paramters 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 b7bdb5f..9da948c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1117,6 +1117,21 @@ intel_dp_compute_config(struct intel_encoder *encoder, pipe_config->has_drrs = false; pipe_config->has_audio = intel_dp->has_audio; + /* Compliance testing can skip most of this function */ + if (!is_edp(intel_dp) && intel_dp->compliance_testing_active) { + /* FIXME: Validate these parameters*/ + 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); @@ -1203,6 +1218,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,