Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1968434rwe; Fri, 2 Sep 2022 06:45:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR7aC4dij+66xtrnjbCj9Crba1BmOg2Eti6ONuburV9PhhBZb+0q6omiBnkOU8FznK3mJNIw X-Received: by 2002:a17:903:25c4:b0:174:4311:bf17 with SMTP id jc4-20020a17090325c400b001744311bf17mr34086700plb.103.1662126329420; Fri, 02 Sep 2022 06:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662126329; cv=none; d=google.com; s=arc-20160816; b=XFuQ95Y8/9D5Q83UJl67Bkz+6kckwl7ANRPyRATUOh4FT5bGXGtMrA5071eJnxuDUt KUiG4Kjzjo+FOIL5TGbDQSwOnamz2erm+xeKrMxAzDZ2sgiHC4APD8giudkahqiUBxTC Bj8oY8bUMZLMTM2LIP18o7RkAg5VGM8zzn4nIwQ5gh/1C0Wsm+ubq/5Wfbjf3GRuqOY4 wH6/yD4hsfhnErd/qb+LtsUvlPF2vllQnlXMb+pNPX3sRvUK1egOF5/83sr6gUOHt6OH NPPAhboQBSwmrViCFlxT9MxzLOE4yH1shDWkeuQCrOeZs1/JoZhr3FF9CFXGMF9aikP1 /uBQ== 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=8dSHWHOfFLVXU+ihD6TSzGQh5by6HAMFRD99qHJqgRI=; b=h+fYCbe3yoRCbofLri+fgRYMfe3v+shN3MmRANumvZ9Xwo/ZiwfAlaNWOKN2kiT57C 4dzPoEIYmcstc0u9XHvOHLCEA6EjOr0xJgdfunNYjU4QPjnKeogdyb5Uw/wdmFWVq6Cb Njds8RCqwWVfZnFAqKR5MifDzdzp6M1G8eWVJoveWIFxCP9tgiXzFLli1dtbB0RW8og4 WQSimtdonm0W5uMxJomJllybAVoWgvQXwNbzYxJ/lGPJ7/s2P6hTEDN9OrY1p9CB1RFR BpDpmdLgiZ8rJKkfi7usp36RDmdgA66uzGHdidu/jCLPKE+mez8Ee+I41o1Mwm+HyBwB aVkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WY38d2dY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a056a001acc00b0052e677b7056si2253912pfv.279.2022.09.02.06.45.18; Fri, 02 Sep 2022 06:45:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WY38d2dY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238084AbiIBM4V (ORCPT + 99 others); Fri, 2 Sep 2022 08:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238173AbiIBMyB (ORCPT ); Fri, 2 Sep 2022 08:54:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5C0F1AF24; Fri, 2 Sep 2022 05:38:43 -0700 (PDT) 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 5365B6215D; Fri, 2 Sep 2022 12:38:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48F58C433C1; Fri, 2 Sep 2022 12:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662122293; bh=fnNNfiYZWirMDFmJg7FtUoSBfRmd7MQx/c6xnOQizJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WY38d2dYYo+0UPb5qzqFyO3gJJ1CnIIN2c1I6ny4FWo6RK5BWwQdQ/FdPGSpku2Sh 1X8NEqMIdQs0CuRRIqPaQ7yJo9mLC22os9sQoBGg2vGiIC2gi7WZc53masmafbUTCx JHxU4KsEWZrrrWJYzzoElQ5oYk6TlaCebRydId4E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Leung , Brian Chang , Charlene Liu , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.19 58/72] drm/amd/display: avoid doing vm_init multiple time Date: Fri, 2 Sep 2022 14:19:34 +0200 Message-Id: <20220902121406.668444371@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121404.772492078@linuxfoundation.org> References: <20220902121404.772492078@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Charlene Liu [ Upstream commit 5544a7b5a07480192eb5fd3536462faed2c21528 ] [why] this is to ensure that driver will not reprogram hvm_prefetch_req again if it is done. Reviewed-by: Martin Leung Acked-by: Brian Chang Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c index c5e200d09038f..5752271f22dfe 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c @@ -67,9 +67,15 @@ static uint32_t convert_and_clamp( void dcn21_dchvm_init(struct hubbub *hubbub) { struct dcn20_hubbub *hubbub1 = TO_DCN20_HUBBUB(hubbub); - uint32_t riommu_active; + uint32_t riommu_active, prefetch_done; int i; + REG_GET(DCHVM_RIOMMU_STAT0, HOSTVM_PREFETCH_DONE, &prefetch_done); + + if (prefetch_done) { + hubbub->riommu_active = true; + return; + } //Init DCHVM block REG_UPDATE(DCHVM_CTRL0, HOSTVM_INIT_REQ, 1); -- 2.35.1