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> Cc: Sunpeng.Li@amd.com, Harry.Wentland@amd.com, qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com, roman.li@amd.com, Anson.Jacob@amd.com, Aurabindo.Pillai@amd.com, Bhawanpreet.Lakha@amd.com, bindu.r@amd.com Subject: [RFC 2/2] drm/amd/display: Use PPC FPU functions Date: Mon, 19 Jul 2021 15:52:11 -0400 [thread overview] Message-ID: <20210719195211.520428-3-Anson.Jacob@amd.com> (raw) In-Reply-To: <20210719195211.520428-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" Signed-off-by: Anson Jacob <Anson.Jacob@amd.com> --- drivers/gpu/drm/amd/display/dc/os_types.h | 28 ++--------------------- 1 file changed, 2 insertions(+), 26 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..999c5103357e 100644 --- a/drivers/gpu/drm/amd/display/dc/os_types.h +++ b/drivers/gpu/drm/amd/display/dc/os_types.h @@ -57,32 +57,8 @@ #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 +#define DC_FP_START() kernel_fpu_begin() +#define DC_FP_END() kernel_fpu_end() #endif /* -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
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> Cc: Sunpeng.Li@amd.com, Harry.Wentland@amd.com, qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com, roman.li@amd.com, Anson.Jacob@amd.com, Aurabindo.Pillai@amd.com, Bhawanpreet.Lakha@amd.com, bindu.r@amd.com Subject: [RFC 2/2] drm/amd/display: Use PPC FPU functions Date: Mon, 19 Jul 2021 15:52:11 -0400 [thread overview] Message-ID: <20210719195211.520428-3-Anson.Jacob@amd.com> (raw) In-Reply-To: <20210719195211.520428-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" Signed-off-by: Anson Jacob <Anson.Jacob@amd.com> --- drivers/gpu/drm/amd/display/dc/os_types.h | 28 ++--------------------- 1 file changed, 2 insertions(+), 26 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..999c5103357e 100644 --- a/drivers/gpu/drm/amd/display/dc/os_types.h +++ b/drivers/gpu/drm/amd/display/dc/os_types.h @@ -57,32 +57,8 @@ #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 +#define DC_FP_START() kernel_fpu_begin() +#define DC_FP_END() kernel_fpu_end() #endif /* -- 2.25.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-07-19 22:56 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-19 19:52 [RFC 0/2] Add generic FPU api similar to x86 Anson Jacob 2021-07-19 19:52 ` Anson Jacob 2021-07-19 19:52 ` [RFC 1/2] ppc/fpu: " Anson Jacob 2021-07-19 19:52 ` Anson Jacob 2021-07-20 6:04 ` Christoph Hellwig 2021-07-20 6:04 ` Christoph Hellwig 2021-07-20 19:30 ` kernel test robot 2021-07-19 19:52 ` Anson Jacob [this message] 2021-07-19 19:52 ` [RFC 2/2] drm/amd/display: Use PPC FPU functions Anson Jacob 2021-07-20 6:06 ` Christoph Hellwig 2021-07-20 6:06 ` Christoph Hellwig 2021-07-20 23:00 ` kernel test robot 2021-07-20 6:17 ` [RFC 0/2] Add generic FPU api similar to x86 Christian König 2021-07-20 6:17 ` Christian König 2022-03-02 16:00 ` Christophe Leroy
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=20210719195211.520428-3-Anson.Jacob@amd.com \ --to=anson.jacob@amd.com \ --cc=Aurabindo.Pillai@amd.com \ --cc=Bhawanpreet.Lakha@amd.com \ --cc=Harry.Wentland@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=christophe.leroy@csgroup.eu \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.