Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-amdgpu/dist/src restore the set ve...
details: https://anonhg.NetBSD.org/xsrc/rev/3c2dc8776538
branches: trunk
changeset: 10800:3c2dc8776538
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Aug 27 01:01:18 2021 +0000
description:
restore the set version call in amdgpu_open_drm_master().
now this works again with reredrum branch.
diffstat:
external/mit/xf86-video-amdgpu/dist/src/amdgpu_probe.c | 19 ++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diffs (33 lines):
diff -r 3e7bcec4b32c -r 3c2dc8776538 external/mit/xf86-video-amdgpu/dist/src/amdgpu_probe.c
--- a/external/mit/xf86-video-amdgpu/dist/src/amdgpu_probe.c Tue Aug 24 06:28:25 2021 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/src/amdgpu_probe.c Fri Aug 27 01:01:18 2021 +0000
@@ -196,10 +196,29 @@
struct xf86_platform_device *platform_dev,
AMDGPUEntPtr pAMDGPUEnt)
{
+ drmSetVersion sv;
+ int err;
+
pAMDGPUEnt->fd = amdgpu_kernel_open_fd(pScrn, pci_dev, platform_dev, pAMDGPUEnt);
if (pAMDGPUEnt->fd == -1)
return FALSE;
+ /* Check that what we opened was a master or a master-capable FD,
+ * by setting the version of the interface we'll use to talk to it.
+ * (see DRIOpenDRMMaster() in DRI1)
+ */
+ sv.drm_di_major = 1;
+ sv.drm_di_minor = 1;
+ sv.drm_dd_major = -1;
+ sv.drm_dd_minor = -1;
+ err = drmSetInterfaceVersion(pAMDGPUEnt->fd, &sv);
+ if (err != 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[drm] failed to set drm interface version.\n");
+ amdgpu_kernel_close_fd(pAMDGPUEnt);
+ return FALSE;
+ }
+
/* Check that what we opened is a master or a master-capable FD */
if (!local_drmIsMaster(pAMDGPUEnt->fd)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
Home |
Main Index |
Thread Index |
Old Index