Re: [PATCH] drm/amd/powerplay: minor cleanups

2020-08-13 Thread Alex Deucher
On Mon, Aug 10, 2020 at 11:38 PM Evan Quan wrote: > > Drop unnecessary lock protections during hw setup which was confirmed > to have no race condition. Drop also unnecessary null pointer checker. > I think this would be cleaner as 4 patches: 1. remove the feature mutex locking and explain why

Re: [PATCH] drm/amd/powerplay: suppress the kernel test robot warning

2020-08-13 Thread Alex Deucher
On Fri, Aug 14, 2020 at 12:22 AM Evan Quan wrote: > > Suppress the warning below: >In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_cmn.c: > >> drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: warning: Identical > >> condition 'ret', second condition is always false > >>

Re: [PATCH] drm/amd/pm: optimize the power related source code layout

2020-08-13 Thread Alex Deucher
Ah, sorry, I missed that hunk in all of the renaming. Reviewed-by: Alex Deucher On Fri, Aug 14, 2020 at 12:11 AM Quan, Evan wrote: > > [AMD Official Use Only - Internal Distribution Only] > > Yes, that's guarded in the new powerplay/Makefile and confirmed by my local > compiling(with/without

RE: [PATCH] drm/amd/powerplay: minor cleanups

2020-08-13 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Ping.. -Original Message- From: Quan, Evan Sent: Tuesday, August 11, 2020 11:38 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Quan, Evan Subject: [PATCH] drm/amd/powerplay: minor cleanups Drop unnecessary lock

[PATCH] drm/amd/powerplay: suppress the kernel test robot warning

2020-08-13 Thread Evan Quan
Suppress the warning below: In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_cmn.c: >> drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: warning: Identical condition >> 'ret', second condition is always false [identicalConditionAfterEarlyExit] return ret; ^

RE: [PATCH] drm/amd/pm: optimize the power related source code layout

2020-08-13 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Yes, that's guarded in the new powerplay/Makefile and confirmed by my local compiling(with/without the configs). POWER_MGR-y = amd_powerplay.o POWER_MGR-$(CONFIG_DRM_AMDGPU_CIK)+= kv_dpm.o kv_smc.o POWER_MGR-$(CONFIG_DRM_AMDGPU_SI)+=

RE: [PATCH] drm/amdgpu: Fix incorrect return value in sysfs for pp_od_clk_voltage

2020-08-13 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Thanks for catching this. The patch is reviewed-by: Evan Quan I have the same copy as Matt. @Li, Dennis maybe you were working on an old copy? BR Evan -Original Message- From: amd-gfx On Behalf Of Matt Coffin Sent: Friday, August

Re: [PATCH] drm/amdgpu: Fix incorrect return value in sysfs for pp_od_clk_voltage

2020-08-13 Thread Matt Coffin
Hey Dennis, Thanks for the testing. I'm having some issues reproducing, as that command is working fine for me in sh, bash, and zsh. So just to confirm a few things while I look at it... 1. What kind of SMU is on whatever card you're testing on? Looks like smu_v11+ to me? 2. (shouldn't

Fix a memory leak bug for umr tool.

2020-08-13 Thread 张二东
Hi: The function umr_pm4_decode_ring_is_halted call umr_read_ring_data to get ringdata, umr_read_ring_data will alloc memory to store ring data and return the memory pointer to umr_pm4_decode_ring_is_halted, So the memory should be free in umr_pm4_decode_ring_is_halted.

RE: [PATCH 4/4] drm/amd/powerplay: put those exposed power interfaces in amdgpu_dpm.c

2020-08-13 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Yes, I would like to make another patch to address Nirmoy's comments. @Das, Nirmoy is that OK? BR Evan -Original Message- From: Alex Deucher Sent: Thursday, August 13, 2020 9:54 PM To: Das, Nirmoy Cc: Quan, Evan ; amd-gfx list ;

RE: [PATCH] drm/amdgpu: Fix incorrect return value in sysfs for pp_od_clk_voltage

2020-08-13 Thread Li, Dennis
[AMD Official Use Only - Internal Distribution Only] Hi, Matt, With your change, I still could reproduce the following issue: # echo "s 1 1900" > /sys/class/drm/card0/device/pp_od_clk_voltage bash: echo: write error: Invalid argument I found that it is related the following lines

Re: [PATCH] drm/amdgpu: revert "fix system hang issue during GPU reset"

2020-08-13 Thread Matt Coffin
On 8/12/20 9:55 AM, Alex Deucher wrote: > This also broke GPU overclocking. The fix for the `pp_od_clk_voltage` interface was actually quite simple, and the bug was limited to that function. The patch just messed up the return value (which was supposed to be the # of bytes consumed). It was just

[PATCH] drm/amdgpu: Fix incorrect return value in sysfs for pp_od_clk_voltage

2020-08-13 Thread Matt Coffin
The changes in edad8312cbbf9a33c86873fc4093664f150dd5c1 introduced an issue with the sysfs interface for pp_od_clk_voltage. It overwrites the return value to 0 when it calls another function, then returns 0. The intended behavior is that a positive return value indicates the number of bytes from

[PATCH 16/17] drm/amd/display: Mask DPCD field to avoid reading unsupported field value

2020-08-13 Thread Rodrigo Siqueira
From: Jaehyun Chung [Why] DSC will be disabled if DPCD 0006F[6:3] is set to a non-zero value because bits 6:3 are not currently supported. When 6:3 is populated, an unsupported INCREMENT OF bits_per_pixel value is read (DPCD 0006F[2:0]) [How] Mask the INCREMENT OF bits_per_pixel field so that

[PATCH 08/17] drm/amd/display: PSR eDP p-state warning occurs intermittently after unplug DP

2020-08-13 Thread Rodrigo Siqueira
From: hersen wu [Why] with eDP + DP, each display use one pipe. after DP unplugged, eDP switch from one pipe to two pipes -- pipe split. dpp1_cm_set_regamma_pwl will be executed too. The duration from switch single pipe to dual pipes is a little long which could let eDP enter PSR mode. upon two

[PATCH 06/17] drm/amd/display: Change ABM config init interface

2020-08-13 Thread Rodrigo Siqueira
From: Yongqiang Sun [Why & How] change abm config init interface to support multiple ABMs. Signed-off-by: Yongqiang Sun Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- .../amd/display/modules/power/power_helpers.c | 19

[PATCH 15/17] drm/amd/display: fix pow() crashing when given base 0

2020-08-13 Thread Rodrigo Siqueira
From: Krunoslav Kovac [Why] pow(a,x) is implemented as exp(x*log(a)). log(0) will crash. So return 0^x = 0, unless x=0, convention seems to be 0^0 = 1. Cc: sta...@vger.kernel.org Signed-off-by: Krunoslav Kovac Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira ---

[PATCH 17/17] drm/amd/display: [FW Promotion] Release 0.0.29

2020-08-13 Thread Rodrigo Siqueira
From: Anthony Koo [Header Changes] - Add command for panel power seq control Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 12/17] drm/amd/display: Fix DSC force enable on SST

2020-08-13 Thread Rodrigo Siqueira
From: Eryk Brol [why] Previously when force enabling DSC on SST display we unknowingly supressed lane count, which caused DSC to be enabled automatically. [how] By adding an additional flag to force enable DSC in dc_dsc.c DSC can always be enabled with debugfs dsc_clock_en forced to 1 Cc:

[PATCH 07/17] drm/amd/display: Fix DFPstate hang due to view port changed

2020-08-13 Thread Rodrigo Siqueira
From: Paul Hsieh [Why] Place the cursor in the center of screen between two pipes then adjusting the viewport but cursour doesn't update cause DFPstate hang. [How] If viewport changed, update cursor as well. Cc: sta...@vger.kernel.org Signed-off-by: Paul Hsieh Reviewed-by: Aric Cyr Acked-by:

[PATCH 11/17] drm/amd/display: fix dcn3 wide timing dsc validation

2020-08-13 Thread Rodrigo Siqueira
From: Dmytro Laktyushkin Wide timing DSC requires odm. Since spreadsheet is missing this dsc validation we have to modify DML vba code ourselves. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Wesley Chalmers Acked-by: Rodrigo Siqueira ---

[PATCH 05/17] drm/amd/display: create a function to decide mst link settings

2020-08-13 Thread Rodrigo Siqueira
From: Wenjing Liu [why] create a dedicated function to make mst link settings decision, so that the policy's decision is made in a unified place. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 14

[PATCH 03/17] drm/amd/display: Call DMUB for eDP power control

2020-08-13 Thread Rodrigo Siqueira
From: Chris Park [Why] If DMUB is used, LVTMA VBIOS call can be used to control eDP instead of tranditional transmitter control. Interface is agreed with VBIOS for eDP to use this new path to program LVTMA registers. [How] Create DAL interface to send DMUB command for LVTMA as currently

[PATCH 01/17] drm/amd/display: [FW Promotion] Release 0.0.28

2020-08-13 Thread Rodrigo Siqueira
From: Anthony Koo Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

[PATCH 10/17] drm/amd/display: Screen corruption on dual displays (DP+USB-C)

2020-08-13 Thread Rodrigo Siqueira
From: Qingqing Zhuo [why] Current pipe merge and split logic only supports cases where new dc_state is allocated and relies on dc->current_state to gather information from previous dc_state. Calls to validate_bandwidth on UPDATE_TYPE_MED would cause an issue because there is no new dc_state

[PATCH 04/17] drm/amd/display: Assign correct left shift

2020-08-13 Thread Rodrigo Siqueira
From: Chris Park [Why] Reading for DP alt registers return incorrect values due to LE_SF definition missing. [How] Define correct LE_SF or DP alt registers. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira ---

[PATCH 02/17] drm/amd/display: 3.2.98

2020-08-13 Thread Rodrigo Siqueira
From: Anthony Koo Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo 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

[PATCH 13/17] drm/amd/display: Add extra T3 delay

2020-08-13 Thread Rodrigo Siqueira
From: Lewis Huang [Why] For some special panel, it will have an invalid HPD high cause driver DPCD read/write fail. [How] Add extra T3 delay as a monitor patch in dce110_edp_wait_for_hpd_ready Signed-off-by: Lewis Huang Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira ---

[PATCH 00/17] [PATCH 00/17] DC Patches August 13th, 2020

2020-08-13 Thread Rodrigo Siqueira
This DC patchset brings improvements in multiple areas. In summary, we have: * Fixes on DCN3, DSC, eDP, and pow() * Firmware version updates * Updates on ABM * Improvements on MST Anthony Koo (3): drm/amd/display: [FW Promotion] Release 0.0.28 drm/amd/display: 3.2.98 drm/amd/display: [FW

[PATCH 09/17] drm/amd/display: Add read backlight interface

2020-08-13 Thread Rodrigo Siqueira
From: Yongqiang Sun [Why & How] Add read backlight interface to get ABM data. Signed-off-by: Yongqiang Sun Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 12

[PATCH 14/17] drm/amd/display: Reset scrambling on Test Pattern

2020-08-13 Thread Rodrigo Siqueira
From: Chris Park [Why] Programming is missing the sequence where for eDP the scrambling is reset when testing for eye diagram test pattern. [How] Include the required register in the definition Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira ---

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Luben Tuikov
One more nitpick: > +static pci_ers_result_t amdgpu_pci_err_detected(struct pci_dev *pdev, > + pci_channel_state_t state) > +{ > + struct drm_device *dev = pci_get_drvdata(pdev); That's the name of a state, a state of "pci error detected". I'd

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Luben Tuikov
I support having AER handling. However, I feel it should be offloaded to the DRM layer. The PCI driver gets the AER callback and immediately offloads into DRM, as "return drm_aer_recover(dev); }". The DRM layer does a top-down approach into the error recovery procedure. The PCI device driver

RE: [PATCH] drm/amdgpu/vcn3.0: only SIENNA_CICHLID need specify instance for dec/enc

2020-08-13 Thread Liu, Leo
Reviewed-by: Leo Liu -Original Message- From: amd-gfx On Behalf Of James Zhu Sent: August 13, 2020 3:58 PM To: amd-gfx@lists.freedesktop.org Cc: Zhu, James Subject: [PATCH] drm/amdgpu/vcn3.0: only SIENNA_CICHLID need specify instance for dec/enc Only SIENNA_CICHLID(VCN3) has 2

[PATCH] drm/amdgpu/vcn3.0: only SIENNA_CICHLID need specify instance for dec/enc

2020-08-13 Thread James Zhu
Only SIENNA_CICHLID(VCN3) has 2 unsymmetrical instances, there're less codecs on instance 1, we use 0 for decode and 1 for encode. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] drm/amdgpu/jpeg: remove redundant check when it returns

2020-08-13 Thread Deucher, Alexander
[AMD Public Use] Reviewed-by: Alex Deucher From: amd-gfx on behalf of Leo Liu Sent: Thursday, August 13, 2020 3:40 PM To: amd-gfx@lists.freedesktop.org Cc: Liu, Leo Subject: [PATCH] drm/amdgpu/jpeg: remove redundant check when it returns Fix warning from

[PATCH] drm/amdgpu/jpeg: remove redundant check when it returns

2020-08-13 Thread Leo Liu
Fix warning from kernel test robot Signed-off-by: Leo Liu --- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c index c41e5590a701..f4ba423af051 100644 ---

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Andrey Grodzovsky
On 8/13/20 11:06 AM, Nirmoy wrote: On 8/13/20 3:38 PM, Andrey Grodzovsky wrote: On 8/13/20 7:09 AM, Nirmoy wrote: On 8/12/20 4:52 PM, Andrey Grodzovsky wrote: On 8/11/20 9:30 AM, Nirmoy Das wrote: This patch will ignore non-fatal errors and try to stop amdgpu's sw stack on fatal errors.

Re: [PATCH 18/20] drm/xen: Introduce GEM object functions

2020-08-13 Thread Oleksandr Andrushchenko
Hi, On 8/13/20 11:36 AM, Thomas Zimmermann wrote: > GEM object functions deprecate several similar callback interfaces in > struct drm_driver. This patch replaces the per-driver callbacks with > per-instance callbacks in xen. The only exception is gem_prime_mmap, > which is non-trivial to

Re: [PATCH 2/9] drm/amd/display: Fix incorrect backlight register offset for DCN

2020-08-13 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.8, v5.7.14, v5.4.57, v4.19.138, v4.14.193, v4.9.232, v4.4.232. v5.8: Build OK!

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Nirmoy
On 8/13/20 3:38 PM, Andrey Grodzovsky wrote: On 8/13/20 7:09 AM, Nirmoy wrote: On 8/12/20 4:52 PM, Andrey Grodzovsky wrote: On 8/11/20 9:30 AM, Nirmoy Das wrote: This patch will ignore non-fatal errors and try to stop amdgpu's sw stack on fatal errors. Signed-off-by: Nirmoy Das ---  

Re: [PATCH] drm/amd/pm: optimize the power related source code layout

2020-08-13 Thread Alex Deucher
On Thu, Aug 13, 2020 at 5:38 AM Evan Quan wrote: > > The target is to provide a clear entry point(for power routines). > Also this can help to maintain a clear view about the frameworks > used on different ASICs. Hopefully all these can make power part > more friendly to play with. > > Change-Id:

Re: [PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro

2020-08-13 Thread Thomas Zimmermann
Hi Am 13.08.20 um 15:36 schrieb Laurent Pinchart: > Hi Thomas, > > Thank you for the patch. > > On Thu, Aug 13, 2020 at 10:36:43AM +0200, Thomas Zimmermann wrote: >> The xlnx driver uses CMA helpers with default callback functions. >> Initialize the driver structure with the rsp CMA helper

Re: [PATCH 4/4] drm/amd/powerplay: put those exposed power interfaces in amdgpu_dpm.c

2020-08-13 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher Nirmoy makes some good points below, but I think those should be a follow up patch as this patch is just moving code around; no actual changes. Alex On Thu, Aug 13, 2020 at 6:52 AM Nirmoy wrote: > > Acked-by: Nirmoy Das for 1st 3 patches. Check for > below

Re: [PATCH 10/20] drm/omapdrm: Introduce GEM object functions

2020-08-13 Thread Laurent Pinchart
Hi Thomas, Thank you for the patch. On Thu, Aug 13, 2020 at 10:36:34AM +0200, Thomas Zimmermann wrote: > GEM object functions deprecate several similar callback interfaces in > struct drm_driver. This patch replaces the per-driver callbacks with > per-instance callbacks in omapdrm. > >

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Andrey Grodzovsky
On 8/13/20 7:09 AM, Nirmoy wrote: On 8/12/20 4:52 PM, Andrey Grodzovsky wrote: On 8/11/20 9:30 AM, Nirmoy Das wrote: This patch will ignore non-fatal errors and try to stop amdgpu's sw stack on fatal errors. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 56

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Alex Deucher
On Thu, Aug 13, 2020 at 7:06 AM Nirmoy wrote: > > > On 8/12/20 4:52 PM, Andrey Grodzovsky wrote: > > > > On 8/11/20 9:30 AM, Nirmoy Das wrote: > >> This patch will ignore non-fatal errors and try to > >> stop amdgpu's sw stack on fatal errors. > >> > >> Signed-off-by: Nirmoy Das > >> --- > >>

Re: [PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro

2020-08-13 Thread Laurent Pinchart
Hi Thomas, Thank you for the patch. On Thu, Aug 13, 2020 at 10:36:43AM +0200, Thomas Zimmermann wrote: > The xlnx driver uses CMA helpers with default callback functions. > Initialize the driver structure with the rsp CMA helper macro. The > driver is being converted to use GEM object functions

Re: [PATCH] drm/amd/powerplay: Fix uninitialized warning in arcturus ppt driver

2020-08-13 Thread StDenis, Tom
[AMD Official Use Only - Internal Distribution Only] Hi Kevin, Ah ok disregard the (v2) I just sent then :-) Thanks, Tom From: Wang, Kevin(Yang) Sent: Wednesday, August 12, 2020 22:47 To: Quan, Evan; StDenis, Tom; amd-gfx@lists.freedesktop.org Subject:

[PATCH] drm/amd/powerplay: Fix uninitialized warning in arcturus ppt driver (v2)

2020-08-13 Thread Tom St Denis
Fixes: CC [M] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.o drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c: In function ‘arcturus_log_thermal_throttling_event’: drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:2223:24: warning: ‘throttler_status’ may be

Re: [RFC PATCH 1/1] drm/amdgpu: add initial support for pci error handler

2020-08-13 Thread Nirmoy
On 8/12/20 4:52 PM, Andrey Grodzovsky wrote: On 8/11/20 9:30 AM, Nirmoy Das wrote: This patch will ignore non-fatal errors and try to stop amdgpu's sw stack on fatal errors. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 56 -   1 file

Re: [PATCH 4/4] drm/amd/powerplay: put those exposed power interfaces in amdgpu_dpm.c

2020-08-13 Thread Nirmoy
Acked-by: Nirmoy Das for 1st 3 patches. Check for below for more comments. On 8/13/20 11:08 AM, Evan Quan wrote: As other power interfaces. Change-Id: I5e3b85ae21c4b1d0239f54fa75247b33cfdb7ddc Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 425

Re: [PATCH 12/20] drm/radeon: Introduce GEM object functions

2020-08-13 Thread Christian König
Am 13.08.20 um 12:41 schrieb Thomas Zimmermann: Hi Am 13.08.20 um 12:24 schrieb Christian König: Am 13.08.20 um 10:36 schrieb Thomas Zimmermann: GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with

Re: [PATCH 12/20] drm/radeon: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
Hi Am 13.08.20 um 12:24 schrieb Christian König: > Am 13.08.20 um 10:36 schrieb Thomas Zimmermann: >> GEM object functions deprecate several similar callback interfaces in >> struct drm_driver. This patch replaces the per-driver callbacks with >> per-instance callbacks in radeon. >> >>

Re: [PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver

2020-08-13 Thread Thomas Zimmermann
Hi Am 13.08.20 um 12:16 schrieb Sam Ravnborg: > Hi Thomas. > > On Thu, Aug 13, 2020 at 10:36:44AM +0200, Thomas Zimmermann wrote: >> Several GEM and PRIME callbacks have been deprecated in favor of >> per-instance GEM object functions. Remove the callbacks as they are >> now unused. The only

Re: [PATCH 12/20] drm/radeon: Introduce GEM object functions

2020-08-13 Thread Christian König
Am 13.08.20 um 10:36 schrieb Thomas Zimmermann: GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in radeon. Signed-off-by: Thomas Zimmermann ---

Re: [PATCH 01/20] drm/amdgpu: Introduce GEM object functions

2020-08-13 Thread Christian König
Am 13.08.20 um 10:36 schrieb Thomas Zimmermann: GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in amdgpu. The only exception is gem_prime_mmap, which is non-trivial to convert.

Re: [PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver

2020-08-13 Thread Sam Ravnborg
Hi Thomas. On Thu, Aug 13, 2020 at 10:36:44AM +0200, Thomas Zimmermann wrote: > Several GEM and PRIME callbacks have been deprecated in favor of > per-instance GEM object functions. Remove the callbacks as they are > now unused. The only exception is .gem_prime_mmap, which is still > in use by

[PATCH] drm/amd/pm: optimize the power related source code layout

2020-08-13 Thread Evan Quan
The target is to provide a clear entry point(for power routines). Also this can help to maintain a clear view about the frameworks used on different ASICs. Hopefully all these can make power part more friendly to play with. Change-Id: I2baaa98f3c1078816bd44e14153d8bfbbddd141b Signed-off-by: Evan

Re: [PATCH 06/20] drm/i915: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
Hi Am 13.08.20 um 11:08 schrieb Jani Nikula: > On Thu, 13 Aug 2020, Thomas Zimmermann wrote: >> GEM object functions deprecate several similar callback interfaces in >> struct drm_driver. This patch replaces the per-driver callbacks with >> per-instance callbacks in i915. >> >> Signed-off-by:

[PATCH 2/4] drm/amd/powerplay: drop unnecessary pp_funcs checker

2020-08-13 Thread Evan Quan
It's redundant. Also, the callers should not care about the implementation details. Change-Id: I5ae2e334a5657a077747e6bd1428573baad89e33 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 11 +++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++---

[PATCH 4/4] drm/amd/powerplay: put those exposed power interfaces in amdgpu_dpm.c

2020-08-13 Thread Evan Quan
As other power interfaces. Change-Id: I5e3b85ae21c4b1d0239f54fa75247b33cfdb7ddc Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 425 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 14 + drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 423

[PATCH 1/4] drm/amd/powerplay: optimize amdgpu_dpm_set_clockgating_by_smu() implementation

2020-08-13 Thread Evan Quan
Cover the implementation details from outside(of power part). Change-Id: I8220c0c220b5dffa1024cffe35d79d721ba3ab2b Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 15 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 7 +++

Re: [PATCH 06/20] drm/i915: Introduce GEM object functions

2020-08-13 Thread Jani Nikula
On Thu, 13 Aug 2020, Thomas Zimmermann wrote: > GEM object functions deprecate several similar callback interfaces in > struct drm_driver. This patch replaces the per-driver callbacks with > per-instance callbacks in i915. > > Signed-off-by: Thomas Zimmermann > --- >

[PATCH 3/4] drm/amd/powerplay: optimize i2c bus access implementation

2020-08-13 Thread Evan Quan
The caller needs not care about the internal details how the powerplay API implemented. Change-Id: I942de0c9f78b2e2c0dfb7c67b82be2527c6825d3 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c| 15 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h| 3 +++

[PATCH 16/20] drm/vgem: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in vgem. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 15/20] drm/vc4: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in vc4. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 14/20] drm/tegra: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in tegra. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tegra/drm.c | 4 drivers/gpu/drm/tegra/gem.c | 8 2

[PATCH 09/20] drm/nouveau: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in nouveau. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 -

[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver

2020-08-13 Thread Thomas Zimmermann
Several GEM and PRIME callbacks have been deprecated in favor of per-instance GEM object functions. Remove the callbacks as they are now unused. The only exception is .gem_prime_mmap, which is still in use by several drivers. What is also gone is gem_vm_ops in struct drm_driver. All drivers now

[PATCH 13/20] drm/rockchip: Convert to drm_gem_object_funcs

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in rockchip. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 11/20] drm/pl111: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in pl111. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 12/20] drm/radeon: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in radeon. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon_drv.c| 23 +--

[PATCH 17/20] drm/vkms: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in vkms. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vkms/vkms_drv.c | 8 drivers/gpu/drm/vkms/vkms_gem.c | 13

[PATCH 08/20] drm/msm: Introduce GEM object funcs

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in msm. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 04/20] drm/exynos: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in exynos. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 02/20] drm/armada: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in armada. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_drv.c | 3 --- drivers/gpu/drm/armada/armada_gem.c |

[PATCH 18/20] drm/xen: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in xen. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 03/20] drm/etnaviv: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in etnaviv. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 10/20] drm/omapdrm: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in omapdrm. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/omapdrm/omap_drv.c | 9 -

[PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro

2020-08-13 Thread Thomas Zimmermann
The xlnx driver uses CMA helpers with default callback functions. Initialize the driver structure with the rsp CMA helper macro. The driver is being converted to use GEM object functions as part of this change. Two callbacks, .dumb_destroy and .gem_prime_import, were initialized to their default

[PATCH 06/20] drm/i915: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in i915. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 9 -

[PATCH 07/20] drm/mediatek: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in mediatek. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 01/20] drm/amdgpu: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in amdgpu. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann ---

[PATCH 05/20] drm/gma500: Introduce GEM object functions

2020-08-13 Thread Thomas Zimmermann
GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in gma500. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/gma500/framebuffer.c | 2 ++ drivers/gpu/drm/gma500/gem.c |

[PATCH 00/20] Convert all remaining drivers to GEM object functions

2020-08-13 Thread Thomas Zimmermann
The GEM and PRIME related callbacks in struct drm_driver are deprecated in favor of GEM object functions in struct drm_gem_object_funcs. This patchset converts the remaining drivers to object functions and removes most of the obsolete interfaces. Patches #1 to #18 convert DRM drivers to GEM

Re: [PATCH v4] drm/amdgpu: add new trace event for page table update v3

2020-08-13 Thread Christian König
Am 13.08.20 um 05:04 schrieb Shashank Sharma: This patch adds a new trace event to track the PTE update events. This specific event will provide information like: - start and end of virtual memory mapping - HW engine flags for the map - physical address for mapping This will be particularly

RE: [PATCH] drm/amdgpu: fix NULL pointer access issue when unloading driver

2020-08-13 Thread Zhou1, Tao
[AMD Public Use] Reviewed-by: Tao Zhou > -Original Message- > From: Chen, Guchun > Sent: Thursday, August 13, 2020 2:45 PM > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking > ; Li, Dennis ; Zhou1, Tao > ; Clements, John ; Deucher, > Alexander > Cc: Chen, Guchun > Subject: [PATCH]

RE: [PATCH] drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS

2020-08-13 Thread Zhou1, Tao
[AMD Public Use] Reviewed-by: Tao Zhou > -Original Message- > From: Chen, Guchun > Sent: Thursday, August 13, 2020 3:04 PM > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking > ; Li, Dennis ; Zhou1, Tao > ; Clements, John ; Deucher, > Alexander > Cc: Chen, Guchun > Subject: [PATCH]

RE: [PATCH] drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS

2020-08-13 Thread Li, Dennis
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Dennis Li -Original Message- From: Chen, Guchun Sent: Thursday, August 13, 2020 3:04 PM To: amd-gfx@lists.freedesktop.org; Zhang, Hawking ; Li, Dennis ; Zhou1, Tao ; Clements, John ; Deucher, Alexander Cc: Chen,

[PATCH] drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS

2020-08-13 Thread Guchun Chen
It can avoid potential build warn/error when CONFIG_DEBUG_FS is not set. Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index

[PATCH] drm/amdgpu: fix NULL pointer access issue when unloading driver

2020-08-13 Thread Guchun Chen
When unloading driver by "modprobe -r amdgpu", one NULL pointer dereference bug occurs in ras debugfs releasing. The cause is the duplicated debugfs_remove, as drm debugfs_root dir has been cleaned up already by drm_minor_unregister. BUG: kernel NULL pointer dereference, address: 00a0

Re: [PATCH] drm/amdgpu: drop log message in amdgpu_dpm_baco_reset()

2020-08-13 Thread Kevin Wang
Reviewed-by: Kevin Wang Best Regards, Kevin On 8/13/20 12:25 PM, Alex Deucher wrote: The caller does this now for all reset types. This is now a duplicate call. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 2 -- 1 file changed, 2 deletions(-) diff --git