...
 
Commits (8)
......@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-amdgpu],
[1.0.0],
[1.0.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-amdgpu])
......
......@@ -663,25 +663,23 @@ static Bool amdgpu_get_tile_config(ScrnInfoPtr pScrn)
static void AMDGPUSetupCapabilities(ScrnInfoPtr pScrn)
{
#ifdef AMDGPU_PIXMAP_SHARING
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
uint64_t value;
int ret;
pScrn->capabilities = 0;
/* PRIME offloading requires acceleration */
if (!info->use_glamor)
return;
ret = drmGetCap(pAMDGPUEnt->fd, DRM_CAP_PRIME, &value);
if (ret == 0) {
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
if (value & DRM_PRIME_CAP_EXPORT) {
pScrn->capabilities |= RR_Capability_SourceOutput;
if (info->use_glamor && info->dri2.available)
pScrn->capabilities |= RR_Capability_SinkOffload;
}
if (value & DRM_PRIME_CAP_IMPORT) {
pScrn->capabilities |= RR_Capability_SinkOutput;
if (info->use_glamor && info->dri2.available)
pScrn->capabilities |= RR_Capability_SourceOffload;
}
if (value & DRM_PRIME_CAP_EXPORT)
pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload;
if (value & DRM_PRIME_CAP_IMPORT)
pScrn->capabilities |= RR_Capability_SinkOutput | RR_Capability_SourceOffload;
}
#endif
}
......@@ -785,6 +783,10 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
goto fail;
}
/* Get ScreenInit function */
if (!xf86LoadSubModule(pScrn, "fb"))
return FALSE;
if (!AMDGPUPreInitAccel_KMS(pScrn))
goto fail;
......@@ -870,10 +872,6 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
/* Set display resolution */
xf86SetDpi(pScrn, 0, 0);
/* Get ScreenInit function */
if (!xf86LoadSubModule(pScrn, "fb"))
return FALSE;
if (!xf86SetGamma(pScrn, zeros))
return FALSE;
......@@ -1415,7 +1413,8 @@ static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen)
return FALSE;
}
if (amdgpu_bo_map(pScrn, info->front_buffer)) {
if (!info->use_glamor &&
amdgpu_bo_map(pScrn, info->front_buffer) != 0) {
ErrorF("Failed to map front buffer memory\n");
return FALSE;
}
......
......@@ -87,6 +87,13 @@ amdgpu_sync_init(ScreenPtr screen)
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
SyncScreenFuncsPtr screen_funcs;
if (!xf86LoaderCheckSymbol("miSyncShmScreenInit")) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"SYNC extension fences disabled because "
"miSyncShmScreenInit symbol unresolved\n");
return FALSE;
}
if (!miSyncShmScreenInit(screen)) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"SYNC extension fences disabled because "
......
......@@ -905,7 +905,7 @@ static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
if (max_height < iter->mode.VDisplay)
max_height = iter->mode.VDisplay;
}
#ifndef HAS_DIRTYTRACKING2
#if !defined(HAS_DIRTYTRACKING_ROTATION) && !defined(HAS_DIRTYTRACKING2)
if (iter != crtc) {
ErrorF
("Cannot do multiple crtcs without X server dirty tracking 2 interface\n");
......@@ -993,6 +993,7 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res
drmmode_crtc->mode_crtc =
drmModeGetCrtc(pAMDGPUEnt->fd, mode_res->crtcs[num]);
drmmode_crtc->drmmode = drmmode;
drmmode_crtc->dpms_mode = DPMSModeOff;
crtc->driver_private = drmmode_crtc;
drmmode_crtc_hw_id(crtc);
......@@ -1117,6 +1118,9 @@ static void drmmode_output_dpms(xf86OutputPtr output, int mode)
drmModeConnectorPtr koutput = drmmode_output->mode_output;
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(output->scrn);
if (!koutput)
return;
if (mode != DPMSModeOn && crtc)
drmmode_do_crtc_dpms(crtc, mode);
......@@ -1737,7 +1741,7 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
goto fail;
}
if (amdgpu_bo_map(scrn, info->front_buffer)) {
if (!info->use_glamor && amdgpu_bo_map(scrn, info->front_buffer) != 0) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to map front buffer memory\n");
goto fail;
......