Message ID | 20231102151228.668842-2-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp424078vqu; Thu, 2 Nov 2023 08:13:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRDFAQic+26RBk9IIkR2KZeY3dNUEwxrqTCTJYw6xDArJ6rLkjfwcPt2xexuuxR/xaIcIo X-Received: by 2002:a05:6a00:6c98:b0:6c3:3964:ac8a with SMTP id jc24-20020a056a006c9800b006c33964ac8amr1628770pfb.28.1698938027355; Thu, 02 Nov 2023 08:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698938027; cv=none; d=google.com; s=arc-20160816; b=tav07QGVpDBcNdi4kjDnDu8hFaqoIm5F+5mSXN0HJ4S4KOHZgnKXrkBlEuaJAL9spm fFb4o/DJSmspj+IGYPwbcpWnMNFe1dRgUoNcPuRAaD9Hiz95sf7c7Rf/HroS5192S5ZN zc8XeIMBcbzrFW7nor6pwnwZjRPngloaGtXCShvy8V925u7jp06vlQmt6OyAxYYGpgG8 Phy3fAGs+vn8Ax4jjzG/Tflj8p1dc9IbfFcOfJX0pu04MmGbs7Jqgjv5B74I8KRIpE2w SObMQiblwWe6kQTCV46EBR5mS/ybbhgN98+sKQfAD/9ObG7MAt7V15zsyl/PL0wt1qli dnJg== 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=v6FnCc7RWWk/c6sJPNsQiV4cTbu/31bzjd9uebkf+IE=; fh=W9Apx1mxfI4Sn4Tfu/ApINr5FKslMaF8Hy7vCgvNWsQ=; b=JWbrIMHfrYH1QxB4OKlodk6cu6/jepiZTV35H/Nih8SB8LwiLPNvg97RZtEJZKKUF+ IRadNV6p7BfMf6RyV2tJ5zVpVv8oJsZwXqi1kitU7jaap1IjsjGdRmWaBQqp35T6Wbf7 kOg/7LJZqB+ckdVzW6dKBGmmyptiDO6VX61EB+OyvJVVAUNcZLQWKThsULsZTh925VdV pb0QC8LBOQ9F2F/KPvhBj+Yqpkw5iyquS0dCOa9QjdstHaKZtSMAGxDyr5EyXqxGnk/+ gwf512BdPLQT7ybVxHH9a4RILHEcxdt95wV/5BD3oeiN/88Ok2ntyOc7i6BdE6WLdxPN brzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OyXdTJRA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id h12-20020a056a00218c00b006bd2084d6ddsi3811791pfi.100.2023.11.02.08.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 08:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OyXdTJRA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C684E8111397; Thu, 2 Nov 2023 08:13:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345447AbjKBPMy (ORCPT <rfc822;heyuhang3455@gmail.com> + 35 others); Thu, 2 Nov 2023 11:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235476AbjKBPMt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Nov 2023 11:12:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EED5D50 for <linux-kernel@vger.kernel.org>; Thu, 2 Nov 2023 08:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698937956; x=1730473956; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zPRCzYNN16HwjO3RHBcn1H7M4PO+1uvgVko+eIKdfwQ=; b=OyXdTJRANKn/Wso0a1rLf7IX2QCBhptlJUJDD5T4icbkotY1i9HiYDgW DwHVtLTFTYQ0vrAF/ec2mtZ/NZfPJeufuUH5i+TQe8VrDvpNgd62XeoHV K+9q0sM4faDTkaEWpjL6cWjIfnC081xs+ua/uYvZ/ZZb20SvC1tTiRPJV TLqoBgo+b2hI4CJoxAemsfiuCjDEDD/j1olFbHIg5CFYyahVC9KbMz0FT jwegnCF5U4nWYSM74vuJMtXjVodiF9xl/TXaQjuzQ/CLG60zVH8CEKcC3 apN1A+E7kIXiBlxgbDBmOahOWR22wrd4OU4zWYS5IPaECazQcHGmGf1uz w==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="373773420" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="373773420" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 08:12:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="711173920" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="711173920" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 02 Nov 2023 08:12:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8757154A; Thu, 2 Nov 2023 17:12:30 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Jani Nikula <jani.nikula@intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Jani Nikula <jani.nikula@linux.intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Hans de Goede <hdegoede@redhat.com> Subject: [PATCH v3 01/15] drm/i915/dsi: assume BXT gpio works for non-native GPIO Date: Thu, 2 Nov 2023 17:12:14 +0200 Message-Id: <20231102151228.668842-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20231102151228.668842-1-andriy.shevchenko@linux.intel.com> References: <20231102151228.668842-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 08:13:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781465641077118515 X-GMAIL-MSGID: 1781465641077118515 |
Series |
drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO
|
|
Commit Message
Andy Shevchenko
Nov. 2, 2023, 3:12 p.m. UTC
From: Jani Nikula <jani.nikula@intel.com> Purely a guess. Drop the nop function. Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
Comments
On Thu, Nov 02, 2023 at 05:12:14PM +0200, Andy Shevchenko wrote: > From: Jani Nikula <jani.nikula@intel.com> > > Purely a guess. Drop the nop function. > > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Cc: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > index 24b2cbcfc1ef..b2c0cc11f8c1 100644 > --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > @@ -372,14 +372,6 @@ static void bxt_exec_gpio(struct intel_connector *connector, > gpiod_set_value(gpio_desc, value); > } > > -static void icl_exec_gpio(struct intel_connector *connector, > - u8 gpio_source, u8 gpio_index, bool value) > -{ > - struct drm_i915_private *dev_priv = to_i915(connector->base.dev); > - > - drm_dbg_kms(&dev_priv->drm, "Skipping ICL GPIO element execution\n"); > -} > - > enum { > MIPI_RESET_1 = 0, > MIPI_AVDD_EN_1, > @@ -491,7 +483,7 @@ static const u8 *mipi_exec_gpio(struct intel_dsi *intel_dsi, const u8 *data) > if (native) > icl_native_gpio_set_value(dev_priv, gpio_number, value); > else if (DISPLAY_VER(dev_priv) >= 11) > - icl_exec_gpio(connector, gpio_source, gpio_index, value); > + bxt_exec_gpio(connector, gpio_source, gpio_index, value); We could just drop this whole branch since we end up in bxt_exec_gpio() in the end anyway. Or we drop the final else and make this one check for DISPLAY_VER >=9. > else if (IS_VALLEYVIEW(dev_priv)) > vlv_exec_gpio(connector, gpio_source, gpio_number, value); > else if (IS_CHERRYVIEW(dev_priv)) > -- > 2.40.0.1.gaa8946217a0b
On Thu, Nov 02, 2023 at 07:10:09PM +0200, Ville Syrjälä wrote: > On Thu, Nov 02, 2023 at 05:12:14PM +0200, Andy Shevchenko wrote: ... > > if (native) > > icl_native_gpio_set_value(dev_priv, gpio_number, value); > > else if (DISPLAY_VER(dev_priv) >= 11) > > - icl_exec_gpio(connector, gpio_source, gpio_index, value); > > + bxt_exec_gpio(connector, gpio_source, gpio_index, value); > > We could just drop this whole branch since we end up in bxt_exec_gpio() > in the end anyway. Or we drop the final else and make this one check for > DISPLAY_VER >=9. Looking at the code, I'm not sure how we can get rid of it, but the second option is feasible. > > else if (IS_VALLEYVIEW(dev_priv)) > > vlv_exec_gpio(connector, gpio_source, gpio_number, value); > > else if (IS_CHERRYVIEW(dev_priv))
diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c index 24b2cbcfc1ef..b2c0cc11f8c1 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c @@ -372,14 +372,6 @@ static void bxt_exec_gpio(struct intel_connector *connector, gpiod_set_value(gpio_desc, value); } -static void icl_exec_gpio(struct intel_connector *connector, - u8 gpio_source, u8 gpio_index, bool value) -{ - struct drm_i915_private *dev_priv = to_i915(connector->base.dev); - - drm_dbg_kms(&dev_priv->drm, "Skipping ICL GPIO element execution\n"); -} - enum { MIPI_RESET_1 = 0, MIPI_AVDD_EN_1, @@ -491,7 +483,7 @@ static const u8 *mipi_exec_gpio(struct intel_dsi *intel_dsi, const u8 *data) if (native) icl_native_gpio_set_value(dev_priv, gpio_number, value); else if (DISPLAY_VER(dev_priv) >= 11) - icl_exec_gpio(connector, gpio_source, gpio_index, value); + bxt_exec_gpio(connector, gpio_source, gpio_index, value); else if (IS_VALLEYVIEW(dev_priv)) vlv_exec_gpio(connector, gpio_source, gpio_number, value); else if (IS_CHERRYVIEW(dev_priv))