FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

drm-v5.0-fbsd12.1 Can’t add metre when video ram set to auto in bios #208

Open raffeale opened 4 years ago

raffeale commented 4 years ago

the driver can’t add mttr correctly when set video ram to auto in bios. Sometimes I get some errors about following information drm error: drm_sched_entity_flush ======> BUG: entity->rq->sched is null

I am using amd apu r5 3500u and amdgpu driver

littlelevi commented 4 years ago

I'm not sure if this is same issue I think its related and my dmesg is very similar, and we both use the same driver. GPU RX590 and amdgpu driver

uname reeBSD 13.0-CURRENT #0 r358133:

% pkg info | grep drm-devel drm-devel-kmod-5.0.g20200221

Full dmesg goes as follow:

`[drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL` ``` __pm_runtime_resume not implemented -- see your local kernel hacker pm_runtime_mark_last_busy not implemented -- see your local kernel hacker __pm_runtime_suspend not implemented -- see your local kernel hacker __pm_runtime_resume not implemented -- see your local kernel hacker pm_runtime_mark_last_busy not implemented -- see your local kernel hacker __pm_runtime_suspend not implemented -- see your local kernel hacker [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL uma_zalloc_debug: zone "128" with the following non-sleepable locks held: exclusive rw vm object (vm object) r = 0 (0xfffff801a0ee4210) locked @ /usr/src/sys/vm/vm_fault.c:1263 stack backtrace: #0 0xffffffff80c33fb1 at witness_debugger+0x71 #1 0xffffffff80c34fd0 at witness_warn+0x430 #2 0xffffffff80f03a99 at uma_zalloc_arg+0x49 #3 0xffffffff80b9f499 at malloc+0x99 #4 0xffffffff82d086dd at linux_alloc_current+0x3d #5 0xffffffff82d07f07 at linux_cdev_pager_populate+0x237 #6 0xffffffff80f0c8bc at vm_fault+0x44c #7 0xffffffff80f0c31e at vm_fault_trap+0x6e #8 0xffffffff8106c0e3 at trap_pfault+0x1f3 #9 0xffffffff8106b737 at trap+0x457 #10 0xffffffff810424fc at calltrap+0x8 uma_zalloc_debug: zone "64" with the following non-sleepable locks held: exclusive rw vm object (vm object) r = 0 (0xfffff801a0ee4210) locked @ /usr/src/sys/vm/vm_fault.c:1263 stack backtrace: #0 0xffffffff80c33fb1 at witness_debugger+0x71 #1 0xffffffff80c34fd0 at witness_warn+0x430 #2 0xffffffff80f03a99 at uma_zalloc_arg+0x49 #3 0xffffffff80b9f499 at malloc+0x99 #4 0xffffffff82d08702 at linux_alloc_current+0x62 #5 0xffffffff82d07f07 at linux_cdev_pager_populate+0x237 #6 0xffffffff80f0c8bc at vm_fault+0x44c #7 0xffffffff80f0c31e at vm_fault_trap+0x6e #8 0xffffffff8106c0e3 at trap_pfault+0x1f3 #9 0xffffffff8106b737 at trap+0x457 #10 0xffffffff810424fc at calltrap+0x8 [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL [drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL ```

And this sequence keeps repeat. Occasionally but its very rare, the driver hangs whole machine. I suspect this is only the case when putting GPU under more stress or greater GPU memory usage. But im not sure of that on 100%, at least not yet. But maybe it makes sense according to what @raffeale says.

littlelevi commented 4 years ago

[drm ERROR :drm_sched_entity_flush] ==========> BUG: entity->rq->sched is NULL

That part of error seems to be gone after upgrading xorg to:

% pkg info xorg

xorg-7.7_3
Name           : xorg
Version        : 7.7_3
Installed on   : Thu Mar  5 18:46:51 2020 CET
Origin         : x11/xorg
Architecture   : FreeBSD:13:*
Prefix         : /usr/local
Categories     : x11
Licenses       : 
Maintainer     : x11@FreeBSD.org
WWW            : https://www.x.org/
Comment        : X.Org complete distribution metaport
Options        :
        DOCS           : on
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 0.00B
Description    :
This is a metaport for many of the X.Org packages available in the ports tree.
valpackett commented 4 years ago

entity->rq->sched is null is fine, I'm seeing it all the time with no problems. (I'm not using xorg at all, wayland only)

wulf7 commented 4 years ago

You can ignore MTRR warnings. See https://lists.freebsd.org/pipermail/freebsd-current/2018-August/070645.html