Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3112364pxm; Mon, 28 Feb 2022 12:15:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt47gfn1GnRp/qqiwQcE6CxpgaiDIzstFF2KevIanY8ck3NvpuBgBvIhZK/ofxxaQVECa4 X-Received: by 2002:a05:6a00:1503:b0:4e1:d277:cca with SMTP id q3-20020a056a00150300b004e1d2770ccamr23445482pfu.4.1646079357930; Mon, 28 Feb 2022 12:15:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079357; cv=none; d=google.com; s=arc-20160816; b=dELg4MkyRYIEF/EsdS9cbmLMGLuepV0beietZBwzoMNpmnO1Dgr9jHRdtnV0xWRgbl XAhg1cmJckgL0v+5Wlm2id+6pUgr8Rq/+jj9NcY39nysKjeVc9NNZIBWWZ/d4ts9+IKk kYXIY65jY/+SFQEgZmcQh2/NRwzMlSOAvir7BiiVptO2831O8coxdmiV5zQoUKmSpdAd x/IIdFAZ4dBeKeVLQTbER1AlufmCTYdF/KxwTddskJnaGHj8Kd9RTmLCDLMxhFaMXC0l 1dXe+++ScFOZqFKQrFeUPtN6L5REDhke7NnkfSPofJgwKjOJovQunM7f1QmxJ4QRRE++ 8xXQ== 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=3GJ6nf0jmmUbzE3BuKVxujmrh8xNalqabz8a2R698V4=; b=SvxqFL93JuoGu0+cxZDNe1YY1xKu7suWQUMZ3t1hsPSAJx5ceVpGTfteMiCMEAgnyL t1O3S9PTgLhgL4OBK+5pkzjRW+RSHrUnI0S6COPIjWkPo8etBzWGeNm/fIQhylNtmHCV Mh6N8unla94s5Tt7cnb9kEbr+pQ04oMr5FUYFQuN2XI8rkSGm2L640wEBEdNpBoem51b HgHdkkDEG5rSG6HgQ1FFnh00H/JSWofJvutGEwTacfOYf/uCeLJeJLEbZYhwzBxSww9n /CtcpH31rF7mpAYCGf1X8aaTsVceJmYPuH3xo8fm4Ul3Xx2VZJps3T4AZYTyHMSYpkEO /NrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kdsQIiZt; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x9-20020a170902820900b0014ff73c8222si9562406pln.319.2022.02.28.12.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:15:57 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kdsQIiZt; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B26717B886; Mon, 28 Feb 2022 11:37:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239601AbiB1SBf (ORCPT + 99 others); Mon, 28 Feb 2022 13:01:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240758AbiB1Rye (ORCPT ); Mon, 28 Feb 2022 12:54:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB9515133A; Mon, 28 Feb 2022 09:43:06 -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 ams.source.kernel.org (Postfix) with ESMTPS id 797DFB815AB; Mon, 28 Feb 2022 17:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6F9BC340E7; Mon, 28 Feb 2022 17:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646070184; bh=14EMimUpj5GZ9KgacRO25ktm5uKqvBSC3sszDYK6NcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kdsQIiZtID+G9RdvBtEXDj30u5CcGNwv2GcHVcYuUxujdlMVCEsGVK7ajGohO96bc 4/vPEQ23MpjNoWTreJUQ07UbgslWC2bYEl+csW0snP3rV+2ISTh8c6Xh4Nbad+IlrW kSoJnLE0cAvvkHhzAI9zA7sIYlN2gcs4voSOj39o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bas Nieuwenhuizen , Alex Deucher Subject: [PATCH 5.16 017/164] drm/amd/display: Protect update_bw_bounding_box FPU code. Date: Mon, 28 Feb 2022 18:22:59 +0100 Message-Id: <20220228172401.489267046@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172359.567256961@linuxfoundation.org> References: <20220228172359.567256961@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Bas Nieuwenhuizen commit 1432108d00e42ffa383240bcac8d58f89ae19104 upstream. For DCN3/3.01/3.02 at least these use the fpu. v2: squash in build fix for when DCN is not enabled (Leo) Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c @@ -437,8 +437,10 @@ static void dcn3_get_memclk_states_from_ clk_mgr_base->bw_params->clk_table.num_entries = num_levels ? num_levels : 1; /* Refresh bounding box */ + DC_FP_START(); clk_mgr_base->ctx->dc->res_pool->funcs->update_bw_bounding_box( clk_mgr->base.ctx->dc, clk_mgr_base->bw_params); + DC_FP_END(); } static bool dcn3_is_smu_present(struct clk_mgr *clk_mgr_base) --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -999,10 +999,13 @@ static bool dc_construct(struct dc *dc, goto fail; #ifdef CONFIG_DRM_AMD_DC_DCN dc->clk_mgr->force_smu_not_present = init_params->force_smu_not_present; -#endif - if (dc->res_pool->funcs->update_bw_bounding_box) + if (dc->res_pool->funcs->update_bw_bounding_box) { + DC_FP_START(); dc->res_pool->funcs->update_bw_bounding_box(dc, dc->clk_mgr->bw_params); + DC_FP_END(); + } +#endif /* Creation of current_state must occur after dc->dml * is initialized in dc_create_resource_pool because