[PATCH] drm/amd/pp: Fix uninitialized variable

2018-06-18 Thread rajan . vaja
From: Rajan Vaja Initialize variable to 0 before performing logical OR operation. Signed-off-by: Rajan Vaja --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c b/d

Re: [PATCH 1/5] dma_buf: remove device parameter from attach callback

2018-06-18 Thread Daniel Vetter
On Fri, Jun 01, 2018 at 02:00:16PM +0200, Christian König wrote: > The device parameter is completely unused because it is available in the > attachment structure as well. > > Signed-off-by: Christian König > --- > drivers/dma-buf/dma-buf.c | 2 +- > drivers/gpu/drm/a

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-18 Thread Daniel Vetter
On Fri, Jun 01, 2018 at 02:00:17PM +0200, Christian König wrote: > Neither used nor correctly implemented anywhere. Just completely remove > the interface. > > Signed-off-by: Christian König I wonder whether we can nuke the normal kmap stuff too ... everyone seems to want/use the vmap stuff for

Re: [PATCH 3/5] dma-buf: lock the reservation object during (un)map_dma_buf

2018-06-18 Thread Daniel Vetter
On Fri, Jun 01, 2018 at 02:00:18PM +0200, Christian König wrote: > First step towards unpinned DMA buf operation. > > I've checked the DRM drivers to potential locking of the reservation > object, but essentially we need to audit all implementations of the > dma_buf _ops for this to work. > > Sig

Re: [PATCH 4/5] dma-buf: add dma_buf_(un)map_attachment_locked variants

2018-06-18 Thread Daniel Vetter
On Fri, Jun 01, 2018 at 02:00:19PM +0200, Christian König wrote: > Add function variants which can be called with the reservation lock > already held. > > Signed-off-by: Christian König I expect that we'll need this patch before patch 3 and then roll it out to drivers doing reservation locking a

Re: [PATCH 5/5] drm/amdgpu: add independent DMA-buf export v3

2018-06-18 Thread Daniel Vetter
On Fri, Jun 01, 2018 at 02:00:20PM +0200, Christian König wrote: > The caching of SGT's done by the DRM code is actually quite harmful and > should probably removed altogether in the long term. Hm, why is it harmful? We've done it because it's expensive, and people started screaming about the over

Re: [PATCH 2/2] drm/doc: Make naming consistent for Core Driver Infrastructure

2018-06-18 Thread Daniel Vetter
On Wed, Jun 13, 2018 at 01:45:23PM -0400, Alex Deucher wrote: > On Mon, Jun 4, 2018 at 5:11 AM, Michel Dänzer wrote: > > > > Adding dri-devel. > > > > Any opinions? 100% meh, i.e. if you care, go with whatever, you have my ack. Anyone who cares about making docs more consistent makes me a happy

[PATCH 1/5] drm/amd/display: Implement dm_pp_get_clock_levels_by_type_with_latency

2018-06-18 Thread Rex Zhu
Display component can get tru max_displ_clk_in_khz instand of hardcode Signed-off-by: Rex Zhu --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 45 +- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_service

[PATCH 2/5] drm/amd/pp: Fix wrong clock-unit exported to Display

2018-06-18 Thread Rex Zhu
Transfer 10KHz (requested by smu) to KHz needed by Display component. This can fix the issue 4k Monitor can't be lit up on Vega/Raven. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 +- dri

[PATCH 3/5] drm/amd/pp: Memory Latency is always 25us on Vega10

2018-06-18 Thread Rex Zhu
Also use the tolerable latency defined in Display to find lowest MCLK frequency when disable mclk switch Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 24 ++ 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/p

[PATCH 4/5] drm/amd/display: Delete old implementation of bw_calcs_data_update_from_pplib

2018-06-18 Thread Rex Zhu
this function is copied from dce112. it is not for AI/RV. driver need to re-implement this function. Signed-off-by: Rex Zhu --- .../drm/amd/display/dc/dce120/dce120_resource.c| 123 + 1 file changed, 1 insertion(+), 122 deletions(-) diff --git a/drivers/gpu/drm/amd/displ

[PATCH 5/5] drm/amd/display: Refine the interface dm_pp_notify_wm_clock_changes

2018-06-18 Thread Rex Zhu
change function parameter type from dm_pp_wm_sets_with_clock_ranges * to void *. so this interface can be supported on AI/RV. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 2 +- drivers/gpu/drm/amd/display/dc/dm_services.h | 2 +- drivers/g

Re: [PATCH 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-18 Thread Christian König
Am 15.06.2018 um 17:19 schrieb Michel Dänzer: On 2018-06-15 05:18 PM, Christian König wrote: Am 15.06.2018 um 17:14 schrieb Michel Dänzer: On 2018-06-15 05:11 PM, Christian König wrote: Am 15.06.2018 um 16:42 schrieb Michel Dänzer: + +    if (mem->start >= adev->gmc.visible_vram_size >> PAGE_

Re: [PATCH] drm/amd/pp: Fix uninitialized variable

2018-06-18 Thread Zhu, Rex
Applied. Thanks. Best Regards Rex From: rajan.v...@gmail.com Sent: Monday, June 18, 2018 3:31 PM To: Deucher, Alexander; Koenig, Christian; Zhou, David(ChunMing); Zhu, Rex; StDenis, Tom Cc: amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org; linu

Re: [PATCH 3/5] dma-buf: lock the reservation object during (un)map_dma_buf

2018-06-18 Thread Christian König
Am 18.06.2018 um 10:22 schrieb Daniel Vetter: On Fri, Jun 01, 2018 at 02:00:18PM +0200, Christian König wrote: First step towards unpinned DMA buf operation. I've checked the DRM drivers to potential locking of the reservation object, but essentially we need to audit all implementations of the

linux-4.18-rc1/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:207: broken nested if ?

2018-06-18 Thread David Binderman
Hello there, [linux-4.18-rc1/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:208]: (warning) Identical inner 'if' condition is always true. Source code is if (set_clocks && adev->pm.dpm_enabled) { if (adev->pm.dpm_enabled) amdgpu_dpm_enable_uvd(adev, true

Re: [PATCH] drm/amdgpu: use first uvd instance to avoid clang build error

2018-06-18 Thread Alex Deucher
On Sun, Jun 17, 2018 at 10:03 PM, James Zhu wrote: > > > On 2018-06-17 04:52 AM, Stefan Agner wrote: >> >> Explicitly use the first uvd instance to avoid a build error when >> using clang 6: >> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1148:52: error: expected ')' >> container_of(wo

[PATCH 2/2] amdgpu: kfd: use modern ktime accessors

2018-06-18 Thread Arnd Bergmann
getrawmonotonic64() and get_monotonic_boottime64() are deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() and ktime_get_boot_ns() also simplify the callers. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 ++-- 1 file cha

[PATCH 1/2] amdgpu: display: use modern ktime accessors

2018-06-18 Thread Arnd Bergmann
getrawmonotonic64() is deprecated because of the nonstandard naming. The replacement functions ktime_get_raw_ns() also simplifies the callers. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 8 drivers/gpu/drm/amd/display/dc/dm_services.h

Re: [PATCH 1/2] amdgpu: display: use modern ktime accessors

2018-06-18 Thread Harry Wentland
On 2018-06-18 11:35 AM, Arnd Bergmann wrote: > getrawmonotonic64() is deprecated because of the nonstandard naming. > > The replacement functions ktime_get_raw_ns() also simplifies the callers. > > Signed-off-by: Arnd Bergmann Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/di

[PATCH v2 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-18 Thread Michel Dänzer
From: Michel Dänzer Even BOs with AMDGPU_GEM_CREATE_NO_CPU_ACCESS may end up at least partially in CPU visible VRAM, in particular when all VRAM is visible. v2: * Don't take VRAM mgr spinlock, not needed (Christian König) * Make loop logic simpler and clearer. Cc: sta...@vger.kernel.org Signed-

Re: [PATCH v2 3/4] drm/amdgpu: Make amdgpu_vram_mgr_bo_invisible_size always accurate

2018-06-18 Thread Christian König
Am 18.06.2018 um 18:52 schrieb Michel Dänzer: From: Michel Dänzer Even BOs with AMDGPU_GEM_CREATE_NO_CPU_ACCESS may end up at least partially in CPU visible VRAM, in particular when all VRAM is visible. v2: * Don't take VRAM mgr spinlock, not needed (Christian König) * Make loop logic simpler

[PATCH] drm/amdgpu:All UVD instances share one idle_work handle

2018-06-18 Thread James Zhu
All UVD instanses have only one dpm control, so it is better to share one idle_work handle. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 14 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dr

Re: [PATCH] drm/amdgpu:All UVD instances share one idle_work handle

2018-06-18 Thread Alex Deucher
On Mon, Jun 18, 2018 at 2:00 PM, James Zhu wrote: > All UVD instanses have only one dpm control, so it is better > to share one idle_work handle. > > Signed-off-by: James Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 14 +++--- > drivers/gpu/drm/amd/a

Re: [PATCH 1/5] drm/amd/display: Implement dm_pp_get_clock_levels_by_type_with_latency

2018-06-18 Thread Alex Deucher
On Mon, Jun 18, 2018 at 7:18 AM, Rex Zhu wrote: > Display component can get tru max_displ_clk_in_khz instand of hardcode tru -> true With that fixed: Acked-by: Alex Deucher > > Signed-off-by: Rex Zhu > --- > .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 45 > +- >

Re: [PATCH 3/5] drm/amd/pp: Memory Latency is always 25us on Vega10

2018-06-18 Thread Alex Deucher
On Mon, Jun 18, 2018 at 7:18 AM, Rex Zhu wrote: > Also use the tolerable latency defined in Display > to find lowest MCLK frequency when disable mclk switch This should probably be two patches? One to fix the memory latency, and one to switch the tolerable latency for display. With that fixed:

Re: [PATCH 4/5] drm/amd/display: Delete old implementation of bw_calcs_data_update_from_pplib

2018-06-18 Thread Alex Deucher
On Mon, Jun 18, 2018 at 7:18 AM, Rex Zhu wrote: > this function is copied from dce112. it is not for AI/RV. > driver need to re-implement this function. Maybe it's similar enough to be ok for now? What's better? Harry? Alex > > Signed-off-by: Rex Zhu > --- > .../drm/amd/display/dc/dce120/dce

Re: [PATCH 2/5] drm/amd/pp: Fix wrong clock-unit exported to Display

2018-06-18 Thread Alex Deucher
On Mon, Jun 18, 2018 at 7:18 AM, Rex Zhu wrote: > Transfer 10KHz (requested by smu) to KHz needed by Display > component. > > This can fix the issue 4k Monitor can't be lit up on Vega/Raven. > > Signed-off-by: Rex Zhu Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hw

Re: [PATCH 5/5] drm/amd/display: Refine the interface dm_pp_notify_wm_clock_changes

2018-06-18 Thread Alex Deucher
On Mon, Jun 18, 2018 at 7:18 AM, Rex Zhu wrote: > change function parameter type from dm_pp_wm_sets_with_clock_ranges * to > void *. so this interface can be supported on AI/RV. > > Signed-off-by: Rex Zhu Acked-by: Alex Deucher but should probably be approved by the DC team as well. Alex > --

Re: [PATCH 1/5] drm/amd/display: Implement dm_pp_get_clock_levels_by_type_with_latency

2018-06-18 Thread Harry Wentland
On 2018-06-18 07:18 AM, Rex Zhu wrote: > Display component can get tru max_displ_clk_in_khz instand of hardcode > > Signed-off-by: Rex Zhu Mikita has pretty much the same patch (part of the DC patchset going out tomorrow) and did the *10 on our end. I prefer your version, though, as that multi

[PATCH] drm/amdgpu: correct GART location info

2018-06-18 Thread Junwei Zhang
Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index f77b07b..f9fe8d3 100644 --- a/drivers/gpu/dr