Re: [PATCH] drm/amd/display: Fix DCN build breakage

2018-03-14 Thread Dieter Nützel
Ups, you were faster than ever - my 'double post' ''CONFIG_DRM_AMD_DC_DCN1_0=y' mandatory, again'...;-) Tested-by: Dieter Nützel Dieter Fixes: 680acc64120c (drm/amd/display: Set disp clk in a safe way to avoid over high dpp clk.) Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/di

Re: [PATCH 1/3] drm/amdgpu: remove trailing whitespace from soc15ip.h

2018-03-14 Thread Christian König
Am 14.03.2018 um 02:22 schrieb Alex Deucher: no intended functional change. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd/include/vega10_ip_offset.h | 286 - 1 file changed, 143 insertions(+), 143 deletions(-) diff --git a/driv

Re: [PATCH] drm/amdgpu/powerplay/vega10: fix memory leak in error path

2018-03-14 Thread Zhu, Rex
Reviewed-by: Rex Zhu Best Regards Rex From: amd-gfx on behalf of Quan, Evan Sent: Wednesday, March 14, 2018 11:20 AM To: Alex Deucher; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: RE: [PATCH] drm/amdgpu/powerplay/vega10: fix memory leak in

[PATCH] drm/amd/pp: Fix memory leak in error path in smumgr

2018-03-14 Thread Rex Zhu
Free the backend structure if we fail to allocate device memory. Change-Id: Ib5fbd507369575b90df57a55d3e7318c769b3e27 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 35 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 8 +++-- .../gpu/

RE: [PATCH] drm/amd/pp: Fix memory leak in error path in smumgr

2018-03-14 Thread Quan, Evan
Reviewed-by: Evan Quan -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Rex Zhu Sent: Wednesday, March 14, 2018 4:17 PM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amd/pp: Fix memory leak in error path in smumgr Free t

[bug report] drm/amd/display: Handle HDR use cases.

2018-03-14 Thread Dan Carpenter
Hello Vitaly Prosyak, The patch 44c6f2e59ee8: "drm/amd/display: Handle HDR use cases." from Feb 13, 2018, leads to the following static checker warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_cm_common.c:543 cm_helper_translate_curve_to_degamma_hw_format() warn: pot

How to enable Radeon Pro Duo with mesa

2018-03-14 Thread Lvzhihong (ReJohn)
Hi All , Does mesa support Radeon Pro Duo? I don't know how to configure xorg.conf to use two WX7100 card of DUO , and now I can only use the first card of DUO. Installed software packages: xserver-xorg xfce4 xinit Mesa version: 17.2.8 kernel version: 4.15 Pci information: 000d:31:00.0 PCI bri

[PATCH v2] drm/amd/pp: Fix memory leak in error path in smumgr

2018-03-14 Thread Rex Zhu
v2: not change the sequence of smu backend assignment Free the backend structure if we fail to allocate device memory. Change-Id: Ib2007d83f3d99dcc6c4a0c9fe9a9f144bb7469e9 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 32 ++ drivers/gpu/drm/

Re: [PATCH][next] drm/amd/pp: remove redundant pointer internal_buf

2018-03-14 Thread Zhu, Rex
Apply it and thanks. Best Regards Rex From: Colin King Sent: Tuesday, March 13, 2018 9:22 PM To: Deucher, Alexander; Koenig, Christian; Zhou, David(ChunMing); David Airlie; Zhu, Rex; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Cc: kernel-

Re: How to enable Radeon Pro Duo with mesa

2018-03-14 Thread Alex Deucher
On Wed, Mar 14, 2018 at 5:41 AM, Lvzhihong (ReJohn) wrote: > Hi All , > > Does mesa support Radeon Pro Duo? I don’t know how to configure xorg.conf to > use two WX7100 card of DUO , and now I can only use the first card of DUO. What are you trying to do? A large desktop spread across both chips?

Re: [PATCH 1/3] drm/amdgpu: remove trailing whitespace from soc15ip.h

2018-03-14 Thread Christian König
Am 14.03.2018 um 14:42 schrieb Alex Deucher: On Wed, Mar 14, 2018 at 4:01 AM, Christian König wrote: Am 14.03.2018 um 02:22 schrieb Alex Deucher: no intended functional change. Signed-off-by: Alex Deucher Reviewed-by: Christian König Is this for the series or just this patch? For the s

Re: [PATCH 1/3] drm/amdgpu: remove trailing whitespace from soc15ip.h

2018-03-14 Thread Alex Deucher
On Wed, Mar 14, 2018 at 4:01 AM, Christian König wrote: > Am 14.03.2018 um 02:22 schrieb Alex Deucher: >> >> no intended functional change. >> >> Signed-off-by: Alex Deucher > > > Reviewed-by: Christian König Is this for the series or just this patch? Alex > > >> --- >> drivers/gpu/drm/amd/

vga handover for raven

2018-03-14 Thread Tom St Denis
Hi, In the original version of the patch we had: @@ -358,7 +360,9 @@ struct dce_hwseq_registers { HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\ HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL, PHYPLL_PIXEL_RATE_SOURCE, mask_sh), \ HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBB

[PATCH] drm/amd/display: Fix null pointer when setting backlight

2018-03-14 Thread Harry Wentland
Fixes: c894d9f208f9 (drm/amd/display: Fixed dim around 1sec when resume from S3) Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gp

Re: [PATCH] drm/amd/display: Fix null pointer when setting backlight

2018-03-14 Thread Alex Deucher
On Wed, Mar 14, 2018 at 9:55 AM, Harry Wentland wrote: > Fixes: c894d9f208f9 (drm/amd/display: Fixed dim around 1sec when resume > from S3) > > Signed-off-by: Harry Wentland Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +--- > 1 file changed, 5 insertio

Re: vga handover for raven

2018-03-14 Thread Harry Wentland
On 2018-03-14 09:54 AM, Tom St Denis wrote: > Hi, > > In the original version of the patch we had: > > @@ -358,7 +360,9 @@ struct dce_hwseq_registers { > >     HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, OTG0_),\ >     HWS_SF1(OTG0_, PHYPLL_PIXEL_RATE_CNTL, PHYPLL_PIXEL_RATE_SOURCE, > mask_s

Re: vga handover for raven

2018-03-14 Thread Tom St Denis
Hi Harry, Reverting that on top of the current amd-staging-drm-next seems to have fixed the issue. Thanks, Tom On 03/14/2018 10:08 AM, Harry Wentland wrote: On 2018-03-14 09:54 AM, Tom St Denis wrote: Hi, In the original version of the patch we had: @@ -358,7 +360,9 @@ struct dce_hwseq_re

RE: vga handover for raven

2018-03-14 Thread Yang, Eric
If there is no VGA hand over, the change should make no difference. In the VGA hand over case, the difference introduced is the following, we can try to revert this part of the commit, which should not break S3. REG_WRITE(D1VGA_CONTROL, 0); - REG_WRITE(D2VGA_CONTROL, 0); - RE

[PATCH xf86-video-ati] Pass extents to amdgpu_scanout_do_update by value

2018-03-14 Thread Michel Dänzer
From: Michel Dänzer amdgpu_scanout_extents_intersect could leave the scanout damage region in an invalid state, triggering debugging checks in pixman: *** BUG *** In pixman_region_append_non_o: The expression r->x1 < r->x2 was false Set a breakpoint on '_pixman_log_error' to debug (Ported from

Re: AMD E8860 on PowerPC with u-boot (T2080)

2018-03-14 Thread Bas Vermeulen
I have the radeon driver working on the T2080, and am currently running into a problem with gallium/mesa. My problem was a mismatch between u-boot and my device-tree that caused PCI Express to misbehave. When I run a program calling OpenCL, I get a segfault. The cause for this particular crash in

Re: vga handover for raven

2018-03-14 Thread Tom St Denis
This diff on top of drm-next works fine diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index 4365906b14ee..7688ed5724b9 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/dr

[PATCH] drm/radeon: Don't turn off DP sink when disconnected

2018-03-14 Thread Michel Dänzer
From: Michel Dänzer Turning off the sink in this case causes various issues, because userspace expects it to stay on until it turns it off explicitly. Instead, turn the sink off and back on when a display is connected again. This dance seems necessary for link training to work correctly. Bugzil

[PATCH] drm/amdgpu: Use atomic function to disable crtcs with dc enabled

2018-03-14 Thread mikita.lipski
From: Mikita Lipski This change fixes the deadlock when unloading the driver with displays connected. Signed-off-by: Mikita Lipski --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_devic

Re: [PATCH] drm/amdgpu: Use atomic function to disable crtcs with dc enabled

2018-03-14 Thread Andrey Grodzovsky
Reviewed-by: Andrey Grodzovsky Andrey On 03/14/2018 01:51 PM, mikita.lip...@amd.com wrote: From: Mikita Lipski This change fixes the deadlock when unloading the driver with displays connected. Signed-off-by: Mikita Lipski --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1

[PATCH 1/2] drm/amdgpu: Improve documentation of bo_ptr in amdgpu_bo_create_kernel

2018-03-14 Thread Andrey Grodzovsky
and amdgpu_bo_create_reserved. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 48e0115..11673c3 1

[PATCH 2/2] drm/amd/powerplay: Fix KASAN user after free on driver unload.

2018-03-14 Thread Andrey Grodzovsky
Reusing local handle to initialize BO without resetting it to NULL is wrong since it causes amdgpu_bo_create_reserved to skip new BO creation and just reuse the given pointer for pinning. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 7 ++- driv

Re: [PATCH 1/2] drm/amdgpu: Improve documentation of bo_ptr in amdgpu_bo_create_kernel

2018-03-14 Thread Christian König
Am 14.03.2018 um 19:07 schrieb Andrey Grodzovsky: and amdgpu_bo_create_reserved. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/d

Re: [PATCH 2/2] drm/amd/powerplay: Fix KASAN user after free on driver unload.

2018-03-14 Thread Christian König
Am 14.03.2018 um 19:07 schrieb Andrey Grodzovsky: Reusing local handle to initialize BO without resetting it to NULL is wrong since it causes amdgpu_bo_create_reserved to skip new BO creation and just reuse the given pointer for pinning. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/am

Re: [PATCH] drm/radeon: Don't turn off DP sink when disconnected

2018-03-14 Thread Alex Deucher
On Wed, Mar 14, 2018 at 1:15 PM, Michel Dänzer wrote: > From: Michel Dänzer > > Turning off the sink in this case causes various issues, because > userspace expects it to stay on until it turns it off explicitly. > > Instead, turn the sink off and back on when a display is connected > again. This

[pull] radeon and amdgpu drm-fixes-4.16

2018-03-14 Thread Alex Deucher
Hi Dave, A few fixes for 4.16: - Fix a backlight S/R regression on amdgpu - Fix prime teardown on radeon and amdgpu - DP fix for amdgpu The following changes since commit b0655d668fc4faf0c1985e828820f9b9ca13abe6: Merge branch 'drm-fixes-4.16' of git://people.freedesktop.org/~agd5f/linux into

Debugging modesetting problem

2018-03-14 Thread Jona Stubbe
Hi AMD graphics developers, I've recently hit a modesetting problem: when I used the DisplayPort KVM switch that I got yesterday to connect my PC (running Arch Linux) to my 4K monitor, it only worked in 3 out of about 60 times of switching/replugging the cable (the BIOS always manages to put so

[PATCH 1/8] drm/amdgpu: Fix hardcoded base offset of vram pages

2018-03-14 Thread Feifei Xu
In gmc_v9_0_vram_gtt_location(),the vram_base_offset is hardcoded to 0 in dGPU. Fix it by reading mmMC_VM_FB_OFFSET or return zfb_phys_addr if ZFB is enabled. Change-Id: I585b7d4d96ebab2a5d7178fe8d1d6a746ef0c72a Signed-off-by: Feifei Xu Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgp

[PATCH 2/8] drm/amdgpu: add new member in amdgpu_mc for zfb support

2018-03-14 Thread Feifei Xu
Change-Id: I8253c8ff80e0cbd1f12e5ee801600e7619e6718f Signed-off-by: Hawking Zhang Signed-off-by: Feifei Xu Acked-by: John Bridgman Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.

[PATCH 3/8] drm/amdgpu: add amdgpu module parameter for zfb

2018-03-14 Thread Feifei Xu
Users can pass in an array to decide enable/disable Zero Frame Buffer. zfb[0] = zfb_size(MB), zfb[1] = zfb_phys_addr(MB). If zbf_size > 0, zfb is enabled. Otherwise disabled. Usage for example: modprobe amdgpu zfb=256,8192 Change-Id: I711062eb86b6cdff74572cabb3df250c6708e473 Signed-off-by:

[PATCH 4/8] drm/amdgpu: init zfb start address and size

2018-03-14 Thread Feifei Xu
Use module parameter passed from user to initialize zfb start address and size. Change-Id: I3d786e863114a217f89ff7c3d4ffdabf000f31a4 Signed-off-by: Feifei Xu Signed-off-by: Hawking Zhang Acked-by: John Bridgman Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10

[PATCH 5/8] drm/amdgpu: user reserved zfb to init vram base offset and size

2018-03-14 Thread Feifei Xu
Change-Id: I866dd16548304a42298b0cb28741f27cba3a76ca Signed-off-by: Feifei Xu Signed-off-by: Hawking Zhang Acked-by: John Bridgman Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a

[PATCH 6/8] drm/amdgpu: enable physical transaction for ptd/pde when ZFB is enabled

2018-03-14 Thread Feifei Xu
Change-Id: I2b45d765f1f60252fa1c02aced94f8100d575ddc Signed-off-by: Hawking Zhang Signed-off-by: Feifei Xu Acked-by: John Bridgman Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 9 +++-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 9 +++-- 2 files changed, 14 i

[PATCH 7/8] drm/amdgpu: program AGP aperture as frame buffer when ZFB is enabled

2018-03-14 Thread Feifei Xu
From: Hawking Zhang Change-Id: I09f9ddea0ad23af00fadd9af7aaccf7160e4e569 Signed-off-by: Hawking Zhang Acked-by: John Bridgman Reviewed-by: Alex Deucher Signed-off-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 19 +++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 1

[PATCH 8/8] drm/amdgpu: program system bit for pte/pde when ZFB is enabled

2018-03-14 Thread Feifei Xu
Change-Id: I9e4babf1e91855fb66e65cf2f82db64a1cd6fc97 Signed-off-by: Hawking Zhang Signed-off-by: Feifei Xu Acked-by: John Bridgman Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c| 6 ++ drivers/gpu/drm/amd/amdgpu/mmhu