[PATCH] drm/amdgpu: remove the access of xxx_PSP_DEBUG on cycan_skillfish

2021-07-27 Thread Huang Rui
It won't need to clear the xxx_PSP_DEBUG registers, because firmware will handle this change. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

Re: [PATCH 00/14] drm: Make DRM's IRQ helpers legacy

2021-07-27 Thread Thomas Zimmermann
Hi Sam Am 27.07.21 um 20:51 schrieb Sam Ravnborg: Hi Thomas, On Tue, Jul 27, 2021 at 08:27:07PM +0200, Thomas Zimmermann wrote: DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux IRQ interfaces. DRM provides IRQ he

[PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms (v3)

2021-07-27 Thread Ryan Taylor
Move dce_virtual into amdgpu_vkms and update all references to dce_virtual with amdgpu_vkms. v2: Removed more references to dce_virtual. v3: Restored display modes from previous implementation. Reported-by: kernel test robot Suggested-by: Alex Deucher Signed-off-by: Ryan Taylor --- drivers/g

[PATCH 0/3] drm/amdgpu: modernize virtual display feature

2021-07-27 Thread Ryan Taylor
The amdgpu vkms interface provides a virtual KMS interface for several use cases: devices without display hardware, platforms where the actual display hardware is not useful (e.g., servers), SR-IOV virtual functions, device emulation/simulation, and device bring up prior to display hardware being u

[PATCH 2/3] drm/amdgpu: cleanup dce_virtual

2021-07-27 Thread Ryan Taylor
Remove obsolete functions and variables from dce_virtual. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 568 +-- 1 file changed, 3 insertions(+), 565 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/

[PATCH 1/3] drm/amdgpu: create amdgpu_vkms (v4)

2021-07-27 Thread Ryan Taylor
Modify the VKMS driver into an api that dce_virtual can use to create virtual displays that obey drm's atomic modesetting api. v2: Made local functions static. v3: Switched vkms_output kzalloc for kcalloc. Cleanup patches by moving display mode fixes to this patch. v4: Update atomic_check an

Re: [PATCH 00/11] Implement generic prot_guest_has() helper function

2021-07-27 Thread Tom Lendacky
On 7/27/21 5:26 PM, Tom Lendacky wrote: > This patch series provides a generic helper function, prot_guest_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new protected virtualization technologies are > added to t

[PATCH 08/11] mm: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Signed-off-by: Tom Lendacky --- include/linux/mem_encrypt.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h index 5c4a18a91f89..

[PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of mem_encrypt_active() with calls to prot_guest_has() with the PATTR_MEM_ENCRYPT attribute. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxi

[PATCH 09/11] x86/sev: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_encrypt.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/x86/in

[PATCH 10/11] powerpc/pseries/svm: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Tom Lendacky --- arch/powerpc/include/asm/mem_encrypt.h | 5 - 1 file changed, 5 deletions(-) diff --gi

[PATCH 11/11] s390/mm: Remove the now unused mem_encrypt_active() function

2021-07-27 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Since the default implementation of the prot_guest_has() matches the s390 implementation of mem_encrypt_active(), prot_guest_has() does not need to be implemented in s390 (the config option ARCH_H

[PATCH 05/11] x86/sev: Replace occurrences of sev_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of sev_active() with the more generic prot_guest_has() using PATTR_GUEST_MEM_ENCRYPT, except for in arch/x86/mm/mem_encrypt*.c where PATTR_SEV will be used. If future support is added for other memory encryption technologies, the use of PATTR_GUEST_MEM_ENCRYPT can be updated, as

[PATCH 06/11] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of sev_es_active() with the more generic prot_guest_has() using PATTR_GUEST_PROT_STATE, except for in arch/x86/kernel/sev*.c and arch/x86/mm/mem_encrypt*.c where PATTR_SEV_ES will be used. If future support is added for other memory encyrption techonologies, the use of PATTR_GUE

[PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-07-27 Thread Tom Lendacky
In prep for other protected virtualization technologies, introduce a generic helper function, prot_guest_has(), that can be used to check for specific protection attributes, like memory encryption. This is intended to eliminate having to add multiple technology-specific checks to the code (e.g. if

[PATCH 04/11] x86/sme: Replace occurrences of sme_active() with prot_guest_has()

2021-07-27 Thread Tom Lendacky
Replace occurrences of sme_active() with the more generic prot_guest_has() using PATTR_HOST_MEM_ENCRYPT, except for in arch/x86/mm/mem_encrypt*.c where PATTR_SME will be used. If future support is added for other memory encryption technologies, the use of PATTR_HOST_MEM_ENCRYPT can be updated, as r

[PATCH 02/11] x86/sev: Add an x86 version of prot_guest_has()

2021-07-27 Thread Tom Lendacky
Introduce an x86 version of the prot_guest_has() function. This will be used in the more generic x86 code to replace vendor specific calls like sev_active(), etc. While the name suggests this is intended mainly for guests, it will also be used for host memory encryption checks in place of sme_acti

[PATCH 00/11] Implement generic prot_guest_has() helper function

2021-07-27 Thread Tom Lendacky
This patch series provides a generic helper function, prot_guest_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new protected virtualization technologies are added to the kernel, they can all be covered by a single funct

[PATCH 03/11] powerpc/pseries/svm: Add a powerpc version of prot_guest_has()

2021-07-27 Thread Tom Lendacky
Introduce a powerpc version of the prot_guest_has() function. This will be used to replace the powerpc mem_encrypt_active() implementation, so the implementation will initially only support the PATTR_MEM_ENCRYPT attribute. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signe

Re: [PATCH] drm/amdgpu: remove the access of xxx_PSP_DEBUG on cycan_skillfish

2021-07-27 Thread Alex Deucher
Acked-by: Alex Deucher On Tue, Jul 27, 2021 at 10:11 PM Huang Rui wrote: > > It won't need to clear the xxx_PSP_DEBUG registers, because firmware > will handle this change. > > Signed-off-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 -- > 1 file changed, 2 deletions(-) > >

Re: [PATCH] drm/amdkfd: move PTR_ERR under IS_ERR() condition

2021-07-27 Thread Felix Kuehling
Hi Huoqing, Your patch is technically correct. However, I don't think it fixes any actual bug, and it changes a code path that has no performance implications. Therefore I would just leave it as it is. Regards,   Felix Am 2021-07-20 um 2:34 a.m. schrieb Cai Huoqing: > no need to get error code

RE: [PATCH V2] drm/amdgpu/display: add support for multiple backlights

2021-07-27 Thread Li, Roman
[Public] Reviewed-by: Roman Li -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, July 14, 2021 3:00 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; kernel test robot Subject: [PATCH V2] drm/amdgpu/display: add support for multiple backlights On

Re: [PATCH 00/14] drm: Make DRM's IRQ helpers legacy

2021-07-27 Thread Sam Ravnborg
Hi Thomas, On Tue, Jul 27, 2021 at 08:27:07PM +0200, Thomas Zimmermann wrote: > DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move > the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux > IRQ interfaces. > > DRM provides IRQ helpers for setting up, receiving and removing

[PATCH 13/14] drm: Remove unused devm_drm_irq_install()

2021-07-27 Thread Thomas Zimmermann
DRM IRQ helpers will become legacy. The function devm_drm_irq_install() is unused and won't be required later. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_irq.c | 32 include/drm/drm_irq.h | 1 - 2 files changed, 33 deletions(-) diff --git a/dr

[PATCH 14/14] drm: IRQ midlayer is now legacy

2021-07-27 Thread Thomas Zimmermann
Hide the DRM midlayer behind CONFIG_DRM_LEGACY, make functions use the prefix drm_legacy_, and move declarations to drm_legacy.h. In struct drm_device, move the fields irq and irq_enabled behind CONFIG_DRM_LEGACY. All callers have been updated. Signed-off-by: Thomas Zimmermann --- drivers/gpu/d

[PATCH 11/14] drm/tilcdc: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Calls to platform_get_irq() can fail with a negative errno code. Abort initi

[PATCH 12/14] drm/vc4: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Calls to platform_get_irq() can fail with a negative errno code. Abort initi

[PATCH 10/14] drm/tidss: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tidss/tidss_drv.c | 1

[PATCH 06/14] drm/kmb: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/kmb/kmb_drv.c | 26 ++

[PATCH 09/14] drm/radeon: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon_drv.c

[PATCH 05/14] drm/gma500: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/gma500/power.c | 1

[PATCH 07/14] drm/msm: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/msm/msm_drv.c | 113 +

[PATCH 08/14] drm/mxsfb: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Calls to platform_get_irq() can fail with a negative errno code. Abort initi

[PATCH 04/14] drm/fsl-dcu: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_dr

[PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcd

[PATCH 02/14] drm/arm/hdlcd: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Calls to platform_get_irq() can fail with a negative errno code. Abort initi

[PATCH 01/14] drm/amdgpu: Convert to Linux IRQ interfaces

2021-07-27 Thread Thomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. The interrupt number returned by pci_msi_vector() is now stored in struct am

[PATCH 00/14] drm: Make DRM's IRQ helpers legacy

2021-07-27 Thread Thomas Zimmermann
DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux IRQ interfaces. DRM provides IRQ helpers for setting up, receiving and removing IRQ handlers. It's an abstraction over plain Linux functions. The code is mid-layerish w

Re: [PATCH v2] drm/amdgpu: Fix build error reported for some config

2021-07-27 Thread Aurabindo Pillai
On 2021-07-27 9:45 a.m., Pratik Vishwakarma wrote: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: error: ‘pm_suspend_target_state’ undeclared (first use in this function) 1045 | re

[PATCH v2] drm/amdgpu: Fix build error reported for some config

2021-07-27 Thread Pratik Vishwakarma
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: error: ‘pm_suspend_target_state’ undeclared (first use in this function) 1045 | return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;

Re: [PATCH] maintainers: add bugs and chat URLs for amdgpu

2021-07-27 Thread Alex Deucher
On Sun, Jul 25, 2021 at 12:49 PM Simon Ser wrote: > > Add links to the issue tracker and the IRC channel for the amdgpu > driver. > > Signed-off-by: Simon Ser > Cc: Alex Deucher > Cc: Christian König > Cc: Pan Xinhui Applied. Thanks! Alex > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 in

[PATCH] drm/amdgpu: Fix out-of-bounds read when update mapping

2021-07-27 Thread Pan, Xinhui
[AMD Official Use Only] If one GTT BO has been evicted/swapped out, it should sit in CPU domain. TTM only alloc struct ttm_resource instead of struct ttm_range_mgr_node for sysMem. Now when we update mapping for such invalidated BOs, we might walk out of bounds of struct ttm_resource. Three poss

[PATCH AUTOSEL 5.10 16/17] drm/amd/display: Fix max vstartup calculation for modes with borders

2021-07-27 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit d7940911fc0754d99b208f0e3098762d39f403a0 ] [Why] Vertical and horizontal borders in timings are treated as increasing the active area - vblank and hblank actually shrink. Our input into DML does not include these borders so it incorrectly assumes it h

[PATCH AUTOSEL 5.10 15/17] drm/amd/display: Fix comparison error in dcn21 DML

2021-07-27 Thread Sasha Levin
From: Victor Lu [ Upstream commit ec3102dc6b36c692104c4a0546d4119de59a3bc1 ] [why] A comparison error made it possible to not iterate through all the specified prefetch modes. [how] Correct "<" to "<=" Reviewed-by: Dmytro Laktyushkin Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Sig

[PATCH AUTOSEL 5.13 18/21] drm/amd/display: Fix max vstartup calculation for modes with borders

2021-07-27 Thread Sasha Levin
From: Nicholas Kazlauskas [ Upstream commit d7940911fc0754d99b208f0e3098762d39f403a0 ] [Why] Vertical and horizontal borders in timings are treated as increasing the active area - vblank and hblank actually shrink. Our input into DML does not include these borders so it incorrectly assumes it h

[PATCH AUTOSEL 5.13 17/21] drm/amd/display: Fix comparison error in dcn21 DML

2021-07-27 Thread Sasha Levin
From: Victor Lu [ Upstream commit ec3102dc6b36c692104c4a0546d4119de59a3bc1 ] [why] A comparison error made it possible to not iterate through all the specified prefetch modes. [how] Correct "<" to "<=" Reviewed-by: Dmytro Laktyushkin Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Sig

Re: [PATCH v4 4/4] drm/amd/display: Add DC_FP helper to check FPU state

2021-07-27 Thread Christian König
Am 27.07.21 um 02:52 schrieb Rodrigo Siqueira: To fully isolate FPU operations in a single place, we must avoid situations where compilers spill FP values to registers due to FP enable in a specific C file. Note that even if we isolate all FPU functions in a single file and call its interface fro

Re: [PATCH v4 3/4] drm/amd/display: Add control mechanism for FPU utilization

2021-07-27 Thread Christian König
Am 27.07.21 um 02:52 schrieb Rodrigo Siqueira: DC invokes DC_FPU_START/END in multiple parts of the code; this can create a situation where we invoke this FPU operation in a nested way or exit too early. For avoiding this situation, this commit adds a mechanism where dc_fpu_begin/end manages the

Re: [PATCH v4 2/4] drm/amd/display: Add control mechanism for FPU

2021-07-27 Thread Christian König
Am 27.07.21 um 02:52 schrieb Rodrigo Siqueira: DC invokes DC_FPU_START/END in multiple parts of the code; this can create a situation where we invoke this FPU operation in a nested way or exit too early. For avoiding this situation, this commit adds a mechanism where dc_fpu_begin/end manages the

Re: [PATCH v4 1/4] drm/amd/display: Move specific DCN2x code that uses FPU to DML

2021-07-27 Thread Christian König
Am 27.07.21 um 02:52 schrieb Rodrigo Siqueira: The display core files rely on FPU, which requires to be compiled with special flags. Ideally, we don't want these FPU operations spread around the DC code; nevertheless, it happens in the current source. This commit introduces a new directory inside

[PATCH] drm/amdgpu: Fix build error reported for some config

2021-07-27 Thread Pratik Vishwakarma
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: error: ‘pm_suspend_target_state’ undeclared (first use in this function) 1045 | return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;