Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3642333pxb; Mon, 24 Jan 2022 14:13:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxax94oYcCCUXGlCtvx9a2ARcf5hIGEZ4I6JPs6//xFlnm/KL3kulzrvvp+fPsnwYdA2yRx X-Received: by 2002:a17:90a:fa88:: with SMTP id cu8mr406049pjb.98.1643062407884; Mon, 24 Jan 2022 14:13:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643062407; cv=none; d=google.com; s=arc-20160816; b=B22EV4TLh37hmPP4qO4sTPPcz2V52JAe9BR1qSSdN0DQRy+1ROkCOzoKx8RlLt67Xr q2WUE7uT76Cly+juMQeQFwnWO/JydDi3nVpbljkwcp60l4vDXbqeuTvLPDE5cliJJECv utzLg6EUtS/xiy89eoAJBqAlzLpqERmeHVAIYkgxmHF/rSAEuZem7u7hdGgYxz42i8zt H00OD+655snjMFXJwMDUYoAYCc8JbEGqB3rFgi0gNtnayII8DOnK7JWRZfVwwk/xmwUn 8TmOInbGNjVoYx+ArJk1rFVGG6EBiSi01mHgWxphZ7WLtdMb1GuMRhcVPdqM0ZrbUemy ky2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bQvtxmHY+Z3gC3N0wUKmOmNZcVur9G8mq7iaK7abShM=; b=zHF8mxcoATJjrLcYVLFEVdT+Ag0+ixRn3ITxUdLHWNkaFN5drr2GCNVm9Thm4d7aEG esP7y5S73OxPoAQ26CztfZ0fGO0YdqJCU4PZvhcNWZ9i2itJyMBhdIvgEfG2lMWyTyfT 06k2AIPi6fwRmmviRqnpRvza0qddZm7myc6mgmr/OCZrNJapXP6H4uizYisYDY3xjQoL nR+J8g2NE6+r8PDnLjZDK/Y8EfjWIiCWxggITPcYiYlm7gCFjMhIXsW/vCH/isE3bfOC WBd34CHEXlgM2wsbcmasC98RRey+20pPv+3Gb5eLlgmT+lSTG7WokTIuP4DZM7laXb+j BhhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ggKcWDDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j30si9940380pgm.529.2022.01.24.14.13.13; Mon, 24 Jan 2022 14:13:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ggKcWDDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1577320AbiAXV7v (ORCPT + 99 others); Mon, 24 Jan 2022 16:59:51 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:43272 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1451345AbiAXVWn (ORCPT ); Mon, 24 Jan 2022 16:22:43 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C269D61305; Mon, 24 Jan 2022 21:22:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1C15C340E4; Mon, 24 Jan 2022 21:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059362; bh=K1P0TxYjsDj04lZnqfKDF20Wp9vKSWilXUlbwfumO/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ggKcWDDidZeyN8vLWMo08nX3+1CWwm+jCx69VNzwC4koWY+l3BuB9aQAZN8Y3m7Ps D+YWRohe0jzSc4A5GPlDJLKd+6cu50NnOMD3kCyFX8+VXK9pnzVow4PICQUe4kcDso 9E9kCPpQrpgp+T5JYopAnwiWaRYD/lpIpAJi0VFo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Harry Wentland , Alex Deucher , Sasha Levin Subject: [PATCH 5.16 0583/1039] drm/amdgpu/display: set vblank_disable_immediate for DC Date: Mon, 24 Jan 2022 19:39:32 +0100 Message-Id: <20220124184144.945945777@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher [ Upstream commit 92020e81ddbeac351ea4a19bcf01743f32b9c800 ] Disable vblanks immediately to save power. I think this was missed when we merged DC support. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1781 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index cc2e0c9cfe0a1..4f3c62adccbde 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -333,7 +333,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev) if (!amdgpu_device_has_dc_support(adev)) { if (!adev->enable_virtual_display) /* Disable vblank IRQs aggressively for power-saving */ - /* XXX: can this be enabled for DC? */ adev_to_drm(adev)->vblank_disable_immediate = true; r = drm_vblank_init(adev_to_drm(adev), adev->mode_info.num_crtc); diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 05f7ffd6a28da..e12f841d1d110 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1597,6 +1597,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) adev_to_drm(adev)->mode_config.cursor_width = adev->dm.dc->caps.max_cursor_size; adev_to_drm(adev)->mode_config.cursor_height = adev->dm.dc->caps.max_cursor_size; + /* Disable vblank IRQs aggressively for power-saving */ + adev_to_drm(adev)->vblank_disable_immediate = true; + if (drm_vblank_init(adev_to_drm(adev), adev->dm.display_indexes_num)) { DRM_ERROR( "amdgpu: failed to initialize sw for display support.\n"); -- 2.34.1