Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3670216pxb; Mon, 24 Jan 2022 14:58:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwkLh8wA11GDLFiepETXJGLbgDxyZ+j1Ld3+j1eENWnqn0JyCyfmJKb+SsazfGDQ6RyKLK X-Received: by 2002:a17:902:f24a:b0:14a:f56d:8acb with SMTP id j10-20020a170902f24a00b0014af56d8acbmr16565184plc.91.1643065123317; Mon, 24 Jan 2022 14:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643065123; cv=none; d=google.com; s=arc-20160816; b=FszDP7BzIOnEM8rYwgccFKMQZkYlAQ9if0f4yNWUCT2nzE2g/aYFCsAyWqxvf2ZTPL hnwT1urF4DIPs3NL/6CFysfUEmtWseA+eGhxQv35KJA/Tk2zQF2+3JAvurSoiVodxep9 njJIteraXakkUJJ7ZY0MtN+MJeBYGxXcRvju94cfNtdRPDYREIjlRwSH/ZUjG4zCP4yt SSSrzQYEj+p5v2WB1aqL0PuRH4KLJ2LpwGJN2EjA/YgJ6lc03mqByuC1QyasJT++Sx6K 5N57kRVQLl2YCM4ooT9Bs5Fib4pRPw4asoK2h1nRyrKirZQHYxuoR6rZlfkmBFl3S8Mi Eh5Q== 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=bJZbiBYiCNwxHwnzoU2UTmqsy65b/i/12GZ2EC4E5Tc=; b=xFSjWm4NROgcCMPKnQoLDguFUo7MD1/KBLQDVTE5MgqhzOiM11nImL3DXZUxzpl8L1 NFvgAzjyNPCbhuilkx2l0AHpyeVXIKTWJDpcA5djhdyh8QaASOzWrYf+W+CwNBFmJRtu 96Q26oi8H+yXo7tEhi31SL8Uk+vlAVIYjDKWdWErxFQuRG1BF52ynWuuFj6qYzhzvzhc EG01/PSMNrmFUFvnmG94OPF+eNkWTNxWXfEJHGSwlqRdFGRB82i+GbMfgnYto1GKVkrL oFTQXk8VMKtoBjjlyUIBBzVD888b/5KHGRGH8Wpo+3vhNuJGIi3R9YJqFgTr1NvKMrXs 2I9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LX1QMzw6; 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 m10si15070420pgv.363.2022.01.24.14.58.30; Mon, 24 Jan 2022 14:58:43 -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=LX1QMzw6; 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 S1840569AbiAXWyp (ORCPT + 99 others); Mon, 24 Jan 2022 17:54:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1576146AbiAXVxF (ORCPT ); Mon, 24 Jan 2022 16:53:05 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCCF2C0C0904; Mon, 24 Jan 2022 12:34:31 -0800 (PST) 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 79B7561546; Mon, 24 Jan 2022 20:34:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55528C340E7; Mon, 24 Jan 2022 20:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056470; bh=V7/JdFZkaZtZGU6MdNaGyFFwHH6I5LEbMplix7arxqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LX1QMzw6BYdG6lzua5ZGYJEHM4GFEMM8MM5XqvIMI8drk+HCy3ORDpa8Ao6gpNk1O UXvkCAqifqWNaEwhczt9pN9cMiBGhkfpwoeATJzW34JldjKeHhljVeju48SQxWpSp+ ypaMK2mHD7aY/SReFRjUV/Okii+GeZ1L2zWDUsss= 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.15 495/846] drm/amdgpu/display: set vblank_disable_immediate for DC Date: Mon, 24 Jan 2022 19:40:12 +0100 Message-Id: <20220124184118.084070642@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 2fbaf6f869bfb..16556ae892d4a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1279,6 +1279,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