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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 29590C4167B for ; Thu, 2 Nov 2023 17:40:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52E2410E96C; Thu, 2 Nov 2023 17:40:55 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A26F10E96C; Thu, 2 Nov 2023 17:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698946854; x=1730482854; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=nsYlMTWUww8YnOWzQWMLZoiChKl1M1Xnh9+qYn0rJ5Q=; b=M1IJDcCsYRAQYqbeNQMlw8Gjyv76DrwFYZiJ7rBPDl0/C0o6Fy8+F+5S bKsNGu2pesnxiHt22lmhX/l0MLkACP5ZT6vxssnQyZyEM/pFDck5rkQ/X vmsKYVkh7AUAp0Welhb7ssIdwC8Td5gKI3KlPt0cg4fcfCrI6Ewu6SvSH 6yxh4No9hmG0Bv0eY5lD2Gic9G5K8HVgEhKJfgzFCxI9/BoSSj5B9aqlS S58QFMwFxeRCmz6II18GcnsCudFeHjUGIXIOKh5lq7N4MYrzSMDHENLCz OAPfGVAYJcjCLokqsuuzpZffI5G1gvc9Zjh/yshDguYdfE+s/ChOovBcz w==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="10306072" X-IronPort-AV: E=Sophos;i="6.03,272,1694761200"; d="scan'208";a="10306072" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 10:40:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="761348091" X-IronPort-AV: E=Sophos;i="6.03,272,1694761200"; d="scan'208";a="761348091" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 10:40:49 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC3) (envelope-from ) id 1qybgU-0000000AlQ2-1Eg2; Thu, 02 Nov 2023 19:40:46 +0200 Date: Thu, 2 Nov 2023 19:40:46 +0200 From: Andy Shevchenko To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Message-ID: References: <20231102151228.668842-1-andriy.shevchenko@linux.intel.com> <20231102151228.668842-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: Re: [Intel-gfx] [PATCH v3 01/15] drm/i915/dsi: assume BXT gpio works for non-native GPIO 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: , Cc: Jani Nikula , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans de Goede , Daniel Vetter , Rodrigo Vivi , David Airlie Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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)) -- With Best Regards, Andy Shevchenko