xf86-video-amdgpu: Branch 'master'

Michel Dänzer daenzer at kemper.freedesktop.org
Fri Oct 9 02:43:35 PDT 2015


 src/drmmode_display.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit dc40582d5ff94d812cbc08f95cf14b80cd0f410d
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Wed Oct 7 16:19:22 2015 +0900

    Don't advertise rotation support without hardware acceleration v2
    
    Rotation currently doesn't work without acceleration (doesn't actually
    rotate with Option "NoAccel", crashes with Option "AccelMethod" "none"
    or when glamor fails to initialize) and would probably be too slow
    anyway.
    
    v2: Also remove now dead code checking for ShadowFB from
        drmmode_crtc_scanout_allocate().
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b1a485d..94f273c 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -475,20 +475,12 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
 			      int width, int height)
 {
 	ScrnInfoPtr pScrn = crtc->scrn;
-	AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 	int ret;
 	int pitch;
 	union gbm_bo_handle bo_handle;
 
-	/* rotation requires acceleration */
-	if (info->shadow_fb) {
-		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-			   "Rotation requires acceleration!\n");
-		return NULL;
-	}
-
 	if (scanout->bo) {
 		if (scanout->width == width && scanout->height == height)
 			return scanout->bo;
@@ -920,7 +912,7 @@ static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
 }
 #endif
 
-static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
+static xf86CrtcFuncsRec drmmode_crtc_funcs = {
 	.dpms = drmmode_crtc_dpms,
 	.set_mode_major = drmmode_set_mode_major,
 	.set_cursor_colors = drmmode_set_cursor_colors,
@@ -1874,6 +1866,7 @@ static void drm_wakeup_handler(pointer data, int err, pointer p)
 Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 {
 	AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
+	AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
 	int i, num_dvi = 0, num_hdmi = 0;
 	unsigned int crtcs_needed = 0;
 	drmModeResPtr mode_res;
@@ -1898,6 +1891,13 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 	xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, AMDGPU_LOGLEVEL_DEBUG,
 		       "%d crtcs needed for screen.\n", crtcs_needed);
 
+	if (!info->use_glamor) {
+		/* Rotation requires hardware acceleration */
+		drmmode_crtc_funcs.shadow_allocate = NULL;
+		drmmode_crtc_funcs.shadow_create = NULL;
+		drmmode_crtc_funcs.shadow_destroy = NULL;
+	}
+
 	for (i = 0; i < mode_res->count_crtcs; i++)
 		if (!xf86IsEntityShared(pScrn->entityList[0]) ||
 		    (crtcs_needed && !(pAMDGPUEnt->assigned_crtcs & (1 << i))))


More information about the xorg-commit mailing list