Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp937816pxb; Tue, 9 Feb 2021 17:19:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSePB7ixblictZAlh4182vb0KVzrOZUkBbP1L8CI6VEG8b1FvpIL6fwwUwGqTe9Im/IjpX X-Received: by 2002:a17:906:2299:: with SMTP id p25mr450628eja.279.1612919942998; Tue, 09 Feb 2021 17:19:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612919942; cv=none; d=google.com; s=arc-20160816; b=ZxSN5dNE/8Os5/YdwhDMLXHpUbCxsBhsoYCg440MM1n9mRaFdr2T1ydP4imm6VbhNq G1FL1FKJ1W6xco1tOG+jl53woqrxMbjeAuC/cRzgQSNT/8XSvU6G/A/8gNeo5mOSBZAs Gklbm/K3k0qIrPBdD98OLoieMkhUusGYLZd74xc11S0gfDv9Y5YLLvLI42jU3iRwwz5L bjFeVtMxgPMSwgvjFcFYtYozyRAgYH68NF1aOWq+0ncAUJbSEgRvBB6wWm1OrDBV+fBb Eh8tHg1NiucMwqnhdTvwfTzEv9EmhZFsPsuYgEBvmdVbUzr3fybe/j0eJxX8negDBd3b JCAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r4vHKyxaJAT0/1wV081PetDr4hjwJkdG0DrTm5Hc4Eo=; b=SzpJJlRrtC0ZUZUBtfi7dc1Jv7rXFWoY+oYVMay30lnXeAC73mM3oO/GxmrfbT6tRG Zv2tXe5peZrD4steK6KhCIDVxEXbHFubXNQAXL+gR3337lENQAC9ajwCLx79j4V3/Xn9 sLm+/lyKODpX7Qypug0nYMNm0tccik2MVaeTfJ9gZOO3mCVuaNWMZtG0TRi7CLWlZWxx 5yCIR8yjARON7Cw7X2kC8qIE24ceGXOIckZveNmYwmehd8vxo3ul+c7YqzEVefN6bcEQ vFNDHYmQXpeaHRu6tOVDf/DiuUQpTd3EGCWE3CgciAu+GD6Cacf/ajVQIPVdoM/RutC2 5sPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EZsEajXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si377452edj.331.2021.02.09.17.18.40; Tue, 09 Feb 2021 17:19:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EZsEajXU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235003AbhBJBRx (ORCPT + 99 others); Tue, 9 Feb 2021 20:17:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46194 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234272AbhBIWUN (ORCPT ); Tue, 9 Feb 2021 17:20:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612909112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r4vHKyxaJAT0/1wV081PetDr4hjwJkdG0DrTm5Hc4Eo=; b=EZsEajXU3HtCUZrpfsyLyVznvTUm84Ub2Z/njOFBy408B00AVuExG5s4GrrCfXRxm+/FpN T3ojDVMGH3PxKnbB7dZcTLNw+8t1h77luVwb/zvx9pAzaH+Vx0wzkgjY3dXUIbG12sZL/c ZgW8JZrts9QqumEl6ArjUiVXlFsE5Gg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-480-ShacVntjP_idw7_mlFjzNA-1; Tue, 09 Feb 2021 16:29:13 -0500 X-MC-Unique: ShacVntjP_idw7_mlFjzNA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC191835E28; Tue, 9 Feb 2021 21:29:10 +0000 (UTC) Received: from Whitewolf.redhat.com (ovpn-113-53.rdu2.redhat.com [10.10.113.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CDAB19C78; Tue, 9 Feb 2021 21:29:08 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org Cc: Matt Roper , Jani Nikula , Ville Syrjala , Tejas Upadhyay , Yijun Shen , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Manasi Navare , =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= , Chris Wilson , Dave Airlie , Pankaj Bharadiya , Maarten Lankhorst , Karthik B S , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v5 4/4] drm/i915/gen9_bc: Add W/A for missing STRAP config on TGP PCH + CML combos Date: Tue, 9 Feb 2021 16:28:31 -0500 Message-Id: <20210209212832.1401815-5-lyude@redhat.com> In-Reply-To: <20210209212832.1401815-1-lyude@redhat.com> References: <20210209212832.1401815-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Apparently the new gen9_bc platforms that Intel has introduced don't provide us with a STRAP config register to read from for initializing DDI B, C, and D detection. So, workaround this by hard-coding our strap config in intel_setup_outputs(). Changes since v4: * Split this into it's own commit Cc: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul --- drivers/gpu/drm/i915/display/intel_display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index beed08c00b6c..4dee37f8659d 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -11943,7 +11943,14 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) /* DDI B, C, D, and F detection is indicated by the SFUSE_STRAP * register */ - found = intel_de_read(dev_priv, SFUSE_STRAP); + if (HAS_PCH_TGP(dev_priv)) { + /* W/A due to lack of STRAP config on TGP PCH*/ + found = (SFUSE_STRAP_DDIB_DETECTED | + SFUSE_STRAP_DDIC_DETECTED | + SFUSE_STRAP_DDID_DETECTED); + } else { + found = intel_de_read(dev_priv, SFUSE_STRAP); + } if (found & SFUSE_STRAP_DDIB_DETECTED) intel_ddi_init(dev_priv, PORT_B); -- 2.29.2