[Bug 210787] New: amdgpu fan NA on multi gpu R9 nano
https://bugzilla.kernel.org/show_bug.cgi?id=210787 Bug ID: 210787 Summary: amdgpu fan NA on multi gpu R9 nano Product: Drivers Version: 2.5 Kernel Version: 5.9.12-5.10.1 Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-...@kernel-bugs.osdl.org Reporter: janpieter.sol...@edpnet.be Regression: No Created attachment 294229 --> https://bugzilla.kernel.org/attachment.cgi?id=294229&action=edit dmesg with manual GPU loading when running sensors, the 1st GPU fan (this GPU has the display attached) is unavailable: > amdgpu-pci-0700 > Adapter: PCI adapter > vddgfx: 900.00 mV > fan1: N/A (min = 1000 RPM, max = 4200 RPM) > edge: +23.0°C (crit = +89.0°C, hyst = -273.1°C) > power1: 10.23 W (cap = 150.00 W) > > amdgpu-pci-4300 > Adapter: PCI adapter > vddgfx: 850.00 mV > fan1:1544 RPM (min = 1000 RPM, max = 4200 RPM) > edge: +26.0°C (crit = +89.0°C, hyst = -273.1°C) > power1: 10.08 W (cap = 150.00 W) blacklisting amdgpu did not help, but when breaking the config (specifying an invalid parameter in /etc/modprobe.d/amdgpu.conf), and loading it manually with correct parameters, it works. We're talking about a ryzen 1950x setup here with 2x r9 nano GPUs -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210787] amdgpu fan NA on multi gpu R9 nano
https://bugzilla.kernel.org/show_bug.cgi?id=210787 --- Comment #1 from Janpieter Sollie (janpieter.sol...@edpnet.be) --- Created attachment 294231 --> https://bugzilla.kernel.org/attachment.cgi?id=294231&action=edit dmesg with amdgpu loaded automatically -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 07/48] dt-bindings: arm: tegra: Add binding for core power domain
On Thu, Dec 17, 2020 at 09:05:57PM +0300, Dmitry Osipenko wrote: > All NVIDIA Tegra SoCs have a core power domain where majority of hardware > blocks reside. Add binding for the core power domain. > > Signed-off-by: Dmitry Osipenko > --- > .../arm/tegra/nvidia,tegra20-core-domain.yaml | 48 +++ > 1 file changed, 48 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-core-domain.yaml > > diff --git > a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-core-domain.yaml > b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-core-domain.yaml > new file mode 100644 > index ..f3d8fd2d8371 > --- /dev/null > +++ > b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-core-domain.yaml > @@ -0,0 +1,48 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/tegra/nvidia,tegra20-core-domain.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVIDIA Tegra Core Power Domain > + > +maintainers: > + - Dmitry Osipenko > + - Jon Hunter > + - Thierry Reding > + > +properties: > + compatible: > +enum: > + - nvidia,tegra20-core-domain > + - nvidia,tegra30-core-domain The file should be in bindings/power. Include also the power-domain.yaml schema. > + > + operating-points-v2: > +description: > + Should contain level, voltages and opp-supported-hw property. > + The supported-hw is a bitfield indicating SoC speedo or process > + ID mask. > + > + "#power-domain-cells": > +const: 0 > + > + power-supply: > +description: > + Phandle to voltage regulator connected to the SoC Core power rail. > + > +required: > + - compatible > + - operating-points-v2 > + - "#power-domain-cells" > + - power-supply > + > +additionalProperties: false > + > +examples: > + - | > +core-domain { power-domain (to follow schema and devicetree spec) Best regards, Krzysztof > +compatible = "nvidia,tegra20-core-domain"; > +operating-points-v2 = <&opp_table>; > +power-supply = <®ulator>; > +#power-domain-cells = <0>; > +}; > -- > 2.29.2 > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 41/48] memory: tegra20-emc: Use devm_tegra_core_dev_init_opp_table()
On Thu, Dec 17, 2020 at 09:06:31PM +0300, Dmitry Osipenko wrote: > Use common devm_tegra_core_dev_init_opp_table() helper for the OPP table > initialization. > > Signed-off-by: Dmitry Osipenko > --- > drivers/memory/tegra/tegra20-emc.c | 57 +++--- > 1 file changed, 4 insertions(+), 53 deletions(-) If there was no more Tegra MC work planned, this could easily go via Tegra SoC tree. However I expect still work of your interconnect patches, so maybe it's better to stick these in same tree. In such case I would need a stable tag with the devm_tegra_core_dev_init_opp_table() helper for memory controller tree. Best regards, Krzysztof ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
udl: Unrecognized vendor firmware descriptor (all zeroes)
I got a Lenovo USB port replicator (model no: K33415) with DisplayLink VGA. When I plug it into my Lenovo laptop (with no display attached to the dock yet), USB hub and audio devices from the dock are found but the DisplayLink device initialization gets an error. All bytes in vendor firmware descriptor and EDID seem to be zero. Is it something wrong with the device, Linux USB stack or UDL driver? [379953.534772] usb 1-3.4: new high-speed USB device number 23 using xhci_hcd [379953.630502] usb 1-3.4: New USB device found, idVendor=17e9, idProduct=01e0, bcdDevice= 0.03 [379953.635493] usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [379953.640411] usb 1-3.4: Product: Lenovo Enhanced USB Port Replicator [379953.645573] usb 1-3.4: Manufacturer: DisplayLink [379953.650430] usb 1-3.4: SerialNumber: 01>0-128530 [379953.662128] [drm] vendor descriptor length:e0 data:00 00 00 00 00 00 00 00 00 00 00 [379953.667129] [drm:udl_init.cold [udl]] *ERROR* Unrecognized vendor firmware descriptor [379953.673031] [drm] Initialized udl 0.0.1 20120220 for 1-3.4:1.0 on minor 1 [379953.677693] [drm] Initialized udl on minor 1 [379953.733025] udl 1-3.4:1.0: [drm] DVI-I-1: EDID is invalid: [379953.735019] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.737014] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.739061] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.741086] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.743170] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.745163] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.747176] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.749093] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.751015] udl 1-3.4:1.0: [drm] Cannot find any crtc or sizes [379953.753565] [drm] vendor descriptor length:e0 data:00 00 00 00 00 00 00 00 00 00 00 [379953.755501] [drm:udl_init.cold [udl]] *ERROR* Unrecognized vendor firmware descriptor [379953.758261] [drm] Initialized udl 0.0.1 20120220 for 1-3.4:1.1 on minor 3 [379953.760405] [drm] Initialized udl on minor 3 [379953.827661] udl 1-3.4:1.1: [drm] DVI-I-3: EDID is invalid: [379953.832758] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.838083] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.843553] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.848803] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.853151] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.856164] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.858381] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.860334] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [379953.862199] udl 1-3.4:1.1: [drm] Cannot find any crtc or sizes [379964.084865] udl 1-3.4:1.0: [drm] Cannot find any crtc or sizes [379964.089921] udl 1-3.4:1.1: [drm] Cannot find any crtc or sizes -- Meelis Roos ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: udl: Unrecognized vendor firmware descriptor (all zeroes)
Meelis Roos wrote: > Is it something wrong with the device, Linux USB stack or UDL driver? It looks like the device. > [379953.534772] usb 1-3.4: new high-speed USB device number 23 using xhci_hcd > [379953.630502] usb 1-3.4: New USB device found, idVendor=17e9, > idProduct=01e0, bcdDevice= 0.03 > [379953.635493] usb 1-3.4: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [379953.640411] usb 1-3.4: Product: Lenovo Enhanced USB Port Replicator > [379953.645573] usb 1-3.4: Manufacturer: DisplayLink > [379953.650430] usb 1-3.4: SerialNumber: 01>0-128530 > [379953.662128] [drm] vendor descriptor length:e0 data:00 00 00 00 00 00 00 > 00 00 00 00 Do the descriptors perhaps change, if you run lsusb -v for the device a second or two after plugging it in? (Of course they shouldn't, but ..) Also, the device connects as a high-speed (480Mbps) device through xhci (so perhaps on a super-speed port?). Can you try connecting the device to a high-speed-only port and see if it behaves the same? It might be enough to place a high-speed hub between computer and device for that test. Or if you already tested with a high-speed-only port on your xHCI but the device is actually super-speed-capable then can you try connecting it to a super-speed port? //Peter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 0/5] Share mtk mutex driver for both DRM and MDP
mtk mutex is a driver used by DRM and MDP [1], so this series move mtk mutex driver from DRM folder to soc folder, so it could be used by DRM and MDP. This series based on linux-next next-20201218 [2] [1] https://patchwork.kernel.org/patch/11140751/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?h=next-20201218 CK Hu (5): drm/mediatek: Remove redundant file including drm/mediatek: Rename file mtk_drm_ddp to mtk_mutex drm/mediatek: Change disp/ddp term to mutex in mtk mutex driver drm/mediatek: Automatically search unclaimed mtk mutex in mtk_mutex_get() soc / drm: mediatek: Move mtk mutex driver to soc folder drivers/gpu/drm/mediatek/Makefile | 1 - drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 32 +- drivers/gpu/drm/mediatek/mtk_drm_ddp.h| 28 -- drivers/gpu/drm/mediatek/mtk_drm_drv.c| 3 - drivers/gpu/drm/mediatek/mtk_drm_drv.h| 1 - drivers/soc/mediatek/Makefile | 1 + .../mediatek/mtk-mutex.c} | 317 +- include/linux/soc/mediatek/mtk-mutex.h| 26 ++ 8 files changed, 201 insertions(+), 208 deletions(-) delete mode 100644 drivers/gpu/drm/mediatek/mtk_drm_ddp.h rename drivers/{gpu/drm/mediatek/mtk_drm_ddp.c => soc/mediatek/mtk-mutex.c} (54%) create mode 100644 include/linux/soc/mediatek/mtk-mutex.h -- 2.17.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 1/5] drm/mediatek: Remove redundant file including
From: CK Hu Those file includings are useless, so remove them. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_ddp.h | 2 -- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 -- 3 files changed, 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c index 1f99db6b1a42..ab7295c51b23 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c @@ -10,7 +10,6 @@ #include #include -#include "mtk_drm_ddp.h" #include "mtk_drm_ddp_comp.h" #define MT2701_DISP_MUTEX0_MOD00x2c diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp.h index 6b691a57be4a..a1ee21d15334 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.h @@ -6,8 +6,6 @@ #ifndef MTK_DRM_DDP_H #define MTK_DRM_DDP_H -#include "mtk_drm_ddp_comp.h" - struct regmap; struct device; struct mtk_disp_mutex; diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 2f717df28a77..089f956b22c2 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -26,7 +25,6 @@ #include #include "mtk_drm_crtc.h" -#include "mtk_drm_ddp.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_drv.h" #include "mtk_drm_gem.h" -- 2.17.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/5] drm/mediatek: Rename file mtk_drm_ddp to mtk_mutex
From: CK Hu After mmsys routing function is moved out of mtk_drm_ddp.c, mtk_drm_ddp.c has only mtk mutex function, so rename it to match the function in it. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Makefile | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/gpu/drm/mediatek/{mtk_drm_ddp.c => mtk_mutex.c} | 0 drivers/gpu/drm/mediatek/{mtk_drm_ddp.h => mtk_mutex.h} | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) rename drivers/gpu/drm/mediatek/{mtk_drm_ddp.c => mtk_mutex.c} (100%) rename drivers/gpu/drm/mediatek/{mtk_drm_ddp.h => mtk_mutex.h} (92%) diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index a892edec5563..09979c4c340a 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -4,13 +4,13 @@ mediatek-drm-y := mtk_disp_color.o \ mtk_disp_ovl.o \ mtk_disp_rdma.o \ mtk_drm_crtc.o \ - mtk_drm_ddp.o \ mtk_drm_ddp_comp.o \ mtk_drm_drv.o \ mtk_drm_gem.o \ mtk_drm_plane.o \ mtk_dsi.o \ - mtk_dpi.o + mtk_dpi.o \ + mtk_mutex.o obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index bdd37eadecd5..1e827de1427d 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -19,10 +19,10 @@ #include "mtk_drm_drv.h" #include "mtk_drm_crtc.h" -#include "mtk_drm_ddp.h" #include "mtk_drm_ddp_comp.h" #include "mtk_drm_gem.h" #include "mtk_drm_plane.h" +#include "mtk_mutex.h" /* * struct mtk_drm_crtc - MediaTek specific crtc structure. diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_mutex.c similarity index 100% rename from drivers/gpu/drm/mediatek/mtk_drm_ddp.c rename to drivers/gpu/drm/mediatek/mtk_mutex.c diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.h b/drivers/gpu/drm/mediatek/mtk_mutex.h similarity index 92% rename from drivers/gpu/drm/mediatek/mtk_drm_ddp.h rename to drivers/gpu/drm/mediatek/mtk_mutex.h index a1ee21d15334..3abcc20e88fb 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.h +++ b/drivers/gpu/drm/mediatek/mtk_mutex.h @@ -3,8 +3,8 @@ * Copyright (c) 2015 MediaTek Inc. */ -#ifndef MTK_DRM_DDP_H -#define MTK_DRM_DDP_H +#ifndef MTK_MUTEX_H +#define MTK_MUTEX_H struct regmap; struct device; @@ -23,4 +23,4 @@ void mtk_disp_mutex_put(struct mtk_disp_mutex *mutex); void mtk_disp_mutex_acquire(struct mtk_disp_mutex *mutex); void mtk_disp_mutex_release(struct mtk_disp_mutex *mutex); -#endif /* MTK_DRM_DDP_H */ +#endif /* MTK_MUTEX_H */ -- 2.17.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 3/5] drm/mediatek: Change disp/ddp term to mutex in mtk mutex driver
From: CK Hu mtk mutex is used by both drm and mdp driver, so change disp/ddp term to mutex to show that it's a common driver for drm and mdp. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 30 +-- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +- drivers/gpu/drm/mediatek/mtk_mutex.c| 306 drivers/gpu/drm/mediatek/mtk_mutex.h| 26 +- 5 files changed, 182 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index 1e827de1427d..5c4e8e2f4448 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -55,7 +55,7 @@ struct mtk_drm_crtc { #endif struct device *mmsys_dev; - struct mtk_disp_mutex *mutex; + struct mtk_mutex*mutex; unsigned intddp_comp_nr; struct mtk_ddp_comp **ddp_comp; @@ -107,7 +107,7 @@ static void mtk_drm_crtc_destroy(struct drm_crtc *crtc) { struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); - mtk_disp_mutex_put(mtk_crtc->mutex); + mtk_mutex_put(mtk_crtc->mutex); drm_crtc_cleanup(crtc); } @@ -283,7 +283,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc) return ret; } - ret = mtk_disp_mutex_prepare(mtk_crtc->mutex); + ret = mtk_mutex_prepare(mtk_crtc->mutex); if (ret < 0) { DRM_ERROR("Failed to enable mutex clock: %d\n", ret); goto err_pm_runtime_put; @@ -299,11 +299,11 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc) mtk_mmsys_ddp_connect(mtk_crtc->mmsys_dev, mtk_crtc->ddp_comp[i]->id, mtk_crtc->ddp_comp[i + 1]->id); - mtk_disp_mutex_add_comp(mtk_crtc->mutex, + mtk_mutex_add_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); } - mtk_disp_mutex_add_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); - mtk_disp_mutex_enable(mtk_crtc->mutex); + mtk_mutex_add_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); + mtk_mutex_enable(mtk_crtc->mutex); for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) { struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[i]; @@ -332,7 +332,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc) return 0; err_mutex_unprepare: - mtk_disp_mutex_unprepare(mtk_crtc->mutex); + mtk_mutex_unprepare(mtk_crtc->mutex); err_pm_runtime_put: pm_runtime_put(crtc->dev->dev); return ret; @@ -351,19 +351,19 @@ static void mtk_crtc_ddp_hw_fini(struct mtk_drm_crtc *mtk_crtc) } for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) - mtk_disp_mutex_remove_comp(mtk_crtc->mutex, + mtk_mutex_remove_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); - mtk_disp_mutex_disable(mtk_crtc->mutex); + mtk_mutex_disable(mtk_crtc->mutex); for (i = 0; i < mtk_crtc->ddp_comp_nr - 1; i++) { mtk_mmsys_ddp_disconnect(mtk_crtc->mmsys_dev, mtk_crtc->ddp_comp[i]->id, mtk_crtc->ddp_comp[i + 1]->id); - mtk_disp_mutex_remove_comp(mtk_crtc->mutex, + mtk_mutex_remove_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); } - mtk_disp_mutex_remove_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); + mtk_mutex_remove_comp(mtk_crtc->mutex, mtk_crtc->ddp_comp[i]->id); mtk_crtc_ddp_clk_disable(mtk_crtc); - mtk_disp_mutex_unprepare(mtk_crtc->mutex); + mtk_mutex_unprepare(mtk_crtc->mutex); pm_runtime_put(drm->dev); @@ -475,9 +475,9 @@ static void mtk_drm_crtc_hw_config(struct mtk_drm_crtc *mtk_crtc) mtk_crtc->pending_async_planes = true; if (priv->data->shadow_register) { - mtk_disp_mutex_acquire(mtk_crtc->mutex); + mtk_mutex_acquire(mtk_crtc->mutex); mtk_crtc_ddp_config(crtc, NULL); - mtk_disp_mutex_release(mtk_crtc->mutex); + mtk_mutex_release(mtk_crtc->mutex); } #if IS_REACHABLE(CONFIG_MTK_CMDQ) if (mtk_crtc->cmdq_client) { @@ -772,7 +772,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, if (!mtk_crtc->ddp_comp) return -ENOMEM; - mtk_crtc->mutex = mtk_disp_mutex_get(priv->mutex_dev, pipe); + mtk_crtc->mutex = mtk_mutex_get(priv->mutex_dev, pipe); if (IS_ERR(mtk_crtc->mutex)) { ret = PTR_ERR(mtk_crtc->mutex); dev_err(dev, "Failed to get mutex: %d\n", ret)
[PATCH 4/5] drm/mediatek: Automatically search unclaimed mtk mutex in mtk_mutex_get()
From: CK Hu Moving mutex resource management from client driver to mutex driver could prevent client drivers negotiating for resource management. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/gpu/drm/mediatek/mtk_mutex.c| 16 drivers/gpu/drm/mediatek/mtk_mutex.h| 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index 5c4e8e2f4448..23d9abc4f46c 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -772,7 +772,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, if (!mtk_crtc->ddp_comp) return -ENOMEM; - mtk_crtc->mutex = mtk_mutex_get(priv->mutex_dev, pipe); + mtk_crtc->mutex = mtk_mutex_get(priv->mutex_dev); if (IS_ERR(mtk_crtc->mutex)) { ret = PTR_ERR(mtk_crtc->mutex); dev_err(dev, "Failed to get mutex: %d\n", ret); diff --git a/drivers/gpu/drm/mediatek/mtk_mutex.c b/drivers/gpu/drm/mediatek/mtk_mutex.c index ece26359a292..e16b1772317c 100644 --- a/drivers/gpu/drm/mediatek/mtk_mutex.c +++ b/drivers/gpu/drm/mediatek/mtk_mutex.c @@ -226,18 +226,18 @@ static const struct mtk_mutex_data mt8173_mutex_driver_data = { .mutex_sof_reg = MT2701_MUTEX0_SOF0, }; -struct mtk_mutex *mtk_mutex_get(struct device *dev, unsigned int id) +struct mtk_mutex *mtk_mutex_get(struct device *dev) { struct mtk_mutex_ctx *mtx = dev_get_drvdata(dev); + int i; - if (id >= 10) - return ERR_PTR(-EINVAL); - if (mtx->mutex[id].claimed) - return ERR_PTR(-EBUSY); - - mtx->mutex[id].claimed = true; + for (i = 0; i < 10; i++) + if (!mtx->mutex[i].claimed) { + mtx->mutex[i].claimed = true; + return &mtx->mutex[i]; + } - return &mtx->mutex[id]; + return ERR_PTR(-EBUSY); } void mtk_mutex_put(struct mtk_mutex *mutex) diff --git a/drivers/gpu/drm/mediatek/mtk_mutex.h b/drivers/gpu/drm/mediatek/mtk_mutex.h index b678e0988a37..6fe4ffbde290 100644 --- a/drivers/gpu/drm/mediatek/mtk_mutex.h +++ b/drivers/gpu/drm/mediatek/mtk_mutex.h @@ -10,7 +10,7 @@ struct regmap; struct device; struct mtk_mutex; -struct mtk_mutex *mtk_mutex_get(struct device *dev, unsigned int id); +struct mtk_mutex *mtk_mutex_get(struct device *dev); int mtk_mutex_prepare(struct mtk_mutex *mutex); void mtk_mutex_add_comp(struct mtk_mutex *mutex, enum mtk_ddp_comp_id id); -- 2.17.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 5/5] soc / drm: mediatek: Move mtk mutex driver to soc folder
From: CK Hu mtk mutex is used by DRM and MDP driver, and its function is SoC-specific, so move it to soc folder. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Makefile | 3 +-- drivers/gpu/drm/mediatek/mtk_drm_crtc.c| 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 - drivers/soc/mediatek/Makefile | 1 + .../{gpu/drm/mediatek/mtk_mutex.c => soc/mediatek/mtk-mutex.c} | 2 ++ .../mtk_mutex.h => include/linux/soc/mediatek/mtk-mutex.h | 0 7 files changed, 5 insertions(+), 5 deletions(-) rename drivers/{gpu/drm/mediatek/mtk_mutex.c => soc/mediatek/mtk-mutex.c} (99%) rename drivers/gpu/drm/mediatek/mtk_mutex.h => include/linux/soc/mediatek/mtk-mutex.h (100%) diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index 09979c4c340a..01d06332f767 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -9,8 +9,7 @@ mediatek-drm-y := mtk_disp_color.o \ mtk_drm_gem.o \ mtk_drm_plane.o \ mtk_dsi.o \ - mtk_dpi.o \ - mtk_mutex.o + mtk_dpi.o obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index 23d9abc4f46c..d7bd07916d74 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,6 @@ #include "mtk_drm_ddp_comp.h" #include "mtk_drm_gem.h" #include "mtk_drm_plane.h" -#include "mtk_mutex.h" /* * struct mtk_drm_crtc - MediaTek specific crtc structure. diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 907a69eb6d51..d1232124b650 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -602,7 +602,6 @@ static struct platform_driver mtk_drm_platform_driver = { }; static struct platform_driver * const mtk_drm_drivers[] = { - &mtk_mutex_driver, &mtk_disp_color_driver, &mtk_disp_ovl_driver, &mtk_disp_rdma_driver, diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h index c7220f267a62..f7cd95903a4e 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -46,7 +46,6 @@ struct mtk_drm_private { struct drm_atomic_state *suspend_state; }; -extern struct platform_driver mtk_mutex_driver; extern struct platform_driver mtk_disp_color_driver; extern struct platform_driver mtk_disp_ovl_driver; extern struct platform_driver mtk_disp_rdma_driver; diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile index b6908db534c2..90270f8114ed 100644 --- a/drivers/soc/mediatek/Makefile +++ b/drivers/soc/mediatek/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS) += mtk-pm-domains.o obj-$(CONFIG_MTK_MMSYS) += mtk-mmsys.o +obj-$(CONFIG_MTK_MMSYS) += mtk-mutex.o diff --git a/drivers/gpu/drm/mediatek/mtk_mutex.c b/drivers/soc/mediatek/mtk-mutex.c similarity index 99% rename from drivers/gpu/drm/mediatek/mtk_mutex.c rename to drivers/soc/mediatek/mtk-mutex.c index e16b1772317c..f2597ebf52db 100644 --- a/drivers/gpu/drm/mediatek/mtk_mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -459,3 +459,5 @@ struct platform_driver mtk_mutex_driver = { .of_match_table = mutex_driver_dt_match, }, }; + +builtin_platform_driver(mtk_mutex_driver); diff --git a/drivers/gpu/drm/mediatek/mtk_mutex.h b/include/linux/soc/mediatek/mtk-mutex.h similarity index 100% rename from drivers/gpu/drm/mediatek/mtk_mutex.h rename to include/linux/soc/mediatek/mtk-mutex.h -- 2.17.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210683] Nasty amdgpu powersave regression Navi14
https://bugzilla.kernel.org/show_bug.cgi?id=210683 David Mak (david.18.19...@gmail.com) changed: What|Removed |Added CC||david.18.19...@gmail.com --- Comment #4 from David Mak (david.18.19...@gmail.com) --- Created attachment 294239 --> https://bugzilla.kernel.org/attachment.cgi?id=294239&action=edit dmesg outputs for 5.9.14 and 5.10.1. I can reproduce the issue on the RX 6800 (Navi 21 XL). I use Radeontop to inspect the memory/GPU clock of my GPU. When using Linux 5.9.14: - In both KDE Plasma and tty2, Memory Clock hovers at around 100MHz. - GPU Power reported by lm_sensors is around 5-7W. When using Linux 5.10.1: - In tty2, Memory Clock hovers at around 100MHz and GPU Power reported by lm_sensors is around 5-7W. - In KDE Plasma, Memory Clock is usually around 1GHz (100%), although it can be down to ~470MHz, and GPU Power reported by lm_sensors is around 30W. - Disconnecting one of my two monitors does not change the memory clock. I am trying to bisect the commit, but many revisions seem to give a blank screen or the amdgpu module is not loaded. (I suspect I am not building the kernel properly) Tested linux-firmware versions: 20201120.bc9cd0b, 20201218.646f159 -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH AUTOSEL 5.9 08/15] drm/amd/display: Prevent bandwidth overflow
From: Chris Park [ Upstream commit 80089dd8410f356d5104496d5ab71a66a4f4646b ] [Why] At very high pixel clock, bandwidth calculation exceeds 32 bit size and overflow value. This causes the resulting selection of link rate to be inaccurate. [How] Change order of operation and use fixed point to deal with integer accuracy. Also address bug found when forcing link rate. Signed-off-by: Chris Park Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index b0f8bfd48d102..462f8b18440b3 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -3394,10 +3394,13 @@ uint32_t dc_bandwidth_in_kbps_from_timing( { uint32_t bits_per_channel = 0; uint32_t kbps; + struct fixed31_32 link_bw_kbps; if (timing->flags.DSC) { - kbps = (timing->pix_clk_100hz * timing->dsc_cfg.bits_per_pixel); - kbps = kbps / 160 + ((kbps % 160) ? 1 : 0); + link_bw_kbps = dc_fixpt_from_int(timing->pix_clk_100hz); + link_bw_kbps = dc_fixpt_div_int(link_bw_kbps, 160); + link_bw_kbps = dc_fixpt_mul_int(link_bw_kbps, timing->dsc_cfg.bits_per_pixel); + kbps = dc_fixpt_ceil(link_bw_kbps); return kbps; } -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH AUTOSEL 5.9 09/15] drm/amdkfd: Fix leak in dmabuf import
From: Felix Kuehling [ Upstream commit c897934da15f182ce99536007f8ef61c4748c07e ] Release dmabuf reference before returning from kfd_ioctl_import_dmabuf. amdgpu_amdkfd_gpuvm_import_dmabuf takes a reference to the underlying GEM BO and doesn't keep the reference to the dmabuf wrapper. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index e9b96ad3d9a52..fdad4d108dd36 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -1729,6 +1729,7 @@ static int kfd_ioctl_import_dmabuf(struct file *filep, } mutex_unlock(&p->mutex); + dma_buf_put(dmabuf); args->handle = MAKE_HANDLE(args->gpu_id, idr_handle); @@ -1738,6 +1739,7 @@ static int kfd_ioctl_import_dmabuf(struct file *filep, amdgpu_amdkfd_gpuvm_free_memory_of_gpu(dev->kgd, (struct kgd_mem *)mem, NULL); err_unlock: mutex_unlock(&p->mutex); + dma_buf_put(dmabuf); return r; } -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH AUTOSEL 5.4 05/10] drm/amd/display: Prevent bandwidth overflow
From: Chris Park [ Upstream commit 80089dd8410f356d5104496d5ab71a66a4f4646b ] [Why] At very high pixel clock, bandwidth calculation exceeds 32 bit size and overflow value. This causes the resulting selection of link rate to be inaccurate. [How] Change order of operation and use fixed point to deal with integer accuracy. Also address bug found when forcing link rate. Signed-off-by: Chris Park Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index 47cefc05fd3f5..f933791f1fbbb 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -2906,11 +2906,14 @@ uint32_t dc_bandwidth_in_kbps_from_timing( { uint32_t bits_per_channel = 0; uint32_t kbps; + struct fixed31_32 link_bw_kbps; #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT if (timing->flags.DSC) { - kbps = (timing->pix_clk_100hz * timing->dsc_cfg.bits_per_pixel); - kbps = kbps / 160 + ((kbps % 160) ? 1 : 0); + link_bw_kbps = dc_fixpt_from_int(timing->pix_clk_100hz); + link_bw_kbps = dc_fixpt_div_int(link_bw_kbps, 160); + link_bw_kbps = dc_fixpt_mul_int(link_bw_kbps, timing->dsc_cfg.bits_per_pixel); + kbps = dc_fixpt_ceil(link_bw_kbps); return kbps; } #endif -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH AUTOSEL 5.4 06/10] drm/amdkfd: Fix leak in dmabuf import
From: Felix Kuehling [ Upstream commit c897934da15f182ce99536007f8ef61c4748c07e ] Release dmabuf reference before returning from kfd_ioctl_import_dmabuf. amdgpu_amdkfd_gpuvm_import_dmabuf takes a reference to the underlying GEM BO and doesn't keep the reference to the dmabuf wrapper. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 1d3cd5c50d5f2..4a0ef9268918c 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -1664,6 +1664,7 @@ static int kfd_ioctl_import_dmabuf(struct file *filep, } mutex_unlock(&p->mutex); + dma_buf_put(dmabuf); args->handle = MAKE_HANDLE(args->gpu_id, idr_handle); @@ -1673,6 +1674,7 @@ static int kfd_ioctl_import_dmabuf(struct file *filep, amdgpu_amdkfd_gpuvm_free_memory_of_gpu(dev->kgd, (struct kgd_mem *)mem); err_unlock: mutex_unlock(&p->mutex); + dma_buf_put(dmabuf); return r; } -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel