Received: by 10.192.165.156 with SMTP id m28csp23504imm; Tue, 10 Apr 2018 15:35:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx49k0sIihCkRTZJ6JEXIkhG62lLepUJgiFR0ExAxIt5DASLNxnWeZ0F0EkzQY9pF3mfEP2z6 X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr2335151plo.72.1523399729839; Tue, 10 Apr 2018 15:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523399729; cv=none; d=google.com; s=arc-20160816; b=VtCoZwemJJpm/olvXLCBXG4VZV0HlGw0Y1ohQsvmhGVfe/5GE6m1HjnrbMNm6WbIF+ G6VW72IXsfO3XhXTdm+tPnD9WNkgtEzQpjtaYqAw/DxDxLVzQRoyS+atNd8F3Rq9Si6d IpfXzYa/DAgxUEP0oFC1anRDYNyiyIuSPA2BrOMa4DixvFjMtZYusGz0w+C7Iouofr+Q dqg9M+m7VgxZDYE6XbX9eRULw/sZa5qd15IWDPlmoR0711D2HjGzdDQivQyGJt6U9uLC 9g7+/u7v6eIW5F8hHnIo+sru47zQ2z0NUVEL8jfTPFLGrwQvbhBXndITNafErcdx7l6s wzSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TW1nQiZEKCZq7SxWZEhCudeAlaOTe2mxUcVIiat/NhE=; b=G3cgonYxswYVWNPWWT9f8z8cF2aVXflWIfpJyJsvV7qmvkNAluvEvZBGRYIsAXtOxl K3apVf1tqENDSFtGAJmPezkNnNFzJajg0pqmIpoYam3PGoxiB1lCga9b98PMmYT4DXdb 9wLAlQsspkfDn4jluOh8V+rWdTWdQ323jFI/e06DS0yWFI2H07GZIXueMHoI1UK/R9w0 fNivK5M92AwYMIgvs41VDKNZUuvd9cEVY4IZR0wEk0fnTgM3OcDpCJgNEwu1AgWNMhYG F5VaeJmxaixDvMJbNZvL547hayW9TPqfldDbNxNCQ9RIgiYKbVCgIv9IbUgyKMMFwy3c Iqjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33-v6si3501068plb.478.2018.04.10.15.34.53; Tue, 10 Apr 2018 15:35:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754660AbeDJWao (ORCPT + 99 others); Tue, 10 Apr 2018 18:30:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40066 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785AbeDJWah (ORCPT ); Tue, 10 Apr 2018 18:30:37 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DFB83DE7; Tue, 10 Apr 2018 22:30:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai Heng Feng , Rodrigo Vivi , Radhakrishna Sripada Subject: [PATCH 4.15 107/168] drm/i915/cnp: Ignore VBT request for know invalid DDC pin. Date: Wed, 11 Apr 2018 00:24:09 +0200 Message-Id: <20180410212804.801933664@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rodrigo Vivi commit f24c606c21a8cb6f75adc20edcd80b6d851991bf upstream. Let's ignore VBT request if the pin is clearly wrong. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139 Cc: Kai Heng Feng Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180123174050.4261-1-rodrigo.vivi@intel.com Reviewed-by: Radhakrishna Sripada (cherry picked from commit a8e6f3888b05c1e7b685800a3371ce050720368f) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -1115,9 +1115,14 @@ static const u8 cnp_ddc_pin_map[] = { static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin) { - if (HAS_PCH_CNP(dev_priv) && - vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) - return cnp_ddc_pin_map[vbt_pin]; + if (HAS_PCH_CNP(dev_priv)) { + if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) + return cnp_ddc_pin_map[vbt_pin]; + if (vbt_pin > GMBUS_PIN_4_CNP) { + DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin); + return 0; + } + } return vbt_pin; }