Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp811644rdb; Wed, 1 Nov 2023 03:41:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9Z0xy3J0T0Hv5QV0UQ5A4OMB1iiU0gy21h3eMqZEfRl9ZHUgOhdr6/No7/Lzm/PLtVKna X-Received: by 2002:a05:6a00:190b:b0:6be:20d5:e8f8 with SMTP id y11-20020a056a00190b00b006be20d5e8f8mr14337030pfi.1.1698835299944; Wed, 01 Nov 2023 03:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698835299; cv=none; d=google.com; s=arc-20160816; b=UyfI8+V/YEYFJNfvApWSIPhke/GU9Yp+D/ph5Z9bz1MHMzLCv2jSKQRejcM5VwOgfz oyJfIGeoEGWHX9A52sSGQMYiHj1UxulwQN6u1yg582noPIuCdLzbyfYSwWxBNY4XAz+F gzU/Gc6XHM/1OfqPUjSY3V3UAM+YEsW/h698DbmyHNjDjzhixtoVkUcqPr0zqWJzVD9B iX5jA8yb1kXmi51fTThezddGjVOaJ1wCxeMDTJ4BctSqmdwPEC0UJ/TbiSlxyHS3AnnF v+Z+SOOvTQjKe2BEPe+MAawZkY2Gl1wH8PHkfnntoTx+VQKLZcj7X3+4yRC+fzP6oq9N lNBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IXci9J0xD0tMPtjPi+KFGNzlE2tvEnYyGsbEz8laLLc=; fh=Eg3EkHGwOPDLPuYWSHytXyWVebKErQkXk8IVlb9HtMc=; b=T3uiFnI3w5S/2osUrMhNFrBMTsPrC/LNO72RY1a1fq+qZOchpXh9i4yGEYIgb9GkoL 1ntnVnbJJxifrlRsAh03ows3tsxhzmniEYcX+Ql4W5TlbweMMLrugdx6wLi5K+ijLSDz behADYQL1awCX8IwTL/+epmPNiCzqCk7OG74bcUzhVF/W5UNScVAo3OFlJMS9WfJfb61 NR5hwGFSnV5U0BIaFXTGzy5xf+FIyJKaAAsDWAwDXbYLarhzYl0O8kJfcIggItZvo4x+ PyUWrLKPhkXlpetNrPXZ+4SOz+zRFRbNXgT3VwrJi1LCya1ELGGPegwATozcWKpm3k0C paaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DT3bqnwn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c17-20020a056a00249100b006b6424d826asi1484902pfv.16.2023.11.01.03.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 03:41:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DT3bqnwn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E4D67805793A; Wed, 1 Nov 2023 03:41:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjKAKlb (ORCPT + 99 others); Wed, 1 Nov 2023 06:41:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbjKAKl3 (ORCPT ); Wed, 1 Nov 2023 06:41:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF3BDA for ; Wed, 1 Nov 2023 03:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698835239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IXci9J0xD0tMPtjPi+KFGNzlE2tvEnYyGsbEz8laLLc=; b=DT3bqnwnF3/THMw5nh8A+Rd7DJ04FLdE6REB0+PgevBz/4ijV8wd3KDUNRvyXkB2jWmH97 /TorFKq0BgSPz07AFJRoAbjj2GToCUNOemyPYLr33QKVq4f7gfsOPKqY+KvUrf0uhqN180 NbhrfH/dttDejEUgEPclxfh7NLFpVXw= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-bj8-N-xGN8WbdVaKSePGCQ-1; Wed, 01 Nov 2023 06:40:37 -0400 X-MC-Unique: bj8-N-xGN8WbdVaKSePGCQ-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-53e26bbbc63so4845186a12.3 for ; Wed, 01 Nov 2023 03:40:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698835236; x=1699440036; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IXci9J0xD0tMPtjPi+KFGNzlE2tvEnYyGsbEz8laLLc=; b=Xqnc8+aVszzYqrlP1fIoN1+Gz4NmRDCyyiicLKz9MAIiR8hafxGTwqsnJSZOfqZO/A pK3Mf9rKAGPkqZsLLnkAiMT6yC8XMoEnWtA8nfu5+PpvejKNZlTyyPsedkFDRK/ipclj LJAVim4OUJMzc0rHPzSlytWfiBTjZIFNlLle1ARTTZk46+HG83Bo+U/bebw++8vQ40mC GsboLwmCjnThOmIQS4HKCRS+fxyIrXcPjjQatOZp03MnhsYyUK8dovhmfKQfptHy64NK knyjWhWrFdnow5q1+/CW5qFO9ZB08AMWRdoNuXs/TwUp3/GyRQpAibA0XaZk20NM/gZ/ 1hgQ== X-Gm-Message-State: AOJu0Yzoj3WTOnqwPot45M0Mm1dv8/d4PuoGQUOdUOrVCKI1KqkLJCGP ke6fowx2A1O+eIctTtx1nc5wcQX4lcwk9kjxdzc/CrPDOpFcCkd+EzhafCRc5m+F3UN5y2xNsb2 W8+9dRrCSeCX2E4bg/OA6U1/k X-Received: by 2002:a05:6402:3586:b0:538:a47:89d3 with SMTP id y6-20020a056402358600b005380a4789d3mr12770009edc.21.1698835236782; Wed, 01 Nov 2023 03:40:36 -0700 (PDT) X-Received: by 2002:a05:6402:3586:b0:538:a47:89d3 with SMTP id y6-20020a056402358600b005380a4789d3mr12769999edc.21.1698835236475; Wed, 01 Nov 2023 03:40:36 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id v28-20020a50d09c000000b005434e3d8e7bsm930845edd.1.2023.11.01.03.40.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Nov 2023 03:40:35 -0700 (PDT) Message-ID: Date: Wed, 1 Nov 2023 11:40:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [Intel-gfx] [PATCH v2 6/7] drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back Content-Language: en-US, nl To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: Andy Shevchenko , Jani Nikula , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Rodrigo Vivi , David Airlie References: <20231024155739.3861342-1-andriy.shevchenko@linux.intel.com> <20231024155739.3861342-7-andriy.shevchenko@linux.intel.com> <16e533e2-81bb-47ba-9e23-460a626bcad7@redhat.com> From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 01 Nov 2023 03:41:37 -0700 (PDT) Hi, On 11/1/23 11:34, Ville Syrjälä wrote: > On Wed, Nov 01, 2023 at 11:20:23AM +0100, Hans de Goede wrote: >> Hi, >> >> On 11/1/23 10:32, Andy Shevchenko wrote: >>> On Tue, Oct 31, 2023 at 10:15:52PM +0100, Hans de Goede wrote: >>>> On 10/31/23 17:07, Hans de Goede wrote: >>>>> On 10/24/23 18:11, Andy Shevchenko wrote: >>>>>> On Tue, Oct 24, 2023 at 06:57:38PM +0300, Andy Shevchenko wrote: >>> >>> ... >>> >>>>> As for the CHT support, I have not added that to my tree yet, I would >>>>> prefer to directly test the correct/fixed patch. >>>> >>>> And I hit the "jackpot" on the first device I tried and the code needed >>>> some fixing to actually work, so here is something to fold into v3 to >>>> fix things: >>> >>> Thanks! >>> >>> But let me first send current v3 as it quite differs to v2 in the sense >>> of how I do instantiate GPIO lookup tables. >> >> The problem is there already is a GPIO lookup table registered for >> the "0000:00:02.0" device by intel_dsi_vbt_gpio_init() and there can >> be only be one GPIO lookup table per device. So no matter how you >> instantiate GPIO lookup tables it will not work. >> >> The solution that I chose is to not instantiate a GPIO lookup table >> at all and instead to extend the existing table with an extra entry. >> >> Although thinking more about it I must admit that this is racy. >> >> So a better idea would be to unregister the GPIO lookup >> table registered by intel_dsi_vbt_gpio_init() after getting >> the GPIOs there, that would allow instantiating a new one >> from soc_exec_opaque_gpio() as it currently does and that >> would be race free. > > The proper solution would likely be be to pre-parse the sequences > to determine which GPIOs are actually needed. That would also get > rid of the bxt_gpio_table[] eyesore. Interesting suggestion. Note that intel_dsi_vbt_gpio_init() arm only runs on byt and cht though, so that is something to keep in mind. Regards, Hans