From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE70F19E7D1 for ; Fri, 14 Nov 2025 13:10:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763125816; cv=none; b=hgjsF4j9Ag4fe56n86rYeau6gHjS7gfYqy6u5MmQ0W0y0IuqPzUH1Q9npVUKXIgLjFvFk9Yrf25twYK1ek40DrwEfKnUonGR8x8lk75jZ2FUGDegRBcEqFZl2DwT92lBr0oDmgiw4ZbXCMffoK0gWHPUpXCrQIu3oDTqorxstVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763125816; c=relaxed/simple; bh=RN+oS9V0JBuDCUU2h38OjtR/75MiXG1oI7KgYKVEfEo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=R6sNQalGEXNuR0RfVdbEnGPpjuLXUsF14WmNa46sECGatKzxDjz0XGD/I+Kzld567EkJsTn6o6b21fSHV2Szx4mEK5eNjnmqNKM9KCq11IJ6N2vSzC+H3F07GhCffMvnEtO0UbaXXcPtR/r6IdYofaCAPHXj0HVH67ChoMyu/X8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BVmpwxtL; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BVmpwxtL" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4710a1f9e4cso14464935e9.0 for ; Fri, 14 Nov 2025 05:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763125813; x=1763730613; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EJ9S8y/liwc1XSXK0RvzbAJey2hh3NqcyHJfhnjyxSE=; b=BVmpwxtLKXCjxD2blA41IYyEGW/Lo1HlP1SzzWm7IZxYhij6jVL3y+oLlUU9QD9qJk O/5Xwx7mAYIhQZmAwgdFpAOIGEXgPk/Tk8F+Shl9pfP2m6pzRDvyB9xVI3xVYwWuvlVl TXQ8kmFXHFBGTM13Wmd2HNyc39+kQHsyP889sB76PJUZaOW5bysFB9ahHZVVWhSdL4f9 sX4D7fHbEiw84Vul6BbyX7WvwR7nPxTXyaWi3tsaYtqnmSQestL7eBh+QmCnIyNGXulo HY8gL3jYAfft+yl1ziH+I5ThTAIg2XXakyVvzk1S2mnxbQC8H7wIPmTvHiyJQXRp0Ov+ sYpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763125813; x=1763730613; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EJ9S8y/liwc1XSXK0RvzbAJey2hh3NqcyHJfhnjyxSE=; b=TerCdx8mvt4CrxKS9za2S6zGRiolC/JQG8mcKYluj9rmaUOEwKGUWsgIl0g61uV8/R 327RY9Z0i1C10PNsyr9BwMAObhIHIRSUtPEDWs3SAvR+MujBnldEoOXHFS8bXDLPOOpk QCe7fmG4hzMivPgGgu8/6M4Sl/mdzuW9/Va0XMMx2Y+DFCBISB1HeCgbMhcQVyO974Dz VigCZannMUVkFmY/lJtjUFKFolhqOuV33COL7KHjHbMkYWea38PtaUE/z2RBP9QLfmK3 vfFP/Wq/uuKzhQcAsmWZC7AWVOKM+9F2UwpZ0tE4df3cBLd7L21qamWpXXKAfWuvLvED zDFA== X-Forwarded-Encrypted: i=1; AJvYcCWoVatF2R1C3qh/v7AFNJDOG+oohxMReOBaZZ4zvV7GmvsZYoxwDp5XfUM8uOx945v8Yojc2B/8CYNUFZ0=@vger.kernel.org X-Gm-Message-State: AOJu0YzKwXszeRQfgkxoBMaEbAWuWydwDb5CNxDO+P3nFiu8Bv97E/pl eP/9omDT6INWsh93q5wk7UWzJhfKelcAlnQs35HjSPfbmNV8QI9QxyZrmU/BR/4q0zk= X-Gm-Gg: ASbGncs2g7sqtOg33xe2wwLmbvLSFOvgnpTPzVypCA8tNjOUNen+GLALGeIb1TYrgPM UWw353drTaYie+uGzbTGZXqLz2h0waYfzj+kmx+JSOSM3qlO3qB2mzzDQcye67O9ai2X+o5QctK ubgCVCszZxp6MbvU/rR8mzwvM2J5S4dDtt8XW1azhvsy00WOm02OZCXeS7rbF3eT0hZJwiqyw6K /8dJ5bzvR6V0vGDx7BR69GcdYeEE9g85eTCyL6VSRtmfXXZHWMk8U8VNy8xZ/s21Z6ckBBTXN9+ FV3JqmSdjbI7w28C+AB9XsSJA6kxlpMD+Idy+6bkiWACvOXr5OCmYSz9s123EkatB4XGz1vpvtx 1APGc39DffbRojJq+/MiikvNPgFOM977xTkHKMs1E3vYB5alzUg506kZNAmiYqrTTCCjN2EOFgN Hx X-Google-Smtp-Source: AGHT+IFRUwKdmMnVHD85N3NvYRNZUnPZKMrSMMhF+DQcXz4gku9fHv+s1niWianlCFXxAAY6/RwthA== X-Received: by 2002:a05:600c:3587:b0:477:63b5:7148 with SMTP id 5b1f17b1804b1-4778fe55174mr31972855e9.6.1763125812943; Fri, 14 Nov 2025 05:10:12 -0800 (PST) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4779527a656sm5951845e9.10.2025.11.14.05.10.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 05:10:11 -0800 (PST) Received: from draig (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1B92A5F820; Fri, 14 Nov 2025 13:10:11 +0000 (GMT) From: =?utf-8?Q?Alex_Benn=C3=A9e?= To: Ilpo =?utf-8?Q?J=C3=A4rvinen?= Cc: Simon Richter , Lucas De Marchi , Alex Deucher , amd-gfx@lists.freedesktop.org, Bjorn Helgaas , David Airlie , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , linux-pci@vger.kernel.org, Rodrigo Vivi , Simona Vetter , Tvrtko Ursulin , Christian =?utf-8?Q?K=C3=B6nig?= , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , =?utf-8?Q?Micha=C5=82?= Winiarski , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 08/11] drm/xe: Remove driver side BAR release before resize In-Reply-To: <20251113162628.5946-9-ilpo.jarvinen@linux.intel.com> ("Ilpo =?utf-8?Q?J=C3=A4rvinen=22's?= message of "Thu, 13 Nov 2025 18:26:25 +0200") References: <20251113162628.5946-1-ilpo.jarvinen@linux.intel.com> <20251113162628.5946-9-ilpo.jarvinen@linux.intel.com> User-Agent: mu4e 1.12.14-dev2; emacs 30.1 Date: Fri, 14 Nov 2025 13:10:11 +0000 Message-ID: <87ecq0pxos.fsf@draig.linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ilpo J=C3=A4rvinen writes: > PCI core handles releasing device's resources and their rollback in > case of failure of a BAR resizing operation. Releasing resource prior > to calling pci_resize_resource() prevents PCI core from restoring the > BARs as they were. > > Remove driver-side release of BARs from the xe driver. > > Signed-off-by: Ilpo J=C3=A4rvinen > Cc: Lucas De Marchi > --- > drivers/gpu/drm/xe/xe_vram.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c > index 00dd027057df..5aacab9358a4 100644 > --- a/drivers/gpu/drm/xe/xe_vram.c > +++ b/drivers/gpu/drm/xe/xe_vram.c > @@ -33,9 +33,6 @@ _resize_bar(struct xe_device *xe, int resno, resource_s= ize_t size) > int bar_size =3D pci_rebar_bytes_to_size(size); > int ret; >=20=20 > - if (pci_resource_len(pdev, resno)) > - pci_release_resource(pdev, resno); > - > ret =3D pci_resize_resource(pdev, resno, bar_size, 0); > if (ret) { > drm_info(&xe->drm, "Failed to resize BAR%d to %dM (%pe). Consider enab= ling 'Resizable BAR' support in your BIOS\n", This didn't apply, I assume due to a clash with: d30203739be79 (drm/xe: Move rebar to be done earlier) --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro