Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2605102lqp; Mon, 25 Mar 2024 04:17:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWp6vw5fy0vq12PcZvM60JkUSgKbx7sS9UNkgfvXUSZPCECqfxDvdpF5NhMWJkG8a/4uLobh89bp6TrXswyxqd3njIzMwhF+x/nTJd3qQ== X-Google-Smtp-Source: AGHT+IFqoC5HAG9dNnRnFsOFevP8EADylNdoI7dYRuetVeUFRYW3fWgCREG2Kf2ifdN9xcZfGkRy X-Received: by 2002:a05:6214:194c:b0:696:8568:769b with SMTP id q12-20020a056214194c00b006968568769bmr5654692qvk.4.1711365474189; Mon, 25 Mar 2024 04:17:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711365474; cv=pass; d=google.com; s=arc-20160816; b=NR/VPrM9dN3T9QVW1aHzescNhghtl72Jmnn+Hpz7ZFmfOf3Mo5Vz3E6FuXf6cQ2NpM gKKBZ8LDQcoi6ZqrZOvi6kvXjKieGXGLY5WDROdPgWyqSwybal2LWlqDBPI7YEQLzDai 9P0uaIJKF6LVacVLqts/gXdFsn8pqJRliFGpXrThGr+3V4Ki0h8wUT1LGMtLgo3ct0On weJEzntXmJ3/gnU534xd2dfNllZ/W0STtgPW7N6A5sVOkSl+QymXC0hk9ucSetd4B7jh 9glZClkAK5iDBPuzGvzv4jpjRNBrFYpCNqxgC5zpdq90CeNYL+CPobAe5q923Bza9IOm 6Znw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Jxyb6TcY9M1YrwmRBJpiDwFDSjIvyoCvyD9BCZJB2X0=; fh=k3W6KTPHPa/uNg9cYisTK+gEqAD8kZjQSzjLB4ehctc=; b=nFcI1XfaZ3x4B5nTGi/+U4XpghkTXc6P3ji8/Lfyktq+o5tMcuv9+xN3+tTccNY5io OlxQwbpktC/5tbJIZSaGYwuD0nvDokFP9ok31PyD3MZRKdTbEWmXoZLVpO2xmnScmofM 3Ifg0PRqPxHEokoCU2Az6zIoMZY8tH5gbCWB5cB+9+q1Y0e52QKDoF3HNOtY5EnY/5vw YRUPalSQN1Qysze3kq7ZAYUWZtaoCRVMMMVHDtuv7fqMGnmW3/5KhY8u/ptT0lDqtpah PBXfhod8d37qkZayAZ7VFKbGzgvbks+uxQZMu3n/wgBifsKqsNPZs/VG9hsBqWz7dEkj +szA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rmuno7Pc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fv6-20020a056214240600b0069680e143b3si4110956qvb.556.2024.03.25.04.17.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:17:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rmuno7Pc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115552-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 873261C2F16F for ; Mon, 25 Mar 2024 11:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 176BA24C34E; Mon, 25 Mar 2024 02:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rmuno7Pc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F8201EFE59; Sun, 24 Mar 2024 22:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321054; cv=none; b=fAO4POHJ0hz55fRemfzpSVD0Qc8JuwsmZMwAmdmozCW6Ts0aGmdSLM+ovTMiM2pY+2syA1nmyFuqW494OnE1hgvcwRZi3HonjyqHMe3+G60pj6ju0/CBAzmRq0Gh3REL3TzZQAJ5m48VBUQjPFuLaSGYCZGVwomOZgk4UTyy2HE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321054; c=relaxed/simple; bh=U7g9Y0xZPvSe/JiBFaypvdFGXsPf97kTS1mDNLbllxU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tnNtl8RkFa7PYhkwAfKIg5CM7LtxusPabzvozH1F+CTBRuwfij2IoLBiOHBeM0oX1EPzjfTjRV70D4p6euDxcbvb0LzqGBRPuvAiSETojw5/LE5kdAPdV81q+SAv3syXovWJw0zUicNNMU6gLX+DuE5vcj0IMAw7u55zHaFl9ww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rmuno7Pc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBA6FC433C7; Sun, 24 Mar 2024 22:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321054; bh=U7g9Y0xZPvSe/JiBFaypvdFGXsPf97kTS1mDNLbllxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rmuno7PcLPHRE/vVvSq9XCu59O5o/IbUSKEOBdqhpmgAx39BEKBW34QRbS+Urmxe0 95AvhbdXljJLLdSckAxhcfbRHhH91oRk0z5FQNrPGKqtcnzI5uVnGp/PDOsoFBd/OX LCM2O6k3+ECEwwebXzxWgWMquFCHokNM41aPTHr+CXTm2PPimQ6mzUAFXIJloghwgS yyluBO1QfYp6F+PqTxhXkPUbk3dc3i/27jxgdl++yVdn71stUZQ2wU+X3gsSx4SwA4 73nqvF7d7nSdgy3lRaLRS8hHIchQ8l+cwRUzeu3x1VipwhhcDNnsIEAa5UFqTo9qjI tpXuCENVM3VXQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexander Usyskin , Tomas Winkler , Greg Kroah-Hartman Subject: [PATCH 6.7 618/713] mei: gsc_proxy: match component when GSC is on different bus Date: Sun, 24 Mar 2024 18:45:44 -0400 Message-ID: <20240324224720.1345309-619-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Alexander Usyskin commit a0776c214d47ea4f7aaef138095beaa41cff03ef upstream. On Arrow Lake S systems, MEI is no longer strictly connected to bus 0, while graphics remain exclusively on bus 0. Adapt the component matching logic to accommodate this change: Original behavior: Required both MEI and graphics to be on the same bus 0. New behavior: Only enforces graphics to be on bus 0 (integrated), allowing MEI to reside on any bus. This ensures compatibility with Arrow Lake S and maintains functionality for the legacy systems. Fixes: 1dd924f6885b ("mei: gsc_proxy: add gsc proxy driver") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20240220200020.231192-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c b/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c index be52b113aea93..89364bdbb1290 100644 --- a/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c +++ b/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c @@ -96,7 +96,8 @@ static const struct component_master_ops mei_component_master_ops = { * * The function checks if the device is pci device and * Intel VGA adapter, the subcomponent is SW Proxy - * and the parent of MEI PCI and the parent of VGA are the same PCH device. + * and the VGA is on the bus 0 reserved for built-in devices + * to reject discrete GFX. * * @dev: master device * @subcomponent: subcomponent to match (I915_COMPONENT_SWPROXY) @@ -123,7 +124,8 @@ static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent, if (subcomponent != I915_COMPONENT_GSC_PROXY) return 0; - return component_compare_dev(dev->parent, ((struct device *)data)->parent); + /* Only built-in GFX */ + return (pdev->bus->number == 0); } static int mei_gsc_proxy_probe(struct mei_cl_device *cldev, @@ -146,7 +148,7 @@ static int mei_gsc_proxy_probe(struct mei_cl_device *cldev, } component_match_add_typed(&cldev->dev, &master_match, - mei_gsc_proxy_component_match, cldev->dev.parent); + mei_gsc_proxy_component_match, NULL); if (IS_ERR_OR_NULL(master_match)) { ret = -ENOMEM; goto err_exit; -- 2.43.0