[PATCH 1/3] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-18 Thread Thomas Zimmermann
The new struct ttm_global provides drivers with TTM's global memory and BO in a unified way. Initialization and release is handled internally. The functionality provided by struct ttm_global is currently re-implemented by a dozen individual DRM drivers using struct drm_global. The implementation

[PATCH 2/3] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Thomas Zimmermann
Unified initialization and relesae of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 63 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- 2 files changed, 7

[PATCH 3/3] drm/radeon: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon.h | 4 +-- drivers/gpu/drm/radeon/radeon_ttm.c | 40 - 2 files changed, 7

[PATCH 0/3] Provide struct ttm_global for TTM global state

2018-10-18 Thread Thomas Zimmermann
TTM provides global memory and a global BO that is shared by all TTM-based drivers. The data structures are provided by struct drm_global and its helpers. All TTM-based DRM drivers copy the initialization and clean-up code for the global TTM state from each other; leading to code duplication. The

Re: [PATCH] powerplay: Respect units on max dcfclk watermark

2018-10-18 Thread Wentland, Harry
On 2018-10-18 11:30 a.m., David Francis wrote: > In a refactor, the watermark clock inputs to > powerplay from DC were changed from units of 10kHz to > kHz clocks. > > One division by 100 was not converted into a division > by 1000. > > Signed-off-by: David Francis Reviewed-by: Harry Wentland

Re: [PATCH v2] drm: Get ref on CRTC commit object when waiting for flip_done

2018-10-18 Thread Wentland, Harry
On 2018-10-16 11:48 a.m., Alex Deucher wrote: > On Tue, Oct 16, 2018 at 11:00 AM Li, Sun peng (Leo) > wrote: >> >> >> >> On 2018-10-16 08:33 AM, Daniel Vetter wrote: >>> On Mon, Oct 15, 2018 at 09:46:40AM -0400, sunpeng...@amd.com wrote: From: Leo Li This fixes a general

[PATCH] drm/radeon: fix a missing-check bug

2018-10-18 Thread Wenwen Wang
In radeon_read_bios(), the bios rom is firstly mapped to the IO memory region 'bios' through pci_map_rom(). Then the first two bytes of 'bios' are copied to 'val1' and 'val2' respectively through readb(). After that, 'val1' and 'val2' are checked to see whether they have expected values, i.e.,

[PATCH] drm/radeon: fix a missing-check bug

2018-10-18 Thread Wenwen Wang
In igp_read_bios_from_vram(), the start of vram is firstly remapped to the IO memory region 'bios' through ioremap(). Then the size and values of 'bios' are checked. For example, 'bios[0]' is compared against 0x55 and 'bios[1]' is compared against 0xaa. If no error happens during this checking

Re: [PATCH 2/3] drm/amdgpu: increase the size of HQD EOP buffers

2018-10-18 Thread Marek Olšák
On Tue, Oct 9, 2018 at 12:17 PM Alex Deucher wrote: > On Fri, Oct 5, 2018 at 5:01 PM Marek Olšák wrote: > > > > From: Marek Olšák > > > > Signed-off-by: Marek Olšák > > --- > > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- > > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- > > Any reason not

[PATCH 1/3] drm/amdkfd: Simplify kfd2kgd interface

2018-10-18 Thread Lin, Amber
After amdkfd module is merged into amdgpu, KFD can call amdgpu directly and no longer needs to use the function pointer. Replace those function pointers with functions if they are not ASIC dependent. Signed-off-by: Amber Lin --- drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 3 +-

[PATCH 2/3] drm/amdgpu: Remove unused function pointers

2018-10-18 Thread Lin, Amber
Remove unused function pointers in kfd2kgd structure. Signed-off-by: Amber Lin --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 25 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 25 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 24 -

Re: [PATCH 3/3] drm/amdkfd: Use functions from amdgpu for setting up page table base

2018-10-18 Thread Kuehling, Felix
On 2018-10-18 5:59 p.m., wrote: > > Please include a patch description on 2 and 3, with that fixed, series is: > > Reviewed-by: Alex Deucher > Reviewed-by: Felix Kuehling > > *From:* Zhao, Yong > *Sent:* Thursday,

Re: [PATCH] drm/amdgpu: fix amdgpu_vm_fini

2018-10-18 Thread zhoucm1
On 2018年10月18日 20:31, Christian König wrote: We should not remove mappings in rbtree_postorder_for_each_entry_safe because that rebalances the tree. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 - 1 file changed, 1 deletion(-) diff --git

RE: [PATCH 2/2] drm/amdgpu: Fix null point errro

2018-10-18 Thread Zhou, David(ChunMing)
A minor suggestion, not sure if it's proper, Can we insert these callback checking to func? I know these func could be defined as a macro, can we change them to function definition? David > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: Friday, October 19, 2018

Re: [PATCH 1/3] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:50AM +0800, Thomas Zimmermann wrote: > The new struct ttm_global provides drivers with TTM's global memory and > BO in a unified way. Initialization and release is handled internally. > > The functionality provided by struct ttm_global is currently re-implemented >

[PATCH 2/2] drm/amdgpu: Fix null point errro

2018-10-18 Thread Rex Zhu
need to check adev->powerplay.pp_funcs first, becasue from AI, the smu ip may be disabled by user, and the pp_handle is null in this case. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c| 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +

[PATCH 1/2] drm/amd/display: Fix Null point error if smu ip was disabled

2018-10-18 Thread Rex Zhu
from AI, SMU Ip is not indispensable to driver and can be disabled by user via module parameter ip_block_mask. so the pp_handle may be NULL. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 16 +++- 1 file changed, 11 insertions(+), 5

Re: [PATCH 2/7] drm: add syncobj timeline support v8

2018-10-18 Thread zhoucm1
On 2018年10月18日 19:50, Christian König wrote: Am 18.10.18 um 05:11 schrieb zhoucm1: On 2018年10月17日 18:24, Daniel Vetter wrote: On Wed, Oct 17, 2018 at 11:29 AM Koenig, Christian wrote: Am 17.10.18 um 11:17 schrieb zhoucm1: [SNIP]    +struct drm_syncobj_signal_pt { +    struct

Re: [PATCH 3/3] drm/radeon: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:52AM +0800, Thomas Zimmermann wrote: > Unified initialization and release of the global TTM state is provided > by struct ttm_global and its interfaces. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Huang Rui > --- > drivers/gpu/drm/radeon/radeon.h | 4

Re: [PATCH 2/3] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:51AM +0800, Thomas Zimmermann wrote: > Unified initialization and relesae of the global TTM state is provided > by struct ttm_global and its interfaces. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |

Re: [PATCH 3/3] drm/amdkfd: Add proper prefix to functions

2018-10-18 Thread Deucher, Alexander
Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of Lin, Amber Sent: Thursday, October 18, 2018 5:15:24 PM To: amd-gfx@lists.freedesktop.org Cc: Lin, Amber Subject: [PATCH 3/3] drm/amdkfd: Add proper prefix to functions Add amdgpu_amdkfd_ prefix

Re: [PATCH 3/3] drm/amdkfd: Add proper prefix to functions

2018-10-18 Thread Kuehling, Felix
On 2018-10-18 6:03 p.m., Deucher, Alexander wrote: > > Series is: > > Reviewed-by: Alex Deucher > Reviewed-by: Felix Kuehling as well. > > *From:* amd-gfx on behalf of > Lin, Amber > *Sent:* Thursday, October 18,

[PATCH 2/2] drm/amdgpu: replace get_user_pages with HMM address mirror helpers v2

2018-10-18 Thread Yang, Philip
Use HMM helper function hmm_vma_fault() to get physical pages backing userptr and start CPU page table update track of those pages. Then use hmm_vma_range_done() to check if those pages are updated before amdgpu_cs_submit for gfx or before user queues are resumed for kfd. If userptr pages are

Re: [PATCH 3/3] drm/amdkfd: Use functions from amdgpu for setting up page table base

2018-10-18 Thread Deucher, Alexander
Please include a patch description on 2 and 3, with that fixed, series is: Reviewed-by: Alex Deucher From: Zhao, Yong Sent: Thursday, October 18, 2018 5:13:04 PM To: amd-gfx@lists.freedesktop.org; brahma_sw_dev Cc: Zhao, Yong Subject: [PATCH 3/3] drm/amdkfd: Use

[PATCH 2/3] drm/amdgpu: Expose *_setup_vm_pt_regs for kfd to use

2018-10-18 Thread Zhao, Yong
Change-Id: I2ea27c4749a454506fecf75bb5b78b09bde9cb28 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 20 +++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h| 6 ++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 20 +++- 3 files changed, 36

[PATCH 3/3] drm/amdkfd: Use functions from amdgpu for setting up page table base

2018-10-18 Thread Zhao, Yong
Change-Id: I42eb2e41ce21b4a6ea0c8394dcc762ee92b2ca5e Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c

[PATCH 1/3] drm/amdkfd: Delete unnecessary register settings

2018-10-18 Thread Zhao, Yong
Those register settings have been performed in amdgpu initialization gfxhub_v1_0_setup_vmid_config() and mmhub_v1_0_setup_vmid_config(). So no need to do it again in kfd. Change-Id: I2b534cdb37f125581e10b1a19c1c2792aae474d6 Signed-off-by: Yong Zhao ---

[PATCH v2] drm/amd/pp: enable power limit increase in OD mode

2018-10-18 Thread Greathouse, Joseph
OverDrive mode allows users to increase the maximum SCLK and MCLK frequencies beyond the default on the GPU. However, this may not results in large performance gains if the GPU then runs into its TDP power limit. This patch adds the capability to increase the power limit of a GPU above its default

Re: [PATCH v2] drm: Get ref on CRTC commit object when waiting for flip_done

2018-10-18 Thread Wentland, Harry
On 2018-10-18 1:38 p.m., Wentland, Harry wrote: > On 2018-10-16 11:48 a.m., Alex Deucher wrote: >> On Tue, Oct 16, 2018 at 11:00 AM Li, Sun peng (Leo) >> wrote: >>> >>> >>> >>> On 2018-10-16 08:33 AM, Daniel Vetter wrote: On Mon, Oct 15, 2018 at 09:46:40AM -0400, sunpeng...@amd.com wrote:

[PATCH 2/3] drm/sched: Expose drm_sched_entity_select_rq to use in drivers.

2018-10-18 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/scheduler/sched_entity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 320c77a..426606c 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++

[PATCH 3/3] drm/amdgpu: Refresh rq selection for job after ASIC reset

2018-10-18 Thread Andrey Grodzovsky
A ring might become unusable after reset, if that the case drm_sched_entity_select_rq will choose another, working rq to run the job if there is one. Also, skip recovery of ring which is not ready. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16

Re: [PATCH v2] drm/amd/pp: enable power limit increase in OD mode

2018-10-18 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Greathouse, Joseph Sent: Thursday, October 18, 2018 3:44:39 PM To: amd-gfx@lists.freedesktop.org Cc: Greathouse, Joseph Subject: [PATCH v2] drm/amd/pp: enable power limit increase in OD mode OverDrive mode

Re: [PATCH 2/3] drm/amdgpu: increase the size of HQD EOP buffers

2018-10-18 Thread Alex Deucher
On Thu, Oct 18, 2018 at 3:47 PM Marek Olšák wrote: > > On Tue, Oct 9, 2018 at 12:17 PM Alex Deucher wrote: >> >> On Fri, Oct 5, 2018 at 5:01 PM Marek Olšák wrote: >> > >> > From: Marek Olšák >> > >> > Signed-off-by: Marek Olšák >> > --- >> > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- >> >

[PATCH 1/3] drm/sched: Add callback to mark if sched is ready to work.

2018-10-18 Thread Andrey Grodzovsky
Problem: A particular scheduler may become unsuable (underlying HW) after some event (e.g. GPU reset). If it's later chosen by the get free sched. policy a command will fail to be submitted. Fix: Add a driver specific callback to report the sced. status so rq with bad sched. can be avoided in

[PATCH 3/3] drm/amdkfd: Add proper prefix to functions

2018-10-18 Thread Lin, Amber
Add amdgpu_amdkfd_ prefix to amdgpu functions served for amdkfd usage. Signed-off-by: Amber Lin --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 12 ++-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c| 4 ++--

[PATCH] drm/amdgpu: Fix null pointer amdgpu_device_fw_loading

2018-10-18 Thread Emily Deng
Need to check adev->powerplay.pp_funcs. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 618d9e5..e26dfc9

Re: [PATCH] drm/amdgpu: Fix null pointer amdgpu_device_fw_loading

2018-10-18 Thread Huang Rui
On Thu, Oct 18, 2018 at 02:27:18PM +0800, Emily Deng wrote: > Need to check adev->powerplay.pp_funcs. > > Signed-off-by: Emily Deng Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL

2018-10-18 Thread Michel Dänzer
From: Michel Dänzer We were trying to already, but testing the wrong pointer. Fixes: b85b7b11f5b5 "Add struct radeon_buffer" Bug: https://bugs.debian.org/910846 Signed-off-by: Michel Dänzer --- src/radeon_dri3.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH] drm/amdgpu: add ring test for page queue

2018-10-18 Thread Huang Rui
We add page queue for sdma to update page table. So here it also needs ring test to verify it workable during the initialization. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH] drm/amd/powerplay: drop highest UCLK setting after display configuration change

2018-10-18 Thread Evan Quan
The UCLK is forced to highest at the start of display configuration change. Downgrade the UCLK from highest after display configuration change. Otherwise, we may see the UCLK stuck in the highest in some cases. Change-Id: I7ee6dd3cf6b4df30667e48576612b6af1a8e9184 Signed-off-by: Evan Quan ---

Re: [PATCH 2/7] drm: add syncobj timeline support v8

2018-10-18 Thread Christian König
Am 18.10.18 um 05:11 schrieb zhoucm1: On 2018年10月17日 18:24, Daniel Vetter wrote: On Wed, Oct 17, 2018 at 11:29 AM Koenig, Christian wrote: Am 17.10.18 um 11:17 schrieb zhoucm1: [SNIP]    +struct drm_syncobj_signal_pt { +    struct dma_fence_array *base; Out of curiosity, why the pointer

[PATCH] drm/amdgpu: fix amdgpu_vm_fini

2018-10-18 Thread Christian König
We should not remove mappings in rbtree_postorder_for_each_entry_safe because that rebalances the tree. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Re: [PATCH] drm/amdgpu: add ring test for page queue

2018-10-18 Thread Christian König
Am 18.10.18 um 12:14 schrieb Huang Rui: We add page queue for sdma to update page table. So here it also needs ring test to verify it workable during the initialization. Signed-off-by: Huang Rui Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 + 1

Re: [PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL

2018-10-18 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Michel Dänzer Sent: Thursday, October 18, 2018 4:13:58 AM To: amd-gfx@lists.freedesktop.org Subject: [PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL From: Michel Dänzer We were

Re: [PATCH] drm/amd/powerplay: drop highest UCLK setting after display configuration change

2018-10-18 Thread Alex Deucher
On Thu, Oct 18, 2018 at 6:41 AM Evan Quan wrote: > > The UCLK is forced to highest at the start of display configuration > change. Downgrade the UCLK from highest after display configuration change. > Otherwise, we may see the UCLK stuck in the highest in some cases. > > Change-Id: