Re: [PATCH 3/3] drm/amd/amdkfd: Surface files in Sysfs to allow users to get number of compute units that are in use.

2020-09-18 Thread philip yang
On 2020-09-17 1:11 p.m., Ramesh Errabolu wrote: + if (pdd->qpd.queue_count == 0) { + pr_info("%s: Gpu-Id: %d has no active queues for process %d\n", + __func__, dev->id, proc->pasid); pr_debug can be dynamically enabled in dmesg if needed, pr_info

[pull] amdgpu, amdkfd, radeon, scheduler drm-next-5.10

2020-09-18 Thread Alex Deucher
Hi Dave, Daniel, More new stuff for 5.10. The following changes since commit 818280d5adf1d80e78f95821815148abe9407e14: Merge v5.9-rc5 into drm-next (2020-09-14 17:19:11 +0200) are available in the Git repository at: git://people.freedesktop.org/~agd5f/linux

[PATCH] drm/i915/selftests: align more to real device lifetimes

2020-09-18 Thread Daniel Vetter
To avoid having to create all the device and driver scaffolding we just manually create and destroy a devres_group. v2: Rebased v3: use devres_open/release_group so we can use devm without real hacks in the driver core or having to create an entire fake bus for testing drivers. Might want to

Re: [PATCH 2/4] drm/i915/selftests: align more to real device lifetimes

2020-09-18 Thread Daniel Vetter
On Fri, Sep 18, 2020 at 8:31 PM Matthew Auld wrote: > > On Fri, 18 Sep 2020 at 19:22, Daniel Vetter wrote: > > > > On Fri, Sep 18, 2020 at 7:50 PM Matthew Auld > > wrote: > > > > > > On Fri, 18 Sep 2020 at 14:25, Daniel Vetter > > > wrote: > > > > > > > > The big change is device_add so that

Re: [PATCH] drm/amdkfd: Calculate CPU VCRAT size dynamically

2020-09-18 Thread Felix Kuehling
Am 2020-09-18 um 1:31 p.m. schrieb Kent Russell: > Instead of guessing at a sufficient size for the CPU VCRAT, base the > size on the number of online NUMA nodes. > > Signed-off-by: Kent Russell > Change-Id: I5fb6e60f1410ad696ab78d780d0b40d01a4f829b Please remove the ChangeId. > --- >

Re: [PATCH 2/4] drm/i915/selftests: align more to real device lifetimes

2020-09-18 Thread Matthew Auld
On Fri, 18 Sep 2020 at 19:22, Daniel Vetter wrote: > > On Fri, Sep 18, 2020 at 7:50 PM Matthew Auld > wrote: > > > > On Fri, 18 Sep 2020 at 14:25, Daniel Vetter wrote: > > > > > > The big change is device_add so that device_del can auto-cleanup > > > devres resources. This allows us to use

Re: [PATCH 2/4] drm/i915/selftests: align more to real device lifetimes

2020-09-18 Thread Daniel Vetter
On Fri, Sep 18, 2020 at 7:50 PM Matthew Auld wrote: > > On Fri, 18 Sep 2020 at 14:25, Daniel Vetter wrote: > > > > The big change is device_add so that device_del can auto-cleanup > > devres resources. This allows us to use devm_drm_dev_alloc, which > > removes the last user of drm_dev_init. > >

RE: [PATCH 1/1] drm/amdgpu: Fix handling of KFD initialization failures

2020-09-18 Thread Russell, Kent
[AMD Public Use] Sorry, I read this yesterday and forgot to reply. Reviewed-by: Kent Russell > -Original Message- > From: amd-gfx On Behalf Of Felix > Kuehling > Sent: Thursday, September 17, 2020 12:16 AM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH 1/1] drm/amdgpu: Fix

Re: [PATCH 2/4] drm/i915/selftests: align more to real device lifetimes

2020-09-18 Thread Matthew Auld
On Fri, 18 Sep 2020 at 14:25, Daniel Vetter wrote: > > The big change is device_add so that device_del can auto-cleanup > devres resources. This allows us to use devm_drm_dev_alloc, which > removes the last user of drm_dev_init. > > v2: Rebased > > v3: use devres_open/release_group so we can use

[PATCH] drm/amdkfd: Calculate CPU VCRAT size dynamically

2020-09-18 Thread Kent Russell
Instead of guessing at a sufficient size for the CPU VCRAT, base the size on the number of online NUMA nodes. Signed-off-by: Kent Russell Change-Id: I5fb6e60f1410ad696ab78d780d0b40d01a4f829b --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 26 -- 1 file changed, 16

Re: [Intel-gfx] [PATCH 0/4] managed drm_device, absolute final leftover bits

2020-09-18 Thread Rodrigo Vivi
On Fri, Sep 18, 2020 at 11:03:12AM -0400, Alex Deucher wrote: > On Fri, Sep 18, 2020 at 9:25 AM Daniel Vetter wrote: > > > > Hi all, > > > > These are the leftovers of the leftovers of my initial drmm series to > > manage drm_device. > > > > Changes: > > - bugfixed i915 selftests > > - patch from

Re: [PATCH] drm/amd/display: fix crash/reboot while accessing sysfs files

2020-09-18 Thread Harry Wentland
On 2020-09-17 4:54 a.m., Shirish S wrote: read/writes to aux_dpcd_* sysfs entries leads to system reboot or hang. Hence fix the handling of input data and reporting of errors appropriately to the user space. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Harry ---

Re: [PATCH 0/4] managed drm_device, absolute final leftover bits

2020-09-18 Thread Alex Deucher
On Fri, Sep 18, 2020 at 9:25 AM Daniel Vetter wrote: > > Hi all, > > These are the leftovers of the leftovers of my initial drmm series to > manage drm_device. > > Changes: > - bugfixed i915 selftests > - patch from Luben to finalize the admgpu conversion > > Alex & i915 maintainers, pls ack for

[bug report] drm/amd/display: Add connector to the state if DSC debugfs is set

2020-09-18 Thread Dan Carpenter
Hello Eryk Brol, The patch c44a22b3128d: "drm/amd/display: Add connector to the state if DSC debugfs is set" from Aug 27, 2020, leads to the following static checker warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:917 amdgpu_check_debugfs_connector_property_change()

Re: [PATCH 4/4] drm/dev: Remove drm_dev_init

2020-09-18 Thread Thomas Zimmermann
Am 18.09.20 um 15:25 schrieb Daniel Vetter: > We can now also delete drm_dev_init, now that vkms, vgem and i915 > selftests are resolved. > > Signed-off-by: Daniel Vetter Reviewed-by: Thomas Zimmermann > --- > drivers/gpu/drm/drm_drv.c | 41 +++--- >

RE: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Zhang, Hawking
[AMD Public Use] Re - it came up as warning/error-free. Peculiar This is not something new. simple grep else in current kernel tree, there will be bunches of "} else" there. Regards, Hawking e.g. if (!IS_ERR(dacl) && !IS_ERR(pacl)) { set_cached_acl(inode, ACL_TYPE_DEFAULT,

Re: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Christian König
You comment was clear enough, I just wanted to explain it inline instead of referencing the documentation :) Christian. Am 18.09.20 um 15:32 schrieb Russell, Kent: [AMD Public Use] Thanks for clarifying my ambiguity, Christian. And for sanity, I just ran checkpatch on a local file with an

RE: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Russell, Kent
[AMD Public Use] Thanks for clarifying my ambiguity, Christian. And for sanity, I just ran checkpatch on a local file with an "} else" and it came up as warning/error-free. Peculiar. Kent > -Original Message- > From: Koenig, Christian > Sent: Friday, September 18, 2020 8:17 AM >

[PATCH 4/4] drm/dev: Remove drm_dev_init

2020-09-18 Thread Daniel Vetter
We can now also delete drm_dev_init, now that vkms, vgem and i915 selftests are resolved. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 41 +++--- drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_managed.c | 13 ---

[PATCH 1/4] drm/i915/selftest: Create mock_destroy_device

2020-09-18 Thread Daniel Vetter
Just some prep work before we rework the lifetime handling, which requires replacing all the drm_dev_put in selftests by something else. v2: Don't go with a static inline, upsets the header tests and separation. Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter ---

[PATCH 2/4] drm/i915/selftests: align more to real device lifetimes

2020-09-18 Thread Daniel Vetter
The big change is device_add so that device_del can auto-cleanup devres resources. This allows us to use devm_drm_dev_alloc, which removes the last user of drm_dev_init. v2: Rebased v3: use devres_open/release_group so we can use devm without real hacks in the driver core or having to create an

[PATCH 3/4] drm/amdgpu: Convert to using devm_drm_dev_alloc() (v2)

2020-09-18 Thread Daniel Vetter
From: Luben Tuikov Convert to using devm_drm_dev_alloc(), as drm_dev_init() is going away. v2: Remove drm_dev_put() since a) devres doesn't do refcounting, see Documentation/driver-api/driver-model/devres.rst, Section 4, paragraph 1; and since b) devres acts as garbage collector

[PATCH 0/4] managed drm_device, absolute final leftover bits

2020-09-18 Thread Daniel Vetter
Hi all, These are the leftovers of the leftovers of my initial drmm series to manage drm_device. Changes: - bugfixed i915 selftests - patch from Luben to finalize the admgpu conversion Alex & i915 maintainers, pls ack for merging this all through drm-misc-next since otherwise the final patch

Re: [PATCH] drm/amd/powerplay: optimize the mclk dpm policy settings

2020-09-18 Thread Alex Deucher
Ping? On Thu, Jul 30, 2020 at 2:16 PM Alex Deucher wrote: > > From: Evan Quan > > Different mclk dpm policy will be applied based on the VRAM > width. > > Signed-off-by: Evan Quan > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 16 +--- >

Re: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Christian König
Am 18.09.20 um 14:37 schrieb Hawking Zhang: support both direct and indirect accessor in unified helper functions. v2: Retire indirect mmio access via mm_index/data Signed-off-by: Hawking Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 23 +++

[PATCH 2/3] drm/amdgpu: switch to indirect reg access helper

2020-09-18 Thread Hawking Zhang
Switch WREG32/RREG32_PCIE to use indirect reg access helper for soc15 and onwards Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Kevin Wang Reviewed-by: Christian König Reviewed-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/nv.c| 51

[PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Hawking Zhang
support both direct and indirect accessor in unified helper functions. v2: Retire indirect mmio access via mm_index/data Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 23 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-

[PATCH 1/3] drm/amdgpu: add helper function for indirect reg access (v3)

2020-09-18 Thread Hawking Zhang
Add helper function in order to remove RREG32/WREG32 in current pcie_rreg/wreg function for soc15 and onwards adapters. PCIE_INDEX/DATA pairs are used to access regsiters outside of mmio bar in the helper functions. The new helper functions help remove the recursion of amdgpu_mm_rreg/wreg from

Re: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Christian König
To be more precise you can either use "else" or "} else {", but don't use "} else" or "else {". Interesting that checkpatch.pl doesn't complain, I thought that this would be checked. Regards, Christian. Am 18.09.20 um 14:12 schrieb Russell, Kent: [AMD Public Use] It's preferred to have

RE: [PATCH] drm/amdgpu: Fix dead lock issue for vblank

2020-09-18 Thread Zhang, Hawking
[AMD Public Use] Hi Emily, I can't find the implementation of dce_virtual_pageflip in the patch. Is it dropped by accident? Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Emily.Deng Sent: Friday, September 18, 2020 18:13 To: amd-gfx@lists.freedesktop.org Cc: Deng,

RE: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Russell, Kent
[AMD Public Use] It's preferred to have braces if the else has a single line: https://www.kernel.org/doc/html/v4.10/process/coding-style.html#placing-braces-and-spaces Right above "3.1) Spaces" Kent > -Original Message- > From: amd-gfx On Behalf Of Zhang, > Hawking > Sent: Friday,

RE: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Zhang, Hawking
[AMD Public Use] > + } else RE - This should use "} else {". Apart from that looks good to me. Hi Chris, Since there is only one line under "else", I dropped the "{}". I thought that is okay in current kernel coding style and checkpatch.pl also shows no complain. So you mean you want the

Re: [PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Christian König
Am 18.09.20 um 11:51 schrieb Hawking Zhang: support both direct and indirect accessor in unified helper functions. v2: Retire indirect mmio access via mm_index/data Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 23 +++

RE: [PATCH] drm/amdgpu: Fix dead lock issue for vblank

2020-09-18 Thread Deng, Emily
[AMD Official Use Only - Internal Distribution Only] Hi Hawking, You are right, my base is not the tip. I have updated now. Please help to review again. Best wishes Emily Deng >-Original Message- >From: Emily.Deng >Sent: Friday, September 18, 2020 6:13 PM >To:

[PATCH] drm/amdgpu: Fix dead lock issue for vblank

2020-09-18 Thread Emily . Deng
Always start vblank timer, but only calls vblank function when vblank is enabled. This is used to fix the dead lock issue. When drm_crtc_vblank_off want to disable vblank, it first get event_lock, and then call hrtimer_cancel, but hrtimer_cancel want to wait timer handler function finished. Timer

[PATCH 3/3] drm/amdgpu: support indirect access reg outside of mmio bar (v2)

2020-09-18 Thread Hawking Zhang
support both direct and indirect accessor in unified helper functions. v2: Retire indirect mmio access via mm_index/data Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 23 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-

[PATCH 2/3] drm/amdgpu: switch to indirect reg access helper

2020-09-18 Thread Hawking Zhang
Switch WREG32/RREG32_PCIE to use indirect reg access helper for soc15 and onwards Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Kevin Wang Reviewed-by: Christian König Reviewed-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/nv.c| 51

[PATCH 1/3] drm/amdgpu: add helper function for indirect reg access (v3)

2020-09-18 Thread Hawking Zhang
Add helper function in order to remove RREG32/WREG32 in current pcie_rreg/wreg function for soc15 and onwards adapters. PCIE_INDEX/DATA pairs are used to access regsiters outside of mmio bar in the helper functions. The new helper functions help remove the recursion of amdgpu_mm_rreg/wreg from

Re: [PATCH] drm/amdgpu: use function pointer for gfxhub functions

2020-09-18 Thread Ernst Sjöstrand
Can some of them be null and others not? Perhaps write that in the comments somewhere. Like v1 doesn't have get_fb_location for example. Regards //Ernst Den fre 18 sep. 2020 kl 01:16 skrev Oak Zeng : > gfxhub functions are now called from function pointers, > instead of from asic-specific

RE: [PATCH 2/2] drm/amdgpu: Fix dead lock issue for vblank

2020-09-18 Thread Deng, Emily
Thanks, will double check. Best wishes Emily Deng >-Original Message- >From: Zhang, Hawking >Sent: Friday, September 18, 2020 4:20 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Cc: Deng, Emily >Subject: RE: [PATCH 2/2] drm/amdgpu: Fix dead lock issue for vblank > >[AMD Public

RE: [PATCH 2/2] drm/amdgpu: Fix dead lock issue for vblank

2020-09-18 Thread Zhang, Hawking
[AMD Public Use] + spin_lock_irqsave(>ddev->event_lock, flags); Are you sure you used the latest code base? I think recently we already switch to adev_to_drm(adev). Could you please double check? Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Emily.Deng Sent:

[PATCH -next] drm/amd/display: remove unused variable in amdgpu_dm.c

2020-09-18 Thread Yang Yingliang
Fix the compile warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:892:26: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable] struct dc_stream_state *stream; ^~ Reported-by: Hulk Robot Signed-off-by: Yang Yingliang ---

[PATCH -next] drm/amd/display: remove unused variable in dcn30_hwseq.c

2020-09-18 Thread Yang Yingliang
Fix the compile warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:322:27: warning: variable ‘optc’ set but not used [-Wunused-but-set-variable] struct timing_generator *optc; ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:641:7: