From: Anson Jacob <Anson.Jacob@amd.com>
To: <mpe@ellerman.id.au>, <benh@kernel.crashing.org>,
<paulus@samba.org>, <christophe.leroy@csgroup.eu>,
<linuxppc-dev@lists.ozlabs.org>, <amd-gfx@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>
Cc: Sunpeng.Li@amd.com, "Harry Wentland" <harry.wentland@amd.com>,
qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
roman.li@amd.com, "Christoph Hellwig" <hch@infradead.org>,
Anson.Jacob@amd.com, Aurabindo.Pillai@amd.com,
Bhawanpreet.Lakha@amd.com,
"Christian König" <christian.koenig@amd.com>,
bindu.r@amd.com
Subject: [RFC v2 2/2] drm/amd/display: Use PPC FPU functions
Date: Wed, 21 Jul 2021 00:48:01 -0400 [thread overview]
Message-ID: <20210721044801.840501-3-Anson.Jacob@amd.com> (raw)
In-Reply-To: <20210721044801.840501-1-Anson.Jacob@amd.com>
Use kernel_fpu_begin & kernel_fpu_end for PPC
Depends on "ppc/fpu: Add generic FPU api similar to x86"
v2:
- Got rid of macro switch for PPC as header file with same
name as x86 is added by previous patch in the series
Signed-off-by: Anson Jacob <Anson.Jacob@amd.com>
CC: Christoph Hellwig <hch@infradead.org>
CC: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
CC: Harry Wentland <harry.wentland@amd.com>
CC: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/amd/display/dc/os_types.h | 29 -----------------------
1 file changed, 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h
index 126c2f3a4dd3..47ef434f93d8 100644
--- a/drivers/gpu/drm/amd/display/dc/os_types.h
+++ b/drivers/gpu/drm/amd/display/dc/os_types.h
@@ -51,38 +51,9 @@
#define dm_error(fmt, ...) DRM_ERROR(fmt, ##__VA_ARGS__)
#if defined(CONFIG_DRM_AMD_DC_DCN)
-#if defined(CONFIG_X86)
#include <asm/fpu/api.h>
#define DC_FP_START() kernel_fpu_begin()
#define DC_FP_END() kernel_fpu_end()
-#elif defined(CONFIG_PPC64)
-#include <asm/switch_to.h>
-#include <asm/cputable.h>
-#define DC_FP_START() { \
- if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
- preempt_disable(); \
- enable_kernel_vsx(); \
- } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
- preempt_disable(); \
- enable_kernel_altivec(); \
- } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
- preempt_disable(); \
- enable_kernel_fp(); \
- } \
-}
-#define DC_FP_END() { \
- if (cpu_has_feature(CPU_FTR_VSX_COMP)) { \
- disable_kernel_vsx(); \
- preempt_enable(); \
- } else if (cpu_has_feature(CPU_FTR_ALTIVEC_COMP)) { \
- disable_kernel_altivec(); \
- preempt_enable(); \
- } else if (!cpu_has_feature(CPU_FTR_FPU_UNAVAILABLE)) { \
- disable_kernel_fp(); \
- preempt_enable(); \
- } \
-}
-#endif
#endif
/*
--
2.25.1
next prev parent reply other threads:[~2021-07-21 4:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 4:47 [RFC v2 0/2] PPC: Add generic FPU api similar to x86 Anson Jacob
2021-07-21 4:48 ` [RFC v2 1/2] ppc/fpu: " Anson Jacob
2021-07-21 6:58 ` Christoph Hellwig
2021-07-21 4:48 ` Anson Jacob [this message]
2021-07-21 6:29 ` [RFC v2 2/2] drm/amd/display: Use PPC FPU functions Christian König
2021-07-21 6:51 ` Christoph Hellwig
2021-07-21 9:24 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210721044801.840501-3-Anson.Jacob@amd.com \
--to=anson.jacob@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=benh@kernel.crashing.org \
--cc=bindu.r@amd.com \
--cc=christian.koenig@amd.com \
--cc=christophe.leroy@csgroup.eu \
--cc=harry.wentland@amd.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=qingqing.zhuo@amd.com \
--cc=roman.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).