[PATCH] drm/amdkfd: fix resource_size.cocci warnings

2021-09-26 Thread Yang Li
Use resource_size function on resource object instead of explicit computation. Clean up coccicheck warning: ./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:905:10-13: ERROR: Missing resource_size with res Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c |

Re: [PATCH v6, 00/15] Using component framework to support multi hardware decode

2021-09-26 Thread yunfei.d...@mediatek.com
Hi Ezequiel, Could you please help to give some feedback when you are free for iommu limitation? According to google's suggestion, it's better not to use v4l2 async also. If there are no further comments, I don't have other choice for this architecture. Thanks, Yunfei Dong On Tue, 2021-09-14 at

Re: [PATCH] drm/msm/mdp5: fix cursor-related warnings

2021-09-26 Thread Yassine Oudjana
On Sat, 2021-09-25 at 22:28 +0300, Dmitry Baryshkov wrote: > Since f35a2a99100f ("drm/encoder: make encoder control functions > optional") drm_mode_config_validate would print warnings if both cursor > plane and cursor functions are provided. Restore separate set of > drm_crtc_funcs to be used if s

Re: [PATCH v6 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-09-26 Thread Kevin Tang
Maxime Ripard 于2021年9月17日周五 下午10:58写道: > > Hi, > > On Fri, Aug 13, 2021 at 10:53:00PM +0800, Kevin Tang wrote: > > Adds DPU(Display Processor Unit) support for the Unisoc's display > > subsystem. > > It's support multi planes, scaler, rotation, PQ(Picture Quality) and more. > > > > v2: > > - Use

Re: [PATCH net-next 3/5] net: bcmasp: Add support for ASP2.0 Ethernet controller

2021-09-26 Thread Andrew Lunn
> > > +static int bcmasp_set_priv_flags(struct net_device *dev, u32 flags) > > > +{ > > > + struct bcmasp_intf *intf = netdev_priv(dev); > > > + > > > + intf->wol_keep_rx_en = flags & BCMASP_WOL_KEEP_RX_EN ? 1 : 0; > > > + > > > + return 0; > > > > Please could you explain this some more. How can

Re: [PATCH v6 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver

2021-09-26 Thread Kevin Tang
Maxime Ripard 于2021年9月17日周五 下午11:40写道: > > On Fri, Aug 13, 2021 at 10:53:02PM +0800, Kevin Tang wrote: > > Adds dsi host controller support for the Unisoc's display subsystem. > > Adds dsi phy support for the Unisoc's display subsystem. > > Only MIPI DSI Displays supported, DP/TV/HMDI will be supp

Re: [PATCH v6, 00/15] Using component framework to support multi hardware decode

2021-09-26 Thread Ezequiel Garcia
On Sun, 26 Sept 2021 at 05:27, yunfei.d...@mediatek.com wrote: > > Hi Ezequiel, > > Could you please help to give some feedback when you are free for iommu > limitation? > How about you work on the architecture I originally suggested? As the saying goes, talk is cheap, show us the code. So let's

Re: [PATCH v6 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver

2021-09-26 Thread Sam Ravnborg
Hi Kevin, > > > + reg->_0b.bits.out_sel = pll->out_sel; > > > + reg->_0b.bits.kint_l = pll->kint & 0xf; > > > + reg->_0e.bits.pll_pu_byp = 0; > > > + reg->_0e.bits.pll_pu = 0; > > > + reg->_0e.bits.stopstate_sel = 1; > > > + reg->_0f.bits.det_delay = pll->det_delay; > > > +

[PATCH] drm/msm: Fix crash on dev file close

2021-09-26 Thread Rob Clark
From: Rob Clark If the device file was opened prior to fw being available (such as from initrd before rootfs is mounted, when the initrd does not contain GPU fw), that would cause a later crash when the dev file is closed due to unitialized submitqueues list: CPU: 4 PID: 263 Comm: plymouthd T

Re: [PATCH] drm/amdkfd: fix resource_size.cocci warnings

2021-09-26 Thread Amos Jianjun Kong
On Sun, Sep 26, 2021 at 3:17 PM Yang Li wrote: > Use resource_size function on resource object > instead of explicit computation. > > Clean up coccicheck warning: > ./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:905:10-13: ERROR: Missing > resource_size with res > > Reported-by: Abaci Robot > Signed

Re: [PATCH] drm/msm: Fix crash on dev file close

2021-09-26 Thread Steev Klimaszewski
On 9/26/21 2:05 PM, Rob Clark wrote: > From: Rob Clark > > If the device file was opened prior to fw being available (such as from > initrd before rootfs is mounted, when the initrd does not contain GPU > fw), that would cause a later crash when the dev file is closed due to > unitialized submit

Re: [PATCH] drm/msm: Fix crash on dev file close

2021-09-26 Thread Dmitry Baryshkov
On Sun, 26 Sept 2021 at 22:01, Rob Clark wrote: > > From: Rob Clark > > If the device file was opened prior to fw being available (such as from > initrd before rootfs is mounted, when the initrd does not contain GPU > fw), that would cause a later crash when the dev file is closed due to > unitia

[PATCH] drm/i915: Use fixed offset for PTEs location

2021-09-26 Thread Michal Wajdeczko
We assumed that for all modern GENs the PTEs and register space are split in the GTTMMADR BAR, but while it is true, we should rather use fixed offset as it is defined in the specification. Bspec: 4409, 4457, 4604, 11181, 9027, 13246, 13321, 44980 Signed-off-by: Michal Wajdeczko Cc: CQ Tang Cc:

Re: [PATCH 1/2] drm/vc4: hdmi: Check the device state in prepare()

2021-09-26 Thread Sudip Mukherjee
On Fri, Sep 24, 2021 at 2:55 PM Maxime Ripard wrote: > > Even though we already check that the encoder->crtc pointer is there > during in startup(), which is part of the open() path in ASoC, nothing > guarantees that our encoder state won't change between the time when we > open the device and the

Re: [PATCH 2/2] drm/vc4: hdmi: Remove drm_encoder->crtc usage

2021-09-26 Thread Sudip Mukherjee
On Fri, Sep 24, 2021 at 2:55 PM Maxime Ripard wrote: > > The drm_encoder crtc pointer isn't really fit for an atomic driver, > let's rely on the connector state instead. > > Signed-off-by: Maxime Ripard Tested-by: Sudip Mukherjee -- Regards Sudip

[PATCH v13 00/35] NVIDIA Tegra power management patches for 5.16

2021-09-26 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 in this series are interdependent and should go via Tegra tree. Changelog: v13: - Fixed compile-test error reported by build bot by reverting the

[PATCH v13 01/35] opp: Change type of dev_pm_opp_attach_genpd(names) argument

2021-09-26 Thread Dmitry Osipenko
Elements of the 'names' array are not changed by the code, constify them for consistency. Signed-off-by: Dmitry Osipenko --- drivers/opp/core.c | 6 +++--- include/linux/pm_opp.h | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/cor

[PATCH v13 03/35] soc/tegra: pmc: Disable PMC state syncing

2021-09-26 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. This also allows to apply device-tree PM patches independently from the driver patches. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/pm

[PATCH v13 06/35] clk: tegra: Support runtime PM and power domain

2021-09-26 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 v13 04/35] soc/tegra: Don't print error message when OPPs not available

2021-09-26 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 v13 08/35] dt-bindings: host1x: Document Memory Client resets of Host1x, GR2D and GR3D

2021-09-26 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. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko --- .../bindings/display/tegr

[PATCH v13 05/35] dt-bindings: clock: tegra-car: Document new clock sub-nodes

2021-09-26 Thread Dmitry Osipenko
Document sub-nodes which describe 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 dedicated to t

[PATCH v13 10/35] gpu: host1x: Add host1x_channel_stop()

2021-09-26 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 v13 17/35] bus: tegra-gmi: Add runtime PM and OPP support

2021-09-26 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 v13 11/35] drm/tegra: dc: Support OPP and SoC core voltage scaling

2021-09-26 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 v13 13/35] drm/tegra: gr2d: Support generic power domain and runtime PM

2021-09-26 Thread Dmitry Osipenko
Add runtime power management and support generic power domains. 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 | 155 +++

[PATCH v13 15/35] drm/tegra: vic: Support system suspend

2021-09-26 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 v13 18/35] pwm: tegra: Add runtime PM and OPP support

2021-09-26 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 v13 09/35] gpu: host1x: Add runtime PM and OPP support

2021-09-26 Thread Dmitry Osipenko
Add runtime PM and OPP support to the Host1x driver. For the starter we will keep host1x always-on because dynamic power management require a major refactoring of the driver code since lot's of code paths are missing the RPM handling and we're going to remove some of these paths in the future. Tes

[PATCH v13 24/35] media: staging: tegra-vde: Support generic power domain

2021-09-26 Thread Dmitry Osipenko
Currently driver supports legacy power domain API, this patch adds generic power domain support. This allows us to utilize a modern GENPD API for newer device-trees. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-b

[PATCH v13 22/35] media: dt: bindings: tegra-vde: Convert to schema

2021-09-26 Thread Dmitry Osipenko
Convert NVIDIA Tegra video decoder binding to schema. Reviewed-by: Rob Herring Acked-by: Hans Verkuil Signed-off-by: Dmitry Osipenko --- .../bindings/media/nvidia,tegra-vde.txt | 64 --- .../bindings/media/nvidia,tegra-vde.yaml | 107 ++ 2 files changed, 107

[PATCH v13 20/35] mtd: rawnand: tegra: Add runtime PM and OPP support

2021-09-26 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. Acked-by: Miquel Raynal Signed-off-by: Dmit

[PATCH v13 26/35] soc/tegra: fuse: Use resource-managed helpers

2021-09-26 Thread Dmitry Osipenko
Use resource-managed helpers to make code cleaner and more correct, properly releasing all resources in case of driver probe error. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/fuse/fuse-tegra.c | 32 ++ drivers/soc/tegra/fuse/fuse-tegra20.c | 33 +++

[PATCH v13 12/35] drm/tegra: hdmi: Add OPP support

2021-09-26 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 v13 31/35] ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees

2021-09-26 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 v13 16/35] usb: chipidea: tegra: Add runtime PM and OPP support

2021-09-26 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 v13 23/35] media: dt: bindings: tegra-vde: Document OPP and power domain

2021-09-26 Thread Dmitry Osipenko
Document new OPP table and power domain properties of the video decoder hardware. Reviewed-by: Rob Herring Acked-by: Hans Verkuil Signed-off-by: Dmitry Osipenko --- .../devicetree/bindings/media/nvidia,tegra-vde.yaml | 12 1 file changed, 12 insertions(+) diff --git a/Documentat

[PATCH v13 14/35] drm/tegra: gr3d: Support generic power domain and runtime PM

2021-09-26 Thread Dmitry Osipenko
Add runtime power management and support generic power domains. 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 | 388 +++

[PATCH v13 07/35] dt-bindings: host1x: Document OPP and power domain properties

2021-09-26 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 v13 25/35] soc/tegra: fuse: Reset hardware

2021-09-26 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 v13 35/35] ARM: tegra20/30: Disable unused host1x hardware

2021-09-26 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 v13 28/35] soc/tegra: pmc: Rename 3d power domains

2021-09-26 Thread Dmitry Osipenko
Device-tree schema doesn't allow domain name to start with a number. We don't use 3d domain yet in device-trees, so rename it to the name used by Tegra TRMs: TD, TD2. Reported-by: David Heidelberg Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/pmc.c | 8 1 file changed, 4 inserti

[PATCH v13 02/35] soc/tegra: Add devm_tegra_core_dev_init_opp_table_common()

2021-09-26 Thread Dmitry Osipenko
Only couple drivers need to get the -ENODEV error code and majority of drivers need to explicitly initialize the performance state. Add new common helper which sets up OPP table for these drivers. Signed-off-by: Dmitry Osipenko --- include/soc/tegra/common.h | 24 1 file

[PATCH v13 29/35] soc/tegra: pmc: Rename core power domain

2021-09-26 Thread Dmitry Osipenko
CORE power domain uses name of device-tree node, which is inconsistent with the names of PMC domains. Set the name to "core" to make it consistent. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/tegra/pmc

[PATCH v13 27/35] soc/tegra: regulators: Prepare for suspend

2021-09-26 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 v13 30/35] soc/tegra: pmc: Enable core domain support for Tegra20 and Tegra30

2021-09-26 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 v13 19/35] mmc: sdhci-tegra: Add runtime PM and OPP support

2021-09-26 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 v13 32/35] ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees

2021-09-26 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 v13 33/35] ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x

2021-09-26 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 v13 34/35] ARM: tegra: Add Memory Client resets to Tegra30 GR2D, GR3D and Host1x

2021-09-26 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 v13 21/35] spi: tegra20-slink: Add OPP support

2021-09-26 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

linux-next: build warning after merge of the drm-misc tree

2021-09-26 Thread Stephen Rothwell
Hi all, After merging the drm-misc tree, today's linux-next build (htmldocs) produced these warnings: include/drm/drm_edid.h:530: warning: Function parameter or member 'vend_chr_1' not described in 'drm_edid_encode_panel_id' include/drm/drm_edid.h:530: warning: Excess function parameter 'vend_ch