From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E1F8C433EF for ; Thu, 16 Sep 2021 10:32:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1596260238 for ; Thu, 16 Sep 2021 10:32:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1596260238 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8247B6EB55; Thu, 16 Sep 2021 10:32:55 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 531576EB55 for ; Thu, 16 Sep 2021 10:32:54 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10108"; a="222190984" X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="222190984" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 03:32:53 -0700 X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="545473609" Received: from djustese-mobl.ger.corp.intel.com (HELO localhost) ([10.249.34.120]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 03:32:51 -0700 From: Jani Nikula To: Lee Shawn C , intel-gfx@lists.freedesktop.org Cc: Lee Shawn C , Vandita Kulkarni , Cooper Chiou , William Tseng In-Reply-To: <20210916102118.17356-1-shawn.c.lee@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20210916102118.17356-1-shawn.c.lee@intel.com> Date: Thu, 16 Sep 2021 13:32:47 +0300 Message-ID: <87h7ekx12o.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [PATCH] drm/i915/dsi: unregister gmbus if LFP display was MIPI panel X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, 16 Sep 2021, Lee Shawn C wrote: > Gmbus driver would setup all Intel i2c GMBuses. But DDC bus > may configured as gpio and reserved for MIPI driver to control > panel power on/off sequence. > > Using i2c tool to communicate to peripherals via i2c interface > reversed for gmbus(DDC). There will be some high/low pulse > appear on DDC SCL and SDA (might be host sent out i2c slave > address). MIPI panel would be impacted due to unexpected signal > then caused abnormal display or shut down issue. Just a quick reply: So I don't know off the bat what the right solution is, but it's very obvious to me that we absolute can't go deleting gmbus adapters from DSI code. BR, Jani. > > Cc: Jani Nikula > Cc: Vandita Kulkarni > Cc: Cooper Chiou > Cc: William Tseng > Signed-off-by: Lee Shawn C > --- > drivers/gpu/drm/i915/display/icl_dsi.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c > index 060bc8fb0d30..d2504e291fcb 100644 > --- a/drivers/gpu/drm/i915/display/icl_dsi.c > +++ b/drivers/gpu/drm/i915/display/icl_dsi.c > @@ -1999,6 +1999,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) > struct intel_connector *intel_connector; > struct drm_connector *connector; > struct drm_display_mode *fixed_mode; > + struct intel_gmbus *bus; > enum port port; > > if (!intel_bios_is_dsi_present(dev_priv, &port)) > @@ -2092,6 +2093,19 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) > icl_dphy_param_init(intel_dsi); > > icl_dsi_add_properties(intel_connector); > + > + /* > + * DDC bus may configured as gpio and reserved for MIPI driver > + * to control panel power on/off sequence. so, unregister gmbus > + * if MIPI was LFP display. > + */ > + bus = &dev_priv->gmbus[GMBUS_PIN_1_BXT]; > + i2c_del_adapter(&bus->adapter); > + > + if (dev_priv->vbt.dsi.config->dual_link) { > + bus = &dev_priv->gmbus[GMBUS_PIN_2_BXT]; > + i2c_del_adapter(&bus->adapter); > + } > return; > > err: -- Jani Nikula, Intel Open Source Graphics Center