From patchwork Thu Nov 2 15:12:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 16187 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp425579vqu; Thu, 2 Nov 2023 08:15:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEe0EhhV7KfV1IZHLIQoASQzIx0xCGAA+7UiJJt0uUGOXld5fM+/EyqZShZIZlcTkQooxv+ X-Received: by 2002:a17:902:eb83:b0:1b0:f8:9b2d with SMTP id q3-20020a170902eb8300b001b000f89b2dmr24197079plg.29.1698938142164; Thu, 02 Nov 2023 08:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698938142; cv=none; d=google.com; s=arc-20160816; b=ABRhB2txAMqpg37l5vlu8DNl7Lo1sIuw1LODHPZ5U5iEaTMnEIt5b0tsuVtggGxOMJ Js0j4fUZDBTwA+JWxfNbejTqK2Wob312C9BWF4dlwcYbiVeR4momcCnCFzh/TncRf5lu WzD6G/mZ9CnzWzvTlQ+ac/ZshfDSbgxIxUeQJSfoCB1ZQI00wElHn35p45pBTGVicvip oG7I25B85pf0YtKU0dzjqaSjU0Oz11Ii6Kq+5B0ewB0xJuw2wOle32ktBqErpfk2sxj7 LzhRSeS8pabi+77TRRAD1Bz5j2em3DIC3UePwoRyQjxoeQ7UFtbpekK/6sjtwRFhcCCV gv3A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=y0+E0arpyNwx6W9dDpKqP3gtHQIF7J3jEShGIUIPvC0=; fh=W9Apx1mxfI4Sn4Tfu/ApINr5FKslMaF8Hy7vCgvNWsQ=; b=F2ty1NPZKgbzlJi0jx0DAi5P+RsDkRxiDEsm3nlbVTrusKlupT5MGLZFQmlDDFytdQ Dmx/dLlhJ0VP1HXEr/J7VwhkeH6PCaA9jyl5X1f49MYXEPhgS60AK+KZDRsNP8fAa0ee w2ukoVsyRSw10aftUQBOGjjLyd+7A+6wCfLLc5uQvAhODRW256aJTQEY5jrA2/+E0fSA 5Juyx3AMcUY1tB6mdYOjnw2Wzs1NviW0vwlQman12jG2YPlfw2yZT/Dx90zIzhW5Fu42 CrSK+VfdrpyPaqnFWbOTCWbypxRGzbSb2B8CMiyp7T/CQAqg/f4BsYb3qt7aVTQsNRMZ 2nqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FPYztSgR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id r17-20020a170903411100b001bb2d95f2a7si27130pld.267.2023.11.02.08.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 08:15:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FPYztSgR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 3D97B8022874; Thu, 2 Nov 2023 08:14:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345328AbjKBPM6 (ORCPT + 35 others); Thu, 2 Nov 2023 11:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235479AbjKBPMt (ORCPT ); Thu, 2 Nov 2023 11:12:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E404D4E for ; Thu, 2 Nov 2023 08:12:35 -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:mime-version: content-transfer-encoding; bh=CLy1y5nIqzAmMc0U1jCcdZeU6NVug+2ZBa3uUHFLFTk=; b=FPYztSgR1V5+y4LSbvXsaNiiFX2n2wDfTdFQqd9S01L0LVdRgbYMq33P GMBIsekUDjKgYLiytSBERk7+2YIbvFSfvbPf5ahYfCaqwDEIKaz9FVPnV Gw5fNIvsdx0qhaXjzx0tkCImrngK5ePNZbfGX3kOmc55HC1tcWbzR8TkE aUjj7+mbCCWnaHGWU0Hu9DEA7Rxvpm8VjS9j2rVZWEHgz6lUSuz2KMOnD O8OsV9c1ZuD/6KOqif4g0inn8TW4mWHUuvoPIQ+wmBoUM50Xw5o9D0iLJ 05BeRurFHDKs5h8yF/v2iI7c8P8Avbm+zaSnt+osQriCPA6olmcybeITN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="1660142" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="1660142" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orvoesa102.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="737784550" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="737784550" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 02 Nov 2023 08:12:31 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 76FA0560; Thu, 2 Nov 2023 17:12:30 +0200 (EET) From: Andy Shevchenko To: Jani Nikula , Andy Shevchenko , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Hans de Goede Subject: [rft, PATCH v3 00/15] drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO Date: Thu, 2 Nov 2023 17:12:13 +0200 Message-Id: <20231102151228.668842-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 08:14:56 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781465761194035451 X-GMAIL-MSGID: 1781465761194035451 DSI code for VBT has a set of ugly GPIO hacks, one of which is direct talking to GPIO IP behind the actual driver's back. A second attempt to fix that is here. If I understood correctly, my approach should work in the similar way as the current IOSF GPIO. Hans, I believe you have some devices that use this piece of code, is it possible to give a test run on (one of) them? In v3: - incorporated series by Jani - incorporated couple of precursor patches by Hans - added Rb tag for used to be first three patches (Andi) - rebased on top of the above changes - fixed indexing for multi-community devices, such as Cherry View In v2: - added a few cleanup patches - reworked to use dynamic GPIO lookup tables - converted CHV as well Andy Shevchenko (8): drm/i915/dsi: Replace while(1) with one with clear exit condition drm/i915/dsi: Get rid of redundant 'else' drm/i915/dsi: Replace check with a (missing) MIPI sequence name drm/i915/dsi: Extract common soc_gpio_set_value() helper drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back drm/i915/dsi: Prepare soc_gpio_set_value() to distinguish GPIO communities drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back drm/i915/iosf: Drop unused APIs Hans de Goede (2): drm/i915/dsi: Remove GPIO lookup table at the end of intel_dsi_vbt_gpio_init() drm/i915/dsi: Fix wrong initial value for GPIOs in bxt_exec_gpio() Jani Nikula (5): drm/i915/dsi: assume BXT gpio works for non-native GPIO drm/i915/dsi: switch mipi_exec_gpio() from dev_priv to i915 drm/i915/dsi: clarify GPIO exec sequence drm/i915/dsi: rename platform specific *_exec_gpio() to *_gpio_set_value() drm/i915/dsi: bxt/icl GPIO set value do not need gpio source drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 355 +++++++------------ drivers/gpu/drm/i915/vlv_sideband.c | 17 - drivers/gpu/drm/i915/vlv_sideband.h | 3 - 3 files changed, 137 insertions(+), 238 deletions(-) Acked-by: Jani Nikula