Re: refactor the i915 GVT support

2021-08-16 Thread Zhenyu Wang
On 2021.08.17 09:08:55 +0800, Zhenyu Wang wrote: > On 2021.08.16 19:34:58 +0200, Christoph Hellwig wrote: > > On Wed, Aug 04, 2021 at 01:26:06PM +0800, Zhenyu Wang wrote: > > > On 2021.08.03 11:30:58 -0300, Jason Gunthorpe wrote: > > > > On Tue, Aug 03, 2021 at 05:43:15PM +0800, Zhenyu Wang wrote:

Re: [RFC PATCH 5/5] drm/mediatek: Add mt8195 DisplayPort driver

2021-08-16 Thread CK Hu
Hi, Markus: On Mon, 2021-08-16 at 21:25 +0200, Markus Schneider-Pargmann wrote: > This patch adds a DisplayPort driver for the Mediatek mt8195 SoC. > > It supports both functional units on the mt8195, the embedded > DisplayPort as well as the external DisplayPort units. It offers > hot-plug-detec

[PATCH v1 2/3] drm/tegra: uapi: Fix wrong mapping end address in case of disabled IOMMU

2021-08-16 Thread Dmitry Osipenko
All jobs are failing on Tegra20 because it doesn't use IOMMU and mapping function uses size of mapping that is zero instead of BO size, fix it. Fixes: d7c591bc1a3f ("drm/tegra: Implement new UAPI") Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/uapi.c | 2 +- 1 file changed, 1 insertio

[PATCH v1 3/3] gpu/host1x: fence: Make spinlock static

2021-08-16 Thread Dmitry Osipenko
The DEFINE_SPINLOCK macro creates a global spinlock symbol that is visible to the whole kernel. This is unintended in the code, fix it. Fixes: 687db2207b1b ("gpu: host1x: Add DMA fence implementation") Signed-off-by: Dmitry Osipenko --- drivers/gpu/host1x/fence.c | 2 +- 1 file changed, 1 insert

[PATCH v1 1/3] drm/tegra: dc: Remove unused variables

2021-08-16 Thread Dmitry Osipenko
Remove unused variables from tegra_crtc_update_memory_bandwidth(). Fixes: 04d5d5df9df7 ("drm/tegra: dc: Support memory bandwidth management") Reported-by: kernel test robot Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c | 3 --- drivers/gpu/drm/tegra/dc.h | 6 -- 2 files chan

[PATCH v1 0/3] Tegra DRM and Host1x driver fixes

2021-08-16 Thread Dmitry Osipenko
Fix troubles introduced by recent commits. Dmitry Osipenko (3): drm/tegra: dc: Remove unused variables drm/tegra: uapi: Fix wrong mapping end address in case of disabled IOMMU gpu/host1x: fence: Make spinlock static drivers/gpu/drm/tegra/dc.c | 3 --- drivers/gpu/drm/tegra/dc.h | 6

Re: refactor the i915 GVT support

2021-08-16 Thread Zhenyu Wang
On 2021.08.16 19:34:58 +0200, Christoph Hellwig wrote: > On Wed, Aug 04, 2021 at 01:26:06PM +0800, Zhenyu Wang wrote: > > On 2021.08.03 11:30:58 -0300, Jason Gunthorpe wrote: > > > On Tue, Aug 03, 2021 at 05:43:15PM +0800, Zhenyu Wang wrote: > > > > Acked-by: Zhenyu Wang > > > > > > > > Thanks a

[PATCH v8 24/34] media: dt: bindings: tegra-vde: Document OPP and power domain

2021-08-16 Thread Dmitry Osipenko
Document new OPP table and power domain properties of the video decoder hardware. Signed-off-by: Dmitry Osipenko --- .../devicetree/bindings/media/nvidia,tegra-vde.yaml | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/media/nvidia,tegra-vde.yam

[PATCH v8 25/34] media: staging: tegra-vde: Support generic power domain and OPP

2021-08-16 Thread Dmitry Osipenko
Currently driver supports legacy power domain API, this patch adds generic power domain and OPP support. This allows us to utilize a modern GENPD API for newer device-trees and support DVFS of the video decoder hardware. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested

[PATCH v8 34/34] ARM: tegra20/30: Disable unused host1x hardware

2021-08-16 Thread Dmitry Osipenko
MPE, VI, EPP and ISP were never used and we don't have drivers for them. Since these modules are enabled by default in a device-tree, a device is created for them, blocking voltage scaling because there is no driver to bind, and thus, state of PMC driver is never synced. Disable them. Signed-off-b

[PATCH v8 28/34] soc/tegra: regulators: Prepare for suspend

2021-08-16 Thread Dmitry Osipenko
Depending on hardware version, Tegra SoC may require a higher voltages during resume from system suspend, otherwise hardware will crash. Set SoC voltages to a nominal levels during suspend. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/regulators-tegra20.c | 99 driv

[PATCH v8 31/34] ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees

2021-08-16 Thread Dmitry Osipenko
Add OPP tables and power domains to all peripheral devices which support power management on Tegra30 SoC. Tested-by: Peter Geis # Ouya T30 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko --- .../tegra30-asus-nexus7-grouper-common.dtsi |1 + arch/arm/boot/dts/tegra30-beav

[PATCH v8 32/34] ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x

2021-08-16 Thread Dmitry Osipenko
Memory access must be blocked before hardware reset is asserted and before power is gated, otherwise a serious hardware fault is inevitable. Add reset for memory clients to the GR2D, GR3D and Host1x nodes. Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 Signed-off-by:

[PATCH v8 11/34] gpu: host1x: Add runtime PM and OPP support

2021-08-16 Thread Dmitry Osipenko
Add runtime PM and OPP support to the Host1x driver. It's required for enabling system-wide DVFS and supporting dynamic power management using a generic power domain. For the starter we will keep host1x always-on because dynamic power management require a major refactoring of the driver code since

[PATCH v8 26/34] soc/tegra: fuse: Add OPP support

2021-08-16 Thread Dmitry Osipenko
Initialize and sync FUSE OPP to set up SoC core voltage vote needed by FUSE hardware. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/fuse/fuse-tegra.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c

[PATCH v8 27/34] soc/tegra: fuse: Reset hardware

2021-08-16 Thread Dmitry Osipenko
The FUSE controller is enabled at a boot time. Reset it in order to put hardware and clock into clean and disabled state. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/fuse/fuse-tegra.c | 25 + drivers/soc/tegra/fuse/fuse.h | 1 + 2 files changed, 26 inserti

[PATCH v8 30/34] ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees

2021-08-16 Thread Dmitry Osipenko
Add OPP tables and power domains to all peripheral devices which support power management on Tegra20 SoC. Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 Signed-off-by: Dmitry Osipenko --- .../boot/dts/tegra20-acer-a500-picasso.dts| 1 + arch/arm/boot/dts/tegra

[PATCH v8 29/34] soc/tegra: pmc: Enable core domain support for Tegra20 and Tegra30

2021-08-16 Thread Dmitry Osipenko
All device drivers got runtime PM and OPP support. Flip the core domain support status for Tegra20 and Tegra30 SoCs. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.

[PATCH v8 33/34] ARM: tegra: Add Memory Client resets to Tegra30 GR2D, GR3D and Host1x

2021-08-16 Thread Dmitry Osipenko
Memory access must be blocked before hardware reset is asserted and before power is gated, otherwise a serious hardware fault is inevitable. Add reset for memory clients to the GR2D, GR3D and Host1x nodes. Tested-by: Peter Geis # Ouya T30 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry O

[PATCH v8 19/34] pwm: tegra: Add runtime PM and OPP support

2021-08-16 Thread Dmitry Osipenko
The PWM on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now PWM must be resumed using runtime PM API in order to initialize the PWM power state. The PWM clock rate must be changed using OPP API that will reconfigure the power domain performance

[PATCH v8 13/34] drm/tegra: hdmi: Add OPP support

2021-08-16 Thread Dmitry Osipenko
The HDMI on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now HDMI driver must use OPP API for driving the controller's clock rate because OPP API takes care of reconfiguring the domain's performance state based on HDMI clock rate. Add OPP suppo

[PATCH v8 23/34] media: dt: bindings: tegra-vde: Convert to schema

2021-08-16 Thread Dmitry Osipenko
Convert NVIDIA Tegra video decoder binding to schema. Signed-off-by: Dmitry Osipenko --- .../bindings/media/nvidia,tegra-vde.txt | 64 --- .../bindings/media/nvidia,tegra-vde.yaml | 107 ++ 2 files changed, 107 insertions(+), 64 deletions(-) delete mode 10064

[PATCH v8 15/34] drm/tegra: gr3d: Support power management

2021-08-16 Thread Dmitry Osipenko
Add power management to the GR3D driver. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/gr3d.c | 393 ++

[PATCH v8 17/34] usb: chipidea: tegra: Add runtime PM and OPP support

2021-08-16 Thread Dmitry Osipenko
The Tegra USB controller belongs to the core power domain and we're going to enable GENPD support for the core domain. Now USB controller must be resumed using runtime PM API in order to initialize the USB power state. We already support runtime PM for the CI device, but CI's PM is separated from t

[PATCH v8 12/34] drm/tegra: dc: Support OPP and SoC core voltage scaling

2021-08-16 Thread Dmitry Osipenko
Add OPP and SoC core voltage scaling support to the display controller driver. This is required for enabling system-wide DVFS on pre-Tegra186 SoCs. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar #

[PATCH v8 18/34] bus: tegra-gmi: Add runtime PM and OPP support

2021-08-16 Thread Dmitry Osipenko
The GMI bus on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now GMI must be resumed using runtime PM API in order to initialize the GMI power state. Add runtime PM and OPP support to the GMI driver. Signed-off-by: Dmitry Osipenko --- drivers

[PATCH v8 20/34] mmc: sdhci-tegra: Add runtime PM and OPP support

2021-08-16 Thread Dmitry Osipenko
The SDHCI on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now SDHCI must be resumed using runtime PM API in order to initialize the SDHCI power state. The SDHCI clock rate must be changed using OPP API that will reconfigure the power domain per

[PATCH v8 22/34] spi: tegra20-slink: Add OPP support

2021-08-16 Thread Dmitry Osipenko
The SPI on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now SPI driver must use OPP API for driving the controller's clock rate because OPP API takes care of reconfiguring the domain's performance state in accordance to the rate. Add OPP suppor

[PATCH v8 21/34] mtd: rawnand: tegra: Add runtime PM and OPP support

2021-08-16 Thread Dmitry Osipenko
The NAND on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now NAND must be resumed using runtime PM API in order to initialize the NAND power state. Add runtime PM and OPP support to the NAND driver. Signed-off-by: Dmitry Osipenko --- drivers

[PATCH v8 06/34] dt-bindings: clock: tegra-car: Document new tegra-clocks sub-node

2021-08-16 Thread Dmitry Osipenko
Document tegra-clocks sub-node which describes Tegra SoC clocks that require a higher voltage of the core power domain in order to operate properly on a higher clock rates. Each node contains a phandle to OPP table and power domain. The root PLLs and system clocks don't have any specific device d

[PATCH v8 16/34] drm/tegra: vic: Support system suspend

2021-08-16 Thread Dmitry Osipenko
Hardware must be stopped before system is suspended. Add suspend-resume callbacks. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/vic.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index c02010ff2b7f..359dd77f8b85 100

[PATCH v8 14/34] drm/tegra: gr2d: Support power management

2021-08-16 Thread Dmitry Osipenko
Add power management to the GR2D driver. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/gr2d.c | 154 ++

[PATCH v8 07/34] clk: tegra: Support runtime PM and power domain

2021-08-16 Thread Dmitry Osipenko
The Clock-and-Reset controller resides in a core power domain on NVIDIA Tegra SoCs. In order to support voltage scaling of the core power domain, we hook up DVFS-capable clocks to the core GENPD for managing of the GENPD's performance state based on the clock changes. Some clocks don't have any s

[PATCH v8 10/34] gpu: host1x: Add host1x_channel_stop()

2021-08-16 Thread Dmitry Osipenko
Add host1x_channel_stop() which waits till channel becomes idle and then stops the channel hardware. This is needed for supporting suspend/resume by host1x drivers since the hardware state is lost after power-gating, thus the channel needs to be stopped before client enters into suspend. Tested-by

[PATCH v8 08/34] dt-bindings: host1x: Document OPP and power domain properties

2021-08-16 Thread Dmitry Osipenko
Document new DVFS OPP table and power domain properties of the Host1x bus and devices sitting on the bus. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko --- .../display/tegra/nvidia,tegra20-host1x.txt | 49 +++ 1 file changed, 49 insertions(+) diff --git a/Documenta

[PATCH v8 09/34] dt-bindings: host1x: Document Memory Client resets of Host1x, GR2D and GR3D

2021-08-16 Thread Dmitry Osipenko
Memory Client should be blocked before hardware reset is asserted in order to prevent memory corruption and hanging of memory controller. Document Memory Client resets of Host1x, GR2D and GR3D hardware units. Signed-off-by: Dmitry Osipenko --- .../bindings/display/tegra/nvidia,tegra20-host1x.tx

[PATCH v8 03/34] soc/tegra: Don't print error message when OPPs not available

2021-08-16 Thread Dmitry Osipenko
Previously we assumed that devm_tegra_core_dev_init_opp_table() will be used only by drivers that will always have device with OPP table, but this is not true anymore. For example now Tegra30 will have OPP table for PWM, but Tegra20 not and both use the same driver. Hence let's not print the error

[PATCH v8 02/34] soc/tegra: pmc: Disable PMC state syncing

2021-08-16 Thread Dmitry Osipenko
Disable PMC state syncing in order to ensure that we won't break older kernels once device-trees will be updated with the addition of the power domains. Previously this was unnecessary because the plan was to make clk device that will attach to the domain for each clock, but the plan changed and no

[PATCH v8 05/34] soc/tegra: Use dev_pm_opp_sync()

2021-08-16 Thread Dmitry Osipenko
Use new generic dev_pm_opp_sync() helper which initializes voltage vote based on clock rate. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/common.c | 30 +- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/soc/tegra/common.c b/drivers/soc/t

[PATCH v8 04/34] soc/tegra: Add devm_tegra_core_dev_init_opp_table_simple()

2021-08-16 Thread Dmitry Osipenko
Only couple drivers need to get the -ENODEV error code and explicitly initialize the performance state. Add new helper that allows to avoid the extra boilerplate code in majority of drivers. Signed-off-by: Dmitry Osipenko --- include/soc/tegra/common.h | 13 + 1 file changed, 13 inse

[PATCH v8 01/34] opp: Add dev_pm_opp_sync() helper

2021-08-16 Thread Dmitry Osipenko
Add dev_pm_opp_sync() helper which syncs OPP table with hardware state and vice versa. Signed-off-by: Dmitry Osipenko --- drivers/opp/core.c | 42 +++--- include/linux/pm_opp.h | 6 ++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH v8 00/34] NVIDIA Tegra power management patches for 5.16

2021-08-16 Thread Dmitry Osipenko
This series adds runtime PM support to Tegra drivers and enables core voltage scaling for Tegra20/30 SoCs, resolving overheating troubles. All patches should go via Tegra tree because they are interdependent, please review and ack. If you haven't seen this series before, that's because I wanted t

Re: [PATCH v6 05/13] drm/amdkfd: generic type as sys mem on migration to ram

2021-08-16 Thread Felix Kuehling
Am 2021-08-16 um 6:06 p.m. schrieb Zeng, Oak: > Regards, > Oak > > > > On 2021-08-16, 3:53 PM, "amd-gfx on behalf of Sierra Guiza, Alejandro > (Alex)" alex.sie...@amd.com> wrote: > > > On 8/15/2021 10:38 AM, Christoph Hellwig wrote: > > On Fri, Aug 13, 2021 at 01:31:42AM -0500, Alex S

Re: [GIT PULL] mediatek drm next for 5.15

2021-08-16 Thread Chun-Kuang Hu
Hi, Dave: Dave Airlie 於 2021年8月16日 週一 下午2:07寫道: > > CC [M] drivers/gpu/drm/mediatek/mtk_disp_aal.o > /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/mediatek/mtk_drm_crtc.c:257:13: > warning: ‘mtk_drm_cmdq_pkt_destroy’ defined but not used > [-Wunused-function] > 257 | static void mtk_drm

[GIT PULL v2] mediatek drm next for 5.15

2021-08-16 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. MT8133 AAL support, adjust rdma fifo threshold formula. 2. Implement mmap as GEM object function. 3. Add support for MT8167. 4. Test component initialization earlier in the function mtk_drm_crtc_create. 5. CMDQ refinement. Regards, Chun-Kuang. The following

Re: [PATCH v2 0/5] dma-fence: Deadline awareness

2021-08-16 Thread Rob Clark
dma_fence_array looks simple enough, just propagate the deadline to all children. I guess dma_fence_chain is similar (ie. fence is signalled when all children are signalled), the difference being simply that children are added dynamically? BR, -R On Mon, Aug 16, 2021 at 3:17 AM Christian König

Re: [PATCH v2 4/5] drm/scheduler: Add fence deadline support

2021-08-16 Thread Rob Clark
On Mon, Aug 16, 2021 at 8:38 AM Daniel Vetter wrote: > > On Mon, Aug 16, 2021 at 12:14:35PM +0200, Christian König wrote: > > Am 07.08.21 um 20:37 schrieb Rob Clark: > > > From: Rob Clark > > > > > > As the finished fence is the one that is exposed to userspace, and > > > therefore the one that o

Re: [PATCH v6 05/13] drm/amdkfd: generic type as sys mem on migration to ram

2021-08-16 Thread Zeng, Oak
Regards, Oak On 2021-08-16, 3:53 PM, "amd-gfx on behalf of Sierra Guiza, Alejandro (Alex)" wrote: On 8/15/2021 10:38 AM, Christoph Hellwig wrote: > On Fri, Aug 13, 2021 at 01:31:42AM -0500, Alex Sierra wrote: >> migrate.vma = vma; >> migrate.start = sta

Re: [RFC PATCH 5/5] drm/mediatek: Add mt8195 DisplayPort driver

2021-08-16 Thread Sam Ravnborg
Hi Markus, A few general things in the following. This is what I look for first in a bridge driver - and I had no time today to review the driver in full. Please address these, then cc: me on next revision where I hopefully have more time. Sam > +static int mtk_dp_bridge_attach(struct dr

Re: [PATCH v6 05/13] drm/amdkfd: generic type as sys mem on migration to ram

2021-08-16 Thread Sierra Guiza, Alejandro (Alex)
On 8/15/2021 10:38 AM, Christoph Hellwig wrote: On Fri, Aug 13, 2021 at 01:31:42AM -0500, Alex Sierra wrote: migrate.vma = vma; migrate.start = start; migrate.end = end; - migrate.flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE; migrate.pgmap_owner = SVM_ADEV_PG

[RFC PATCH 4/5] video/hdmi: Add audio_infoframe packing for DP

2021-08-16 Thread Markus Schneider-Pargmann
Similar to HDMI, DP uses audio infoframes as well which are structured very similar to the HDMI ones. This patch adds a helper function to pack the HDMI audio infoframe for DP, called hdmi_audio_infoframe_pack_for_dp(). hdmi_audio_infoframe_pack_only() is split into two parts. One of them packs th

[RFC PATCH 2/5] drm/mediatek: dpi: Add dpintf support

2021-08-16 Thread Markus Schneider-Pargmann
dpintf is the displayport interface hardware unit. This unit is similar to dpi and can reuse most of the code. This patch adds support for mt8195-dpintf to this dpi driver. Main differences are: - Some features/functional components are not available for dpintf which are now excluded from code

[RFC PATCH 1/5] dt-bindings: mediatek,dpi: Add mt8195 dpintf

2021-08-16 Thread Markus Schneider-Pargmann
DP_INTF is similar to the actual dpi. They differ in some points regarding registers and what needs to be set but the function blocks itself are similar in design. Signed-off-by: Markus Schneider-Pargmann --- .../display/mediatek/mediatek,dpi.yaml| 48 --- 1 file changed,

[RFC PATCH 3/5] drm/edid: Add cea_sad helpers for freq/length

2021-08-16 Thread Markus Schneider-Pargmann
This patch adds two helper functions that extract the frequency and word length from a struct cea_sad. For these helper functions new defines are added that help translate the 'freq' and 'byte2' fields into real numbers. Signed-off-by: Markus Schneider-Pargmann --- drivers/gpu/drm/drm_edid.c |

[RFC PATCH 0/5] drm/mediatek: Add mt8195 DisplayPort driver

2021-08-16 Thread Markus Schneider-Pargmann
Hi everyone, this series is built around the DisplayPort driver. The dpi/dpintf driver and the added helper functions are required for the DisplayPort. Note that this is an RFC. I would like to have your opinion on the driver and what needs to change. The driver itself has its rough edges that I

Re: [PATCH v3] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-16 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Aug 16, 2021 at 11:07 AM Michel Dänzer wrote: > > On 2021-08-16 2:06 p.m., Christian König wrote: > > Am 16.08.21 um 13:33 schrieb Lazar, Lijo: > >> On 8/16/2021 4:05 PM, Michel Dänzer wrote: > >>> From: Michel Dänzer > >>> > >>> schedule_delayed_work does not pus

Re: [PATCH v6 08/13] mm: call pgmap->ops->page_free for DEVICE_GENERIC pages

2021-08-16 Thread Felix Kuehling
Am 2021-08-15 um 11:40 a.m. schrieb Christoph Hellwig: > On Fri, Aug 13, 2021 at 01:31:45AM -0500, Alex Sierra wrote: >> Add MEMORY_DEVICE_GENERIC case to free_zone_device_page callback. >> Device generic type memory case is now able to free its pages properly. > How is this going to work for the

Re: [PATCH v6 02/13] mm: remove extra ZONE_DEVICE struct page refcount

2021-08-16 Thread Felix Kuehling
Am 2021-08-15 um 4:40 p.m. schrieb John Hubbard: > On 8/15/21 8:37 AM, Christoph Hellwig wrote: >>> diff --git a/include/linux/mm.h b/include/linux/mm.h >>> index 8ae31622deef..d48a1f0889d1 100644 >>> --- a/include/linux/mm.h >>> +++ b/include/linux/mm.h >>> @@ -1218,7 +1218,7 @@ __maybe_unused str

Re: [PATCH v6 04/13] drm/amdkfd: add SPM support for SVM

2021-08-16 Thread Felix Kuehling
Am 2021-08-15 um 5:10 a.m. schrieb Christoph Hellwig: >> @@ -880,17 +881,22 @@ int svm_migrate_init(struct amdgpu_device *adev) >> * should remove reserved size >> */ >> size = ALIGN(adev->gmc.real_vram_size, 2ULL << 20); >> -res = devm_request_free_mem_region(adev->dev, &iomem

Re: [PATCH] drm/radeon: Add break to switch statement in radeonfb_create_pinned_object()

2021-08-16 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Aug 16, 2021 at 3:23 AM Christian König wrote: > > Am 15.08.21 um 21:29 schrieb Nathan Chancellor: > > Clang + -Wimplicit-fallthrough warns: > > > > drivers/gpu/drm/radeon/radeon_fb.c:170:2: warning: unannotated > > fall-through between switch labels [-Wimplicit-fa

Re: [PATCH v1 2/2] dt-bindings: Add SC7280 compatible string

2021-08-16 Thread Matthias Kaehlcke
On Thu, Aug 12, 2021 at 05:38:02AM +0530, Sankeerth Billakanti wrote: > The Qualcomm SC7280 platform supports an eDP controller, add > compatible string for it to msm/binding. > > Signed-off-by: Sankeerth Billakanti > --- > Documentation/devicetree/bindings/display/msm/dp-controller.yaml | 3 +++

Re: [PATCH v1 1/2] drm/msm/dp: Add support for SC7280 eDP

2021-08-16 Thread Matthias Kaehlcke
On Thu, Aug 12, 2021 at 05:38:01AM +0530, Sankeerth Billakanti wrote: > The eDP controller on SC7280 is similar to the eDP/DP controllers > supported by the current driver implementation. > > SC7280 supports one EDP and one DP controller which can operate > concurrently. > > The following are som

[PATCH v2] drm/i915: Ditch the i915_gem_ww_ctx loop member

2021-08-16 Thread Thomas Hellström
It's only used by the for_i915_gem_ww() macro and we can use the (typically) on-stack _err variable in its place. v2: - Don't clear the _err variable when entering the loop (Matthew Auld, Maarten Lankhorst). - Use parentheses around the _err macro argument. - Fix up comment. Cc: Matthew Auld S

Re: [PATCH] drm/i915/dp: Use max params for older panels

2021-08-16 Thread Ville Syrjälä
On Wed, Aug 04, 2021 at 11:24:02PM +0800, Kai-Heng Feng wrote: > Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use > fast+narrow link on eDP again and fall back to the old max strategy on > failure"), the screen starts to have wobbly effect. > > Commit a5c936add6a2 ("drm/i915/dp

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-16 Thread Daniele Ceraolo Spurio
On 8/16/2021 8:15 AM, Daniel Vetter wrote: On Fri, Aug 13, 2021 at 08:18:02AM -0700, Daniele Ceraolo Spurio wrote: On 8/13/2021 7:37 AM, Daniel Vetter wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to

Re: [PATCH v1] drm/bridge: anx7625: Don't store unread return value

2021-08-16 Thread Sam Ravnborg
Hi Robert, On Mon, Aug 16, 2021 at 01:14:51PM +0200, Robert Foss wrote: > The return value of sp_tx_rst_aux() is stored, but never read. > This happens in the context EDID communication already failing, > which means that this additional failure doesn't necessarily > convey any additional inforama

Re: [PATCH 5/9] drm/i915/guc: Flush the work queue for GuC generated G2H

2021-08-16 Thread Daniel Vetter
On Fri, Aug 13, 2021 at 07:02:55PM +, Matthew Brost wrote: > On Fri, Aug 13, 2021 at 05:11:59PM +0200, Daniel Vetter wrote: > > On Thu, Aug 12, 2021 at 10:38:18PM +, Matthew Brost wrote: > > > On Thu, Aug 12, 2021 at 09:47:23PM +0200, Daniel Vetter wrote: > > > > On Thu, Aug 12, 2021 at 03:

Re: [PATCH v2 4/5] drm/scheduler: Add fence deadline support

2021-08-16 Thread Daniel Vetter
On Mon, Aug 16, 2021 at 12:14:35PM +0200, Christian König wrote: > Am 07.08.21 um 20:37 schrieb Rob Clark: > > From: Rob Clark > > > > As the finished fence is the one that is exposed to userspace, and > > therefore the one that other operations, like atomic update, would > > block on, we need to

Re: [PATCH v2 3/5] drm/atomic-helper: Set fence deadline for vblank

2021-08-16 Thread Daniel Vetter
On Sat, Aug 07, 2021 at 11:37:57AM -0700, Rob Clark wrote: > From: Rob Clark > > For an atomic commit updating a single CRTC (ie. a pageflip) calculate > the next vblank time, and inform the fence(s) of that deadline. > > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/drm_atomic_helper.c | 3

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-16 Thread Daniel Vetter
On Fri, Aug 13, 2021 at 08:24:44AM -0700, Daniele Ceraolo Spurio wrote: > > > On 8/13/2021 7:42 AM, Daniel Vetter wrote: > > On Fri, Aug 13, 2021 at 04:37:53PM +0200, Daniel Vetter wrote: > > > On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: > > > > This api allow user mod

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-16 Thread Daniel Vetter
On Fri, Aug 13, 2021 at 08:18:02AM -0700, Daniele Ceraolo Spurio wrote: > > > On 8/13/2021 7:37 AM, Daniel Vetter wrote: > > On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: > > > This api allow user mode to create protected buffers and to mark > > > contexts as making use

Re: [PATCH v3] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-16 Thread Michel Dänzer
On 2021-08-16 2:06 p.m., Christian König wrote: > Am 16.08.21 um 13:33 schrieb Lazar, Lijo: >> On 8/16/2021 4:05 PM, Michel Dänzer wrote: >>> From: Michel Dänzer >>> >>> schedule_delayed_work does not push back the work if it was already >>> scheduled before, so amdgpu_device_delay_enable_gfx_off

Re: [Linaro-mm-sig] IIO, dmabuf, io_uring

2021-08-16 Thread Daniel Vetter
On Sat, Aug 14, 2021 at 09:30:19AM +0200, Christoph Hellwig wrote: > On Fri, Aug 13, 2021 at 01:41:26PM +0200, Paul Cercueil wrote: > > Hi, > > > > A few months ago we (ADI) tried to upstream the interface we use with our > > high-speed ADCs and DACs. It is a system with custom ioctls on the iio

Re: [PATCH 1/1] drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails

2021-08-16 Thread Jason Ekstrand
Makes sense Reviewed-by: Jason Ekstrand On Mon, Aug 16, 2021 at 2:40 AM Christian König wrote: > > Am 10.08.21 um 21:59 schrieb Dan Moulding: > > In 69de4421bb4c ("drm/ttm: Initialize debugfs from > > ttm_global_init()"), ttm_global_init was changed so that if creation > > of the debugfs global

Re: [PATCH v2] drm: avoid races with modesetting rights

2021-08-16 Thread Daniel Vetter
On Mon, Aug 16, 2021 at 12:31 PM Desmond Cheong Zhi Xi wrote: > > On 16/8/21 5:04 pm, Daniel Vetter wrote: > > On Mon, Aug 16, 2021 at 10:53 AM Desmond Cheong Zhi Xi > > wrote: > >> On 16/8/21 2:47 am, kernel test robot wrote: > >>> Hi Desmond, > >>> > >>> Thank you for the patch! Yet something t

[PATCH 14/22] drm/i915: Allocate error capture in atomic context

2021-08-16 Thread Matthew Brost
Error captures can now be done in a work queue processing G2H messages. These messages need to be completely done being processed in the reset path, to avoid races in the missing G2H cleanup, which create a dependency on memory allocations and dma fences (i915_requests). Requests depend on resets,

[PATCH 04/22] drm/i915/guc: Don't drop ce->guc_active.lock when unwinding context

2021-08-16 Thread Matthew Brost
Don't drop ce->guc_active.lock when unwinding a context after reset. At one point we had to drop this because of a lock inversion but that is no longer the case. It is much safer to hold the lock so let's do that. Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Sig

[PATCH 13/22] drm/i915/guc: Reset LRC descriptor if register returns -ENODEV

2021-08-16 Thread Matthew Brost
Reset LRC descriptor if a context register returns -ENODEV as this means we are mid-reset. Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 -- 1 file changed, 4 insertions(

[PATCH 15/22] drm/i915/guc: Flush G2H work queue during reset

2021-08-16 Thread Matthew Brost
It isn't safe to scrub for missing G2H or continue with the reset until all G2H processing is complete. Flush the G2H work queue during reset to ensure it is done running. Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Signed-off-by: Matthew Brost --- .../gpu/dr

[PATCH 18/22] drm/i915/guc: Rework and simplify locking

2021-08-16 Thread Matthew Brost
Rework and simplify the locking with GuC subission. Drop sched_state_no_lock and move all fields under the guc_state.sched_state and protect all these fields with guc_state.lock . This requires changing the locking hierarchy from guc_state.lock -> sched_engine.lock to sched_engine.lock -> guc_state

[PATCH 21/22] drm/i915/guc: Move GuC priority fields in context under guc_active

2021-08-16 Thread Matthew Brost
Move GuC management fields in context under guc_active struct as this is where the lock that protects theses fields lives. Also only set guc_prio field once during context init. Fixes: ee242ca704d3 ("drm/i915/guc: Implement GuC priority management") Signed-off-by: Matthew Brost Cc: --- drivers/

[PATCH 19/22] drm/i915/guc: Proper xarray usage for contexts_lookup

2021-08-16 Thread Matthew Brost
Lock the xarray and take ref to the context if needed. v2: (Checkpatch) - Add new line after declaration Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 84 --- 1 file changed, 73 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i9

[PATCH 05/22] drm/i915/guc: Workaround reset G2H is received after schedule done G2H

2021-08-16 Thread Matthew Brost
If the context is reset as a result of the request cancelation the context reset G2H is received after schedule disable done G2H which is likely the wrong order. The schedule disable done G2H release the waiting request cancelation code which resubmits the context. This races with the context reset

[PATCH 17/22] drm/i915/guc: Move guc_blocked fence to struct guc_state

2021-08-16 Thread Matthew Brost
Move guc_blocked fence to struct guc_state as the lock which protects the fence lives there. s/ce->guc_blocked/ce->guc_state.blocked_fence/g Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c| 5 +++-- drivers/gpu/drm/i915/gt/intel_context_types.h | 5 ++--- ...

[PATCH 22/22] drm/i915/guc: Add GuC kernel doc

2021-08-16 Thread Matthew Brost
Add GuC kernel doc for all structures added thus far for GuC submission and update the main GuC submission section with the new interface details. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.h | 42 +--- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 19 ++

[PATCH 20/22] drm/i915/guc: Drop pin count check trick between sched_disable and re-pin

2021-08-16 Thread Matthew Brost
Drop pin count check trick between a sched_disable and re-pin, now rely on the lock and counter of the number of committed requests to determine if scheduling should be disabled on the context. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + .../gpu/drm/i91

[PATCH 10/22] drm/i915/selftests: Add initial GuC selftest for scrubbing lost G2H

2021-08-16 Thread Matthew Brost
While debugging an issue with full GT resets I went down a rabbit hole thinking the scrubbing of lost G2H wasn't working correctly. This proved to be incorrect as this was working just fine but this chase inspired me to write a selftest to prove that this works. This simple selftest injects errors

[PATCH 07/22] drm/i915/selftests: Add a cancel request selftest that triggers a reset

2021-08-16 Thread Matthew Brost
Add a cancel request selftest that results in an engine reset to cancel the request as it is non-preemptable. Also insert a NOP request after the cancelled request and confirm that it completely successfully. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/selftests/i915_request.c | 100 ++

[PATCH 08/22] drm/i915/guc: Don't enable scheduling on a banned context, guc_id invalid, not registered

2021-08-16 Thread Matthew Brost
When unblocking a context, do not enable scheduling if the context is banned, guc_id invalid, or not registered. Fixes: 62eaf0ae217d ("drm/i915/guc: Support request cancellation") Signed-off-by: Matthew Brost Cc: --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 +++ 1 file changed, 3 i

[PATCH 16/22] drm/i915/guc: Release submit fence from an IRQ

2021-08-16 Thread Matthew Brost
A subsequent patch will flip the locking hierarchy from ce->guc_state.lock -> sched_engine->lock to sched_engine->lock -> ce->guc_state.lock. As such we need to release the submit fence for a request from an IRQ to break a lock inversion - i.e. the fence must be release went holding ce->guc_state.l

[PATCH 12/22] drm/i915/guc: Don't touch guc_state.sched_state without a lock

2021-08-16 Thread Matthew Brost
Before we did some clever tricks to not use the a lock when touching guc_state.sched_state in certain cases. Don't do that, enforce the use of the lock. Part of this is removing a dead code path from guc_lrc_desc_pin where a context could be deregistered when the aforementioned function was called

[PATCH 09/22] drm/i915/selftests: Fix memory corruption in live_lrc_isolation

2021-08-16 Thread Matthew Brost
GuC submission has exposed an existing memory corruption in live_lrc_isolation. We believe that some writes to the watchdog offsets in the LRC (0x178 & 0x17c) can result in trashing of portions of the address space. With GuC submission there are additional objects which can move the context redzone

[PATCH 06/22] drm/i915/execlists: Do not propagate errors to dependent fences

2021-08-16 Thread Matthew Brost
Progagating errors to dependent fences is wrong, don't do it. Selftest in following patch exposes this bug. Fixes: 8e9f84cf5cac ("drm/i915/gt: Propagate change in error status to children on unhold") Signed-off-by: Matthew Brost Cc: --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 4

[PATCH 11/22] drm/i915/guc: Take context ref when cancelling request

2021-08-16 Thread Matthew Brost
A context can get destroyed after cancelling a request so take a reference to context when cancelling a request. Fixes: 62eaf0ae217d ("drm/i915/guc: Support request cancellation") Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 5 - 1 file changed, 4 inse

[PATCH 03/22] drm/i915/guc: Unwind context requests in reverse order

2021-08-16 Thread Matthew Brost
When unwinding requests on a reset context, if other requests in the context are in the priority list the requests could be resubmitted out of seqno order. Traverse the list of active requests in reverse and append to the head of the priority list to fix this. Fixes: eb5e7da736f3 ("drm/i915/guc: R

[PATCH 02/22] drm/i915/guc: Fix outstanding G2H accounting

2021-08-16 Thread Matthew Brost
A small race that could result in incorrect accounting of the number of outstanding G2H. Basically prior to this patch we did not increment the number of outstanding G2H if we encoutered a GT reset while sending a H2G. This was incorrect as the context state had already been updated to anticipate a

[PATCH 00/22] Clean up GuC CI failures, simplify locking, and kernel DOC

2021-08-16 Thread Matthew Brost
Daniel Vetter pointed out that locking in the GuC submission code was overly complicated, let's clean this up a bit before introducing more features in the GuC submission backend. Also fix some CI failures, port fixes from our internal tree, and add a few more selftests for coverage. Lastly, add

[PATCH 01/22] drm/i915/guc: Fix blocked context accounting

2021-08-16 Thread Matthew Brost
Prior to this patch the blocked context counter was cleared on init_sched_state (used during registering a context & resets) which is incorrect. This state needs to be persistent or the counter can read the incorrect value resulting in scheduling never getting enabled again. Fixes: 62eaf0ae217d ("

Re: [PATCH] drm/i915: Ditch the i915_gem_ww_ctx loop member

2021-08-16 Thread Thomas Hellström
On 8/16/21 3:34 PM, Maarten Lankhorst wrote: Op 16-08-2021 om 15:30 schreef Thomas Hellström: On 8/16/21 3:25 PM, Matthew Auld wrote: On Mon, 16 Aug 2021 at 09:49, Thomas Hellström wrote: It's only used by the for_i915_gem_ww() macro and we can use the (typically) on-stack _err variable in

Re: [RFC PATCH v3 1/6] drm/doc: Color Management and HDR10 RFC

2021-08-16 Thread sebastian
On 2021-08-16 14:40, Harry Wentland wrote: On 2021-08-16 7:10 a.m., Brian Starkey wrote: On Fri, Aug 13, 2021 at 10:42:12AM +0530, Sharma, Shashank wrote: Hello Brian, (+Uma in cc) Thanks for your comments, Let me try to fill-in for Harry to keep the design discussion going. Please find my c

  1   2   >