Skip to content

Commit f551b69

Browse files
committed
Revert "drm/xe/pf: Set VF LMEM BAR size"
JIRA: https://issues.redhat.com/browse/RHEL-113577 Upstream Status: RHEL only This reverts commit 94eae6e. This commit was backported automatically as part of the DRM backport. The pci_iov_vf_bar_get_sizes() and pci_iov_vf_bar_set_size() helpers are not present in this tree. Backporting them would require backport other changes such as pci_resource_is_iov(), pci_iov_is_memory_decoding_enabled(), pci_iov_resource_set_size() and possible others. Revert this instead. NOTE: This commit does not compile due to missing RHEL-specific fix-ups, which are split out into separate Git commits following this one. If git bisect selected this commit, run "git bisect skip" and try again. Repeat this until it selects a commit which compiles. Signed-off-by: José Expósito <jexposit@redhat.com>
1 parent 698cf51 commit f551b69

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

drivers/gpu/drm/xe/regs/xe_bars.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77

88
#define GTTMMADR_BAR 0 /* MMIO + GTT */
99
#define LMEM_BAR 2 /* VRAM */
10-
#define VF_LMEM_BAR 9 /* VF VRAM */
1110

1211
#endif

drivers/gpu/drm/xe/xe_pci_sriov.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
* Copyright © 2023-2024 Intel Corporation
44
*/
55

6-
#include <linux/bitops.h>
7-
#include <linux/pci.h>
8-
9-
#include "regs/xe_bars.h"
106
#include "xe_assert.h"
117
#include "xe_device.h"
128
#include "xe_gt_sriov_pf_config.h"
@@ -132,18 +128,6 @@ static void pf_engine_activity_stats(struct xe_device *xe, unsigned int num_vfs,
132128
}
133129
}
134130

135-
static int resize_vf_vram_bar(struct xe_device *xe, int num_vfs)
136-
{
137-
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
138-
u32 sizes;
139-
140-
sizes = pci_iov_vf_bar_get_sizes(pdev, VF_LMEM_BAR, num_vfs);
141-
if (!sizes)
142-
return 0;
143-
144-
return pci_iov_vf_bar_set_size(pdev, VF_LMEM_BAR, __fls(sizes));
145-
}
146-
147131
static int pf_enable_vfs(struct xe_device *xe, int num_vfs)
148132
{
149133
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
@@ -174,12 +158,6 @@ static int pf_enable_vfs(struct xe_device *xe, int num_vfs)
174158
if (err < 0)
175159
goto failed;
176160

177-
if (IS_DGFX(xe)) {
178-
err = resize_vf_vram_bar(xe, num_vfs);
179-
if (err)
180-
xe_sriov_info(xe, "Failed to set VF LMEM BAR size: %d\n", err);
181-
}
182-
183161
err = pci_enable_sriov(pdev, num_vfs);
184162
if (err < 0)
185163
goto failed;

0 commit comments

Comments
 (0)