[PATCH] drm/amdgpu: Allow secure submission on SDMAv4.4.2 rings

2024-02-13 Thread David Francis
This flag was accidentally left off of SDMAv4.4.2 when it was added. SDMAv4.4.2, like all other SDMA engines, does support secure submission. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amdkfd: Refactor kfd CRIU into its own file

2024-05-06 Thread David Francis
The kfd CRIU code takes up about a thousand lines in the kfd_chardev file; move it to its own file. No functional change intended. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdkfd/Makefile | 1 + drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 972 +- drivers

[PATCH v2] drm/amdkfd: Refactor kfd CRIU into its own file

2024-05-07 Thread David Francis
The kfd CRIU code takes up about a thousand lines in the kfd_chardev file; move it to its own file. No functional change intended. Signed-off-by: David Francis Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/Makefile | 1 + drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 974

[PATCH] drm/amdgpu: Handle null atom context in VBIOS info ioctl

2023-09-05 Thread David Francis
On some APU systems, there is no atom context and so the atom_context struct is null. Add a check to the VBIOS_INFO branch of amdgpu_info_ioctl to handle this case, returning all zeroes. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 19 --- 1 file

[PATCH v2] drm/amdgpu: Handle null atom context in VBIOS info ioctl

2023-09-11 Thread David Francis
On some APU systems, there is no atom context and so the atom_context struct is null. Add a check to the VBIOS_INFO branch of amdgpu_info_ioctl to handle this case, returning all zeroes. v2: Maintain current use of {} initialization. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu

[PATCH v4] drm/amdgpu: Add EXT_COHERENT memory allocation flags

2023-09-14 Thread David Francis
https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/pull/88 v3: changed name of flag v4: added checks for invalid flag combinations Reviewed-by: David Yat Sin w Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 +++ drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu: Acquire ttm locks for dmaunmap

2023-10-11 Thread David Francis
dmaunmap can call ttm_bo_validate, which expects the ttm dma_resv to be held. Acquire the locks in amdgpu_amdkfd_gpuvm_dmaunmap_mem. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 12

[PATCH 2/2] drm/amdgpu: Permit PCIe transfer over links with XGMI

2023-10-11 Thread David Francis
the topology path. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: Add EXT_COHERENT override for NUMA local nodes

2023-10-12 Thread David Francis
. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h| 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 33 +++ drivers/gpu/drm/amd/amdkfd

[PATCH V2 2/2] drm/amdgpu: Permit PCIe transfer over links with XGMI

2023-10-16 Thread David Francis
the topology path. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH V2 1/2] drm/amdgpu: Acquire ttm locks for dmaunmap

2023-10-16 Thread David Francis
: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 2 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 23 +++ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 14 +-- include/uapi/linux/kfd_ioctl.h| 2 ++ 4 files changed, 34 insertions

[PATCH v2] drm/amdgpu: Add EXT_COHERENT support for APU and NUMA systems

2023-10-19 Thread David Francis
override function for this case, and add a check to ensure it is not used on UNCACHED memory. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h| 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +- drivers/gpu

[PATCH v3] drm/amdgpu: Add EXT_COHERENT support for APU and NUMA systems

2023-10-24 Thread David Francis
override function for this case, and add a check to ensure it is not used on UNCACHED memory. V2: Combined APU and NUMA code into one patch V3: Fixed a potential nullptr in amdgpu_vm_bo_update Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 17 +++- drivers/gpu/drm

[PATCH v3 1/2] drm/amdgpu: Acquire ttm locks for dmaunmap

2023-10-24 Thread David Francis
any issues. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 6 - .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 23 +++ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 19 ++- 3 files changed, 37 insertions(+), 11 deletions

[PATCH v3 2/2] drm/amdgpu: Permit PCIe transfer over links with XGMI

2023-10-24 Thread David Francis
the topology path. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +--- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[v2] drm/amd: Add IMU fw version to fw version queries

2022-09-19 Thread David Francis
Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c| 1 + drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 1 + include/uapi/drm/amdgpu_drm.h

Re: [patch V2] drm/amdkfd: Access gpuvm_export_dmabuf() api

2023-06-28 Thread David Francis
On 2023-06-22 17:10, Ramesh Errabolu wrote: Call KFD api to get Dmabuf instead of calling GEM Prime API Would appreciate a more detailed commit message to explain why the KFD API is preferred over the GEM API. With or without that change, this is Reviewed-by: David Francis Signed-off-by

Re: [patch V2] drm/amdkfd: Access gpuvm_export_dmabuf() api

2023-06-29 Thread David Francis
dma_buf. Regards, Ramesh Looks good. With the new commit message, patch is Reviewed-by: David Francis On 2023-06-22 17:10, Ramesh Errabolu wrote: Call KFD api to get Dmabuf instead of calling GEM Prime API Would appreciate a more detailed commit message to explain why the KFD API is

[no subject]

2023-07-24 Thread David Francis
This is in support of a RCCL change that requires specific coherence behaviour. Corresponding Thunk patch is at https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/pull/88

[PATCH] drm/amdgpu: Add EXT_COHERENCE memory allocation flags

2023-07-24 Thread David Francis
These flags (for GEM and SVM allocations) allocate memory that allows for system-scope atomic semantics. On GFX943 these flags cause caches to be avoided on non-local memory. On all other ASICs they are identical in functionality to the equivalent COHERENT flags. Signed-off-by: David Francis

Re: [PATCH] drm/amdgpu: Add EXT_COHERENCE memory allocation flags

2023-07-24 Thread David Francis
-scope atomic semantics. On GFX943 these flags cause caches to be avoided on non-local memory. On all other ASICs they are identical in functionality to the equivalent COHERENT flags. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 ++ drivers/gpu/drm/amd

[PATCH v2] drm/amdgpu: Add EXT_COHERENCE memory allocation flags

2023-07-26 Thread David Francis
These flags (for GEM and SVM allocations) allocate memory that allows for system-scope atomic semantics. On GFX943 these flags cause caches to be avoided on non-local memory. On all other ASICs they are identical in functionality to the equivalent COHERENT flags. Signed-off-by: David Francis

[PATCH v3] drm/amdgpu: Add EXT_COHERENCE memory allocation flags

2023-07-26 Thread David Francis
https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/pull/88 Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 + drivers/gpu/drm/amd

[PATCH v3] drm/amdgpu: Add EXT_COHERENT memory allocation flags

2023-07-28 Thread David Francis
https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/pull/88 v3: changed name of flag Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1

[PATCH] drm/amdkfd: Checkpoint and restore queues on GFX11

2023-08-25 Thread David Francis
The code in kfd_mqd_manager_v11.c to support criu dump and restore of queue state was missing. Added it; should be equivalent to kfd_mqd_manager_v10.c. CC: Felix Kuehling Signed-off-by: David Francis --- .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 41 +++ 1 file changed

[PATCH] powerplay: Respect units on max dcfclk watermark

2018-10-18 Thread David Francis
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 --- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 2 +- 1 file changed, 1 insertion

[PATCH 1/2] drm/amdgpu: Stop dividing watermarks by 1000 in powerplay

2018-10-30 Thread David Francis
Watermarks were being multiplied by 1000 in amdgpu_dm and divided by 1000 in powerplay. Change watermarks to units of mhz to stop doing that. Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 24 +- .../drm/amd/display/dc/dm_services_types.h| 16

[PATCH 2/2] drm/amdgpu: Change pp clock requests to mHz

2018-10-30 Thread David Francis
We were multiplying clock requests by 1000 in amdgpu_dm and then dividing them by 1000 in powerplay. Also, the vega12 code was dividing by 10 when it should have been multiplying (to convert units of 10kHz to units of kHz). Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v2 1/3] drm/amdgpu: Stop dividing watermarks by 1000 in powerplay

2018-11-01 Thread David Francis
Watermarks were being multiplied by 1000 in amdgpu_dm and divided by 1000 in powerplay. Change watermarks to units of mhz to stop doing that. Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 24 +- .../drm/amd/display/dc/dm_services_types.h| 16

[PATCH v2 2/3] drm/amdgpu: Fix a bad unit conversion in vega12 powerplay

2018-11-01 Thread David Francis
The default unit in powerplay is 10kHz To convert from 10kHz to kHz, multiply by 10 Signed-off-by: David Francis --- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b

[PATCH v2 3/3] drm/amdgpu: Change powerplay clock requests to mHz

2018-11-01 Thread David Francis
This will clean up powerplay code, as we are no longer multiplying the clocks by 1000 in DM and then dividing them by 1000 in powerplay Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 6 +++--- drivers/gpu/drm/amd/include/dm_pp_interface.h

[PATCH v3 2/3] drm/amdgpu: Fix a bad unit conversion in vega12 powerplay

2018-11-02 Thread David Francis
The default unit in powerplay is 10kHz To convert from 10kHz to kHz, multiply by 10 Signed-off-by: David Francis --- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b

[PATCH v3 3/3] drm/amdgpu: Change powerplay clock requests to MHz

2018-11-02 Thread David Francis
This will clean up powerplay code, as we are no longer multiplying the clocks by 1000 in DM and then dividing them by 1000 in powerplay Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 6 +++--- drivers/gpu/drm/amd/include/dm_pp_interface.h

[PATCH v3 1/3] drm/amdgpu: Stop dividing watermarks by 1000 in powerplay

2018-11-02 Thread David Francis
Watermarks were being multiplied by 1000 in amdgpu_dm and divided by 1000 in powerplay. Change watermarks to units of MHz to stop doing that. Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 24 +- .../drm/amd/display/dc/dm_services_types.h| 16

[PATCH] drm/amd: Don't fail on backlight = 0

2018-11-06 Thread David Francis
value of 1 to hardware. Signed-off-by: David Francis Bugzilla: https://bugs.freedesktop.org/108668 Fixes: 416615ea9578 ("drm/amd/display: set backlight level limit to 1") Cc: suresh.gutt...@amd.com Cc: harry.wentl...@amd.com Cc: samant...@posteo.net --- .../gpu/drm/amd/display/amdgpu

[PATCH] drm/amd: update ATIF functions in AMD ACPI header

2018-11-08 Thread David Francis
Backlight Transfer Characteristics, Ready To Undock Notification Changed functions: Get System Parameters, Get System BIOS Requests All changes are right from the standard ATI ACPI Control Methods V0.44 Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 31

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

2018-11-13 Thread David Francis
ven series ASICs and only on eDP monitors. This is a new property on amdgpu connectors, with a range of 0 (off) to 4 (severe backlight reduction). Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 + .../g

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

2018-11-13 Thread David Francis
Move struct dmcu_version from dc.h to dmcu.h to allow dmcu to be included on its own Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/Makefile | 3 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++ drivers/gpu/drm/amd/display/dc/dc.h | 8 +- drivers/gpu

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

2018-11-13 Thread David Francis
are, which is currently available for Raven ASICs only. If the feature does not work, please ensure your firmware is up to date. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 + .../gpu/drm/amd/display

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

2018-11-13 Thread David Francis
Move struct dmcu_version from dc.h to dmcu.h to allow dmcu to be included on its own Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/Makefile | 3 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++ drivers/gpu/drm/amd/display/dc/dc.h | 8 +- drivers/gpu

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

2018-11-15 Thread David Francis
Move struct dmcu_version from dc.h to dmcu.h to allow dmcu to be included on its own Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/Makefile | 3 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++ drivers/gpu/drm/amd/display/dc/dc.h | 8 +- drivers/gpu

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

2018-11-15 Thread David Francis
are, which is currently available for Raven ASICs only. If the feature does not work, please ensure your firmware is up to date. v2: Fix commit message, only attach property if DMCU loaded v3: Storre ABM level in crtc state to accommodate dc Signed-off-by: David Francis --- drivers/gpu/drm/

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

2018-11-20 Thread David Francis
only once. Use the backlight caps in the backlight-to-dc calculation. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 83 +++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 59

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

2018-11-20 Thread David Francis
are, which is currently available for Raven ASICs only. If the feature does not work, please ensure your firmware is up to date. v2: Fix commit message, only attach property if DMCU loaded v3: Store ABM level in crtc state to accommodate dc v4: Fix ABM saving on dpms cycle Signed-off-by: Dav

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

2018-11-20 Thread David Francis
Move struct dmcu_version from dc.h to dmcu.h to allow dmcu to be included on its own Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/Makefile | 3 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++ drivers/gpu/drm/amd/display/dc/dc.h | 8 +- drivers/gpu

[PATCH] drm/amd/display: Fix compile error with ACPI disabled

2018-11-27 Thread David Francis
The fallback code for getting default backlight caps was using the wrong variable name. Fix it. Fixes: https://lists.freedesktop.org/archives/dri-devel/2018-November/197752.html Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2

[PATCH 04/16 v2] drm/amd/display: Add tracing to dc

2018-11-30 Thread David Francis
to be enabled. It counts the register reads and writes since the last entry v2: Don't check for NULL before kfree Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Leo Li --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 + .../amd/display/amdgpu_dm/amdgpu_dm_tr

[PATCH] drm/amd/display: Clean up coding style violations

2019-01-29 Thread David Francis
Some of the grandfathered amd display code does not follow Linux coding style and emits warnings or errors on checkpatch No functional changes here - just cleanup Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 96 +-- 1 file changed, 47

[PATCH 1/3] drm/i915: Move dsc rate params compute into drm

2019-02-13 Thread David Francis
The function intel_compute_rc_parameters is part of the dsc spec and is not driver-specific. Other drm drivers might like to use it. The function is not changed; just moved and renamed. Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c | 133

[PATCH 2/3] drm/dsc: Add native 420 and 422 support to compute_rc_params

2019-02-13 Thread David Francis
, so the mux component of a group is larger by one additional mux word and one additional component Now that there is native 422 support, the configuration option previously called enable422 is renamed to simple_422 to avoid confusion Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c

[PATCH 0/3] Make DRM DSC helpers more generally usable

2019-02-13 Thread David Francis
drivers with their own SDP struct headers David Francis (3): drm/i915: Move dsc rate params compute into drm drm/dsc: Add native 420 and 422 support to compute_rc_params drm/dsc: Change infoframe_pack to payload_pack drivers/gpu/drm/drm_dsc.c | 236 -- drivers

[PATCH 3/3] drm/dsc: Change infoframe_pack to payload_pack

2019-02-13 Thread David Francis
ff-by: David Francis --- drivers/gpu/drm/drm_dsc.c | 86 +++ drivers/gpu/drm/i915/intel_vdsc.c | 2 +- include/drm/drm_dsc.h | 2 +- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/drm_dsc.c b/drivers/gpu/drm/drm_

[PATCH v2 1/3] drm/i915: Move dsc rate params compute into drm

2019-02-15 Thread David Francis
The function intel_compute_rc_parameters is part of the dsc spec and is not driver-specific. Other drm drivers might like to use it. The function is not changed; just moved and renamed. Reviewed-by: Harry Wentland Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c | 135

[PATCH v2 2/3] drm/dsc: Add native 420 and 422 support to compute_rc_params

2019-02-15 Thread David Francis
: Harry Wentland Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c | 33 ++- drivers/gpu/drm/i915/intel_vdsc.c | 4 ++-- include/drm/drm_dsc.h | 4 ++-- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 0/3] Make DRM DSC helpers more generally usable

2019-02-15 Thread David Francis
own SDP struct headers v2: Rebase onto drm-next Refactor drm_dsc_dp_pps_header_init Clean up documentation on new drm function David Francis (3): drm/i915: Move dsc rate params compute into drm drm/dsc: Add native 420 and 422 support to compute_rc_params drm/dsc: Split DSC PPS and SDP header

[PATCH v2 1/3] drm/i915: Move dsc rate params compute into drm

2019-02-21 Thread David Francis
The function intel_compute_rc_parameters is part of the dsc spec and is not driver-specific. Other drm drivers might like to use it. The function is not changed; just moved and renamed. Reviewed-by: Harry Wentland Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c | 135

[PATCH v2 2/3] drm/dsc: Add native 420 and 422 support to compute_rc_params

2019-02-21 Thread David Francis
: Harry Wentland Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c | 33 ++- drivers/gpu/drm/i915/intel_vdsc.c | 4 ++-- include/drm/drm_dsc.h | 4 ++-- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 0/3] Make DRM DSC helpers more generally usable

2019-02-21 Thread David Francis
own SDP struct headers Re-sending due to Mail Delivery System errors v2: Rebase onto drm-next Refactor drm_dsc_dp_pps_header_init Clean up documentation on new drm function David Francis (3): drm/i915: Move dsc rate params compute into drm drm/dsc: Add native 420 and 422 support to

[PATCH v2 3/3] drm/dsc: Split DSC PPS and SDP header initialisations

2019-02-21 Thread David Francis
property of DSC over any connector, not just DP, and because drm drivers may have their own SDP structs they wish to use, make the functions that initialise SDP and PPS headers take the components they operate on, not drm_dsc_pps_infoframe, Signed-off-by: David Francis --- drivers/gpu/drm/drm_dsc.c

[PATCH] drm/amd: Add DMCU firmware loading on raven

2018-09-07 Thread David Francis
- the initial eram and the interrupt vectors. These are treated as seperate pieces of firmware and loaded by PSP The loading occurs in the sw_init hook of DM Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 + drivers/gpu/drm/amd/amdgpu/psp_v10_0.c| 6

[PATCH] drm/amd: Add DMCU firmware loading on raven

2018-09-07 Thread David Francis
- the initial eram and the interrupt vectors. These are treated as seperate pieces of firmware and loaded by PSP The loading occurs in the sw_init hook of DM If the firmware is not found, the sw_init hook returns without error. DMCU is not a requirement for DM to run. Signed-off-by: David Francis

[PATCH v2] drm/amd: Add DMCU firmware loading on raven

2018-09-07 Thread David Francis
loading into its own function, properly release firmware, add debug messages Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 + drivers/gpu/drm/amd/amdgpu/psp_v10_0.c| 6 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 114 +- 3 files

[PATCH v3] drm/amd: Add DMCU firmware loading on raven

2018-09-11 Thread David Francis
loading into its own function, properly release firmware, add debug messages v3: Use one binary file which contains both firmware pieces Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 - drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 10 ++ drivers/gpu/drm

[PATCH 0/3] Add DMCU fw loading on raven

2018-09-11 Thread David Francis
David Francis (3): drm/amd: Add ucode DMCU support drm/amd: Add PSP DMCU support drm/amd: Add DM DMCU support drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 - drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 10 ++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.c| 6 ++ .../gpu/drm

[PATCH 1/3] drm/amd: Add ucode DMCU support

2018-09-11 Thread David Francis
parsing logic similar to MEC, to extract the two ucodes from a single struct firmware. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 10 ++ 2 files changed, 29 insertions(+), 2 deletions

[PATCH 2/3] drm/amd: Add PSP DMCU support

2018-09-11 Thread David Francis
. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c index 02be34e72ed9..240dc8c85867 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +++ b

[PATCH 3/3] drm/amd: Add DM DMCU support

2018-09-11 Thread David Francis
loaded by the kernel's loading mechanism and split into two ucodes according to the header. DMCU is optional, so if the firmware is not found, no error or warning is raised. Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 91 ++- .../gpu/dr

[PATCH v2 0/3] Add DMCU fw loading on raven

2018-09-12 Thread David Francis
v2: measure intv offset in bytes instead of words David Francis (3): drm/amd: Add ucode DMCU support drm/amd: Add PSP DMCU support drm/amd: Add DM DMCU support drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 - drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 10 ++ drivers/gpu/drm

[PATCH v2 1/3] drm/amd: Add ucode DMCU support

2018-09-12 Thread David Francis
parsing logic similar to MEC, to extract the two ucodes from a single struct firmware. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 10 ++ 2 files changed, 29 insertions(+), 2 deletions

[PATCH v2 2/3] drm/amd: Add PSP DMCU support

2018-09-12 Thread David Francis
. Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c index 02be34e72ed9..240dc8c85867 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +++ b

[PATCH v2 3/3] drm/amd: Add DM DMCU support

2018-09-12 Thread David Francis
loaded by the kernel's loading mechanism and split into two ucodes according to the header. DMCU is optional, so if the firmware is not found, no error or warning is raised. Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 91 ++- .../gpu/dr

[PATCH 0/2] DMCU firmware version storing and access

2018-09-13 Thread David Francis
David Francis (2): drm/amd/display: Add DMCU firmware version drm/amdgpu: Add DMCU to firmware query interface drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

[PATCH 2/2] drm/amdgpu: Add DMCU to firmware query interface

2018-09-13 Thread David Francis
DMCU firmware version can be read using the AMDGPU_INFO ioctl or the amdgpu_firmware_info debugfs entry Signed-off-by: David Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 include/uapi/drm/amdgpu_drm.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a

[PATCH 1/2] drm/amd/display: Add DMCU firmware version

2018-09-13 Thread David Francis
Read the version number from the common firmware header and store it in the dm struct Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu

[PATCH 03/14] Revert "drm/amd/display: add global master update lock for DCN2"

2019-08-19 Thread David Francis
This reverts commit 55a6f5bbcf00a49565946c0a9b8c716313dc6c05. This commit was accidentally promoted twice Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland --- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 4 -- .../gpu/drm/amd/display/dc/dcn20/dcn20_optc.c

[PATCH 01/14] Revert "drm/amd/display: skip dsc config for navi10 bring up"

2019-08-19 Thread David Francis
not associated with dsc, and power gating on dsc still has an issue on non-dsc monitors where the dsc hardware block is never init and so cannot respond to power gating requests. Therefore, those are left as is Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland

[PATCH 05/14] drm/amd/display: Enable SST DSC in DM

2019-08-19 Thread David Francis
In create_stream_for_sink, check for SST DP connectors Parse DSC caps to DC format, then, if DSC is supported, compute the config DSC hardware will be programmed by dc_commit_state Cc: Mikita Lipski Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32

[PATCH 04/14] Revert "drm/amd/display: Fix underscan not using proper scaling"

2019-08-19 Thread David Francis
timing Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c

[PATCH 07/14] drm/amd/display: Initialize DSC PPS variables to 0

2019-08-19 Thread David Francis
For DSC MST, sometimes monitors would break out in full-screen static. The issue traced back to the PPS generation code, where these variables were being used uninitialized and were picking up garbage. memset to 0 to avoid this Signed-off-by: David Francis --- drivers/gpu/drm/amd/display/dc

[PATCH 08/14] drm/dp-mst: Parse FEC capability on MST ports

2019-08-19 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 398e7314ea8b

[PATCH 10/14] drm/dp-mst: Fill branch->num_ports

2019-08-19 Thread David Francis
This field on drm_dp_mst_branch was never filled Initialize it to zero when the list of ports is created. When a port is added to the list, increment num_ports Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH 11/14] drm/amd/display: Validate DSC caps on MST endpoints

2019-08-19 Thread David Francis
t will not have been created yet If no DSC is attempted, zero the DSC caps Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 123 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 3 + 2 files changed, 125 inser

[PATCH 02/14] Revert "drm/amd/display: navi10 bring up skip dsc encoder config"

2019-08-19 Thread David Francis
This reverts commit 5f2fd347eeff7d4ce271920efd47baaa18fe968c. Re-enable enc2_dp_set_dsc_config. This function caused warnings due to missing register definitions. With the registers added, this now works Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland

[PATCH 06/14] drm/amd/display: Use dc helpers to compute timeslot distribution

2019-08-19 Thread David Francis
d not take FEC into account (FEC reduces the PBN per timeslot) Use the DC helpers (dc_bandwidth_in_kbps_from_timing, dc_link_bandwidth_kbps) instead Cc: Jerry Zuo Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 41 --- 1 file changed, 8 inserti

[PATCH 09/14] drm/dp-mst: Export symbols for dpcd read/write

2019-08-19 Thread David Francis
To use these functions in drm driver directories, they must be exported Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 53a0ad16e37b

[PATCH 00/14] Display Stream Compression (DSC) for AMD Navi

2019-08-19 Thread David Francis
policy itself. This includes the code for detecting and validating DSC capabilities, enabling DSC over a link, computing the fair DSC configurations for multiple DSC displays, and adding to atomic state crtcs that might need reprogramming due to DSC. David Francis (14): Revert "drm/amd/di

[PATCH 14/14] drm/amd/display: Trigger modesets on MST DSC connectors

2019-08-19 Thread David Francis
Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 80 +++ 1 file changed, 80 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 145fd73025dc..8d5357aec5e8 100644 --- a

[PATCH 12/14] drm/amd/display: Write DSC enable to MST DPCD

2019-08-19 Thread David Francis
devices, use the upstream (peer) device For DP-to-HDMI or virtual DP peer devices, use the output port For the Synaptix workaround, use the link aux Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 30 ++- 1 file

[PATCH 13/14] drm/amd/display: MST DSC compute fair share

2019-08-19 Thread David Francis
end of amdgpu atomic check. If it fails, fail check; This combination of timings cannot be supported. Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 375

[PATCH v2 00/14] Display Stream Compression (DSC) for AMD Navi

2019-08-20 Thread David Francis
x27;s feedback David Francis (14): Revert "drm/amd/display: skip dsc config for navi10 bring up" Revert "drm/amd/display: navi10 bring up skip dsc encoder config" Revert "drm/amd/display: add global master update lock for DCN2" Revert "drm/amd/display

[PATCH v2 11/14] drm/amd/display: Validate DSC caps on MST endpoints

2019-08-20 Thread David Francis
t will not have been created yet If no DSC is attempted, zero the DSC caps Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 123 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 3 + 2 files changed, 125 inser

[PATCH v2 05/14] drm/amd/display: Enable SST DSC in DM

2019-08-20 Thread David Francis
In create_stream_for_sink, check for SST DP connectors Parse DSC caps to DC format, then, if DSC is supported, compute the config DSC hardware will be programmed by dc_commit_state Tested-by: Mikita Lipski Signed-off-by: David Francis Reviewed-by: Nicholas Kazlauskas --- .../gpu/drm/amd

[PATCH v2 04/14] Revert "drm/amd/display: Fix underscan not using proper scaling"

2019-08-20 Thread David Francis
timing Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers

[PATCH v2 09/14] drm/dp-mst: Export symbols for dpcd read/write

2019-08-20 Thread David Francis
To use these functions in drm driver directories, they must be exported Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index b40d975aec76

[PATCH v2 08/14] drm/dp-mst: Parse FEC capability on MST ports

2019-08-20 Thread David Francis
Store it on drm_dp_mst_port Signed-off-by: David Francis --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++ include/drm/drm_dp_mst_helper.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index d789b7af7dbf

[PATCH v2 03/14] Revert "drm/amd/display: add global master update lock for DCN2"

2019-08-20 Thread David Francis
This reverts commit 55a6f5bbcf00a49565946c0a9b8c716313dc6c05. This commit was accidentally promoted twice Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas --- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c| 4 -- .../gpu/drm

[PATCH v2 13/14] drm/amd/display: MST DSC compute fair share

2019-08-20 Thread David Francis
end of amdgpu atomic check. If it fails, fail check; This combination of timings cannot be supported. Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 375

[PATCH v2 01/14] Revert "drm/amd/display: skip dsc config for navi10 bring up"

2019-08-20 Thread David Francis
not associated with dsc, and power gating on dsc still has an issue on non-dsc monitors where the dsc hardware block is never init and so cannot respond to power gating requests. Therefore, those are left as is Signed-off-by: David Francis Reviewed-by: Roman Li Reviewed-by: Harry Wentland

[PATCH v2 12/14] drm/amd/display: Write DSC enable to MST DPCD

2019-08-20 Thread David Francis
devices, use the upstream (peer) device For DP-to-HDMI or virtual DP peer devices, use the output port For the Synaptix workaround, use the link aux Cc: Wenjing Liu Cc: Nikola Cornij Signed-off-by: David Francis --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 30 ++- 1 file

[PATCH v2 14/14] drm/amd/display: Trigger modesets on MST DSC connectors

2019-08-20 Thread David Francis
before adding connectors and planes on modesetting crtcs Cc: Leo Li Cc: Nicholas Kazlauskas Signed-off-by: David Francis --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 +++ 1 file changed, 74 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b

  1   2   >