From patchwork Thu Jun 5 12:55:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Shobhit" X-Patchwork-Id: 4304941 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B64789F387 for ; Thu, 5 Jun 2014 12:55:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF89A2034B for ; Thu, 5 Jun 2014 12:55:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EB34620340 for ; Thu, 5 Jun 2014 12:55:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 512836E946; Thu, 5 Jun 2014 05:55:18 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 135B46E946 for ; Thu, 5 Jun 2014 05:55:17 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 05 Jun 2014 05:55:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,981,1392192000"; d="scan'208";a="550206355" Received: from skumar40-mobl3.gar.corp.intel.com (HELO skumar40-vbox.iind.intel.com) ([10.223.181.46]) by fmsmga002.fm.intel.com with ESMTP; 05 Jun 2014 05:55:15 -0700 From: Shobhit Kumar To: intel-gfx Date: Thu, 5 Jun 2014 18:25:13 +0530 Message-Id: <1401972913-1771-1-git-send-email-shobhit.kumar@intel.com> X-Mailer: git-send-email 1.9.1 Cc: Daniel Vetter , Jesse Barnes Subject: [Intel-gfx] [PATCH] drm/i915: Update bits to check in device class from VBT to detect eDP 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 The DEVICE_TYPE_eDP has been changed to 0x1806 in case of BYT which can causes wrong detection failures for eDP. Reduce the number of bits of interest in DEVICE_TYPE_eDP_BITS to just check most relevant and conclusive ones and ensure they are set in device_class from VBT. This will ensure that eDP detection works across platforms Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_bios.h | 10 +--------- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h index b986677..30d02b7 100644 --- a/drivers/gpu/drm/i915/intel_bios.h +++ b/drivers/gpu/drm/i915/intel_bios.h @@ -710,16 +710,8 @@ int intel_parse_bios(struct drm_device *dev); */ #define DEVICE_TYPE_eDP_BITS \ (DEVICE_TYPE_INTERNAL_CONNECTOR | \ - DEVICE_TYPE_NOT_HDMI_OUTPUT | \ - DEVICE_TYPE_MIPI_OUTPUT | \ - DEVICE_TYPE_COMPOSITE_OUTPUT | \ - DEVICE_TYPE_DUAL_CHANNEL | \ - DEVICE_TYPE_LVDS_SINGALING | \ - DEVICE_TYPE_TMDS_DVI_SIGNALING | \ - DEVICE_TYPE_VIDEO_SIGNALING | \ DEVICE_TYPE_DISPLAYPORT_OUTPUT | \ - DEVICE_TYPE_DIGITAL_OUTPUT | \ - DEVICE_TYPE_ANALOG_OUTPUT) + DEVICE_TYPE_DIGITAL_OUTPUT) /* define the DVO port for HDMI output type */ #define DVO_B 1 diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index dad3780..68f7380 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3842,8 +3842,8 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port) p_child = dev_priv->vbt.child_dev + i; if (p_child->common.dvo_port == port_mapping[port] && - (p_child->common.device_type & DEVICE_TYPE_eDP_BITS) == - (DEVICE_TYPE_eDP & DEVICE_TYPE_eDP_BITS)) + ((p_child->common.device_type & DEVICE_TYPE_eDP_BITS) == + DEVICE_TYPE_eDP_BITS)) return true; } return false;