From patchwork Fri Apr 19 05:24:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1925395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLNQ14108z23jC for ; Fri, 19 Apr 2024 15:25:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rxgk6-0003Jx-ML; Fri, 19 Apr 2024 05:24:58 +0000 Received: from mail-pf1-f179.google.com ([209.85.210.179]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rxgk1-0003JT-Qt for kernel-team@lists.ubuntu.com; Fri, 19 Apr 2024 05:24:53 +0000 Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6ed2dc03df6so1457552b3a.1 for ; Thu, 18 Apr 2024 22:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713504291; x=1714109091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zSR86ksb1dbP+7JTVjJRJ1n9REsC3Eum2Qx+H5+Hvlw=; b=dt2qH2UqLuniuZDtuGtp3+NwvHH5DxCW9YMn1MRhHpjfA+c8UR12x9loKVVthMsjF1 Scm40dFr1yTB96xHq6+mhYNSF1TF7pp/9zo+DbcXZET7b1iObhj3F+GFtgzpHT7LNylC L9gqfajyGEJTpZW8ERPNhh4gvMuXGrWKy9rE/VCgYcimcswhaBx5GAR9Ewti0zpC0XwW HuWEz3pzki1sl2jRWW0EFF1Uh7o+UZTarSOeSJHGH7oK55tvh65CF8JRJxYLM6OQ5aFp AM7FCfcaTycYPstC6wm2ACN8knimtq5WQnOUdClRQPj12I2rnDsjU9hRC/HebxE+P/VI lEQw== X-Gm-Message-State: AOJu0YxhFkzdVnQeTO+rmN2V9Y5RXll92xlCB9+3feBefLRkB9l+D93S B20SQuZ2o1BautVtQoLYq3KCmSxX8MZDCrP0AA/KbSCIk/nqJ9WGx9tf5Q== X-Google-Smtp-Source: AGHT+IG/0B2BzqptPbaQjWCjy/dHZNV7P6GsALhowRp6MGXwXLwXFbXboYv44BSRZUOnsBVYYUXDHw== X-Received: by 2002:a05:6a00:9383:b0:6ea:e841:5889 with SMTP id ka3-20020a056a00938300b006eae8415889mr1455209pfb.33.1713504291362; Thu, 18 Apr 2024 22:24:51 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id v7-20020aa78087000000b006f0b820022dsm857083pff.75.2024.04.18.22.24.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 22:24:50 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/5][SRU][Noble/Unstable] ACPI: scan: Defer enumeration of devices with a _DEP pointing to IVSC device Date: Fri, 19 Apr 2024 13:24:20 +0800 Message-ID: <20240419052424.278801-2-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419052424.278801-1-vicamo.yang@canonical.com> References: <20240419052424.278801-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.179; envelope-from=vicamo@gmail.com; helo=mail-pf1-f179.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Wentong Wu BugLink: https://bugs.launchpad.net/bugs/2061747 Inside IVSC, switching ownership requires an interface with two different hardware modules, ACE and CSI. The software interface to these modules is based on Intel MEI framework. Usually mei client devices are dynamically created, so the info of consumers depending on mei client devices is not present in the firmware tables. This causes problems with the probe ordering with respect to drivers for consumers of these MEI client devices. But on these camera sensor devices, the ACPI nodes describing the sensors all have a _DEP dependency on the matching MEI bus ACPI device, so adding IVSC MEI bus ACPI device to acpi_honor_dep_ids allows solving the probe-ordering problem by deferring the enumeration of ACPI-devices which have a _DEP dependency on an IVSC mei bus ACPI device. Add INTC10CF, the HID of IVSC MEI bus ACPI device on MTL platform, to acpi_honor_dep_ids. Signed-off-by: Wentong Wu Signed-off-by: Rafael J. Wysocki (cherry picked from commit 1e518e8333ca2134a53b96bc835432083f274350) Signed-off-by: You-Sheng Yang --- drivers/acpi/scan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 617f3e0e963d..dd817e9ed2e5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -794,6 +794,7 @@ static const char * const acpi_honor_dep_ids[] = { "INTC1059", /* IVSC (TGL) driver must be loaded to allow i2c access to camera sensors */ "INTC1095", /* IVSC (ADL) driver must be loaded to allow i2c access to camera sensors */ "INTC100A", /* IVSC (RPL) driver must be loaded to allow i2c access to camera sensors */ + "INTC10CF", /* IVSC (MTL) driver must be loaded to allow i2c access to camera sensors */ NULL }; From patchwork Fri Apr 19 05:24:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1925392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLNQ13w1bz23hf for ; Fri, 19 Apr 2024 15:25:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rxgk6-0003K6-St; Fri, 19 Apr 2024 05:24:58 +0000 Received: from mail-oi1-f176.google.com ([209.85.167.176]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rxgk3-0003Jf-Pb for kernel-team@lists.ubuntu.com; Fri, 19 Apr 2024 05:24:55 +0000 Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3c70b652154so1051715b6e.2 for ; Thu, 18 Apr 2024 22:24:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713504293; x=1714109093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zDwF7JupfMBnbaQUl+ewHjjsUupCDkfxrhQY070hW+o=; b=j/L5W4gujoqdDqcqLL22LcQ73ZtrRKpP3M+zHs0Z1E0FRcbIRATndAMc0eG3LZmBxq Swky/KQcG1LYYRVNu1qNHQLh6SsjgvTxolVa/HH9U4/SXUpfsba+vHngin9crK6ZDRJt 8HTOwTbj7wp8gD275s91bNFO71q5vp5DmA+edBg6LyX9ejLcY2vg68eBnQMINNOC05CH YT7ZjzFc6a7sBRyYwpLy/cMo6BUKhSCoFzJM+36iT+S3ZHs2JG9DYov6vwr0YAvUI1ud t2qCQK/WGXRglvfrYrtBZvJULMEKepbbLhIzeYZngS33dFF6+spBp/fSrkYyfJVr/3V8 6gYA== X-Gm-Message-State: AOJu0YybRUY6WLNvswIWD8PwT1szvF0jfhi2TYTDmXg47V8rtX1BomeB EJwuNzQfvNkssIu/mKKwB1RRpVDRiKZPFTCUpW2TEPHQ8i5NeC8Z+9QSFw== X-Google-Smtp-Source: AGHT+IH56FkDDxf401KtBVP0XgVFOtuhvO7rF7m/Wq7HAzFG3Neqo9hjQQJBO27iZqU0OaKnznF7Ag== X-Received: by 2002:a05:6808:2189:b0:3c7:4443:e22b with SMTP id be9-20020a056808218900b003c74443e22bmr1208644oib.37.1713504293599; Thu, 18 Apr 2024 22:24:53 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id v7-20020aa78087000000b006f0b820022dsm857083pff.75.2024.04.18.22.24.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 22:24:53 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/5][SRU][Noble/Unstable] Revert "mei: vsc: Call wake_up() in the threaded IRQ handler" Date: Fri, 19 Apr 2024 13:24:21 +0800 Message-ID: <20240419052424.278801-3-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419052424.278801-1-vicamo.yang@canonical.com> References: <20240419052424.278801-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.167.176; envelope-from=vicamo@gmail.com; helo=mail-oi1-f176.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Sakari Ailus BugLink: https://bugs.launchpad.net/bugs/2061747 This reverts commit 058a38acba15fd8e7b262ec6e17c4204cb15f984. It's not necessary to avoid a spinlock, a sleeping lock on PREEMPT_RT, in an interrupt handler as the interrupt handler itself would be called in a process context if PREEMPT_RT is enabled. So revert the patch. Cc: stable@vger.kernel.org # for 6.8 Signed-off-by: Sakari Ailus Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20240403051341.3534650-1-wentong.wu@intel.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit e3dc66d998d2b0c2734db9ca1d6c94c97349529a linux-next) Signed-off-by: You-Sheng Yang --- drivers/misc/mei/vsc-tp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c index 682c62c635b6..03486bebae09 100644 --- a/drivers/misc/mei/vsc-tp.c +++ b/drivers/misc/mei/vsc-tp.c @@ -419,6 +419,8 @@ static irqreturn_t vsc_tp_isr(int irq, void *data) atomic_inc(&tp->assert_cnt); + wake_up(&tp->xfer_wait); + return IRQ_WAKE_THREAD; } @@ -426,8 +428,6 @@ static irqreturn_t vsc_tp_thread_isr(int irq, void *data) { struct vsc_tp *tp = data; - wake_up(&tp->xfer_wait); - if (tp->event_notify) tp->event_notify(tp->event_notify_context); From patchwork Fri Apr 19 05:24:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1925394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLNQ14420z23jF for ; Fri, 19 Apr 2024 15:25:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rxgkA-0003Ls-Dy; Fri, 19 Apr 2024 05:25:02 +0000 Received: from mail-oi1-f171.google.com ([209.85.167.171]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rxgk8-0003KK-9m for kernel-team@lists.ubuntu.com; Fri, 19 Apr 2024 05:25:00 +0000 Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3c730f599abso1014274b6e.0 for ; Thu, 18 Apr 2024 22:25:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713504298; x=1714109098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ySz4IRVpxewfjDINljAazXqJP1Y/kUAZvnYbG2NAxqU=; b=re+Afmah+VY1aC2MQfur3Eko2WDhZCmpyKU1IscMR3sc4gQD2vSI7LhxEQCnijyNfA Yrwayp8vC2cfhPWDaPXttt2l9M0r0i7fAEGDfCkgYQOQYIRmfpHMMKJ4ZFij0MoXkDLh czg0XFws5o4SViFdPpP7XglQgrUc1OYAqYz8BBqJiRXfPwW2mnuz7IhEZ/pEUDG1v7rC fRt2j9LMIOJ4vawGLGb35iNXrM1YDYIdCaZJlELhaqlpPJ1F/dYL76IBxVzoD009cs/Z xOK3F/ZXaGVOJ9Bx85MCXvL+7zBy87eyutHTe+LPbAX+QATwEBtFBXiRI3/HyGjOY/eF 5C6Q== X-Gm-Message-State: AOJu0YwajfF5A8/uKPRWXiPS9keIw9kPXAEzeS5H3FJVfhgUA3dDvlvg Ix0PnDSDxnTKTrLI79JIBdiBq2rRq8YsO+vsLmsOM73W6LwOTjgGSlJK/w== X-Google-Smtp-Source: AGHT+IGH5YyohLEDZm/8XG9Fziqp087nl1rD8kCyqjBnPblGUhy/phg+kRe8YDDFp0bem+JLONNDdQ== X-Received: by 2002:a05:6808:a95:b0:3c7:2d96:a385 with SMTP id q21-20020a0568080a9500b003c72d96a385mr1025987oij.6.1713504298098; Thu, 18 Apr 2024 22:24:58 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id v7-20020aa78087000000b006f0b820022dsm857083pff.75.2024.04.18.22.24.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 22:24:57 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/5][SRU][Noble/Unstable] mei: vsc: Unregister interrupt handler for system suspend Date: Fri, 19 Apr 2024 13:24:22 +0800 Message-ID: <20240419052424.278801-4-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419052424.278801-1-vicamo.yang@canonical.com> References: <20240419052424.278801-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.167.171; envelope-from=vicamo@gmail.com; helo=mail-oi1-f171.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Sakari Ailus BugLink: https://bugs.launchpad.net/bugs/2061747 Unregister the MEI VSC interrupt handler before system suspend and re-register it at system resume time. This mirrors implementation of other MEI devices. This patch fixes the bug that causes continuous stream of MEI VSC errors after system resume. Fixes: 386a766c4169 ("mei: Add MEI hardware support for IVSC device") Cc: stable@vger.kernel.org # for 6.8 Reported-by: Dominik Brodowski Signed-off-by: Wentong Wu Signed-off-by: Sakari Ailus Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20240403051341.3534650-2-wentong.wu@intel.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit f6085a96c97387154be7eaebd1a5420eb3cd55dc linux-next) Signed-off-by: You-Sheng Yang --- drivers/misc/mei/platform-vsc.c | 17 ++++++- drivers/misc/mei/vsc-tp.c | 84 +++++++++++++++++++++++---------- drivers/misc/mei/vsc-tp.h | 3 ++ 3 files changed, 78 insertions(+), 26 deletions(-) diff --git a/drivers/misc/mei/platform-vsc.c b/drivers/misc/mei/platform-vsc.c index 8d303c6c0000..8db0fcf24e70 100644 --- a/drivers/misc/mei/platform-vsc.c +++ b/drivers/misc/mei/platform-vsc.c @@ -402,25 +402,40 @@ static int mei_vsc_remove(struct platform_device *pdev) static int mei_vsc_suspend(struct device *dev) { struct mei_device *mei_dev = dev_get_drvdata(dev); + struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev); mei_stop(mei_dev); + mei_disable_interrupts(mei_dev); + + vsc_tp_free_irq(hw->tp); + return 0; } static int mei_vsc_resume(struct device *dev) { struct mei_device *mei_dev = dev_get_drvdata(dev); + struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev); int ret; - ret = mei_restart(mei_dev); + ret = vsc_tp_request_irq(hw->tp); if (ret) return ret; + ret = mei_restart(mei_dev); + if (ret) + goto err_free; + /* start timer if stopped in suspend */ schedule_delayed_work(&mei_dev->timer_work, HZ); return 0; + +err_free: + vsc_tp_free_irq(hw->tp); + + return ret; } static DEFINE_SIMPLE_DEV_PM_OPS(mei_vsc_pm_ops, mei_vsc_suspend, mei_vsc_resume); diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c index 03486bebae09..870c70ef3bb8 100644 --- a/drivers/misc/mei/vsc-tp.c +++ b/drivers/misc/mei/vsc-tp.c @@ -94,6 +94,27 @@ static const struct acpi_gpio_mapping vsc_tp_acpi_gpios[] = { {} }; +static irqreturn_t vsc_tp_isr(int irq, void *data) +{ + struct vsc_tp *tp = data; + + atomic_inc(&tp->assert_cnt); + + wake_up(&tp->xfer_wait); + + return IRQ_WAKE_THREAD; +} + +static irqreturn_t vsc_tp_thread_isr(int irq, void *data) +{ + struct vsc_tp *tp = data; + + if (tp->event_notify) + tp->event_notify(tp->event_notify_context); + + return IRQ_HANDLED; +} + /* wakeup firmware and wait for response */ static int vsc_tp_wakeup_request(struct vsc_tp *tp) { @@ -383,6 +404,37 @@ int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb, } EXPORT_SYMBOL_NS_GPL(vsc_tp_register_event_cb, VSC_TP); +/** + * vsc_tp_request_irq - request irq for vsc_tp device + * @tp: vsc_tp device handle + */ +int vsc_tp_request_irq(struct vsc_tp *tp) +{ + struct spi_device *spi = tp->spi; + struct device *dev = &spi->dev; + int ret; + + irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY); + ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr, + IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + dev_name(dev), tp); + if (ret) + return ret; + + return 0; +} +EXPORT_SYMBOL_NS_GPL(vsc_tp_request_irq, VSC_TP); + +/** + * vsc_tp_free_irq - free irq for vsc_tp device + * @tp: vsc_tp device handle + */ +void vsc_tp_free_irq(struct vsc_tp *tp) +{ + free_irq(tp->spi->irq, tp); +} +EXPORT_SYMBOL_NS_GPL(vsc_tp_free_irq, VSC_TP); + /** * vsc_tp_intr_synchronize - synchronize vsc_tp interrupt * @tp: vsc_tp device handle @@ -413,27 +465,6 @@ void vsc_tp_intr_disable(struct vsc_tp *tp) } EXPORT_SYMBOL_NS_GPL(vsc_tp_intr_disable, VSC_TP); -static irqreturn_t vsc_tp_isr(int irq, void *data) -{ - struct vsc_tp *tp = data; - - atomic_inc(&tp->assert_cnt); - - wake_up(&tp->xfer_wait); - - return IRQ_WAKE_THREAD; -} - -static irqreturn_t vsc_tp_thread_isr(int irq, void *data) -{ - struct vsc_tp *tp = data; - - if (tp->event_notify) - tp->event_notify(tp->event_notify_context); - - return IRQ_HANDLED; -} - static int vsc_tp_match_any(struct acpi_device *adev, void *data) { struct acpi_device **__adev = data; @@ -485,10 +516,9 @@ static int vsc_tp_probe(struct spi_device *spi) tp->spi = spi; irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY); - ret = devm_request_threaded_irq(dev, spi->irq, vsc_tp_isr, - vsc_tp_thread_isr, - IRQF_TRIGGER_FALLING | IRQF_ONESHOT, - dev_name(dev), tp); + ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr, + IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + dev_name(dev), tp); if (ret) return ret; @@ -522,6 +552,8 @@ static int vsc_tp_probe(struct spi_device *spi) err_destroy_lock: mutex_destroy(&tp->mutex); + free_irq(spi->irq, tp); + return ret; } @@ -532,6 +564,8 @@ static void vsc_tp_remove(struct spi_device *spi) platform_device_unregister(tp->pdev); mutex_destroy(&tp->mutex); + + free_irq(spi->irq, tp); } static const struct acpi_device_id vsc_tp_acpi_ids[] = { diff --git a/drivers/misc/mei/vsc-tp.h b/drivers/misc/mei/vsc-tp.h index f9513ddc3e40..14ca195cbddc 100644 --- a/drivers/misc/mei/vsc-tp.h +++ b/drivers/misc/mei/vsc-tp.h @@ -37,6 +37,9 @@ int vsc_tp_xfer(struct vsc_tp *tp, u8 cmd, const void *obuf, size_t olen, int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb, void *context); +int vsc_tp_request_irq(struct vsc_tp *tp); +void vsc_tp_free_irq(struct vsc_tp *tp); + void vsc_tp_intr_enable(struct vsc_tp *tp); void vsc_tp_intr_disable(struct vsc_tp *tp); void vsc_tp_intr_synchronize(struct vsc_tp *tp); From patchwork Fri Apr 19 05:24:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1925391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLNQ147rfz23jG for ; Fri, 19 Apr 2024 15:25:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rxgkD-0003OU-3G; Fri, 19 Apr 2024 05:25:05 +0000 Received: from mail-ot1-f41.google.com ([209.85.210.41]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rxgkA-0003L7-NX for kernel-team@lists.ubuntu.com; Fri, 19 Apr 2024 05:25:02 +0000 Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-6eb8809a44eso970567a34.0 for ; Thu, 18 Apr 2024 22:25:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713504300; x=1714109100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u8jddK0GClqs9N3YZyttcx+eIPAdL4bLXXKEYYgrncQ=; b=fvYdpskR7SjdPVPYfXZSe7Aj+q8yKyvSlSjrNyn6Hw0LTYl1lhQGISDsCIVnp4TK97 5HvjRSCaClnUE24D+KKDkrH2/quL0Mwcjri89txoRa2jl2uAVCgmPCwzGnSizTMZqY+0 eNEkYkg0MOUr7qp2zA0RHsYQbUFFMWmeuWpc/1HH+vCggU/c2wVJrifGEnrK48Fa2Nkl n5P3Y1GvdBGa0+dgmMvnDh2MKswNFDsbM/DO2NcXSJ80HmtAFFvbdHTPilqN6kTd6o9K YKyEg97HL182p4rqmB5Ith8StIM5uxgYXsTzHbTx1sN+/ui3vuba6cV5ofO06yKvfbjj W3PA== X-Gm-Message-State: AOJu0YzPozEAj0cZVQ/fVGr96LFRJ9KfXlf5kU51/xJ1SQLGzOhO17xO 7cj/f+3+R8M1fwgMCr54z/HmxwKG9IjGd/9sYkc/nEtaFN3CVqQDQHGQKw== X-Google-Smtp-Source: AGHT+IFEfyolM32b0SCeDQn1Ewd0+yDKnef32j1S+eA/xCPB5GDpry9NHP1+3euGau8iotIuxe0cQA== X-Received: by 2002:a05:6808:4181:b0:3c7:609:2470 with SMTP id dj1-20020a056808418100b003c706092470mr909341oib.41.1713504299601; Thu, 18 Apr 2024 22:24:59 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id v7-20020aa78087000000b006f0b820022dsm857083pff.75.2024.04.18.22.24.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 22:24:58 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/5][SRU][Noble/Unstable] media: ipu-bridge: Add ov01a10 in Dell XPS 9315 Date: Fri, 19 Apr 2024 13:24:23 +0800 Message-ID: <20240419052424.278801-5-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419052424.278801-1-vicamo.yang@canonical.com> References: <20240419052424.278801-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.41; envelope-from=vicamo@gmail.com; helo=mail-ot1-f41.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Sakari Ailus BugLink: https://bugs.launchpad.net/bugs/2061747 Add Omnivision ov01a10 sensor used in Dell XPS 9315, and use the driver default frequency. Signed-off-by: Sakari Ailus Reviewed-by: Daniel Scally Signed-off-by: Hans Verkuil (cherry picked from commit ec86a04bedb1727c847552dd270df9fdbc098cf4) Signed-off-by: You-Sheng Yang --- drivers/media/pci/intel/ipu-bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index f980e3125a7b..b2cf80d62ba2 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -60,6 +60,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = { IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000), /* GalaxyCore GC0310 */ IPU_SENSOR_CONFIG("INT0310", 0), + /* Omnivision ov01a10 */ + IPU_SENSOR_CONFIG("OVTI01A0", 1, 400000000), }; static const struct ipu_property_names prop_names = { From patchwork Fri Apr 19 05:24:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1925396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLNQ13rdrz1yP2 for ; Fri, 19 Apr 2024 15:25:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rxgkE-0003QQ-FC; Fri, 19 Apr 2024 05:25:06 +0000 Received: from mail-oo1-f41.google.com ([209.85.161.41]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rxgkC-0003N0-Aw for kernel-team@lists.ubuntu.com; Fri, 19 Apr 2024 05:25:04 +0000 Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5acb90b2a82so1057964eaf.0 for ; Thu, 18 Apr 2024 22:25:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713504302; x=1714109102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A2dW3ph3+z0cG6S3LjJwKlTZS2Vf2f4YXe6+COnqEII=; b=bJsTNLCfi8gCG55Q6qkM11dbQWZx4KvDbKH9L7VPKD84aQnYKIgVGabr0V8u8wOcNk IGHdoxfej9ZczTIhUar1OBrcInPHVS9GDCUs8DLpO/q0lM5+CBOk4wfBbtsGvq9ooYLs Z3alQ2FfHb+dKrzjOtJSuku3zOXwb222UQi9emgs3CfFdNlkmQ0yaWMzC9d04GO6ITlp LlCX/ch112040gV9e81ooWJY7/Mt0V62Xd+zLfa40MrbBj817KB4RFANyKdOz/id58TI YjcpH4DRtsz6TQZveYvWQt1Vx/d9HBFjR4W60t0JRr3a9K8Bw3qAjav1Sqf5iLjoVMIn bbTw== X-Gm-Message-State: AOJu0Ywb4lArvvWCveSTSecM5nj+RJxwLzxbqAIjdhk7sLok/brg4+I3 CDpX34vnkyc6ZBWk/dpakoKd4v6SuWNeOXEC0hsxTWw99B+hT1X6O2SX9w== X-Google-Smtp-Source: AGHT+IF0OBIKlvDY8zJ5U3rtKmNw2jLdPqKC/eD8a72I8zweM3yvoIFs8upV8fyrKYwfFkT2xYqunQ== X-Received: by 2002:a05:6870:b513:b0:238:f752:af9 with SMTP id v19-20020a056870b51300b00238f7520af9mr1216738oap.56.1713504301856; Thu, 18 Apr 2024 22:25:01 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id v7-20020aa78087000000b006f0b820022dsm857083pff.75.2024.04.18.22.25.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 22:25:01 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/5][SRU][Noble/Unstable] UBUNTU: SAUCE: media: ipu-bridge: Support more sensors Date: Fri, 19 Apr 2024 13:24:24 +0800 Message-ID: <20240419052424.278801-6-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240419052424.278801-1-vicamo.yang@canonical.com> References: <20240419052424.278801-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.161.41; envelope-from=vicamo@gmail.com; helo=mail-oo1-f41.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Hao Yao BugLink: https://bugs.launchpad.net/bugs/2061747 Backported from patch/v6.8/0003-media-ipu-bridge-Support-more-sensors.patch from commit 92fb37eb of upstream repository in github.com/intel/ipu6-drivers. Signed-off-by: Hao Yao Signed-off-by: You-Sheng Yang --- drivers/media/pci/intel/ipu-bridge.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index b2cf80d62ba2..2ac59e02b839 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -58,10 +58,27 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = { IPU_SENSOR_CONFIG("INT3537", 1, 437000000), /* Omnivision ov13b10 */ IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000), + IPU_SENSOR_CONFIG("OVTI13B1", 1, 560000000), /* GalaxyCore GC0310 */ IPU_SENSOR_CONFIG("INT0310", 0), /* Omnivision ov01a10 */ IPU_SENSOR_CONFIG("OVTI01A0", 1, 400000000), + /* Omnivision ov08x40 */ + IPU_SENSOR_CONFIG("OVTI08F4", 1, 400000000), + /* Himax hm11b1 */ + IPU_SENSOR_CONFIG("HIMX11B1", 1, 384000000), + /* Himax hm2170 */ + IPU_SENSOR_CONFIG("HIMX2170", 1, 384000000), + /* Himax hm2172 */ + IPU_SENSOR_CONFIG("HIMX2172", 1, 384000000), + /* Omnivision ov01a1s */ + IPU_SENSOR_CONFIG("OVTI01AS", 1, 400000000), + /* Omnivision ov02c10 */ + IPU_SENSOR_CONFIG("OVTI02C1", 1, 400000000), + /* Omnivision ov02e10 */ + IPU_SENSOR_CONFIG("OVTI02E1", 1, 360000000), + /* Omnivision ov08a10 */ + IPU_SENSOR_CONFIG("OVTI08A1", 1, 500000000), }; static const struct ipu_property_names prop_names = {