Skip to content

Commit 7079194

Browse files
committed
drm/mgag200: Add an option to disable Write-Combine
jira LE-1907 Rebuild_History Non-Buildable kernel-5.14.0-427.33.1.el9_4 commit-author Jocelyn Falempe <jfalempe@redhat.com> commit b593ea9 Unfortunately, the G200 ioburst workaround doesn't work on some servers like Dell poweredge XR11, XR5610, or HPE XL260. In this case completely disabling WC is the only option to achieve low-latency. So this adds a new Kconfig option to disable WC mapping of the G200. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240517151050.624797-3-jfalempe@redhat.com (cherry picked from commit b593ea9) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 059cfd4 commit 7079194

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/gpu/drm/mgag200/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ config DRM_MGAG200
1111
MGA G200 desktop chips and the server variants. It requires 0.3.0
1212
of the modesetting userspace driver, and a version of mga driver
1313
that will fail on KMS enabled devices.
14+
15+
config DRM_MGAG200_DISABLE_WRITECOMBINE
16+
bool "Disable Write Combine mapping of VRAM"
17+
depends on DRM_MGAG200 && PREEMPT_RT
18+
help
19+
The VRAM of the G200 is mapped with Write-Combine to improve
20+
performances. This can interfere with real-time tasks; even if they
21+
are running on other CPU cores than the graphics output.
22+
Enable this option only if you run realtime tasks on a server with a
23+
Matrox G200.

drivers/gpu/drm/mgag200/mgag200_drv.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,18 @@ int mgag200_device_preinit(struct mga_device *mdev)
162162
}
163163
mdev->vram_res = res;
164164

165+
#if defined(CONFIG_DRM_MGAG200_DISABLE_WRITECOMBINE)
166+
mdev->vram = devm_ioremap(dev->dev, res->start, resource_size(res));
167+
if (!mdev->vram)
168+
return -ENOMEM;
169+
#else
165170
mdev->vram = devm_ioremap_wc(dev->dev, res->start, resource_size(res));
166171
if (!mdev->vram)
167172
return -ENOMEM;
168173

169174
/* Don't fail on errors, but performance might be reduced. */
170175
devm_arch_phys_wc_add(dev->dev, res->start, resource_size(res));
176+
#endif
171177

172178
return 0;
173179
}

0 commit comments

Comments
 (0)