Re: [Nouveau] Hardware decoding in video playback with Nvidia GT 218 (NVA8)
First of all really thanks for your quick reply! I followed your suggests: -- $ cat /etc/X11/xorg.conf.d/20-nouveau.conf Section "Device" Identifier "Nvidia card" Driver "nouveau" Option "DRI" "3" EndSection After rebooting, I test various ways, by using mpv, with -vo=vdpau -hwdec=vdpau", using mplayer string you suggested in your link: mplayer -vo vdpau -vc ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau, But without luck... With Option "DRI" "3", I also noticed a worse response during playback, video colors not proper and after a bit it is blocked. I can't close mplayer window, after pressing "q" whole system results crashed and have to hard power off for rebooting again. If you need more details about video file format used to test please let me know, anyway I tried with a 1080p video and 50 FPS, so that it should be a bit lighter to decode and manage by the low budget chip of my card. I also would ask for a question: in your testing experience are you used same GPU of mine GT218 (see details in my previous message) ? Is it known it should be working on hardware video decoding with nouveau drivers? If some other tests or some involved software recompile could be solve this issue, I'm ready to follow your instructions for what are my skills (poor skills! ;) ). Otherwise I'll give up and re-switch to nvidia closed drivers. Thanks again! On Mon, May 30, 2022 at 1:26 AM Ilia Mirkin wrote: > > Hi Joe, > > On Sun, May 29, 2022 at 6:58 PM Joe wrote: > > > > Hi all, I'm trying to make running hardware acceleration decoding on > > my old GeForce 210 (AKA GT-218, or NVA8 / NV-50 Tesla family). > > -- > > 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 > > [GeForce 210] [10de:0a65] (rev a2) > > -- > > [ ... ] > > > > But when I touch something, for instance "f" to enlarge to fullscreen, > > or "q" to quit MPV... > > Surprise! > > > > My system freeze, nothing work again, just the mouse cursor can still > > be moved around. > > > > [ ... ] > > > > I'd like to use open drivers, but I'd like to take advantage of > > hardware decoding too, so that my CPU rests as quiet and fresh as > > possible. Is there some other suggest to configure some other aspect > > and try to achieve my scope? > > Or my tests are all I can do? > > So for hwdec is better to switch back to closed source nvidia driver > > legacy 340.108 ? > > Proprietary driver will definitely work better for hwdec than nouveau. > Forgetting about any stability/performance issues, there are some > reference frame ordering issues in H.264 decoding that were never > addressed. This leads to occasional corruption in some videos. > > FWIW I've mostly tested with mplayer, and I didn't run into problems > there. There should be instructions on using mplayer at > https://nouveau.freedesktop.org/VideoAcceleration.html. The thing you > esp want to avoid is using VDPAU + GL in the same process -- so things > like "-vo vdpau" are much more likely to work than "-vo gpu" or "-vo > gl". You can try enabling DRI3 -- perhaps something broke in the DRI2 > paths. You can add > > Option "DRI" "3" > > into the Driver section of the xorg.conf to expose it. It's not on by > default because there are some annoying corner cases that some window > managers run into with it (KDE as I recall). > > I'm also not sure why VA-API is corrupted for you, it has worked in > the past. But it gets a lot of changes only reviewed by AMD > developers, so it can get broken pretty easily with AMD-specific > assumptions which don't hold on NVIDIA. I suspect it should be easy to > fix by someone who is interested in investigating -- probably a bisect > to sort out what broke it, and then revert or get the person who wrote > it to fix it. > > Cheers, > > -ilia
[Nouveau] [PATCH] drm/nouveau/fifo/gv100-: set gv100_fifo_runlist storage-class to static
sparse reports drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c:56:1: warning: symbol 'gv100_fifo_runlist' was not declared. Should it be static? gv100_fifo_runlist is only used in gv100.c, so change it to static. Signed-off-by: Tom Rix --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c index 70e16a91ac12..faf0fe9f704c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c @@ -52,7 +52,7 @@ gv100_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *cgrp, nvkm_wo32(memory, offset + 0xc, 0x); } -const struct gk104_fifo_runlist_func +static const struct gk104_fifo_runlist_func gv100_fifo_runlist = { .size = 16, .cgrp = gv100_fifo_runlist_cgrp, -- 2.27.0
[Nouveau] [PATCH] drm/nouveau/tegra: remove needless NULL check
There has already been NULL check in clk_prepare_enable() and clk_disable_unprepare(), so remove needless NULL check before calling them. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 2ed528c065fa..ac9e122586bc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -41,11 +41,9 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) ret = clk_prepare_enable(tdev->clk); if (ret) goto err_clk; - if (tdev->clk_ref) { - ret = clk_prepare_enable(tdev->clk_ref); - if (ret) - goto err_clk_ref; - } + ret = clk_prepare_enable(tdev->clk_ref); + if (ret) + goto err_clk_ref; ret = clk_prepare_enable(tdev->clk_pwr); if (ret) goto err_clk_pwr; @@ -70,8 +68,7 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) err_clamp: clk_disable_unprepare(tdev->clk_pwr); err_clk_pwr: - if (tdev->clk_ref) - clk_disable_unprepare(tdev->clk_ref); + clk_disable_unprepare(tdev->clk_ref); err_clk_ref: clk_disable_unprepare(tdev->clk); err_clk: @@ -87,8 +84,7 @@ nvkm_device_tegra_power_down(struct nvkm_device_tegra *tdev) int ret; clk_disable_unprepare(tdev->clk_pwr); - if (tdev->clk_ref) - clk_disable_unprepare(tdev->clk_ref); + clk_disable_unprepare(tdev->clk_ref); clk_disable_unprepare(tdev->clk); udelay(10); -- 2.20.1
[Nouveau] [PATCH] drm/nouveau/therm: Fix pointer dereferenced before checking
The fan->base is dereferencing before null checking, so move it after checking. Signed-off-by: Haowen Bai --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c index 340f37a299dc..b13ba9b2f6be 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c @@ -98,10 +98,10 @@ nvkm_fanpwm_create(struct nvkm_therm *therm, struct dcb_gpio_func *func) return -ENODEV; fan = kzalloc(sizeof(*fan), GFP_KERNEL); - therm->fan = &fan->base; if (!fan) return -ENOMEM; + therm->fan = &fan->base; fan->base.type = "PWM"; fan->base.get = nvkm_fanpwm_get; fan->base.set = nvkm_fanpwm_set; -- 2.7.4
[Nouveau] [PATCH] drm/nouveau/mmu: fix typo in comment
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c index 8bf00b396ec1..8b11dfa0998d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c @@ -280,7 +280,7 @@ nvkm_vmm_unref_ptes(struct nvkm_vmm_iter *it, bool pfn, u32 ptei, u32 ptes) if (desc->type == SPT && (pgt->refs[0] || pgt->refs[1])) nvkm_vmm_unref_sptes(it, pgt, desc, ptei, ptes); - /* PT no longer neeed? Destroy it. */ + /* PT no longer needed? Destroy it. */ if (!pgt->refs[type]) { it->lvl++; TRA(it, "%s empty", nvkm_vmm_desc_type(desc));