From patchwork Sun Feb 11 13:04:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Winkler X-Patchwork-Id: 199450 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1914240dyd; Sun, 11 Feb 2024 05:04:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9z5D83qaGGD+SRBkZX+iSBvI+/SPtOYhpVS+Z1RzFhWaAScNASK3WiQbO19X3FqkqHjNf6vpJBHQqquIqGfan+KNnfw== X-Google-Smtp-Source: AGHT+IHz/e0U6s2MhOlbe2wWe+hzCA0BoVsJq4ZcUZk3BWcEo4cRjnBQ9AO/8yRE2PbdTozCrEMv X-Received: by 2002:a05:6102:5121:b0:46d:21f5:60a6 with SMTP id bm33-20020a056102512100b0046d21f560a6mr2289462vsb.16.1707656685161; Sun, 11 Feb 2024 05:04:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707656685; cv=pass; d=google.com; s=arc-20160816; b=ueOnb5WyvS95OTV6dE+OB1xsyOHdbBgSfWevD0JY5Az7ILyhDjTHxY6qG/6iQ6L8qX nvBK67ZQRT/79PFZJlPNkGAec/iYk6h3ak8QTsRvX3NtERmwauQBmI3nxwWmP6PovR53 UhhzaFO6Di1J/XRXZBJMVq4wNz4UTFkAfXCvHkUlkWMc99WB46mPBx/SlQfWXgbjOVR9 +A/8I+/uPAQFkRnqkuwxfKWHyIRF47ehgulPdVOpYJhemfcIOlG0pQSNZOZjXpX3tx6T q1Kt6Dko225FtYI1dJCpWSSWc4mk5T2gMixX5YezS/Fi88Mtg9taUkqKVVbJs3XfvOrY thrA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=mzmTiYnJcade9cuj/iFJ50axwvtM+Ddqyz11xM1sQlA=; fh=v8B4C4LynD0V9xyBi2VDOYIUVuMXomI07AI/DWkNO2U=; b=fG3lBybgWK99ZDat99pRy1Xsfn7wsvhsUNGScylI4ceA2mpushhko8mEAlLWXQHGSv zGwWGvK9u9Fu/w+yN+A6nVkXo4zCbqqRH38gDz0xb8raR6o/ZD1TVIbAqraaVfGvW0sX bIjNNK4QBVLe7JMbXOiMKh59CgxPgFgWsC8Nr2Hu0MBiq4lKEIWMfCOxN0cwH9y+MIBf yep2wH/Q+KHzPLa6J8jl1ZQRwvrK6pfFtHRVmOWLdkTE38h9srNhxhlWRzoWzoP9DT79 evjQToE7gsEKYa65Jt6k1KcD1M0jOrCJCLSH3VXzXXRWek/b6lr6TRtzpMWG7yyuOH33 amHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GhF+6sLO; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-60781-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60781-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVsc+sey77N8Fvc0b3ysX9MDJBYnMbWdOqDF8fkRNP90mb7RuEkV0Ui9uXbQZR8fKfa+O+dsinACSeE6Esox/UVoFrGpg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id hw8-20020a67e708000000b0046d23a380a3si500861vsb.506.2024.02.11.05.04.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 05:04:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60781-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GhF+6sLO; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-60781-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60781-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 BD5C61C20FCB for ; Sun, 11 Feb 2024 13:04:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FED95B5A8; Sun, 11 Feb 2024 13:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GhF+6sLO" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 766BD1E480; Sun, 11 Feb 2024 13:04:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707656668; cv=none; b=C2bRafU5z4KXjqj1KbLLSb11bZmfZNgweSe74NaUfHxt5o2CBf5xNBYvGE+EDNuevh2HInewNDft6RLrlslw3tBohf4XnRgqvQbJ/MF0ArEiDOS2CyyNqRSEMKACDZfNXJ7Mc/MgCzOVP9CvB730cVf28l7MTZgBl+keuRTqG2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707656668; c=relaxed/simple; bh=ZBgZA9ODcwNHYL2nZ5Frn5vjDI+vzGIrSTkZZkxY+l4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TFvrSt7Zr5L32hG5kap8VRY/oqPYgZsr2WmHqlYJONZjCD1MPtnQwxQS36sg86/Oc/Zdgl2EYqytMeXEUWUl/tjMH2R16riVLm6yRwG3TzkBNYd2HU4OTnG/j+dc9+Kzriohr5ocseIyaef3h/ZlpO3O+jl8vHSIPX045PrQEVQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GhF+6sLO; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707656666; x=1739192666; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZBgZA9ODcwNHYL2nZ5Frn5vjDI+vzGIrSTkZZkxY+l4=; b=GhF+6sLONpRNaFKAYF9xL0ID+nJqJgFFQyKp+7nkRidixwZUsm7KSV6v olxyt8+DlTMRTNuyIK6UtZGxRvKXvfc6vQmAIOOZLlP58t2jd5OQFuxAM 3EQzxNHOSuPkpkPvXdhtQeVca9pRrEspT2Iv1YDdGjHE5n0UMVPnisRq4 np2au9cjBZj6np3lvUa43egBnTEGl8Y1JMcnLr2mTOKV57eOn8+YzKeLJ FbkvxGxdhLB8L1qvWoISjx2aJE6NH0MTnHmSPWfrKO7toetegNBShjAA0 ZqZsOfnMJaptLC2Y/UgYCL0of35ROMJZZc3Jk4EtFAY0CwDxYyo8ij3/6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10980"; a="1756092" X-IronPort-AV: E=Sophos;i="6.05,261,1701158400"; d="scan'208";a="1756092" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2024 05:04:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,261,1701158400"; d="scan'208";a="2407111" Received: from twinkler-lnx.jer.intel.com ([10.12.231.216]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2024 05:04:21 -0800 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , Vitaly Lubart , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tomas Winkler Subject: [char-misc-next] mei: gsc_proxy: match component when GSC is on different bus Date: Sun, 11 Feb 2024 15:04:08 +0200 Message-ID: <20240211130408.3478-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790607816503935510 X-GMAIL-MSGID: 1790607816503935510 From: Alexander Usyskin 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. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- Requires 'mei: me: add arrow lake point S DID' https://lore.kernel.org/lkml/20240211103912.117105-1-tomas.winkler@intel.com/ 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 be52b113aea937c7c658e06c..89364bdbb1290f5726a34945 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;