[PATCH 1/2] drm/edid: Add aspect ratios to HDMI 4K modes

2019-11-11 Thread Wayne Lin
[Why] HDMI 2.0 adds aspect ratio attribute to distinguish different 4k modes. According to Appendix E of HDMI 2.0 spec, source should use VSIF to indicate video mode only when the mode is one defined in HDMI 1.4b 4K modes. Otherwise, use AVI infoframes to convey VIC. Current code doesn't take aspe

[PATCH 2/2] drm/edid: Add alternate clock for SMPTE 4K

2019-11-11 Thread Wayne Lin
[Why] In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode (4096x2160@24) due to there is no alternate clock defined for that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. [How] Remove the exception Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 3 --- 1 fi

[PATCH] drm/amd/powerplay: issue BTC on Navi during SMU setup

2019-11-11 Thread Evan Quan
RunBTC is added for Navi ASIC on hardware setup. Change-Id: I1c04b481ed14d5f12c20b7b0d592b62a65889e4a Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu

RE: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-11 Thread Deng, Emily
Hi Christian, I add the follow print in function drm_sched_cleanup_jobs. From the log it shows that only use cancel_delayed_work could not avoid to free job when the sched is in reset. But don't know exactly where it is wrong about the driver. Do you have any suggestion about this? +

RE: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-11 Thread Deng, Emily
Hi Andrey, On my side, it doesn't need to a specific scenario, I only run the quark with slow job. Then sometimes, it will have fake hang and hardware fence will back. For this case, it will randomly occur the NULL pointer issue in amdgpu_device_gpu_recover. >-Original Message- >Fr

Re: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-11 Thread Grodzovsky, Andrey
Thinking more about this claim - we assume here that if cancel_delayed_work returned true it guarantees that timeout work is not running but, it merely means there was a pending timeout work which was removed from the workqueue before it's timer elapsed and so it didn't have a chance to be deque

[PATCH] drm/amd/powerplay: avoid DPM reenable process on Navi1x ASICs V2

2019-11-11 Thread Evan Quan
Otherwise, without RLC reinitialization, the DPM reenablement will fail. That affects the custom pptable uploading. V2: setting/clearing uploading_custom_pp_table in smu_sys_set_pp_table() Change-Id: I6fe2ed5ce23f2a5b66f371c0b6d1f924837e5af6 Reported-by: Matt Coffin Signed-off-by: Evan Quan

RE: [PATCH] drm/amd/powerplay: avoid DPM reenable process on Navi1x ASICs

2019-11-11 Thread Quan, Evan
> -Original Message- > From: Alex Deucher > Sent: Tuesday, November 12, 2019 1:34 AM > To: Quan, Evan > Cc: amd-gfx list > Subject: Re: [PATCH] drm/amd/powerplay: avoid DPM reenable process on > Navi1x ASICs > > On Mon, Nov 11, 2019 at 4:25 AM Evan Quan wrote: > > > > Otherwise, with

[PATCH 30/30] drm/amd/display: Add Navi10 DMUB VBIOS code

2019-11-11 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] We need some extra dmub_cmd_type for NV10 [How] Add command table functions in DMUB firmware. Signed-off-by: Nicholas Kazlauskas Signed-off-by: Xiong Yan Reviewed-by: Tony Cheng Acked-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/am

[PATCH 19/30] drm/amd/display: Adjust DML workaround threshold

2019-11-11 Thread Rodrigo Siqueira
From: Joshua Aberback [Why] There is a case where the margin is between 50 and 60, but applying the workaround causes a hang. By increasing the threshold, we are blocking more cases from switching p-state during active, but those cases will fall back to switching during blank, which is fine. [Ho

[PATCH 29/30] drm/amd/display: Add DSC 422Native debug option

2019-11-11 Thread Rodrigo Siqueira
From: Ilya Bakoulin [Why] Need to be able to enable native 422 for debugging purposes. [How] Add new dc_debug_options bool and check it in the get_dsc_enc_caps function. Signed-off-by: Ilya Bakoulin Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h

[PATCH 28/30] drm/amd/display: Use a temporary copy of the current state when updating DSC config

2019-11-11 Thread Rodrigo Siqueira
From: Nikola Cornij [why] When updating DSC config, a new config has to be validated before proceeding with applying the update. Validation, however, modifies the current state. This means DSC config validation would affect pipe re-assignment, causing intermittent screen corruption issues when OD

[PATCH 26/30] drm/amd/display: DML Validation Dump/Check with Logging

2019-11-11 Thread Rodrigo Siqueira
From: Jaehyun Chung [Why] Need validation that we are programming the expected values (rq, ttu, dlg) from DML. This debug feature will output logs if we are programming incorrect values and may help differentiate DAL issues from HW issues. [How] Dump relevant registers for each pipe with active

[PATCH 13/30] drm/amd/display: Connect DIG FE to its BE before link training starts

2019-11-11 Thread Rodrigo Siqueira
From: Nikola Cornij [why] In SST mode no idle pattern will be generated after link training if DIG FE is not connected to DIG BE. Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 1 file changed, 4 inse

[PATCH 08/30] drm/amd/display: Fix stereo with DCC enabled

2019-11-11 Thread Rodrigo Siqueira
From: Samson Tam [Why] When sending DCC with Stereo, DCC gets enabled but the meta addresses are 0. This happens momentarily before the meta addresses are populated with a valid address. [How] Add call validate_dcc_with_meta_address() in copy_surface_update_to_plane() to check for surface addres

[PATCH 18/30] drm/amd/display: add color space option when sending link test pattern

2019-11-11 Thread Rodrigo Siqueira
From: Wenjing Liu [why] In the TEST_MSIC dpcd register field definition, the test equipment has the option to choose between YCbCr601 or YCbCr709. We will apply corresponding YCbCr coefficient based on this test request. [how] Add a new input parameter in dc_link_dp_set_test_pattern to allow the

[PATCH 11/30] drm/amd/display: Add DMUB param to load inst const from driver

2019-11-11 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] By default we shouldn't be trying to write secure registers during DMUB hardware init. [How] Add a parameter to control whether we put the DMCUB into secure reset and attempt to load CW0/CW1. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by:

[PATCH 23/30] drm/amd/display: Avoid conflict between HDR multiplier and 3dlut

2019-11-11 Thread Rodrigo Siqueira
From: Michael Strauss [WHY] There can be a conflict between OS HDR multiplier and 3dlut HDR multiplier, which are both sent to DC. [HOW] Instead of having dc determine which HDR multiplier to use, make the decision in dm and send only the intended value in a surface update. Store the current OS

[PATCH 21/30] drm/amd/display: 3.2.60

2019-11-11 Thread Rodrigo Siqueira
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 4c6c2fcc6a96..da

[PATCH 17/30] drm/amd/display: cleanup of construct and destruct funcs

2019-11-11 Thread Rodrigo Siqueira
From: Anthony Koo [Why] Too many construct functions which makes searching difficult, especially on some debuggers. [How] Append all construct and destruct functions with dcn number and object type to make each construct function name unique Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Ac

[PATCH 24/30] drm/amd/display: Don't spin forever waiting for DMCUB phy/auto init

2019-11-11 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] It's an interface violation to use infinite loops within DMUB service functions and we'll lock up the kernel by doing so. [How] Revert the function back to its intended functionality. Move the infinite loops into DC/DM as necessary. Signed-off-by: Nicholas Kazlau

[PATCH 12/30] drm/amd/display: Add debugfs initalization on mst connectors

2019-11-11 Thread Rodrigo Siqueira
From: Mikita Lipski [why] We were missing debugfs files on MST connectors as the files weren't initialized. [how] Move connector debugfs initialization into connoctor's init helper function so it will be called by both SST and MST connectors. Also move connector registration so it will be regist

[PATCH 00/30] DC Patches 11 Nov 2019

2019-11-11 Thread Rodrigo Siqueira
This DC patchset brings improvements in multiple areas. In summary, we have: * Some adjustments in Renoir register * Enhancements in DMUB * Some code cleanup * Improvements and fixes in debugfs Alvin Lee (1): drm/amd/display: Changes in dc to allow full update in some cases Anthony Koo (3):

[PATCH 20/30] drm/amd/display: Add debug trace for dmcub FW autoload.

2019-11-11 Thread Rodrigo Siqueira
From: Yongqiang Sun [Why & How] 1. Add trace code enum for easy debugging. 2. Add trace during uC boot up, including loading phy FW and dmcu FW. 3. Change cache memory type back to write back, since write through has issue when resume from S0i3 100% hang after 3.2ms. 4. Change CW3 base a

[PATCH 06/30] drm/amd/display: Fix incorrect deep color setting in YCBCR420 modes

2019-11-11 Thread Rodrigo Siqueira
From: Stylon Wang [Why] HDMI 2.0 HF-VSDB in EDID defines supported color depths in YCBCR420 modes. But we did not honor these bit masks when choosing pixel encoding. HDMI 2.0 compliance tests with deep color and YCBCR420 failed as a result. [How] Cap color depth based on y420_dc_modes from EDID.

[PATCH 03/30] drm/amd/display: Renoir chroma viewport WA Read the correct register

2019-11-11 Thread Rodrigo Siqueira
From: Joseph Gravenor [why] Before we were reading registers specific to luma size, which caused a black line to appear on the screen from time to time, as although the luma row height is generally the same as the chroma row height for the video case, it will sometimes be one more [how] Read t

[PATCH 22/30] drm/amd/display: add debugfs sdp hook up function for Navi

2019-11-11 Thread Rodrigo Siqueira
From: "David (Dingchen) Zhang" [why] need to send immediate SDP message via debugfs on Navi board. [how] hook up the DCN1x encoder function of sending immediate sdp message to DCN2. Signed-off-by: David (Dingchen) Zhang Reviewed-by: Harry Wentland Acked-by: Rodrigo Siqueira --- drivers/gpu/

[PATCH 27/30] drm/amd/display: Spin for DMCUB PHY init in DC

2019-11-11 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] DCN will hang if we access registers before PHY init is done. So we need to spin or abort. [How] On hardware with DMCUB running and working we shouldn't time out waiting for this to finish and we shouldn't hit the spin cycle. If there's no hardware support then

[PATCH 04/30] drm/amd/display: Add hubp clock status in DTN log for Navi

2019-11-11 Thread Rodrigo Siqueira
From: "Leo (Hanghong) Ma" [Why] For debug purpose, we need to check HUBP_CLOCK_ENABLE in DTN log debugfs on Navi. [How] Add related register read in dcn20_hubp.c. Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn20

[PATCH 01/30] drm/amd/display: add automated audio test support

2019-11-11 Thread Rodrigo Siqueira
From: abdoulaye berthe Signed-off-by: abdoulaye berthe Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 92 +++ drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 48 -- drivers/gpu/drm/amd/display/dc/dc_link.h |

[PATCH 02/30] drm/amd/display: Renoir chroma viewport WA change formula

2019-11-11 Thread Rodrigo Siqueira
From: Joseph Gravenor [why] we want to increase the pte row plus 1 line if chroma viewport height is integer multiple of the pte row height [how] instead of ceiling viewport height, we floor it. this allows us to accommodate both cases: those where the chroma viewport height is integer multiple

[PATCH 09/30] drm/amd/display: Changes in dc to allow full update in some cases

2019-11-11 Thread Rodrigo Siqueira
From: Alvin Lee Changes in dc to allow for different cases where full update is required. Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira --- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 22 +++ .../drm/amd/display/dc/dcn20/dcn20_resource.h | 2 +-

[PATCH 15/30] drm/amd/display: revert change causing DTN hang for RV

2019-11-11 Thread Rodrigo Siqueira
From: Samson Tam [Why] Hanging on RV for DTN driver verifier [How] Roll back change and investigate further Signed-off-by: Samson Tam Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc.c | 27 1 file changed, 27 deletions(-)

[PATCH 07/30] drm/amd/display: 3.2.59

2019-11-11 Thread Rodrigo Siqueira
From: Aric Cyr Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 2e6b3ecd564d..4c

[PATCH 16/30] drm/amd/display: Fix debugfs on MST connectors

2019-11-11 Thread Rodrigo Siqueira
From: Mikita Lipski [why] Previous patch allowed to initialize debugfs entries on both MST and SST connectors, but MST connectors get registered much later which exposed an issue of debugfs entries being initialized in the same folder. [how] Return SST debugfs entries' initialization back to whe

[PATCH 05/30] drm/amd/display: Update background color in bottommost mpcc

2019-11-11 Thread Rodrigo Siqueira
From: Hugo Hu [Why] Background color only takes effect in bottommost mpcc. [How] Update background color in bottommost mpcc. Signed-off-by: Hugo Hu Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 19 +-- 1 file change

[PATCH 14/30] drm/amd/display: Clean up some code with unused registers

2019-11-11 Thread Rodrigo Siqueira
From: Anthony Koo [Why] Unused register in the code [How] Remove unused register Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH 10/30] drm/amd/display: Add DMUB service function check if hw initialized

2019-11-11 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] We want to avoid reprogramming the cache window when possible. We don't need to worry about it for S3 but we *do* need to worry about it for S4 resume. DM can check whether hardware should be reinitialized or store software state when going to S4 to know whether

Re: [PATCH] drm/amd/powerplay: avoid DPM reenable process on Navi1x ASICs

2019-11-11 Thread Matt Coffin
Patch is Tested-by: Matt Coffin On 11/11/19 2:25 AM, Evan Quan wrote: > Otherwise, without RLC reinitialization, the DPM reenablement > will fail. That affects the custom pptable uploading. > > Change-Id: I6fe2ed5ce23f2a5b66f371c0b6d1f924837e5af6 > Signed-off-by: Evan Quan > --- > drivers/gpu/

Re: [PATCH] drm/amd/powerplay: do proper cleanups on hw_fini

2019-11-11 Thread Matt Coffin
Thanks Evan. I can confirm that the linked patch resolves the issue for me. I commented and resolved the bug as well in case other people find it. Cheers, Matt On 11/11/19 2:28 AM, Quan, Evan wrote: > Just sent out a patch which should be able to address this issue. > https://lists.freedesktop.o

[PATCH 3/3] drm/amdkfd: Fix a bug when calculating save_area_used_size

2019-11-11 Thread Yong Zhao
workgroup context data writes from m->cp_hqd_cntl_stack_size, so we should deduct it when calculating the used size. Change-Id: I5252e25662c3b8221f451c39115bf084d1911eae Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

[PATCH 1/3] drm/amdkfd: Implement queue priority controls for gfx10

2019-11-11 Thread Yong Zhao
Ported from gfx9. Change-Id: I388dc7c609ed724a6d600840f8e7317d9c2c877d Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/

[PATCH 2/3] drm/amdkfd: Update get_wave_state() for GFX10

2019-11-11 Thread Yong Zhao
Given control stack is now in the userspace context save restore area on GFX10, the same as GFX8, it is not needed to copy it back to userspace. Change-Id: I063ddc3026eefa57713ec47b466a90f9bf9d49b8 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 14 +-

Re: [PATCH 2/2] drm/amdkfd: Avoid using doorbell_off as offset in process doorbell pages

2019-11-11 Thread Yong Zhao
The NULL pointer is not an issue, because for DIQ, the if (q) condition, which guards the section but is now shown, will never be satisfied. Anyway, I still added the NULL pointer check. With that, I have pushed the change. Yong On 2019-11-11 3:51 p.m., Felix Kuehling wrote: On 2019-11-11 1

Re: [PATCH] drm/amd/display: Fix unsigned variable compared to less than zero

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 11, 2019 at 2:44 PM Gustavo A. R. Silva wrote: > > > > On 11/11/19 11:46, Mikita Lipski wrote: > > > > Thanks for catching it! > > > > Glad to help out. :) > > > Reviewed-by: Mikita Lipski > > > > Thanks > -- > Gustavo > > > > > On 11.11.2019 12:25, Gustavo A.

[PATCH] drm/amdgpu/soc15: move struct definition around to align with other soc15 asics

2019-11-11 Thread Alex Deucher
Move reset_method next to reset callback to match the struct layout and the other definition in this file. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/

Re: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-11 Thread Andrey Grodzovsky
Emily - is there a particular scenario to reproduce this ? I am trying with libdrm deadlock test and artificially delaying the GPU reset logic until after the guilty job is signaling but indeed nothing bad happens as drm_sched_cleanup_jobs returns early because there is a reset in progress and

Re: [PATCH] drm/amd/display: Use pixel encoding 444 for dongle usb-c to hdmi

2019-11-11 Thread Harry Wentland
On 2019-10-08 2:15 p.m., Julien Isorce wrote: > Hi Harry, > > I can reproduce on LG, Samsung and NEC monitors. > > "Have you checked whether the driver picks RGB or YCBCR420 without your > patch?" -> it was selecting RGB . > > For example on https://commons.wikimedia.org/wiki/File:Gray_scale.jpg

Re: [PATCH 2/2] drm/amdkfd: Avoid using doorbell_off as offset in process doorbell pages

2019-11-11 Thread Felix Kuehling
On 2019-11-11 15:43, Felix Kuehling wrote: On 2019-11-01 16:10, Zhao, Yong wrote: dorbell_off in the queue properties is mainly used for the doorbell dw offset in pci bar. We should not set it to the doorbell byte offset in process doorbell pages. This makes the code much easier to read. I kin

[PATCH] drm/amdgpu/vcn: finish delay work before release resources

2019-11-11 Thread Alex Deucher
flush/cancel delayed works before doing finalization to avoid concurrently requests. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c in

Re: [PATCH 2/2] drm/amdkfd: Avoid using doorbell_off as offset in process doorbell pages

2019-11-11 Thread Felix Kuehling
On 2019-11-01 16:10, Zhao, Yong wrote: dorbell_off in the queue properties is mainly used for the doorbell dw offset in pci bar. We should not set it to the doorbell byte offset in process doorbell pages. This makes the code much easier to read. I kind of agree. I think what's confusing is that

Re: [PATCH 00/14] HDCP 2 Content Protection v2

2019-11-11 Thread Harry Wentland
On 2019-11-07 10:56 a.m., Bhawanpreet Lakha wrote: > Just like with the 1.4 series of patches This only introduces the > ability to authenticate and encrypt the link. These patches by > themselves don't constitute a complete and compliant HDCP content > protection solution but are a requirement for

Re: [PATCH] drm/radeon: Clean up code in radeon_pci_shutdown()

2019-11-11 Thread Alex Deucher
On Mon, Nov 11, 2019 at 3:29 PM Kyle Mahlkuch wrote: > > From: KyleMahlkuch > > This fixes the formatting on one comment and consolidates the > pci_get_drvdata() into the radeon_suspend_kms(). > > Signed-off-by: Kyle Mahlkuch Applied. Thanks! Alex > --- > drivers/gpu/drm/radeon/radeon_drv.c

Re: [PATCH 1/2] drm/amdkfd: Use better name to indicate the offset is in dwords

2019-11-11 Thread Felix Kuehling
On 2019-11-01 16:10, Zhao, Yong wrote: Change-Id: I75da23bba90231762cf58da3170f5bb77ece45ed Signed-off-by: Yong Zhao I agree with the name changes. One suggestion for a comment inline. With that fixed, this patch is Reviewed-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/kfd_device_que

[PATCH] drm/radeon: Clean up code in radeon_pci_shutdown()

2019-11-11 Thread Kyle Mahlkuch
From: KyleMahlkuch This fixes the formatting on one comment and consolidates the pci_get_drvdata() into the radeon_suspend_kms(). Signed-off-by: Kyle Mahlkuch --- drivers/gpu/drm/radeon/radeon_drv.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ra

Re: [PATCH -next] drm/amd/display: remove set but not used variable 'bpc'

2019-11-11 Thread Alex Deucher
On Mon, Nov 11, 2019 at 1:01 PM Alex Deucher wrote: > > Applied. Thanks! I've dropped this as it leads to a warning in the code since get_color_depth is no longer used. Care to fix that up as well? Thanks! Alex > > Alex > > On Sun, Nov 10, 2019 at 9:30 PM YueHaibing wrote: > > > > Fixes gcc

Re: [PATCH] drm/amdkfd: Rename create_cp_queue() to init_user_queue()

2019-11-11 Thread Felix Kuehling
On 2019-11-01 16:12, Zhao, Yong wrote: create_cp_queue() could also work with SDMA queues, so we should rename it. Change-Id: I76cbaed8fa95dd9062d786cbc1dd037ff041da9d Signed-off-by: Yong Zhao The name change makes sense. This patch is Reviewed-by: Felix Kuehling --- drivers/gpu/drm/am

Re: [PATCH] drm/amd/display: Fix unsigned variable compared to less than zero

2019-11-11 Thread Gustavo A. R. Silva
On 11/11/19 11:46, Mikita Lipski wrote: > > Thanks for catching it! > Glad to help out. :) > Reviewed-by: Mikita Lipski > Thanks -- Gustavo > > On 11.11.2019 12:25, Gustavo A. R. Silva wrote: >> Currenly, the error check below on variable*vcpi_slots*  is always >> false because it is a u

[PATCH v2 0/2] drm: replace magic numbers

2019-11-11 Thread Bjorn Helgaas
From: Bjorn Helgaas amdgpu and radeon do a bit of mucking with the PCIe Link Control 2 register, some of it using hard-coded magic numbers. The idea here is to replace those with #defines. I don't intend the Target Link Speed patch to change anything, so it should be straightforward to review.

[PATCH 1/2] drm: replace incorrect Compliance/Margin magic numbers with PCI_EXP_LNKCTL2 definitions

2019-11-11 Thread Bjorn Helgaas
From: Bjorn Helgaas Add definitions for these PCIe Link Control 2 register fields: Enter Compliance Transmit Margin and use them in amdgpu and radeon. NOTE: This is a functional change because "7 << 9" was apparently a typo. That mask included the high order bit of Transmit Margin, the Ent

[PATCH 2/2] drm: replace Target Link Speed magic numbers with PCI_EXP_LNKCTL2 definitions

2019-11-11 Thread Bjorn Helgaas
From: Bjorn Helgaas Replace hard-coded magic numbers with the descript PCI_EXP_LNKCTL2 definitions. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 8 drivers/gpu/drm/amd/amdgpu/si.c | 8 drivers/

[PATCH v2] drm/amdgpu/smu_v11: Unify and fix power limits

2019-11-11 Thread Matt Coffin
[Why] On Navi10, and presumably arcterus, updating pp_table via sysfs would not re-scale the maximum possible power limit one can set. On navi10, the SMU code ignored the power percentage overdrive setting entirely, and would not allow you to exceed the default power limit at all. [How] Adding a f

[PATCH v2 3/3] drm/amdgpu/navi10: Implement od clk printing

2019-11-11 Thread Matt Coffin
[Why] Before this patch, navi10 overdrive settings could not be printed via pp_od_clk_voltage [How] Implement printing for the overdrive settings for the following clocks in navi10's ppt print_clk_levels implementation: * SMU_OD_SCLK * SMU_OD_MCLK * SMU_OD_VDDC_CURVE Signed-off-by: Matt Coffin

[PATCH v2 1/3] drm/amdgpu/navi10: implement sclk/mclk OD via pp_od_clk_voltage

2019-11-11 Thread Matt Coffin
[Why] Before this patch, there was no way to use pp_od_clk_voltage on navi [How] Similar to the vega20 implementation, but using the common smc_v11_0 headers, implemented the pp_od_clk_voltage API for navi10's pptable implementation Signed-off-by: Matt Coffin --- drivers/gpu/drm/amd/powerplay/i

[PATCH v2 2/3] drm/amdgpu/navi10: implement GFXCLK_CURVE overdrive

2019-11-11 Thread Matt Coffin
[Why] Before this patch, there was no way to set the gfxclk voltage curve in the overdrive settings for navi10 through pp_od_clk_voltage [How] Add the required implementation to navi10's ppt dpm table editing implementation, similar to the vega20 implementation and interface. Signed-off-by: Matt

Re: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-11 Thread Andrey Grodzovsky
Note that kthread_park waits for kthread->parked to be signaled before proceeding - so in the scenario you described it meas main thread is running (not parked and so kthread->parked is not signaled) and so kthread_park will not proceed until the sched thread finish current loop (including remo

Re: [PATCH 1/2] drm/amdkfd: Use better name to indicate the offset is in dwords

2019-11-11 Thread Yong Zhao
ping On 2019-11-01 4:10 p.m., Zhao, Yong wrote: Change-Id: I75da23bba90231762cf58da3170f5bb77ece45ed Signed-off-by: Yong Zhao --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 14 +++--- drivers/gpu/drm/amd/amdkfd/kf

Re: [PATCH] drm/amdkfd: Rename create_cp_queue() to init_user_queue()

2019-11-11 Thread Yong Zhao
ping On 2019-11-01 4:12 p.m., Zhao, Yong wrote: create_cp_queue() could also work with SDMA queues, so we should rename it. Change-Id: I76cbaed8fa95dd9062d786cbc1dd037ff041da9d Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 6 +++--- 1 file changed, 3

Re: [PATCH -next] drm/amd/display: remove set but not used variable 'bpc'

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Sun, Nov 10, 2019 at 9:30 PM YueHaibing wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function > get_pbn_from_timing: > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2364:11: warning:

Re: [PATCH -next] drm/amd/display: remove set but not used variable 'ds_port'

2019-11-11 Thread Alex Deucher
Applied. thanks! Alex On Sun, Nov 10, 2019 at 9:29 PM YueHaibing wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c: In function > dp_wa_power_up_0010FA: > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:2320:35:

Re: [PATCH] drm/amd/powerplay: remove set but not used variable 'threshold', 'state'

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 11, 2019 at 3:07 AM zhengbin wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c: In function > fiji_populate_single_graphic_level: > drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c:943:11: warnin

Re: [PATCH] drm/amd/display: Use static const, not const static

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 11, 2019 at 9:11 AM zhengbin wrote: > > Move the static keyword to the front of declarations. > > Reported-by: Hulk Robot > Signed-off-by: zhengbin > --- > drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > d

Re: [PATCH 0/2] remove some set but not used variables in hwmgr

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Sun, Nov 10, 2019 at 11:04 PM Quan, Evan wrote: > > Series is reviewed-by: Evan Quan > > > -Original Message- > > From: zhengbin > > Sent: Monday, November 11, 2019 11:46 AM > > To: rex@amd.com; Quan, Evan ; Deucher, > > Alexander ; Koenig, Christian > > ;

[PATCH] drm/amd/display: Fix unsigned variable compared to less than zero

2019-11-11 Thread Gustavo A. R. Silva
Currenly, the error check below on variable *vcpi_slots* is always false because it is a uint64_t type variable, hence, the values this variable can hold are never less than zero: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: 4870 if (dm_new_connector_state->vcpi_slots < 0) { 4871

Re: [PATCH] drm/amd/display: Fix unsigned variable compared to less than zero

2019-11-11 Thread Mikita Lipski
Thanks for catching it! Reviewed-by: Mikita Lipski On 11.11.2019 12:25, Gustavo A. R. Silva wrote: Currenly, the error check below on variable*vcpi_slots* is always false because it is a uint64_t type variable, hence, the values this variable can hold are never less than zero: drivers/gpu/

Re: [PATCH] drm/amdgpu/smu_v11: Unify and fix power limits

2019-11-11 Thread Alex Deucher
Patch is missing your signed-off-by. Please address Evan's comments and the signed off by and I'll apply it. Thanks! Alex On Sun, Nov 10, 2019 at 11:03 PM Quan, Evan wrote: > > If smu_get_pptable_power_limit() is designed to be used internally, the > second argument "lock_needed" can be dropp

Re: [PATCH v2 0/3] navi10: Implement overdrive pp_od_clk_voltage

2019-11-11 Thread Alex Deucher
Patches are missing your Signed-off-by. Please follow up with that and I'll apply them. Thanks! Alex On Fri, Nov 8, 2019 at 4:28 PM Matt Coffin wrote: > > [Why] > Before this patchset, navi10 users could not utilize the overdrive > functionality. This prevented them from overclocking, overvolt

Re: [PATCH] drm/amd/display: remove duplicated comparison expression

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 11, 2019 at 8:38 AM Kazlauskas, Nicholas wrote: > > On 2019-11-09 10:49 a.m., Colin King wrote: > > From: Colin Ian King > > > > There is comparison expression that is duplicated and hence one > > of the expressions can be removed. Remove it. > > > > Addresse

Re: [PATCH] drm/amd/powerplay: avoid DPM reenable process on Navi1x ASICs

2019-11-11 Thread Alex Deucher
On Mon, Nov 11, 2019 at 4:25 AM Evan Quan wrote: > > Otherwise, without RLC reinitialization, the DPM reenablement > will fail. That affects the custom pptable uploading. > > Change-Id: I6fe2ed5ce23f2a5b66f371c0b6d1f924837e5af6 > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/powerplay/amd

Re: [PATCH][next] drm/amd/display: fix spelling mistake "exeuction" -> "execution"

2019-11-11 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Nov 11, 2019 at 8:37 AM Kazlauskas, Nicholas wrote: > > On 2019-11-09 2:49 p.m., Colin King wrote: > > From: Colin Ian King > > > > There are spelling mistakes in a DC_ERROR message and a comment. > > Fix these. > > > > Signed-off-by: Colin Ian King > > Reviewed-

Re: [PATCH] drm/amdgpu: avoid upload corrupted ta ucode to psp

2019-11-11 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: Hawking Zhang Sent: Sunday, November 10, 2019 11:41 PM To: amd-gfx@lists.freedesktop.org ; Deucher, Alexander ; Clements John ; Ma, Le Cc: Zhang, Hawking Subject: [PATCH] drm/amdgpu: avoid upload corrupted ta ucode to psp xgmi,

[PATCH 3/4] drm/ttm: rework BO delayed delete.

2019-11-11 Thread Christian König
This patch reworks the whole delayed deletion of BOs which aren't idle. Instead of having two counters for the BO structure we resurrect the BO when we find that a deleted BO is not idle yet. This has many advantages, especially that we don't need to increment/decrement the BOs reference counter

[PATCH 4/4] drm/ttm: replace dma_resv object on deleted BOs

2019-11-11 Thread Christian König
When non-imported BOs are resurrected for delayed delete we replace the dma_resv object to allow for easy reclaiming of the resources. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo

[PATCH 2/4] drm/ttm: cleanup ttm_buffer_object_transfer

2019-11-11 Thread Christian König
The function is always called with deleted BOs. While at it cleanup the indentation as well. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo

[PATCH 1/4] drm/ttm: refine ghost BO resv criteria

2019-11-11 Thread Christian König
Ghost BOs need to stick with the resv object only when the origin is imported. This is a low hanging fruit to avoid OOM situations on evictions. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/d

Re: AMDGPU bug

2019-11-11 Thread Kazlauskas, Nicholas
On 2019-11-10 7:00 p.m., Subsentient wrote: Hi, I've been experiencing a bug on kernels 5.2 and up that apparently is uncommon and/or unimportant enough to have both threads mentioning it die. On a Ryzen 3 2200G, the amdgpu driver fails upon lightdm login: https://bugzilla.redhat.com/show_bug

[PATCH -next] drm/amd/display: Fix old-style declaration

2019-11-11 Thread YueHaibing
Fix a build warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:75:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: YueHaibing --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/amd/display: Use static const, not const static

2019-11-11 Thread zhengbin
Move the static keyword to the front of declarations. Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/

Re: [PATCH][next] drm/amd/display: fix spelling mistake "exeuction" -> "execution"

2019-11-11 Thread Kazlauskas, Nicholas
On 2019-11-09 2:49 p.m., Colin King wrote: From: Colin Ian King There are spelling mistakes in a DC_ERROR message and a comment. Fix these. Signed-off-by: Colin Ian King Reviewed-by: Nicholas Kazlauskas Thanks! Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c|

Re: [PATCH] drm/amd/display: remove duplicated comparison expression

2019-11-11 Thread Kazlauskas, Nicholas
On 2019-11-09 10:49 a.m., Colin King wrote: From: Colin Ian King There is comparison expression that is duplicated and hence one of the expressions can be removed. Remove it. Addresses-Coverity: ("Same on both sides") Fixes: 12e2b2d4c65f ("drm/amd/display: add dcc programming for dual plane")

RE: [PATCH] drm/amd/powerplay: do proper cleanups on hw_fini

2019-11-11 Thread Quan, Evan
Just sent out a patch which should be able to address this issue. https://lists.freedesktop.org/archives/amd-gfx/2019-November/042458.html Regards, Evan > -Original Message- > From: Matt Coffin > Sent: Saturday, November 9, 2019 4:50 AM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > C

[PATCH] drm/amd/powerplay: avoid DPM reenable process on Navi1x ASICs

2019-11-11 Thread Evan Quan
Otherwise, without RLC reinitialization, the DPM reenablement will fail. That affects the custom pptable uploading. Change-Id: I6fe2ed5ce23f2a5b66f371c0b6d1f924837e5af6 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 32 +++ .../gpu/drm/amd/powerplay/

RE: [PATCH] drm/amdgpu: Fix the null pointer issue for tdr

2019-11-11 Thread Deng, Emily
Hi Christian and Andrey, The issue I encountered is the bad job is freeing after entering to the amdgpu_device_gpu_recover. Don't know why, as per Christian said, it will call cancel_delayed_work in drm_sched_cleanup_jobs. Best wishes Emily Deng >-Original Message- >From: amd-gfx

[PATCH -next] drm/amd/display: remove set but not used variable 'bpc'

2019-11-11 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function get_pbn_from_timing: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2364:11: warning: variable bpc set but not used [-Wunused-but-set-variable] It is not used since commi

[PATCH -next] drm/amd/display: remove set but not used variable 'ds_port'

2019-11-11 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c: In function dp_wa_power_up_0010FA: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:2320:35: warning: variable ds_port set but not used [-Wunused-but-set-variable] It is never us

[PATCH 2/2] drm/amd/powerplay: remove set but not used variable 'data'

2019-11-11 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c: In function vega10_get_performance_level: drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c:5217:23: warning: variable data set but not used [-Wunused-but-set-variable] 'data' is introduced by co

[PATCH][next] drm/amd/display: fix spelling mistake "exeuction" -> "execution"

2019-11-11 Thread Colin King
From: Colin Ian King There are spelling mistakes in a DC_ERROR message and a comment. Fix these. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c| 2 +- drivers/gpu/drm/amd/display/dmub/inc/dmub_srv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) d

[PATCH] drm/amd/powerplay: remove set but not used variable 'threshold', 'state'

2019-11-11 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c: In function fiji_populate_single_graphic_level: drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c:943:11: warning: variable threshold set but not used [-Wunused-but-set-variable] drivers/gpu/drm/a

[PATCH 0/2] remove some set but not used variables in hwmgr

2019-11-11 Thread zhengbin
zhengbin (2): drm/amd/powerplay: remove set but not used variable 'vbios_version','data' drm/amd/powerplay: remove set but not used variable 'data' drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 -- 2 files changed, 6 de

[PATCH 1/2] drm/amd/powerplay: remove set but not used variable 'vbios_version', 'data'

2019-11-11 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function smu7_check_mc_firmware: drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:4215:11: warning: variable vbios_version set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/powerpla

  1   2   >