Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1196851ybn; Wed, 2 Oct 2019 12:16:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1jOnX1RTjH1mB+k5TSHVii0Y5P1dNgAyQCa1Tku3E93nrL5wzFCh3xWcOm+JULxRdLNbT X-Received: by 2002:a50:aa8e:: with SMTP id q14mr5613759edc.155.1570043813514; Wed, 02 Oct 2019 12:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043813; cv=none; d=google.com; s=arc-20160816; b=C1RUIRVVz1o/RNCuCHXnnmb2A8SMerwPwc+Dn377CXnoXmaPBCMkPQqJBElXv8APWl ch9gpnmUjC39BNW98DD05cZpcLGNk3gJlMfoorTOMDVby2VA3JrB7iVmBkZB+lf/jHvp KChs00L7z/eJRULIW0qwwCfqW46zaPvBdsrJMaf4+URO3RumzdvM2PaiiMAg5fVmmunw YP4cQ1/weJr4ue72CT46V8nQfKgBLrvicvqIKEOvS60ZtmgaruqUJwLgF1XIeMKWvYuC 1G+fUA9zP7BvZINn92cVJ2LD3lHpxY/rRViDXAX7LeHoZ9+sYFDATuYKjZNrZowEpJjI 3LDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=dyNXpqHHoveZtsPBpFzGeY0gS+vf9KbRCW7CF2ESsYM=; b=RBga7vBfQ4ZAVGCcax5eOTXRkFuDu5oDe4idmEzNVZrwdKe2IkVlXxPrvnz2AR6pa0 Acut1d0ncdPpmPsmhk56TutPgUE/mdp1d2xF0j1dYn3VXZWpFM1ZDSx91p4xP9u6vNCH bhXLsNPTC7tYjdvAhvFVQ8SzuBWjlDPIC3SSWG86lBdBiuxuSot1wNLpt0prAUHmXcx/ czCiQDXKvwyd/4U/f9+TovV9e43lq1DfGH1I3cDdKQiTe+3OqqVVGq7xfGWvE/iyYudx ss/HX5MDVSQ0gQML9F/NR8GzMeGDj3k0zjcVYwRZ2UuWHUzFBGqz1dn55PE03D1Vi5l2 Tl5w== 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 k1si22256ede.255.2019.10.02.12.16.28; Wed, 02 Oct 2019 12:16:53 -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 S1730274AbfJBTOR (ORCPT + 99 others); Wed, 2 Oct 2019 15:14:17 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35232 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728997AbfJBTII (ORCPT ); Wed, 2 Oct 2019 15:08:08 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyn-00035I-De; Wed, 02 Oct 2019 20:08:05 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyn-0003aa-2x; Wed, 02 Oct 2019 20:08:05 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Hans de Goede" , "Patrik Jakobsson" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 10/87] drm/gma500/cdv: Check vbt config bits when detecting lvds panels In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Patrik Jakobsson commit 7c420636860a719049fae9403e2c87804f53bdde upstream. Some machines have an lvds child device in vbt even though a panel is not attached. To make detection more reliable we now also check the lvds config bits available in the vbt. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1665766 Reviewed-by: Hans de Goede Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20190416114607.1072-1-patrik.r.jakobsson@gmail.com Signed-off-by: Ben Hutchings --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 +++ drivers/gpu/drm/gma500/intel_bios.c | 3 +++ drivers/gpu/drm/gma500/psb_drv.h | 1 + 3 files changed, 7 insertions(+) --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c @@ -620,6 +620,9 @@ void cdv_intel_lvds_init(struct drm_devi int pipe; u8 pin; + if (!dev_priv->lvds_enabled_in_vbt) + return; + pin = GMBUS_PORT_PANEL; if (!lvds_is_present_in_vbt(dev, &pin)) { DRM_DEBUG_KMS("LVDS is not present in VBT\n"); --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c @@ -436,6 +436,9 @@ parse_driver_features(struct drm_psb_pri if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP) dev_priv->edp.support = 1; + dev_priv->lvds_enabled_in_vbt = driver->lvds_config != 0; + DRM_DEBUG_KMS("LVDS VBT config bits: 0x%x\n", driver->lvds_config); + /* This bit means to use 96Mhz for DPLL_A or not */ if (driver->primary_lfp_id) dev_priv->dplla_96mhz = true; --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h @@ -533,6 +533,7 @@ struct drm_psb_private { int lvds_ssc_freq; bool is_lvds_on; bool is_mipi_on; + bool lvds_enabled_in_vbt; u32 mipi_ctrl_display; unsigned int core_freq;