diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2019-03-01 17:35:48 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2019-03-04 17:31:45 +0100 |
commit | 72653455e4f652ca6c7c290c7f1e8a889b77f5ce (patch) | |
tree | df528db283f8d0342cdf865a38f332177a15381d /src | |
parent | 28cd209ebf20561e65d14fa2e8bbfaedf6965948 (diff) |
Revert "Remove set but unused amdgpu_dri2::pKernelDRMVersion"
This reverts commit 720a61000aeb139005bd8125908cec66a6e69554.
We're going to make use of it now.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/amdgpu_dri2.h | 1 | ||||
-rw-r--r-- | src/amdgpu_kms.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/amdgpu_dri2.h b/src/amdgpu_dri2.h index a345e6b..c6a2ab6 100644 --- a/src/amdgpu_dri2.h +++ b/src/amdgpu_dri2.h @@ -30,6 +30,7 @@ #include <xorg-server.h> struct amdgpu_dri2 { + drmVersionPtr pKernelDRMVersion; Bool available; Bool enabled; char *device_name; diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 458d2d0..74d5806 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -1595,6 +1595,12 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags) info->dri2.available = FALSE; info->dri2.enabled = FALSE; + info->dri2.pKernelDRMVersion = drmGetVersion(pAMDGPUEnt->fd); + if (info->dri2.pKernelDRMVersion == NULL) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "AMDGPUDRIGetVersion failed to get the DRM version\n"); + return FALSE; + } /* Get ScreenInit function */ if (!xf86LoadSubModule(pScrn, "fb")) |