Skip to content

Commit 62422b7

Browse files
committed
drm/xe: Define all possible engines in media IP descriptors
Rather than trying to identify exactly which engines are available on each platform in the IP descriptor, just include the list of all media engines that the IP could theoretically support (i.e., 8 VCS + 4 VECS). We still rely on the media fuse registers to tell us which specific engine instances are actually present on a given platform, so there shouldn't be any functional change. This will help prevent mistakes with engine numbering (for example ambiguity about whether the 2nd VCS engine on a platform with exactly two engines is numbered "VCS1" or "VCS2") and will also future-proof the code a bit more in case new SKUs or platform refreshes extend the engine list in the future. Note that the media fuse register technically has an 8-bit field for VECS engine presence starting on Xe2. However there's still no MMIO register range reserved for VE engines above VECS3, so VE0-VE3 is still consider the "maximum" VE engine mask that the driver can support for now. Bspec: 52614, 52615, 62567 Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7af6b11 commit 62422b7

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

drivers/gpu/drm/xe/xe_pci.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ static const struct xe_media_desc media_xem = {
185185
.rel = 0,
186186

187187
.hw_engine_mask =
188-
BIT(XE_HW_ENGINE_VCS0) | BIT(XE_HW_ENGINE_VCS2) |
189-
BIT(XE_HW_ENGINE_VECS0),
188+
GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
189+
GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0),
190190
};
191191

192192
static const struct xe_media_desc media_xehpm = {
@@ -195,21 +195,23 @@ static const struct xe_media_desc media_xehpm = {
195195
.rel = 55,
196196

197197
.hw_engine_mask =
198-
BIT(XE_HW_ENGINE_VCS0) | BIT(XE_HW_ENGINE_VCS2) |
199-
BIT(XE_HW_ENGINE_VECS0) | BIT(XE_HW_ENGINE_VECS1),
198+
GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
199+
GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0),
200200
};
201201

202202
static const struct xe_media_desc media_xelpmp = {
203203
.name = "Xe_LPM+",
204204
.hw_engine_mask =
205-
BIT(XE_HW_ENGINE_VCS0) | BIT(XE_HW_ENGINE_VCS2) |
206-
BIT(XE_HW_ENGINE_VECS0) | BIT(XE_HW_ENGINE_GSCCS0)
205+
GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
206+
GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0) |
207+
BIT(XE_HW_ENGINE_GSCCS0)
207208
};
208209

209210
static const struct xe_media_desc media_xe2 = {
210211
.name = "Xe2_LPM / Xe2_HPM",
211212
.hw_engine_mask =
212-
BIT(XE_HW_ENGINE_VCS0) | BIT(XE_HW_ENGINE_VECS0), /* TODO: GSC0 */
213+
GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
214+
GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0), /* TODO: GSC0 */
213215
};
214216

215217
static const struct xe_device_desc tgl_desc = {

0 commit comments

Comments
 (0)