Re: [PATCH 27/27] drm/amdgpu: Fix GTT size calculation

2019-04-30 Thread Koenig, Christian
Am 30.04.19 um 17:36 schrieb Kuehling, Felix: > On 2019-04-30 5:32 a.m., Christian König wrote: >> [CAUTION: External Email] >> >> Am 30.04.19 um 01:16 schrieb Kuehling, Felix: >>> On 2019-04-29 8:34 a.m., Christian König wrote: Am 28.04.19 um 09:44 schrieb Kuehling, Felix: > From: Kent

Re: [PATCH] drm/amd/display: Allow faking displays as VRR capable.

2019-04-30 Thread Mario Kleiner
On Tue, Apr 30, 2019 at 2:22 PM Kazlauskas, Nicholas wrote: > > On 4/30/19 3:44 AM, Michel Dänzer wrote: > > [CAUTION: External Email] > > > > On 2019-04-30 9:37 a.m., Mario Kleiner wrote: > >> Allow to detect any connected display to be marked as > >> VRR capable. This is useful for testing the

Re: [PATCH 27/27] drm/amdgpu: Fix GTT size calculation

2019-04-30 Thread Kuehling, Felix
On 2019-04-30 5:32 a.m., Christian König wrote: > [CAUTION: External Email] > > Am 30.04.19 um 01:16 schrieb Kuehling, Felix: >> On 2019-04-29 8:34 a.m., Christian König wrote: >>> Am 28.04.19 um 09:44 schrieb Kuehling, Felix: From: Kent Russell GTT size is currently limited to

Re: [PATCH V2] drm/amdgpu: Fix VM clean check method

2019-04-30 Thread Christian König
Am 30.04.19 um 16:48 schrieb Trigger Huang: amdgpu_vm_make_compute is used to turn a GFX VM into a compute VM, the prerequisite is this VM is clean. Let's check if some page tables are already filled , while not check if some mapping is already made. Signed-off-by: Trigger Huang ---

Re: [PATCH v14 11/17] drm/amdgpu, arm64: untag user pointers

2019-04-30 Thread Kuehling, Felix
On 2019-04-30 9:25 a.m., Andrey Konovalov wrote: > [CAUTION: External Email] > > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > >

Re: [PATCH] drm/amdgpu: Rearm IRQ in Vega10 SR-IOV if IRQ lost

2019-04-30 Thread Alex Deucher
On Tue, Apr 30, 2019 at 1:10 PM Christian König wrote: > > Am 30.04.19 um 17:14 schrieb Trigger Huang: > > In Multi-VFs stress test, sometimes we see IRQ lost when running > > benchmark, just rearm it. > > Well I think I have seen that on bare metal as well, it would certainly > explain some very

Re: [PATCH 27/27] drm/amdgpu: Fix GTT size calculation

2019-04-30 Thread Kuehling, Felix
On 2019-04-30 1:03 p.m., Koenig, Christian wrote: > Am 30.04.19 um 17:36 schrieb Kuehling, Felix: >> On 2019-04-30 5:32 a.m., Christian König wrote: >>> [CAUTION: External Email] >>> >>> Am 30.04.19 um 01:16 schrieb Kuehling, Felix: On 2019-04-29 8:34 a.m., Christian König wrote: > Am

Re: [PATCH v14 12/17] drm/radeon, arm64: untag user pointers

2019-04-30 Thread Kuehling, Felix
On 2019-04-30 9:25 a.m., Andrey Konovalov wrote: > [CAUTION: External Email] > > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > radeon_ttm_tt_pin_userptr()

Re: [PATCH] drm/amdgpu: Rearm IRQ in Vega10 SR-IOV if IRQ lost

2019-04-30 Thread Christian König
Am 30.04.19 um 17:14 schrieb Trigger Huang: In Multi-VFs stress test, sometimes we see IRQ lost when running benchmark, just rearm it. Well I think I have seen that on bare metal as well, it would certainly explain some very odd behavior I've got from the IH block. Have you pinged the hw

[PATCH 20/20] drm/amd/display: Expose send immediate sdp message interface

2019-04-30 Thread Bhawanpreet Lakha
From: "Leo (Hanghong) Ma" [Why] To send sdp message immediately from a single slot. [How] Modify the generic SDP message interface, and use GSP4 to send immediate sdp message. Change-Id: I3f4c5ed84a021ee030d002d0155d6541f04930b9 Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland

[PATCH 16/20] drm/amd/display: stop external access to internal optc sync params

2019-04-30 Thread Bhawanpreet Lakha
From: Dmytro Laktyushkin These are internal otg params and should be handled as such. Thich change passes the params as function arguments. Change-Id: I84caccd330c59994865fe2157aa1af137122df12 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha ---

[PATCH 15/20] drm/amd/display: move signal type out of otg dlg params

2019-04-30 Thread Bhawanpreet Lakha
From: Dmytro Laktyushkin It makes no logical sense being there Change-Id: I55fe8eca7613be81132680a2a58bd58d874eb2b6 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +--

[PATCH 13/20] drm/amd/display: change name from dc_link_get_verified_link_cap to dc_link_get_link_cap

2019-04-30 Thread Bhawanpreet Lakha
From: Samson Tam [Why] DM doesn't need to know which link cap is being retrieved ( verified or preferred ). Let DC figure it out. [How] Change name. Change-Id: I5585ac7dcdf58216b2942f7ab6758c5d15719d0d Signed-off-by: Samson Tam Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha ---

[PATCH 14/20] drm/amd/display: reset retimer/redriver below 340Mhz

2019-04-30 Thread Bhawanpreet Lakha
From: Charlene Liu [Description] This is for HDMI 6Ghz mode before we load the driver, because VBIOS not support HDMI (6Ghz mode) Reset to redriver/retimer setting for the setting for below 340Mhz. Change-Id: I998b371d075c570ccea4305345e5fd66d2cbdf2e Signed-off-by: Charlene Liu Reviewed-by:

[PATCH 17/20] drm/amd/display: Check scaling info when determing update type

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] Surface scaling info updates can affect bandwidth and blocks. We need to be checking these with global validation to avoid underflow or corruption. [How] Drop the state->allow_modeset early exit in dm_determine_update_type_for_commit. Most of those should be

[PATCH 18/20] drm/amd/display: move back vbios cmd table for set dprefclk

2019-04-30 Thread Bhawanpreet Lakha
From: Eric Yang [Why] Upon closer inspection, our previous implementation is missing code for programming de-spread and DP DTO. Porting this logic into driver is rather involved, as there are a lot of table look ups. So for now move back to calling vbios cmd table [How] Go back to calling vbios

[PATCH 08/20] drm/amd/display: Update plane scaling parameters for fast updates

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] Plane scaling parameters are not correctly filled or updated when performing fast updates. They're filled when creating the dc plane state and during atomic check. While the atomic check code path happens for the plane even during fast updates, the issue is that

[PATCH 19/20] drm/amd/display: Add fast_validate parameter

2019-04-30 Thread Bhawanpreet Lakha
From: Joshua Aberback Add a fast_validate parameter in dc_validate_global_state for future use Change-Id: If7a7ea618ba85bdddc8ee4419cd01e2fae3fda93 Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH 17/20] drm/amd/display: fix acquire_first_split_pipe function

2019-04-30 Thread Bhawanpreet Lakha
From: Dmytro Laktyushkin This function needs to re-calculate the scaling on the pipe that loses it's half. Change-Id: I448583eb13f17f868377aab2b1a5d68beb43989f Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha ---

[PATCH 18/20] drm/amd/display: Relax requirements for CRTCs to be enabled

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] As long as we have at least one non-cursor plane enabled on a CRTC then the CRTC itself can remain enabled. This will allow for commits where there's an overlay plane enabled but no primary plane enabled. [How] Remove existing primary plane fb != NULL checks and

[PATCH 20/20] drm/amd/display: Add profiling tools for bandwidth validation

2019-04-30 Thread Bhawanpreet Lakha
From: Joshua Aberback [Why] We used this change to investigate the performance of bandwidth validation, it will be useful to have if we need to investigate further. [How] We use performance counter tick numbers to profile performance, they live at dc->debug.bw_val_profile (set .enable in

[PATCH 19/20] drm/amd/display: Fill plane attrs only for valid pxl format

2019-04-30 Thread Bhawanpreet Lakha
From: Roman Li [Why] In fill_plane_buffer_attributes() we calculate chroma/luma assuming that the surface_pixel_format is always valid. If it's not the case, there's a risk of divide by zero error. [How] Check if format valid before calculating pixel format attributes Change-Id:

[PATCH 09/20] drm/amd/display: Maintain z-ordering when creating planes

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] The overlay will be incorrectly placed *below* the primary plane for commits with state->allow_modeset = true because the primary plane won't be removed and recreated in the same commit. [How] Add the should_reset_plane helper to determine if the plane should be

[PATCH 11/20] drm/amd/display: Recalculate pitch when buffers change

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] Pitch was only calculated based on format whenever the plane state was recreated. This could result in surface corruption due to the incorrect pitch being programmed when the surface pitch changed during commits where state->allow_modeset = false. [How]

[PATCH 09/20] drm/amd/display: Fill prescale_params->scale for RGB565

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] An assertion is thrown when using SURFACE_PIXEL_FORMAT_GRPH_RGB565 formats on DCE since the prescale_params->scale wasn't being filled. Found by a dmesg-fail when running the igt@kms_plane@pixel-format-pipe-a-planes test on Baffin. [How] Fill in the scale

[PATCH 11/20] drm/amd/display: 3.2.29

2019-04-30 Thread Bhawanpreet Lakha
From: Aric Cyr Change-Id: I5ec540c83bb1bb01efb5a67d9dd17a518ef6edaf Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha --- 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

[PATCH 02/20] drm/amd/display: Add DRM color properties for primary planes

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] We need DC's color space to match the color encoding and color space specified by userspace to correctly render YUV surfaces. [How] Add the DRM color properties when the DC plane supports NV12. Change-Id: Ie3eb9800a9a7954d05f691b277e7ca5a25164d5d Signed-off-by:

[PATCH 00/20] DC Patches 30 Apr 2019

2019-04-30 Thread Bhawanpreet Lakha
Summary of Changes *Cursor fixes *Set clocks split refactor *Refactor watermark programing Anthony Koo (1): drm/amd/display: fix multi display seamless boot case Aric Cyr (2): drm/amd/display: 3.2.28 drm/amd/display: 3.2.29 Charlene Liu (3): drm/amd/display: add SW_USE_I2C_REG request.

[PATCH 04/20] drm/amd/display: Set dispclk and dprefclock directly

2019-04-30 Thread Bhawanpreet Lakha
From: Eric Yang [Why] To simply logic for setting DCN specific clocks, we will send SMU message directly through the VBIOS message box. [How] Add new structure in pp_smu to hold functions to set clocks through vbios message box Change-Id: I8dcad7a1ebb8a9ae317d03e492d9090af5d3443c

[PATCH 07/20] drm/amd/display: 3.2.26

2019-04-30 Thread Bhawanpreet Lakha
From: Aric Cyr Change-Id: I2e35170195717fa417ddaeb372efe2908722d4a9 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha --- 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

[PATCH 10/20] drm/amd/display: Disable cursor when offscreen in negative direction

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] When x or y is negative we set the x and y values to 0 and compensate with a positive cursor hotspot in DM since DC expects positive cursor values. When x or y is less than or equal to the maximum cursor width or height the cursor hotspot is clamped so the

[PATCH 05/20] drm/amd/display: define HUBP_MASK_SH_LIST_DCN for Raven

2019-04-30 Thread Bhawanpreet Lakha
From: Yongqiang Sun Change-Id: Ibe60745eaaea72d694ceb9d22936eae0abae5674 Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH 01/20] drm/amd/display: 3.2.28

2019-04-30 Thread Bhawanpreet Lakha
From: Aric Cyr Change-Id: Id37ddaf1186ee12ea1b40b5e991ac575f006c039 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha --- 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

[PATCH 07/20] drm/amd/display: block passive dongle EDID Emulation for USB-C ports

2019-04-30 Thread Bhawanpreet Lakha
From: Samson Tam [Why] Emulating passive dongle on USB-C port causes issue on some asics. [How] Check for DP_IS_USB_C flag in bios parser and propagate it to encoder features flags. If DP_IS_USB_C flag is set and it is trying to emulate passive dongle, then return fail. Change-Id:

[PATCH 13/20] drm/amd/display: color space ycbcr709 support

2019-04-30 Thread Bhawanpreet Lakha
From: Charlene Liu Change-Id: I7ca5ff67a2d2f701e7e974cae7a93e7622669ac5 Signed-off-by: Charlene Liu Reviewed-by: Duke Du Acked-by: Bhawanpreet Lakha --- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 29 +-- .../gpu/drm/amd/display/dc/core/dc_stream.c | 4 +--

[PATCH 14/20] drm/amd/display: Add basic downscale and upscale valdiation

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] Planes have downscaling limits and upscaling limits per format and DM is expected to validate these using DC caps. We should fail atomic check validation if we aren't capable of doing the scaling. [How] We don't currently create store which DC plane maps to which

[PATCH 02/20] drm/amd/display: Refactor program watermark.

2019-04-30 Thread Bhawanpreet Lakha
From: Yongqiang Sun Refactor programming watermark function: Divided into urgent watermark, stutter watermark and pstate watermark. Change-Id: I95ca189767237aedf91e454f1f7215cdcc8c1821 Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha ---

[PATCH 03/20] drm/amd/display: expand plane caps to include fp16 and scaling capability

2019-04-30 Thread Bhawanpreet Lakha
From: Jun Lei [why] there are some scaling capabilities such as fp16 which are known to be unsupported on a given ASIC. exposing these static capabilities allows much simpler implementation for OS interfaces which require to report such static capabilities to reduce the number of dynamic

[PATCH 08/20] drm/amd/display: Support AVI InfoFrame V3 and V4

2019-04-30 Thread Bhawanpreet Lakha
From: Chris Park [Why] Part of HDMI 2.1 requires AVI InfoFrame version update from current V2 to V3 for new VICs, and V4 for new colorimetry. [How] Implement V3 and V4 AVI InfoFrame. If (C1, C0)=(1, 1) and (EC2, EC1, EC0)=(1, 1, 1), the Source shall use 20 AVI InfoFrame Version 4. If VIC >=

[PATCH 06/20] drm/amd/display: add SW_USE_I2C_REG request.

2019-04-30 Thread Bhawanpreet Lakha
From: Charlene Liu [Description] This is for DC_I2c arbitration use between HW use/SW use and DMCU use. Change-Id: I44fd98c0e0ff91bb71dac8a9c57b50cf6ec5921f Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha ---

[PATCH 12/20] drm/amd/display: Define Byte 14 on AVI InfoFrame

2019-04-30 Thread Bhawanpreet Lakha
From: Chris Park [Why] Part of HDMI 2.1 requires AVI InfoFrame version update from current V2 to V4 for new colorimetry. [How] Define V4 AVI InfoFrame ACE0-ACE3 bit. Change-Id: Ie840136e661ea72ac90be6894e19c44e376d4679 Signed-off-by: Chris Park Reviewed-by: Nevenko Stupar Acked-by:

[PATCH 06/20] drm/amd/display: Read eDP link settings on detection

2019-04-30 Thread Bhawanpreet Lakha
From: Anthony Koo [Why] Unlike external DP panels, internal eDP does not perform verify link caps because the panel connection is fixed. So if GOP enabled the eDP at boot, we can retain its trained link settings to optimize. [How] Read the lane count and link rate by reading this information

[PATCH 12/20] drm/amd/display: Rework DC plane filling and surface updates

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] We currently don't do DC validation for medium or full updates where the plane state isn't created. There are some medium and full updates that can cause bandwidth or clock changes to occur resulting in underflow or corruption. We need to be able to fill surface

[PATCH 01/20] drm/amd/display: Expose support for NV12 on suitable planes

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] Hardware can support video surfaces and DC tells us which planes are suitable via DC plane caps. [How] The supported formats array will now vary based on what DC tells us, so create an array and fill it dynamically based on plane types and caps. Ideally we'd

[PATCH 10/20] drm/amd/display: If one stream full updates, full update all planes

2019-04-30 Thread Bhawanpreet Lakha
From: David Francis [Why] On some compositors, with two monitors attached, VT terminal switch can cause a graphical issue by the following means: There are two streams, one for each monitor. Each stream has one plane current state: M1:S1->P1 M2:S2->P2 The user calls for a

[PATCH 15/20] drm/amd/display: Use surface directly when checking update type

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] DC expects the surface memory address to identify the surface. This doesn't work with what we're doing with the temporary surfaces, it will always assume this is a full update because the surface isn't in the current context. [How] Use the surface directly. This

[PATCH 16/20] drm/amd/display: Don't warn when DC update type > DM guess

2019-04-30 Thread Bhawanpreet Lakha
From: Nicholas Kazlauskas [Why] DM thinks that the update type should be full whenever a stream or plane is added or removed (including recreations). This won't match in the case where DC thinks what looks like a fast update to DM is actually a medium or full - like scaling changes that affect

[PATCH 03/20] drm/amd/display: fix multi display seamless boot case

2019-04-30 Thread Bhawanpreet Lakha
From: Anthony Koo [Why] There is a scenario that causes eDP to become blank if there are multiple displays connected, and the external display is set as the primary display such that the first flip comes to the external display. In this scenario, we call our optimize function before the eDP

[PATCH 04/20] drm/amd/display: Handle get crtc position error

2019-04-30 Thread Bhawanpreet Lakha
From: David Francis [Why] dc_stream_get_crtc_position can return false. This was unhandled in delay_cursor_until_vupdate [How] If dc_stream_get_crtc_position returns false, something is weird. Don't delay. Change-Id: Id0fc61792aaa248594deb46d9984bcb3fb78559c Signed-off-by: David Francis

[PATCH V2] drm/amdgpu: Fix VM clean check method

2019-04-30 Thread Trigger Huang
amdgpu_vm_make_compute is used to turn a GFX VM into a compute VM, the prerequisite is this VM is clean. Let's check if some page tables are already filled , while not check if some mapping is already made. Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 33

[PATCH] drm/amdgpu: Rearm IRQ in Vega10 SR-IOV if IRQ lost

2019-04-30 Thread Trigger Huang
In Multi-VFs stress test, sometimes we see IRQ lost when running benchmark, just rearm it. Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 37 +- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git

RE: [PATCH] drm/amdgpu: Unmap CSA under SR-IOV in KFD path

2019-04-30 Thread Huang, Trigger
Hi Christian, Thanks for the quick response. One thing I want to confirm, per my understanding that CSA is only used by CP preemption for KCQ and KGQ path, but in KFD user mode queue path, can we delete CSA? If yes, then maybe we can split this topic into two patches 1, the original one that

Re: [PATCH] drm/amdgpu: Unmap CSA under SR-IOV in KFD path

2019-04-30 Thread Christian König
Am 30.04.19 um 12:28 schrieb Huang, Trigger: Hi Christian, Thanks for the quick response. One thing I want to confirm, per my understanding that CSA is only used by CP preemption for KCQ and KGQ path, but in KFD user mode queue path, can we delete CSA? If yes, then maybe we can split this

RE: [PATCH] drm/amdgpu: Unmap CSA under SR-IOV in KFD path

2019-04-30 Thread Huang, Trigger
Thanks, Ok, I got it. That makes more clear. Thanks & Best Wishes, Trigger Huang -Original Message- From: Christian König Sent: Tuesday, April 30, 2019 6:32 PM To: Huang, Trigger ; Koenig, Christian ; Kuehling, Felix ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu:

RE: [PATCH] drm/amdgpu: Unmap CSA under SR-IOV in KFD path

2019-04-30 Thread Huang, Trigger
Hi Christian & Felix, Thanks for the information. But actually currently CSA is mapped only in amdgpu_driver_open_kms under SR-IOV. So would you give more information about ' Well that is exactly what we already do here'? Where I can find its implementation? On the other hand, I will try the

Re: [PATCH 27/27] drm/amdgpu: Fix GTT size calculation

2019-04-30 Thread Christian König
Am 30.04.19 um 01:16 schrieb Kuehling, Felix: On 2019-04-29 8:34 a.m., Christian König wrote: Am 28.04.19 um 09:44 schrieb Kuehling, Felix: From: Kent Russell GTT size is currently limited to the minimum of VRAM size or 3/4 of system memory. This severely limits the quanitity of system

Re: [PATCH] drm/amdgpu: Unmap CSA under SR-IOV in KFD path

2019-04-30 Thread Koenig, Christian
Am 30.04.19 um 11:53 schrieb Huang, Trigger: > Hi Christian & Felix, > > Thanks for the information. > > But actually currently CSA is mapped only in amdgpu_driver_open_kms under > SR-IOV. > So would you give more information about ' Well that is exactly what we > already do here'? Where I can

Re: [PATCH] drm/amdgpu: enable separate timeout setting for every ring type V4

2019-04-30 Thread Christian König
Am 30.04.19 um 05:20 schrieb Alex Deucher: On Mon, Apr 29, 2019 at 11:16 PM Evan Quan wrote: Every ring type can have its own timeout setting. - V2: update lockup_timeout parameter format and cosmetic fixes - V3: invalidate 0 and negative values - V4: update lockup_timeout parameter

Re: [PATCH] drm/amdgpu: Unmap CSA under SR-IOV in KFD path

2019-04-30 Thread Christian König
Well that is exactly what we already do here. The only problem is we do the wrong check amdgpu_vm_make_compute(). Instead of checking if some page tables are already filled we check if some mapping is already made. Regards, Christian. Am 30.04.19 um 01:34 schrieb Kuehling, Felix: I

[PATCH] drm/amd/display: Allow faking displays as VRR capable.

2019-04-30 Thread Mario Kleiner
Allow to detect any connected display to be marked as VRR capable. This is useful for testing the basics of VRR mode, e.g., scheduling and timestamping, BTR, and transition logic, on non-VRR capable displays, e.g., to perform IGT test-suit kms_vrr test runs. This fake VRR display mode is enabled

Re: [PATCH] drm/amd/display: Allow faking displays as VRR capable.

2019-04-30 Thread Michel Dänzer
On 2019-04-30 9:37 a.m., Mario Kleiner wrote: > Allow to detect any connected display to be marked as > VRR capable. This is useful for testing the basics of > VRR mode, e.g., scheduling and timestamping, BTR, and > transition logic, on non-VRR capable displays, e.g., > to perform IGT test-suit

[PATCH] drm/amdgpu: Add IDH_QUERY_ALIVE event for SR-IOV

2019-04-30 Thread Trigger Huang
SR-IOV host side will send IDH_QUERY_ALIVE to guest VM to check if this guest VM is still alive (not destroyed). The only thing guest KMD need to do is to send ACK back to host. Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h

Re: [PATCH] drm/amd/display: Allow faking displays as VRR capable.

2019-04-30 Thread Kazlauskas, Nicholas
On 4/30/19 3:44 AM, Michel Dänzer wrote: > [CAUTION: External Email] > > On 2019-04-30 9:37 a.m., Mario Kleiner wrote: >> Allow to detect any connected display to be marked as >> VRR capable. This is useful for testing the basics of >> VRR mode, e.g., scheduling and timestamping, BTR, and >>

[PATCH v14 04/17] mm: add ksys_ wrappers to memory syscalls

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch adds ksys_ wrappers to the following memory syscalls: brk, get_mempolicy (renamed kernel_get_mempolicy

[PATCH v14 00/17] arm64: untag user pointers passed to the kernel

2019-04-30 Thread Andrey Konovalov
=== Overview arm64 has a feature called Top Byte Ignore, which allows to embed pointer tags into the top byte of each pointer. Userspace programs (such as HWASan, a memory debugging tool [1]) might use this feature and pass tagged user pointers to the kernel through syscalls or other interfaces.

[PATCH v14 06/17] mm: untag user pointers in do_pages_move

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. do_pages_move() is used in the implementation of the move_pages syscall. Untag user pointers in this function.

[PATCH v14 17/17] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch adds a simple test, that calls the uname syscall with a tagged user pointer as an argument. Without the

[PATCH v14 11/17] drm/amdgpu, arm64: untag user pointers

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. amdgpu_ttm_tt_get_user_pages() uses provided user pointers for vma lookups, which can only by done with untagged

[PATCH v14 12/17] drm/radeon, arm64: untag user pointers

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. radeon_ttm_tt_pin_userptr() uses provided user pointers for vma lookups, which can only by done with untagged

[PATCH v14 16/17] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. vaddr_get_pfn() uses provided user pointers for vma lookups, which can only by done with untagged pointers. Untag

[PATCH v14 13/17] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. mlx4_get_umem_mr() uses provided user pointers for vma lookups, which can only by done with untagged pointers.

[PATCH v14 05/17] arms64: untag user pointers passed to memory syscalls

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch allows tagged pointers to be passed to the following memory syscalls: brk, get_mempolicy, madvise, mbind,

[PATCH v14 03/17] lib, arm64: untag user pointers in strn*_user

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. strncpy_from_user and strnlen_user accept user addresses as arguments, and do not go through the same path as

[PATCH v14 10/17] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. userfaultfd_register() and userfaultfd_unregister() use provided user pointers for vma lookups, which can only by

[PATCH v14 02/17] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. copy_from_user (and a few other similar functions) are used to copy data from user memory into the kernel memory or

[PATCH v14 01/17] uaccess: add untagged_addr definition for other arches

2019-04-30 Thread Andrey Konovalov
To allow arm64 syscalls to accept tagged pointers from userspace, we must untag them when they are passed to the kernel. Since untagging is done in generic parts of the kernel, the untagged_addr macro needs to be defined for all architectures. Define it as a noop for architectures other than

[PATCH v14 14/17] media/v4l2-core, arm64: untag user pointers in videobuf_dma_contig_user_get

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. videobuf_dma_contig_user_get() uses provided user pointers for vma lookups, which can only by done with untagged

[PATCH v14 15/17] tee, arm64: untag user pointers in tee_shm_register

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. tee_shm_register()->optee_shm_unregister()->check_mem_type() uses provided user pointers for vma lookups (via

[PATCH v14 07/17] mm, arm64: untag user pointers in mm/gup.c

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example

[PATCH v14 09/17] fs, arm64: untag user pointers in copy_mount_options

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In copy_mount_options a user address is being subtracted from TASK_SIZE. If the address is lower than TASK_SIZE, the

[PATCH v14 08/17] mm, arm64: untag user pointers in get_vaddr_frames

2019-04-30 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. get_vaddr_frames uses provided user pointers for vma lookups, which can only by done with untagged pointers. Instead

[PATCH] drm/amdgpu: Fix VM clean check method

2019-04-30 Thread Trigger Huang
amdgpu_vm_make_compute is used to turn a GFX VM into a compute VM, the prerequisite is this VM is clean. Let's check if some page tables are already filled , while not check if some mapping is already made. Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 36

Re: [PATCH] drm/amdgpu: Fix VM clean check method

2019-04-30 Thread Christian König
Am 30.04.19 um 16:18 schrieb Trigger Huang: amdgpu_vm_make_compute is used to turn a GFX VM into a compute VM, the prerequisite is this VM is clean. Let's check if some page tables are already filled , while not check if some mapping is already made. Signed-off-by: Trigger Huang ---