RE: Rebasing of amd-staging-drm-next

2019-11-16 Thread Liu, Zhan
Hi Martin, Probably you are missing a building package. You can give it another try after installing the following tools: sudo apt install kernel-package libncurses5-dev pkg-config libssl-dev libelf-dev build-essential bison flex Could you also elaborate more on what building errors

[PATCH v7 16/17] drm/amd/display: Recalculate VCPI slots for new DSC connectors

2019-11-16 Thread mikita.lipski
From: Mikita Lipski [why] Since for DSC MST connector's PBN is claculated differently due to compression, we have to recalculate both PBN and VCPI slots for that connector. [how] The function iterates through all the active streams to find, which have DSC enabled, then recalculates PBN for it

[PATCH v7 08/17] drm/amd/display: Validate DSC caps on MST endpoints

2019-11-16 Thread mikita.lipski
From: David Francis During MST mode enumeration, if a new dc_sink is created, populate it with dsc caps as appropriate. Use drm_dp_mst_dsc_aux_for_port to get the raw caps, then parse them onto dc_sink with dc_dsc_parse_dsc_dpcd. Reviewed-by: Wenjing Liu Signed-off-by: David Francis

[PATCH v7 15/17] drm/amd/display: MST DSC compute fair share

2019-11-16 Thread mikita.lipski
From: David Francis If there is limited link bandwidth on a MST network, it must be divided fairly between the streams on that network Implement an algorithm to determine the correct DSC config for each stream The algorithm: This [ ] ( ) represents the range of

[PATCH v7 04/17] drm/dp_mst: Fill branch->num_ports

2019-11-16 Thread mikita.lipski
From: David Francis This field on drm_dp_mst_branch was never filled It is initialized to zero when the port is kzallocced. When a port is added to the list, increment num_ports, and when a port is removed from the list, decrement num_ports. v2: remember to decrement on port removal v3: don't

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

2019-11-16 Thread mikita.lipski
From: 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 Reviewed-by: Nicholas Kazlauskas

[PATCH v7 02/17] drm/dp_mst: Parse FEC capability on MST ports

2019-11-16 Thread mikita.lipski
From: David Francis As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating if FEC can be supported up to that point in the MST network. The bit is the first byte of the ENUM_PATH_RESOURCES ack reply, bottom-most bit (refer to section 2.11.9.4 of DP standard, v1.4) That value is needed for

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

2019-11-16 Thread mikita.lipski
From: Mikita Lipski Whenever a connector on an MST network is attached, detached, or undergoes a modeset, the DSC configs for each stream on that topology will be recalculated. This can change their required bandwidth, requiring a full reprogramming, as though a modeset was performed, even if

[PATCH v7 05/17] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux

2019-11-16 Thread mikita.lipski
From: David Francis Add drm_dp_mst_dsc_aux_for_port. To enable DSC, the DSC_ENABLED register might have to be written on the leaf port's DPCD, its parent's DPCD, or the MST manager's DPCD. This function finds the correct aux for the job. As part of this, add drm_dp_mst_is_virtual_dpcd. Virtual

[PATCH v7 14/17] drm/amd/display: Add PBN per slot calculation for DSC

2019-11-16 Thread mikita.lipski
From: Mikita Lipski [why] Need to calculate VCPI slots differently for DSC to take in account current link rate, link count and FEC. [how] Add helper to get pbn_div from dc_link Signed-off-by: Mikita Lipski --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 8

[PATCH v7 03/17] drm/dp_mst: Add MST support to DP DPCD R/W functions

2019-11-16 Thread mikita.lipski
From: David Francis Instead of having drm_dp_dpcd_read/write and drm_dp_mst_dpcd_read/write as entry points into the aux code, have drm_dp_dpcd_read/write handle both. This means that DRM drivers can make MST DPCD read/writes. v2: Fix spacing v3: Dump dpcd access on MST read/writes v4: Fix

[PATCH v7 10/17] drm/dp_mst: Manually overwrite PBN divider for calculating timeslots

2019-11-16 Thread mikita.lipski
From: Mikita Lipski [why] For DSC case we cannot always use topology manager's PBN divider variable. The default divider does not take FEC into account. Therefore we should allow driver to calculate its own divider based on the link rate and count its handling, as it is hw specific. [how] Pass

[PATCH v7 06/17] drm/dp_mst: Add new quirk for Synaptics MST hubs

2019-11-16 Thread mikita.lipski
From: Mikita Lipski Synaptics DP1.4 hubs (BRANCH_ID 0x90CC24) do not support virtual DPCD registers, but do support DSC. The DSC caps can be read from the physical aux, like in SST DSC. These hubs have many different DEVICE_IDs. Add a new quirk to detect this case. Reviewed-by: Wenjing Liu

[PATCH v7 13/17] drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs

2019-11-16 Thread mikita.lipski
From: Mikita Lipski [why] Whenever a connector on an MST network is changed or undergoes a modeset, the DSC configs for each stream on that topology will be recalculated. This can change their required bandwidth, requiring a full reprogramming, as though a modeset was performed, even if that

[PATCH v7 09/17] drm/amd/display: Write DSC enable to MST DPCD

2019-11-16 Thread mikita.lipski
From: David Francis Rework the dm_helpers_write_dsc_enable callback to handle the MST case. Use the cached dsc_aux field. Reviewed-by: Wenjing Liu Signed-off-by: David Francis Signed-off-by: Mikita Lipski --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 19 ++- 1 file

[PATCH v7 01/17] drm/dp_mst: Add PBN calculation for DSC modes

2019-11-16 Thread mikita.lipski
From: David Francis With DSC, bpp can be fractional in multiples of 1/16. Change drm_dp_calc_pbn_mode to reflect this, adding a new parameter bool dsc. When this parameter is true, treat the bpp parameter as having units not of bits per pixel, but 1/16 of a bit per pixel v2: Don't add separate

[PATCH v7 11/17] drm/dp_mst: Add DSC enablement helpers to DRM

2019-11-16 Thread mikita.lipski
From: Mikita Lipski Adding a helper function to be called by drivers outside of DRM to enable DSC on the MST ports. Function is called to recalculate VCPI allocation if DSC is enabled and raise the DSC flag to enable. In case of disabling DSC the flag is set to false and recalculation of VCPI

[PATCH v7 00/17] DSC MST support for DRM and AMDGPU

2019-11-16 Thread mikita.lipski
From: Mikita Lipski Patches are based of amd-staging-drm-next, the follow up set of patches will be sent for drm-tip This set of patches is a continuation of DSC enablement patches for AMDGPU. This set enables DSC on MST. It also contains implementation of both encoder and connector atomic

[PATCH v7 12/17] drm/dp_mst: Add branch bandwidth validation to MST atomic check

2019-11-16 Thread mikita.lipski
From: Mikita Lipski Adding PBN attribute to drm_dp_vcpi_allocation structure to keep track of how much bandwidth each Port requires. Adding drm_dp_mst_atomic_check_bw_limit to verify that state's bandwidth needs doesn't exceed available bandwidth. The funtion is called in drm_dp_mst_atomic_check

Re: Rebasing of amd-staging-drm-next

2019-11-16 Thread Alex Deucher
It roughly follows drm-next. If you want something more up to date, you can use my drm-next branch: https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next Alex On Sat, Nov 16, 2019 at 11:25 AM Babutzka, Martin wrote: > > Dear AMD developers, > > Are there plans to rebase the staging kennel

Potential BUG: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function(v3)

2019-11-16 Thread Iago Abal
Hi, With the help of a static bug finder (EBA - https://github.com/IagoAbal/eba) I have found a potential double lock in Linux Next tag next-20191115, file drivers/gpu/drm/amd/amdgpu/amdgpu_device.c. This bug seems to be introduced by commit e35e2b117f4 ("drm/amdgpu: add a generic fb accessing

[PATCH] drm/amd/powerplay: remove variable 'result' set but not used

2019-11-16 Thread Chen Wandun
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In function vegam_populate_smc_boot_level: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:6: warning: variable result set but not used [-Wunused-but-set-variable]

Rebasing of amd-staging-drm-next

2019-11-16 Thread Babutzka, Martin
Dear AMD developers, Are there plans to rebase the staging kennel to 5.4? Would be great because 5.3 does not builds properly for me. Many regards, Martin ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org

Re: drm core/helpers and MIT license

2019-11-16 Thread Emmanuel Vadot
Hi Daniel, On Tue, 12 Nov 2019 16:03:33 +0100 Daniel Vetter wrote: > Hi all, > > Dave and me chatted about this last week on irc. Essentially we have: > > $ git grep SPDX.*GPL -- ':(glob)drivers/gpu/drm/*c' > drivers/gpu/drm/drm_client.c:// SPDX-License-Identifier: GPL-2.0 >

Re: [PATCH] amd/amdgpu: force to trigger a no-retry-fault after a retry-fault

2019-11-16 Thread Christian König
Am 15.11.19 um 23:38 schrieb Alex Sierra: After a retry-fault happens, the fault handler will modify the UTCL2 to set PTE bits to force a no-retry-fault. This will cause the wave to enter the trap handler. NAK, you can't do this unconditionally since that behavior is not wanted for graphics.

Re: [PATCH 1/2] drm/amdgpu: disable gfxoff on original raven

2019-11-16 Thread Christian König
Am 15.11.19 um 16:28 schrieb Alex Deucher: There are still combinations of sbios and firmware that are not stable. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=204689 Signed-off-by: Alex Deucher Acked-by: Christian König for the series. --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9