From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEBA3C2D0A3 for ; Tue, 3 Nov 2020 15:44:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A80112080D for ; Tue, 3 Nov 2020 15:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604418253; bh=f6s/NQ5+LTx7LAjNwL/NnhagdtXRZUWQEE9VirAD0CU=; h=Subject:To:Cc:From:Date:List-ID:From; b=xFJlgo5wXToGeZ9V7ikeQ/Y5tuj6G7+EfrSQlYKJ3kMl64ItrYBDYwKn49JSFVxnm MYCbqTr8XygD71f32P6QnjPcEU07aJWbAcfd4A6YPhq3zS6Sdm5Zi7eLnpsxV9gHLK mOt+MmMAAWnMFkwcJR47LjKXAfAEYOnG1kyquVCk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727961AbgKCPoN (ORCPT ); Tue, 3 Nov 2020 10:44:13 -0500 Received: from forward3-smtp.messagingengine.com ([66.111.4.237]:45369 "EHLO forward3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727901AbgKCPoN (ORCPT ); Tue, 3 Nov 2020 10:44:13 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.nyi.internal (Postfix) with ESMTP id D9AE71942B01; Tue, 3 Nov 2020 10:44:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 03 Nov 2020 10:44:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=gFKqZa rjeF3i3sDhBQ1T64wRQIiNFCAjC9H/9fA4lE8=; b=YiPC7z7ULK5yDJATiCv+WB vUWyP5S6VNVmUjzRC7JGtN7jC/hR4c1f+iM9PYvfgxLRxMF/PnFO5nIDHETrcllv zTkioN/O7WvX+FllcCFiX3jg6YEgFkhPi9XRtrfPhanEOrEBy5Xn4N8+SqdpWO0J 9sRysZnZxZYWH0/ytZYxpbK1sm+VVquegEjW00ps9i9jy6/rJiBVAUuEKpatoc55 6ORGEoBrfOL1LdyXL6qSCmjpPfr2/I1GPuzE66ll8D6EBztBZhMgtVaBjIJoI7pN j7tOchDi6dO/hIZYJqQT8kSedRxSfO3o/MdOjhRNCxoi+4hKABC4KJKL5eqQ0fsg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepieetveehuedvhfdtgfdvieeiheehfeelveevheejud etveeuveeludejjefgteehnecukfhppeekfedrkeeirdejgedrieegnecuvehluhhsthgv rhfuihiivgepkeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrd gtohhm X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 5828E328005A; Tue, 3 Nov 2020 10:44:11 -0500 (EST) Subject: FAILED: patch "[PATCH] drm/amd/display: fix pow() crashing when given base 0" failed to apply to 5.9-stable tree To: Krunoslav.Kovac@amd.com, Anthony.Koo@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com Cc: From: Date: Tue, 03 Nov 2020 16:45:05 +0100 Message-ID: <16044183051247@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 5ab7943187f22b572fd12d517bd699771b88ce91 Mon Sep 17 00:00:00 2001 From: Krunoslav Kovac Date: Thu, 6 Aug 2020 17:54:47 -0400 Subject: [PATCH] drm/amd/display: fix pow() crashing when given base 0 [Why&How] pow(a,x) is implemented as exp(x*log(a)). log(0) will crash. So return 0^x = 0, unless x=0, convention seems to be 0^0 = 1. Cc: stable@vger.kernel.org Signed-off-by: Krunoslav Kovac Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h b/drivers/gpu/drm/amd/display/include/fixed31_32.h index 89ef9f6860e5..16df2a485dd0 100644 --- a/drivers/gpu/drm/amd/display/include/fixed31_32.h +++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h @@ -431,6 +431,9 @@ struct fixed31_32 dc_fixpt_log(struct fixed31_32 arg); */ static inline struct fixed31_32 dc_fixpt_pow(struct fixed31_32 arg1, struct fixed31_32 arg2) { + if (arg1.value == 0) + return arg2.value == 0 ? dc_fixpt_one : dc_fixpt_zero; + return dc_fixpt_exp( dc_fixpt_mul( dc_fixpt_log(arg1),