Re: [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices

2018-11-20 Thread Tejun Heo
Hello, On Tue, Nov 20, 2018 at 10:21:14PM +, Ho, Kenny wrote: > By this reply, are you suggesting that vendor specific resources > will never be acceptable to be managed under cgroup? Let say a user I wouldn't say never but whatever which gets included as a cgroup controller should have

[PATCH RFC 3/5] drm/amdgpu: Add DRM cgroup support for AMD devices

2018-11-20 Thread Kenny Ho
Change-Id: Ib66c44ac1b1c367659e362a2fc05b6fbb3805876 Signed-off-by: Kenny Ho --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 drivers/gpu/drm/amd/amdgpu/amdgpu_drmcgrp.c | 37 +

[PATCH RFC 5/5] drm/amdgpu: Add accounting of buffer object creation request via DRM cgroup

2018-11-20 Thread Kenny Ho
Account for the total size of buffer object requested to amdgpu by buffer type on a per cgroup basis. x prefix in the control file name x.bo_requested.amd.stat signify experimental. Change-Id: Ifb680c4bcf3652879a7a659510e25680c2465cf6 Signed-off-by: Kenny Ho ---

[PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices

2018-11-20 Thread Kenny Ho
Since many parts of the DRM subsystem has vendor-specific implementations, we introduce mechanisms for vendor to register their specific resources and control files to the DRM cgroup subsystem. A vendor will register itself with the DRM cgroup subsystem first before registering individual DRM

Re: [PATCH RFC 4/5] drm/amdgpu: Add accounting of command submission via DRM cgroup

2018-11-20 Thread Eric Anholt
Kenny Ho writes: > Account for the number of command submitted to amdgpu by type on a per > cgroup basis, for the purpose of profiling/monitoring applications. For profiling other drivers, I've used perf tracepoints, which let you get useful timelines of multiple events in the driver. Have you

RE: [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices

2018-11-20 Thread Ho, Kenny
Hi Tejun, Thanks for the reply. A few clarifying questions: On Tue, Nov 20, 2018 at 3:21 PM Tejun Heo wrote: > So, I'm still pretty negative about adding drm controller at this > point. There isn't enough of common resource model defined yet and > until that gets sorted out I think it's in

Re: [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices

2018-11-20 Thread Tejun Heo
Hello, On Tue, Nov 20, 2018 at 01:58:11PM -0500, Kenny Ho wrote: > Since many parts of the DRM subsystem has vendor-specific > implementations, we introduce mechanisms for vendor to register their > specific resources and control files to the DRM cgroup subsystem. A > vendor will register itself

Re: [PATCH][drm-next] drm/amd/display: fix dereference of pointer fs_params before it is null checked

2018-11-20 Thread Li, Sun peng (Leo)
On 2018-11-20 12:17 p.m., Colin King wrote: > From: Colin Ian King > > Currently there are several instances of pointer fs_params being > dereferenced before fs_params is being null checked. Fix this by > only dereferencing fs_params after the null check. > > Detected by CoverityScan,

[PATCH RFC 4/5] drm/amdgpu: Add accounting of command submission via DRM cgroup

2018-11-20 Thread Kenny Ho
Account for the number of command submitted to amdgpu by type on a per cgroup basis, for the purpose of profiling/monitoring applications. x prefix in the control file name x.cmd_submitted.amd.stat signify experimental. Change-Id: Ibc22e5bda600f54fe820fe0af5400ca348691550 Signed-off-by: Kenny Ho

[PATCH RFC 1/5] cgroup: Introduce cgroup for drm subsystem

2018-11-20 Thread Kenny Ho
Change-Id: I6830d3990f63f0c13abeba29b1d330cf28882831 Signed-off-by: Kenny Ho --- include/linux/cgroup_drm.h| 32 include/linux/cgroup_subsys.h | 4 +++ init/Kconfig | 5 kernel/cgroup/Makefile| 1 + kernel/cgroup/drm.c | 46

[PATCH][drm-next] drm/amd/display: fix dereference of pointer fs_params before it is null checked

2018-11-20 Thread Colin King
From: Colin Ian King Currently there are several instances of pointer fs_params being dereferenced before fs_params is being null checked. Fix this by only dereferencing fs_params after the null check. Detected by CoverityScan, CID#1475565 ("Dereference before null check") Fixes: e1e8a020c6b8

[PATCH 3/4] drm/amdkfd: Add DMABuf import functionality

2018-11-20 Thread Kuehling, Felix
This is used for interoperability between ROCm compute and graphics APIs. It allows importing graphics driver BOs into the ROCm SVM address space for zero-copy GPU access. The API is split into two steps (query and import) to allow user mode to manage the virtual address space allocation for the

[PATCH 1/4] drm/amdgpu: Add KFD VRAM limit checking

2018-11-20 Thread Kuehling, Felix
We don't want KFD processes evicting each other over VRAM usage. Therefore prevent overcommitting VRAM among KFD applications with a per-GPU limit. Also leave enough room for page tables on top of the application memory usage. Signed-off-by: Felix Kuehling Reviewed-by: Eric Huang ---

[PATCH 4/4] drm/amdkfd: Add support for doorbell BOs

2018-11-20 Thread Kuehling, Felix
This allows user mode to map doorbell pages into GPUVM address space. That way GPUs can submit to user mode queues (self-dispatch). Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 59 ++-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

[PATCH 2/4] drm/amdkfd: Add NULL-pointer check

2018-11-20 Thread Kuehling, Felix
top_dev->gpu is NULL for CPUs. Avoid dereferencing it if NULL. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c

[PATCH 0/4] KFD upstreaming Nov 2018, part 2

2018-11-20 Thread Kuehling, Felix
This round adds support for more ROCm memory manager features: * VRAM limit checking to avoid overcommitment * DMABuf import for graphics interoperability * Support for mapping doorbells into GPUVM address space Felix Kuehling (4): drm/amdgpu: Add KFD VRAM limit checking drm/amdkfd: Add

RE: [PATCH v2] drm/amdgpu: Enable HDP memory light sleep

2018-11-20 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of > Kenneth Feng > Sent: 2018年11月20日 16:06 > To: amd-gfx@lists.freedesktop.org > Cc: Feng, Kenneth > Subject: [PATCH v2] drm/amdgpu: Enable HDP memory light sleep > > Due to the register name and setting change of

[PATCH v2] drm/amdgpu: Enable HDP memory light sleep

2018-11-20 Thread Kenneth Feng
Due to the register name and setting change of HDP memory light sleep on Vega20,change accordingly in the driver. Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/amdgpu/soc15.c | 39 +++--- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git

[PATCH] drm/amdgpu: disable page queue support for Vega20

2018-11-20 Thread Evan Quan
Keep it disabled until we confirm it's ready. Change-Id: I2dc4c0f1156dd82f7046672fed6d22b9d18c2010 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c

[PATCH] drm/amd/amdgpu/vce_v3_0.c: Remove duplicate header

2018-11-20 Thread Brajeswar Ghosh
Remove gca/gfx_8_0_d.h which is included more than once Signed-off-by: Brajeswar Ghosh --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 6dbd39730070..4e4289a06a53

[PATCH] drm/amd/display/amdgpu_dm/amdgpu_dm.c: Remove duplicate header

2018-11-20 Thread Brajeswar Ghosh
Remove dm_services_types.h which is included more than once Signed-off-by: Brajeswar Ghosh --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Re: [PATCH] drm/amdgpu: disable page queue support for Vega20

2018-11-20 Thread Alex Deucher
Reviewed-by: Alex Deucher On Wed, Nov 21, 2018 at 1:40 AM Evan Quan wrote: > > Keep it disabled until we confirm it's ready. > > Change-Id: I2dc4c0f1156dd82f7046672fed6d22b9d18c2010 > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 ++- > 1 file changed, 2

Re: [PATCH RFC 5/5] drm/amdgpu: Add accounting of buffer object creation request via DRM cgroup

2018-11-20 Thread Eric Anholt
Kenny Ho writes: > Account for the total size of buffer object requested to amdgpu by > buffer type on a per cgroup basis. > > x prefix in the control file name x.bo_requested.amd.stat signify > experimental. Why is a counting of the size of buffer objects ever allocated useful, as opposed to

Re: [PATCH] drm/amdgpu: Remove dead static variable

2018-11-20 Thread Emil Velikov
On Mon, 19 Nov 2018 at 11:19, Christian König wrote: > > Am 19.11.18 um 12:07 schrieb Rex Zhu: > > The static struct drm_driver *driver was > > not used because drm_pci_init was deprecated > > > > Signed-off-by: Rex Zhu > > Reviewed-by: Christian König > > Can you of hand see what "pdriver" is

Re: [PATCH 3/3] drm/amdgpu: enable paging queue based on FW version

2018-11-20 Thread Christian König
Am 19.11.18 um 22:16 schrieb Yang, Philip: On 2018-11-19 3:57 p.m., Deucher, Alexander wrote: -Original Message- From: amd-gfx On Behalf Of Yang, Philip Sent: Monday, November 19, 2018 3:20 PM To: amd-gfx@lists.freedesktop.org Cc: Yang, Philip Subject: [PATCH 3/3] drm/amdgpu: enable

Re: [PATCH] drm/amdgpu: Remove dead static variable

2018-11-20 Thread Koenig, Christian
Am 20.11.18 um 11:48 schrieb Emil Velikov: > On Mon, 19 Nov 2018 at 11:19, Christian König > wrote: >> Am 19.11.18 um 12:07 schrieb Rex Zhu: >>> The static struct drm_driver *driver was >>> not used because drm_pci_init was deprecated >>> >>> Signed-off-by: Rex Zhu >> Reviewed-by: Christian

Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-20 Thread Philipp Zabel
On Mon, 2018-11-12 at 16:01 +0100, Maarten Lankhorst wrote: > We already have __drm_atomic_helper_connector_reset() and > __drm_atomic_helper_plane_reset(), extend this to crtc as well. > > Most drivers already have a gpu reset hook, correct it. > Nouveau already implemented its own

Re: [PATCH] drm/amdgpu: enable paging queue doorbell support v2

2018-11-20 Thread Christian König
Am 19.11.18 um 21:08 schrieb Kuehling, Felix: Hi Christian, On 2018-11-19 6:24 a.m., Christian König wrote: Am 15.11.18 um 20:10 schrieb Yang, Philip: paging queues doorbell index use existing assignment sDMA_HI_PRI_ENGINE0/1 index, and increase SDMA_DOORBELL_RANGE size from 2 dwords to 4

Re: [PATCH v6 3/5] drm: Document variable refresh properties

2018-11-20 Thread Pekka Paalanen
On Wed, 7 Nov 2018 15:10:31 + "Kazlauskas, Nicholas" wrote: > On 11/7/18 9:57 AM, Wentland, Harry wrote: > > > > > > On 2018-11-06 3:24 p.m., Nicholas Kazlauskas wrote: > >> These include the drm_connector 'vrr_capable' and the drm_crtc > >> 'vrr_enabled' properties. > >> > >>

Re: [PATCH] pci: fix incorrect value returned from pcie_get_speed_cap

2018-11-20 Thread Bjorn Helgaas
On Tue, Nov 20, 2018 at 09:17:52AM -0500, Alex Deucher wrote: > On Mon, Nov 19, 2018 at 7:47 PM Bjorn Helgaas wrote: > > On Tue, Oct 30, 2018 at 12:36:08PM -0400, Mikulas Patocka wrote: > > > The macros PCI_EXP_LNKCAP_SLS_*GB are values, not bit masks. We must mask > > > the register and compare

[PATCH] drm/amd: Query and use ACPI backlight caps

2018-11-20 Thread David Francis
ACPI ATIF has a function called query backlight transfer characteristics. Among the information returned by this function is the minimum and maximum input signals for the backlight Call that function on ACPI init. When DM backlight device is updated, copy over the backlight caps into DM, but

Re: [PATCH] pci: fix incorrect value returned from pcie_get_speed_cap

2018-11-20 Thread Alex Deucher
On Mon, Nov 19, 2018 at 7:47 PM Bjorn Helgaas wrote: > > On Tue, Oct 30, 2018 at 12:36:08PM -0400, Mikulas Patocka wrote: > > The macros PCI_EXP_LNKCAP_SLS_*GB are values, not bit masks. We must mask > > the register and compare it against them. > > > > This patch fixes errors "amdgpu:

[PATCH 3/4] drm/radeon: Use drm_hdmi_avi_infoframe_quant_range()

2018-11-20 Thread Ville Syrjala
From: Ville Syrjälä Fill out the AVI infoframe quantization range bits using drm_hdmi_avi_infoframe_quant_range() instead of hand rolling it. This changes the behaviour slightly as drm_hdmi_avi_infoframe_quant_range() will set a non-zero Q bit even when QS==0 iff the Q bit matched the default

[PATCH 4/4] drm/edid: Add display_info.rgb_quant_range_selectable

2018-11-20 Thread Ville Syrjala
From: Ville Syrjälä Move the CEA-861 QS bit handling entirely into the edid code. No need to bother the drivers with this. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org Cc: Eric Anholt (supporter:DRM DRIVERS FOR VC4) Signed-off-by:

[PATCH v4 2/2] drm/amd: Add abm level drm property

2018-11-20 Thread David Francis
Adaptive Backlight Management (ABM) is a feature that reduces backlight level to save power, while increasing pixel contrast and pixel luminance to maintain readability and image quality. ABM will adjust in response to the pixel luminance of the displayed content. ABM is made available as a drm

[PATCH v4 1/2] drm/amd: Load DMCU IRAM

2018-11-20 Thread David Francis
DMCU IRAM must be loaded by the driver before DMCU can function. Move the IRAM code out of the shadows and into a new file modules/power/power_helpers.c The IRAM table contains the backlight curve and ABM parameters Add this new file to the Makefiles Call dmcu_load_iram in late init of DM

Re: [PATCH 1/4] drm/edid: Pass connector to AVI inforframe functions

2018-11-20 Thread Thierry Reding
On Tue, Nov 20, 2018 at 06:13:42PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Make life easier for drivers by simply passing the connector > to drm_hdmi_avi_infoframe_from_display_mode() and > drm_hdmi_avi_infoframe_quant_range(). That way drivers don't > need to worry about

[PATCH 1/4] drm/edid: Pass connector to AVI inforframe functions

2018-11-20 Thread Ville Syrjala
From: Ville Syrjälä Make life easier for drivers by simply passing the connector to drm_hdmi_avi_infoframe_from_display_mode() and drm_hdmi_avi_infoframe_quant_range(). That way drivers don't need to worry about is_hdmi2_sink mess. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing)

Re: [PATCH] pci: fix incorrect value returned from pcie_get_speed_cap

2018-11-20 Thread Alex Deucher
On Tue, Nov 20, 2018 at 10:13 AM Bjorn Helgaas wrote: > > On Tue, Nov 20, 2018 at 09:17:52AM -0500, Alex Deucher wrote: > > On Mon, Nov 19, 2018 at 7:47 PM Bjorn Helgaas wrote: > > > On Tue, Oct 30, 2018 at 12:36:08PM -0400, Mikulas Patocka wrote: > > > > The macros PCI_EXP_LNKCAP_SLS_*GB are