From patchwork Thu Jan 21 10:08:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 8079601 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3E7E3BEEED for ; Thu, 21 Jan 2016 10:09:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E24620558 for ; Thu, 21 Jan 2016 10:09:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AD0D72054E for ; Thu, 21 Jan 2016 10:09:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5694D6EA5D; Thu, 21 Jan 2016 02:09:03 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2E906E212 for ; Thu, 21 Jan 2016 02:08:58 -0800 (PST) Received: by mail-wm0-f65.google.com with SMTP id l65so9727304wmf.3 for ; Thu, 21 Jan 2016 02:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=K7aGhIoGu6759PwUzSvEWFnRFIgUFFcqY9FUSJbtw7I=; b=JAGAbPCPjZQaG9y8TX3xdFHb+2V68jAxlYwmnn82yvNw0OBpcmz/lcpVj+JDqNk/M8 1kM3+Cc8D318H2WM0pB4XjGrhJQBiwirIhxqYKfkPq8ho065bwE4KiHaGo5PZVOw2kN0 zkXbAB3K6vz7CWskrzipO2DUXDnVGV2KmYnRk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=K7aGhIoGu6759PwUzSvEWFnRFIgUFFcqY9FUSJbtw7I=; b=bX4TOs3Xo91ZB4ElwRZC4F28unmFI+91SEJKVO4Gtbj9G4T0zEgTt9TdVXZ3gQmuZV qKO7BS8aeNodH9P88qhNFHotLw8PuROFPs4fxd/O3okcnWDE5/DuYhgsKgLzZKOFq/Zj ws6P7kQjPza5huerkwzYgEiYo9boQHsFcyY91BxBRvvAKNBhSWGzLdcvhGZZjYWzr9dP TVwx3EGdqt0VqZSF24Qs19YZRhhv+egbjrSsBL/T3IYeqp7jPemATuyvj3gJbsG9bRiI CgBxRdfOjatIUdBB/I7+1LNTE1BRE888DdGigCBHQXbE7XIWhTf9st4NHPfktg9dpeUL I1hw== X-Gm-Message-State: AG10YOR8Y6TSb2DOBsj8/fil2+uk2nC2u0Ylo9JdrbPDn4HbPk3aa/cpVeAw/XDbXq8CyA== X-Received: by 10.28.88.8 with SMTP id m8mr9680101wmb.73.1453370937566; Thu, 21 Jan 2016 02:08:57 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:56c9:0:22cf:30ff:fe4c:37d6]) by smtp.gmail.com with ESMTPSA id t195sm29232832wme.13.2016.01.21.02.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jan 2016 02:08:56 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 3/3] drm/amdgpu: Switch to drm_vblank_on/off Date: Thu, 21 Jan 2016 11:08:58 +0100 Message-Id: <1453370938-5464-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.7.0.rc3 In-Reply-To: <1453370938-5464-1-git-send-email-daniel.vetter@ffwll.ch> References: <1453370938-5464-1-git-send-email-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Cc: Daniel Vetter , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Equivalent change to the radeon driver. Note that with radeon this caught a bug in the dri3 DDX implementation, which asked for vblank interrupts when the pipe is off. That bug needs to be fixed before we can merge this patch (if amdgpu is affected too). Michel discovered this one. Cc: Michel Dänzer Signed-off-by: Daniel Vetter Acked-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 093599aba64b..d3926d193018 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -2701,13 +2701,13 @@ static void dce_v10_0_crtc_dpms(struct drm_crtc *crtc, int mode) type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); amdgpu_irq_update(adev, &adev->crtc_irq, type); amdgpu_irq_update(adev, &adev->pageflip_irq, type); - drm_vblank_post_modeset(dev, amdgpu_crtc->crtc_id); + drm_vblank_on(dev, amdgpu_crtc->crtc_id); dce_v10_0_crtc_load_lut(crtc); break; case DRM_MODE_DPMS_STANDBY: case DRM_MODE_DPMS_SUSPEND: case DRM_MODE_DPMS_OFF: - drm_vblank_pre_modeset(dev, amdgpu_crtc->crtc_id); + drm_vblank_off(dev, amdgpu_crtc->crtc_id); if (amdgpu_crtc->enabled) { dce_v10_0_vga_enable(crtc, true); amdgpu_atombios_crtc_blank(crtc, ATOM_ENABLE); diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 8e67249d4367..789c7f9f623a 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -2692,13 +2692,13 @@ static void dce_v11_0_crtc_dpms(struct drm_crtc *crtc, int mode) type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id); amdgpu_irq_update(adev, &adev->crtc_irq, type); amdgpu_irq_update(adev, &adev->pageflip_irq, type); - drm_vblank_post_modeset(dev, amdgpu_crtc->crtc_id); + drm_vblank_on(dev, amdgpu_crtc->crtc_id); dce_v11_0_crtc_load_lut(crtc); break; case DRM_MODE_DPMS_STANDBY: case DRM_MODE_DPMS_SUSPEND: case DRM_MODE_DPMS_OFF: - drm_vblank_pre_modeset(dev, amdgpu_crtc->crtc_id); + drm_vblank_off(dev, amdgpu_crtc->crtc_id); if (amdgpu_crtc->enabled) { dce_v11_0_vga_enable(crtc, true); amdgpu_atombios_crtc_blank(crtc, ATOM_ENABLE);