Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3366805pxb; Mon, 1 Nov 2021 12:30:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlYAWWWeBYRXEbtKqiBjW1llIl+PWJswPLCdKB1qfrrYT2ea9ZYyUVnbbxd8pvTWjMbFOh X-Received: by 2002:a05:6638:2650:: with SMTP id n16mr23891143jat.72.1635795021512; Mon, 01 Nov 2021 12:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635795021; cv=none; d=google.com; s=arc-20160816; b=wTWG/fX8qhzD0bbPxReuDKCLEonMqCs3PCvTVtTUppPiP3UL8B2meeTAFwSwt76tBg w61Md4bcnDaVcv/nCM9sKLQXmOtbXP/fnFIMO8B0VqEFExfTMdLK8mGnSalM5dxHwhwL X0yqvC78geR8KG1OXPSNkyh7jzIc8badNJgLg99f6NqWjNI1RxJBm9QsQ9f6OBnWW//j r+zJ46FdHOTfZlwZzFigZJ6z4IQchwrzM3xx28+oQQdFBq9V6UfMcnjJm9c2GYIUsv32 w1c6HgA+HIEVcsKZehgEdS7k6w/zUnJcw0BtLDw0p4ZIfcYMvmYpJ2ygpvg3LdXcL19D pFPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hOO5cElUZMDpVBoGvI1psahFy71eRdvO+xqX1DlQwk4=; b=N14iRvM1lR0eEqNEKWWfkeyKzvIJVUX1RqsJ1Ai8UHnjeswywbujN4WCz4qzzC3yWO ILD9y2V8aa4EncLZlfjvh2G5JMGlfVVxMXSLuw5UrTy1vdtSXuWK21+cBg0UXXOKyHOm vm5pJqTguq/yupxRJmM8BJYzmctNNgh2nPkpEEK0GHpnSYBD0hhPyaDKbbKcIvTN4axJ PHCxbA/hoku6s+rUXC6ibNoKMwOvzMODBh/tgliRPD1wPhAHBgNh8jF5UvLT6GBmE1PY pmgcFBLtZtO71S5Q7X7yM1oP7zg2peLd0eLXulqrHIL15AOllerdzfOr7IhbDxuigSN+ WggA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QeYyQNXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si24898777jat.22.2021.11.01.12.30.09; Mon, 01 Nov 2021 12:30:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QeYyQNXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbhKATbT (ORCPT + 99 others); Mon, 1 Nov 2021 15:31:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbhKATbP (ORCPT ); Mon, 1 Nov 2021 15:31:15 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60911C061764; Mon, 1 Nov 2021 12:28:41 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id f3so30148091lfu.12; Mon, 01 Nov 2021 12:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hOO5cElUZMDpVBoGvI1psahFy71eRdvO+xqX1DlQwk4=; b=QeYyQNXSmou1cH0xoo2x424K4JY1qpf4YZiEB90O5f+LaRebUDHSS7sZ30SgncadsK PoJjRTxVFH820PDkXffL2BsvNxdMGo9XMpq03XaqlU8VV3hIxc3qIwqIxPnZfz0yB+cR 1eHY/sQq93lO0PCOXeKcYcNE2d1Ixxfhl3HqV8PgC4CV/CG5FdDQA1QbuBz8PnyLTS/i ll/A77H6+aUXIHNmhkOImAsbahmNZQGzYZZ0Ciij+gRhaZ3qfaTfNdNXmFBV4pyReXnV wnsjczAO+YI6h2L9iQwGpk15IHkS9VCCv6J2usL+aNERcDzxfuuDhPxLgpLQ/OqBFJck iy2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hOO5cElUZMDpVBoGvI1psahFy71eRdvO+xqX1DlQwk4=; b=Ayy083VxkO1uPunX8Z4+cU0DeOZ5ycOgZOO185lEHvDhfxlIGFewHmkYe61k0+Lt7w /KMrLOB+5RlpxOBIzGFACeN3V22whkhqc2bMWZkhmi9DA/rdQ7/DEl4oL/QRPSxHZ5yv AVcdK9WdCkzaiiqMa+jA/V9DXUFI5fQEavdG6du9YOG+NmzVjxXAaYDm+4LCBUOM1OWR QdVttIDvsvIgMfu+4IHmtwl+YP7v/IxFgk++OcNR8ZjvJhqaoJd4eI2KnHUxL0Pj5Usu xPxA7Y2cu0zbOqYSHD25aP4xBFspCM4JGIpCFwv1ssnmPRolvR82u5c0zrZJ64/ponWZ 3ftQ== X-Gm-Message-State: AOAM531DBj2y6hLdiYQ3ZLCUcnKMfZ34YUx27G1xDBz53m+klPE0AQ5V mIPk09UE6cIF1Zx6Tjn4drkdV6MMIuq4YE+pMhc= X-Received: by 2002:ac2:4e8c:: with SMTP id o12mr16851808lfr.459.1635794919646; Mon, 01 Nov 2021 12:28:39 -0700 (PDT) MIME-Version: 1.0 References: <20211017161958.44351-1-kitakar@gmail.com> <20211017161958.44351-5-kitakar@gmail.com> <20211026092637.196447aa@sal.lan> <1a295721fd1f1e512cd54a659a250aef162bfb6f.camel@gmail.com> <20211028123944.66c212c1@sal.lan> <20211101141058.36ea2c8e@sal.lan> <2b81ca7e-fcaa-5449-5662-4eb72e746b02@redhat.com> In-Reply-To: <2b81ca7e-fcaa-5449-5662-4eb72e746b02@redhat.com> From: Andy Shevchenko Date: Mon, 1 Nov 2021 21:27:50 +0200 Message-ID: Subject: Re: [PATCH 04/17] media: atomisp: pci: do not use err var when checking port validity for ISP2400 To: Hans de Goede Cc: Mauro Carvalho Chehab , Tsuchiya Yuto , Sakari Ailus , Greg Kroah-Hartman , Linux Media Mailing List , linux-staging@lists.linux.dev, Linux Kernel Mailing List , Nable , Andy Shevchenko , Fabio Aiuto , "andrey.i.trufanov" , Patrik Gfeller Content-Type: multipart/mixed; boundary="0000000000001d0d0e05cfbf2f9f" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000001d0d0e05cfbf2f9f Content-Type: text/plain; charset="UTF-8" On Mon, Nov 1, 2021 at 9:07 PM Hans de Goede wrote: > On 11/1/21 15:10, Mauro Carvalho Chehab wrote: ... > Testing BYT support definitely is on my radar. Note that BYT > also has the additional issue that the atomisp2 on BYT can be > enumerated as either a PCI dev (which may work) or an ACPI/platform > dev which is unsupported in the original atomisp2 code-drop and > seems non trivial (because of pci config space writes) to get to > work. > > On the T100TA the device is actually enumerated as an ACPI/platform > device and the BIOS option to change this is hidden. In the mean > time I've gained quite a lot of experience with changing hidden > BIOS options though, so I can easily put it in PCI mode for > testing. But eventually we also need to tackle ACPI enumeration > support... Not sure if you saw my very far from being even tested patch... Share it here just in case. I believe you will have a better idea on how to implement it. -- With Best Regards, Andy Shevchenko --0000000000001d0d0e05cfbf2f9f Content-Type: text/x-patch; charset="UTF-8"; name="0001-i915-Enumerate-AtomISP-when-it-s-an-ACPI-device.patch" Content-Disposition: attachment; filename="0001-i915-Enumerate-AtomISP-when-it-s-an-ACPI-device.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kvh212fx0 RnJvbSA4MjUwMzU0ZDlmYWY1Y2NiMjFhMjZiMWQ4YTdhNzcxZGIyNDQ2N2U1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmR5IFNoZXZjaGVua28gPGFuZHJpeS5zaGV2Y2hlbmtvQGxp bnV4LmludGVsLmNvbT4KRGF0ZTogRnJpLCAzIE5vdiAyMDE3IDIxOjM5OjQ3ICswMjAwClN1Ympl Y3Q6IFtQQVRDSCAxLzFdIGk5MTU6IEVudW1lcmF0ZSBBdG9tSVNQIHdoZW4gaXQncyBhbiBBQ1BJ IGRldmljZQoKV2hlbiBBdG9tSVNQIGlzIGFuIEFDUEkgc3ViZGV2aWNlIG9mIGdyYXBoaWNzLCB3 ZSBuZWVkIHRvIGVudW1lcmF0ZSBpdAppbiB0aGUgc2ltaWxhciB3YXkgaG93IGl0J3MgZG9uZSBm b3IgTFBFIEF1ZGlvLCBiZWNhdXNlIGludGVycnVwdCBsaW5lCmlzIHByb3ZpZGVkIHZpYSBHUFUg cmVnaXN0ZXIuCgpTaWduZWQtb2ZmLWJ5OiBBbmR5IFNoZXZjaGVua28gPGFuZHJpeS5zaGV2Y2hl bmtvQGxpbnV4LmludGVsLmNvbT4KLS0tCiBkcml2ZXJzL2dwdS9kcm0vaTkxNS9NYWtlZmlsZSAg ICB8ICAgMyArCiBkcml2ZXJzL2dwdS9kcm0vaTkxNS9pOTE1X2Rydi5oICB8ICAxMyArKwogZHJp dmVycy9ncHUvZHJtL2k5MTUvaTkxNV9pcnEuYyAgfCAgIDMgKwogZHJpdmVycy9ncHUvZHJtL2k5 MTUvaW50ZWxfaXNwLmMgfCAyNDQgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKwogNCBm aWxlcyBj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LT5yZXMpID09 IElPUkVTT1VSQ0VfTUVNKSB7CisJCQlkZXZfcHJpdi0+aXNwLm1taW8gPSAqZW50cnktPnJlczsK KwkJCWJyZWFrOworCQl9CisJfQorCisJYWNwaV9kZXZfZnJlZV9yZXNvdXJjZV9saXN0KCZyZXNv dXJjZV9saXN0KTsKKworCWRldl9wcml2LT5pc3AuZm91bmQgPSB0cnVlOworCXJldHVybiBBRV9P SzsKK30KKworc3RhdGljIGludCBpc3Bfc2V0dXAoc3RydWN0IGRybV9pOTE1X3ByaXZhdGUgKmRl dl9wcml2KQoreworCWludCByZXQ7CisKKwlkZXZfcHJpdi0+aXNwLmlycSA9IGlycV9hbGxvY19k ZXNjKDApOworCWlmIChkZXZfcHJpdi0+aXNwLmlycSA8IDApIHsKKwkJRFJNX0VSUk9SKCJGYWls ZWQgdG8gYWxsb2NhdGUgSVJRIGRlc2M6ICVkXG4iLCBkZXZfcHJpdi0+aXNwLmlycSk7CisJCXJl dCA9IGRldl9wcml2LT5pc3AuaXJxOworCQlnb3RvIGVycjsKKwl9CisKKwlEUk1fREVCVUcoImly cSA9ICVkXG4iLCBkZXZfcHJpdi0+aXNwLmlycSk7CisKKwlyZXQgPSBpc3BfaXJxX2luaXQoZGV2 X3ByaXYpOworCisJaWYgKHJldCkgeworCQlEUk1fRVJST1IoIkZhaWxlZCB0byBpbml0aWFsaXpl IGlycWNoaXAgZm9yIElTUDogJWRcbiIsIHJldCk7CisJCWdvdG8gZXJyX2ZyZWVfaXJxOworCX0K KworCWRldl9wcml2LT5pc3AucGxhdGRldiA9IGlzcF9wbGF0ZGV2X2NyZWF0ZShkZXZfcHJpdik7 CisKKwlpZiAoSVNfRVJSKGRldl9wcml2LT5pc3AucGxhdGRldikpIHsKKwkJcmV0ID0gUFRSX0VS UihkZXZfcHJpdi0+aXNwLnBsYXRkZXYpOworCQlEUk1fRVJST1IoIkZhaWxlZCB0byBjcmVhdGUg SVNQIHBsYXRmb3JtIGRldmljZTogJWRcbiIsIHJ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