Re: [PATCH] drm/amd/pm: Fix a bug communicating with the SMU

2021-07-12 Thread Lazar, Lijo
On 7/12/2021 9:00 PM, Luben Tuikov wrote: This fixes a bug which if we probe a non-existing I2C device, and the SMU returns 0xFF, from then on we can never communicate with the SMU, because the code before this patch reads and interprets 0xFF as a terminal error, and thus we never write 0 into

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Christian König
Am 13.07.21 um 00:06 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect making

[PATCH] drm/amdgpu: add another Renior DID

2021-07-12 Thread Jinzhou Su
Add new PCI device id. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 179f2d01a082..1db106b135f9 100644 ---

[PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Felix Kuehling
KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect making a mapping writable after the fact v3: update dri

Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20210712] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7 v5.14-rc1] [If your

Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20210712] [also build test ERROR on v5.14-rc1] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13

Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20210712] [also build test WARNING on v5.14-rc1] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14

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

2021-07-12 Thread Ryan Taylor
Move dce_virtual into amdgpu_vkms and update all references to dce_virtual with amdgpu_vkms. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 195 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.h | 3 - dr

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

2021-07-12 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 0/3] drm/amdgpu: modernize virtual display feature

2021-07-12 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 1/3] drm/amdgpu: create amdgpu_vkms

2021-07-12 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. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.

Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20210712] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7 v5.14-rc1] [If your patch

[PATCH] drm/amd/pm: Fix a bug communicating with the SMU

2021-07-12 Thread Luben Tuikov
This fixes a bug which if we probe a non-existing I2C device, and the SMU returns 0xFF, from then on we can never communicate with the SMU, because the code before this patch reads and interprets 0xFF as a terminal error, and thus we never write 0 into register 90 to clear the status (and subsequen

Re: Waiting for fences timed out on MacBook Pro 2019

2021-07-12 Thread Alex Deucher
On Mon, Jul 12, 2021 at 5:57 AM Tomasz Moń wrote: > > Hello, > > I am having trouble getting Linux to run on MacBook Pro 2019 with > Radeon Pro Vega 20 4 GB. Basically as soon as graphical user interface > starts, the whole system freezes. This happens with every Linux kernel > version I have trie

Waiting for fences timed out on MacBook Pro 2019

2021-07-12 Thread Tomasz Moń
Hello, I am having trouble getting Linux to run on MacBook Pro 2019 with Radeon Pro Vega 20 4 GB. Basically as soon as graphical user interface starts, the whole system freezes. This happens with every Linux kernel version I have tried over the last few months, including 5.13. Using SSH I have be

Re: [PATCH 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Christian König
Am 10.07.21 um 02:28 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect making a

Re: [PATCH 2/2] drm/ttm: Fix COW check

2021-07-12 Thread Christian König
Am 10.07.21 um 02:29 schrieb Felix Kuehling: On 2021-07-09 3:37 p.m., Christian König wrote: Am 09.07.21 um 21:31 schrieb Felix Kuehling: On 2021-07-09 2:38 a.m., Christian König wrote: Am 08.07.21 um 21:36 schrieb Alex Deucher: From: Felix Kuehling KFD Thunk maps invisible VRAM BOs with

Re: AMDGPU error: "[drm:amdgpu_dm_atomic_commit_tail [amdgpu]] *ERROR* Waiting for fences timed out!"

2021-07-12 Thread Michel Dänzer
On 2021-07-11 9:48 a.m., Ketsui wrote: >> So far, so good; no hang in a week. I'll try the rest of the new firmware as >> well now, will follow up if there's a hang again. > > I've noticed that the VM_L2_PROTECTION_FAULT_STATUS error doesn't always > result in a hang, looking through my journal

[PATCH] drm/amd/amdgpu: Recovery vcn instance iterate.

2021-07-12 Thread Peng Ju Zhou
The previous logic is recording the amount of valid vcn instances to use them on SRIOV, it is a hard task due to the vcn accessment is based on the index of the vcn instance. there is a machanism which recording the invalid instance and skipping the invalid one, re-use this mechanism on SRIOV envi

Re: drm/amd/display: Simplify hdcp validate_bksv

2021-07-12 Thread Joe Perches
t; > url: > https://github.com/0day-ci/linux/commits/Joe-Perches/drm-amd-display-Simplify-hdcp-validate_bksv/20210712-034708 > base: git://anongit.freedesktop.org/drm-intel for-linux-next > config: i386-randconfig-a003-20210712 (attached as .config) > compiler

[PATCH] drm/amd/display: Fix identical code for different branches

2021-07-12 Thread Len Baker
The ternary expression: vrr->state == VRR_STATE_ACTIVE_VARIABLE ? max_refresh : max_refresh; has identical then and else expressions. So, simplify the code. Addresses-Coverity-ID: 1471122 ("Identical code for different branches") Fixes: 9bc4162665827 ("drm/amd/display: Implement VSIF V3 extended

Re: [PATCH] drm/amd/display: Fix identical code for different branches

2021-07-12 Thread Joe Perches
On Sun, 2021-07-11 at 19:24 +0200, Len Baker wrote: > The branches of the "if" statement are the same. So remove the > unnecessary if and goto statements. > > Addresses-Coverity-ID: 1456916 ("Identical code for different branches") > Fixes: 4c283fdac08ab ("drm/amd/display: Add HDCP module") > Sign

drm/amd/display: Simplify hdcp validate_bksv

2021-07-12 Thread Joe Perches
commit 06888d571b51 ("drm/amd/display: Avoid HDCP over-read and corruption") fixed an overread with an invalid buffer length but added an unnecessary buffer and copy. Simplify the code by using a single uint64_t and __builtin_popcountll to count the number of bits set in the original bksv buffer i

[PATCH] drm/amd/display: Fix identical code for different branches

2021-07-12 Thread Len Baker
The branches of the "if" statement are the same. So remove the unnecessary if and goto statements. Addresses-Coverity-ID: 1456916 ("Identical code for different branches") Fixes: 4c283fdac08ab ("drm/amd/display: Add HDCP module") Signed-off-by: Len Baker --- drivers/gpu/drm/amd/display/modules/h