Code Monkey home page Code Monkey logo

freebsddesktop / deprecated-freebsd-base-graphics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jameslinus/freebsd-base-graphics

49.0 49.0 13.0 1.53 GB

Fork of FreeBSD's base repository to work on graphics-stack-related projects

License: Other

Makefile 1.73% Assembly 0.98% C 70.93% Shell 1.90% C++ 22.52% Rebol 0.01% Perl 0.27% R 0.01% Terra 0.01% Yacc 0.26% Max 0.01% Java 0.01% DTrace 0.21% Python 0.09% Lex 0.06% D 0.01% HTML 0.69% TeX 0.08% M4 0.26% CMake 0.01%

deprecated-freebsd-base-graphics's People

Contributors

alcriceedu avatar amotin avatar avg-i avatar bapt avatar bdrewery avatar bmah888 avatar bsdimp avatar bsdjhb avatar bsdphk avatar cbrueffer avatar dag-erling avatar darkhelmet433 avatar delphij avatar dimitryandric avatar emaste avatar glebius avatar gwollman avatar hselasky avatar juikim avatar kientzle avatar kostikbel avatar ngie-eign avatar nyan- avatar pgiffuni avatar rwatson avatar sleffler avatar sparcplug avatar thompsa avatar trasz avatar zxombie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deprecated-freebsd-base-graphics's Issues

Screen corruption on Atom

It's a dmesg after kldloading the latest.

[drm] Initialized drm 1.1.0 20060810
bus_register unimplemented!!!
[drm:drm_pci_init]
[drm:0xffffffff82dc525as] ERROR FreeBSD needs DRIVER_MODESET

System doesn't hang now, but it's still scfb which runs video.

int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)
{
    struct pci_dev *pdev = NULL;
    const struct pci_device_id *pid;
    int i;

    DRM_DEBUG("\n");

    /* FreeBSD specific hackery */
    pdriver->busname = "vgapci";
    pdriver->bsdclass = &drm_devclass;
    pdriver->name = "drmn";

    if (driver->driver_features & DRIVER_MODESET)
        return pci_register_driver(pdriver);

    DRM_ERROR("FreeBSD needs DRIVER_MODESET");
    return (-ENOTSUP);

#ifdef __linux__    
    /* If not using KMS, fall back to stealth mode manual scanning. */
    INIT_LIST_HEAD(&driver->legacy_dev_list);
    for (i = 0; pdriver->id_table[i].vendor != 0; i++) {
        pid = &pdriver->id_table[i];

        /* Loop around setting up a DRM device for each PCI device
         * matching our ID and device class.  If we had the internal
         * function that pci_get_subsys and pci_get_class used, we'd
         * be able to just pass pid in instead of doing a two-stage
         * thing.
         */
        pdev = NULL;
        while ((pdev =
            pci_get_subsys(pid->vendor, pid->device, pid->subvendor,
                       pid->subdevice, pdev)) != NULL) {
            if ((pdev->class & pid->class_mask) != pid->class)
                continue;

            /* stealth mode requires a manual probe */
            pci_dev_get(pdev);
            drm_get_pci_dev(pdev, pid, driver);
        }
    }
    return 0;
#endif

The DRIVER_MODESET flag is getting cleared. It's unclear why this is happening or how it's tied to its inability to find a PCH.

kernel panic on i915kms module load (i7-6700T)

$ sysctl hw.model
hw.model: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz

I have a reproduce-able kernel panic on the above system. bellow is the backtrace - i've also included it on this ticket for easier analysis
kgdb.txt
:


Fatal trap 12: page fault while in kernel mode
cpuid = 4; apic id = 04
fault virtual address   = 0x0
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80ff2354
stack pointer           = 0x28:0xfffffe022f2949f0
frame pointer           = 0x28:0xfffffe022f294a40
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 1126 (kldload)

<snip>

#0  doadump (textdump=0) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:298
298             dumptid = curthread->td_tid;
(kgdb) bt
#0  doadump (textdump=0) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:298
#1  0xffffffff803f0bb2 in db_dump (dummy=-2130762924, dummy2=false, dummy3=-1, dummy4=0xfffffe022f294170 "")
    at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_command.c:533
#2  0xffffffff803f099e in db_command (last_cmdp=0xffffffff821c4ea8, cmd_table=0x0, dopager=1)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_command.c:440
#3  0xffffffff803f053e in db_command_loop () at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_command.c:493
#4  0xffffffff803f5433 in db_trap (type=12, code=0) at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_main.c:251
#5  0xffffffff80ffdadf in kdb_trap (type=12, code=0, tf=0xfffffe022f294940)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_kdb.c:654
#6  0xffffffff81634ab4 in trap_fatal (frame=0xfffffe022f294940, eva=0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:836
#7  0xffffffff81634d26 in trap_pfault (frame=0xfffffe022f294940, usermode=0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:716
#8  0xffffffff81633d72 in trap (frame=0xfffffe022f294940) at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:442
#9  0xffffffff816351ca in trap_check (frame=0xfffffe022f294940) at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:635
#10 0xffffffff8160c791 in calltrap () at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:236
#11 0xffffffff80ff2354 in BUS_HINT_DEVICE_UNIT (_dev=0x0, _child=0xfffff800049a9800, _name=0xfffff80004744bd8 "drm", _unitp=0xfffffe022f294ac4)
    at bus_if.h:920
#12 0xffffffff80ff204c in devclass_alloc_unit (dc=0xfffff80004744b80, dev=0xfffff800049a9800, unitp=0xfffff800049a9850)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1634
#13 0xffffffff80feb3cc in devclass_add_device (dc=0xfffff80004744b80, dev=0xfffff800049a9800)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1723
#14 0xffffffff80fe94f7 in make_device (parent=0x0, name=0xfffff80039a329b0 "drm", unit=-1)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1818
#15 0xffffffff80fe90d0 in device_add_child_ordered (dev=0x0, order=0, name=0xfffff80039a329b0 "drm", unit=-1)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1904
#16 0xffffffff80fe8faa in device_add_child (dev=0x0, name=0xfffff80039a329b0 "drm", unit=-1)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1870
#17 0xffffffff834a668b in device_register () at device.h:414
#18 0xffffffff834a627f in i2c_add_adapter (adapter=0xfffff8016d013150)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_i2c.c:116
#19 0xffffffff8352c73f in gen6_rps_irq_handler (dev_priv=0xfffff8016d00e800, pm_iir=0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_irq.c:1627
#20 0xffffffff8350341d in gen8_alloc_va_range_3lvl (vm=0x41000, pdp=0xfffff801022a2000, start=3, length=7)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_gem_gtt.c:1274
#21 0xffffffff8350e5e6 in refcount_acquire (count=0xfffffe0002658000) at refcount.h:52
#22 0xffffffff834c3be5 in pci_get_domain (dev=0xffffffff83587730) at pcivar.h:314
#23 0xffffffff8343f555 in drm_dev_register (dev=0x42, flags=18446735283740291072)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_drv.c:785
#24 0xffffffff834588f9 in drm_get_pci_dev (pdev=0xfffff80004298000, ent=0xffffffff83586780, driver=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_pci.c:323
#25 0xffffffff834a8f83 in linux_pci_attach (dev=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_pci.c:193
#26 0xffffffff80febf87 in DEVICE_ATTACH (dev=0xfffff800049a9700) at device_if.h:180
#27 0xffffffff80feb826 in device_attach (dev=0xfffff800049a9700) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:2900
#28 0xffffffff80feb75e in device_probe_and_attach (dev=0xfffff800049a9700)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:2858
#29 0xffffffff80fee0f1 in bus_generic_driver_added (dev=0xfffff800049aa300, driver=0xffffffff835b6cf0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:3920
---Type <return> to continue, or q <return> to quit--- 
#30 0xffffffff80ff1dcf in BUS_DRIVER_ADDED (_dev=0xfffff800049aa300, _driver=0xffffffff835b6cf0) at bus_if.h:204
#31 0xffffffff80fe85a5 in devclass_driver_added (dc=0xfffff80004560100, driver=0xffffffff835b6cf0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1099
#32 0xffffffff80fe838f in devclass_add_driver (dc=0xfffff80004560100, driver=0xffffffff835b6cf0, pass=2147483647, dcp=0xffffffff8348c540)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_bus.c:1172
#33 0xffffffff834a8816 in pci_register_driver (pdrv=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_pci.c:297
#34 0xffffffff834c6dcc in _sg_iter_next (iter=0x7fffffffee48) at scatterlist.h:309
#35 0xffffffff80f56809 in linker_file_sysinit (lf=0xfffff800042ca000) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_linker.c:230
#36 0xffffffff80f5546c in linker_load_file (filename=0xfffff800042cfd20 "/boot/kernel/i915kms.ko", result=0xfffffe022f2956a8)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_linker.c:430
#37 0xffffffff80f507d4 in linker_load_module (kldname=0x0, modname=0xfffff80009dbbc00 "i915kms", parent=0x0, verinfo=0x0, 
    lfpp=0xfffffe022f295728) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_linker.c:2003
#38 0xffffffff80f526c3 in kern_kldload (td=0xfffff80009b5d000, file=0xfffff80009dbbc00 "i915kms", fileid=0xfffffe022f295790)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_linker.c:1037
#39 0xffffffff80f527e8 in sys_kldload (td=0xfffff80009b5d000, uap=0xfffffe022f295958)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_linker.c:1063
#40 0xffffffff81635cd1 in syscallenter (td=0xfffff80009b5d000, sa=0xfffffe022f295948) at subr_syscall.c:135
#41 0xffffffff8163557a in amd64_syscall (td=0xfffff80009b5d000, traced=0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:942
#42 0xffffffff8160ca7b in Xfast_syscall () at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:396
#43 0x000000080086d12a in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
(kgdb) 

linux chromium dependencies

Need the following to work even without sandboxing:

  • /proc/modules
  • inotify
  • name_to_handle_at
  • netlink

for sandboxing need user environment support for clone.

libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
[1542:1542:0709/062814:ERROR:browser_main_loop.cc(219)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
[1542:101512:0709/062816:ERROR:address_tracker_linux.cc(153)] Could not create NETLINK socket: Address family not supported by protocol
[1542:101512:0709/062816:ERROR:file_path_watcher_linux.cc(264)] inotify_init() failed: Function not implemented
[1542:101515:0709/062816:ERROR:bus.cc(432)] Failed to connect to the bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[1542:1542:0709/062817:ERROR:process_posix.cc(191)] Not implemented reached in bool {anonymous}::WaitForExitWithTimeoutImpl(base::ProcessHandle, int*, base::TimeDelta)
[1542:1542:0709/062817:ERROR:process_singleton_posix.cc(998)] Failed to bind() /tmp/.org.chromium.Chromium.g5kH93/SingletonSocket: No such file or directory
[1542:1542:0709/062817:ERROR:chrome_browser_main.cc(1432)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.
MESA-LOADER: could not create udev device for fd 240
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
libGL: Using DRI2 for screen 0
[1542:101523:0709/062817:FATAL:udev_linux.cc(20)] Check failed: monitor_.
#0 0x000804a967ae base::debug::StackTrace::StackTrace()
#1 0x000804ab348e
#2 0x000811bf9718
#3 0x000811aa1e9a media::DeviceMonitorLinux::Initialize()
#4 0x000804a983c9 base::debug::TaskAnnotator::RunTask()
#5 0x000804abab91 base::MessageLoop::RunTask()
#6 0x000804abb3ed base::MessageLoop::DeferOrRunPendingTask()
#7 0x000804abb6b9 base::MessageLoop::DoWork()
#8 0x000804a87480 base::MessagePumpLibevent::Run()
#9 0x000804ad8f88 base::RunLoop::Run()
#10 0x000804ab9d65 base::MessageLoop::Run()
#11 0x000808a8ce58 content::BrowserThreadImpl::IOThreadRun()
#12 0x000808a8d7ed content::BrowserThreadImpl::Run()
#13 0x000804afc888 base::Thread::ThreadMain()
#14 0x000804af8006
#15 0x000826e076fa start_thread
#16 0x000827306b5d clone

[1554:1554:0709/062819:FATAL:thread_helpers.cc(41)] Check failed: 0 == fstat_ret. : No such file or directory

memory overwrites on Arrandale (AGP)

All the frame buffer attributes are the same in both 3.8 and 4.6 which is why it's very odd that bzero'ing it after mapping appears to overwrite many thread stacks causing the system to fail rather spectacularly.
@dumbbell can you take a look?

static int intelfb_create(struct drm_fb_helper *helper,
              struct drm_fb_helper_surface_size *sizes)
{
    struct intel_fbdev *ifbdev =
        container_of(helper, struct intel_fbdev, helper);
    struct intel_framebuffer *intel_fb = ifbdev->fb;
    struct drm_device *dev = helper->dev;
    struct drm_i915_private *dev_priv = dev->dev_private;
    struct fb_info *info;
    struct drm_framebuffer *fb;
    struct drm_i915_gem_object *obj;
    int size, ret;
    bool prealloc = false;


    if (intel_fb &&
        (sizes->fb_width > intel_fb->base.width ||
         sizes->fb_height > intel_fb->base.height)) {
        DRM_DEBUG_KMS("BIOS fb too small (%dx%d), we require (%dx%d),"
                  " releasing it\n",
                  intel_fb->base.width, intel_fb->base.height,
                  sizes->fb_width, sizes->fb_height);
        drm_framebuffer_unreference(&intel_fb->base);
        intel_fb = ifbdev->fb = NULL;
    }
    if (!intel_fb || WARN_ON(!intel_fb->obj)) {
        DRM_DEBUG_KMS("no BIOS fb, allocating a new one\n");
        ret = intelfb_alloc(helper, sizes);
        if (ret)
            return ret;
        intel_fb = ifbdev->fb;
    } else {
        DRM_DEBUG_KMS("re-using BIOS fb\n");
        prealloc = true;
        sizes->fb_width = intel_fb->base.width;
        sizes->fb_height = intel_fb->base.height;
    }

    obj = intel_fb->obj;
    size = obj->base.size;

    mutex_lock(&dev->struct_mutex);

    /* Pin the GGTT vma for our access via info->screen_base.
     * This also validates that any existing fb inherited from the
     * BIOS is suitable for own access.
     */
    ret = intel_pin_and_fence_fb_obj(NULL, &ifbdev->fb->base, NULL);
    if (ret)
        goto out_unlock;

    info = drm_fb_helper_alloc_fbi(helper);
    if (IS_ERR(info)) {
        DRM_ERROR("Failed to allocate fb_info\n");
        ret = PTR_ERR(info);
        goto out_unpin;
    }

    info->par = helper;

    fb = &ifbdev->fb->base;

    ifbdev->helper.fb = fb;

    strcpy(info->fix.id, "inteldrmfb");

    info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT;
    info->fbops = &intelfb_ops;

    /* setup aperture base/size for vesafb takeover */
    info->apertures->ranges[0].base = dev->mode_config.fb_base;
    info->apertures->ranges[0].size = dev_priv->gtt.mappable_end;

    info->fix.smem_start = dev->mode_config.fb_base + i915_gem_obj_ggtt_offset(obj);
    info->fix.smem_len = size;

    vm_phys_fictitious_reg_range(info->apertures->ranges[0].base,
                     info->apertures->ranges[0].base +
                     info->apertures->ranges[0].size,
                     VM_MEMATTR_WRITE_COMBINING);
    info->screen_base =
        ioremap_wc(dev_priv->gtt.mappable_base + i915_gem_obj_ggtt_offset(obj),
               size);

    if (!info->screen_base) {
        DRM_ERROR("Failed to remap framebuffer into virtual memory\n");
        ret = -ENOSPC;
        goto out_destroy_fbi;
    }
    info->screen_size = size;
    DRM_DEBUG("mappable_base %lx ggtt_offset %lx screen_size %lx\n", dev_priv->gtt.mappable_base,
          i915_gem_obj_ggtt_offset(obj), info->screen_size);


    /* This driver doesn't need a VT switch to restore the mode on resume */
    info->skip_vt_switch = true;

    drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
    drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);

    /* If the object is shmemfs backed, it will have given us zeroed pages.
     * If the object is stolen however, it will be full of whatever
     * garbage was left in there.
     */
    if (ifbdev->fb->obj->stolen && !prealloc)
        memset_io(info->screen_base, 0, info->screen_size); <----- MEMORY OVERWRITE HERE

    /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */

    DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08zx, bo %p\n",
              fb->width, fb->height,
              i915_gem_obj_ggtt_offset(obj), obj);

    mutex_unlock(&dev->struct_mutex);
    vga_switcheroo_client_fb_set(dev->pdev, info);
    return 0;

out_destroy_fbi:
    drm_fb_helper_release_fbi(helper);
out_unpin:
    i915_gem_object_ggtt_unpin(obj);
out_unlock:
    mutex_unlock(&dev->struct_mutex);
    return ret;
}

Panic on i915kms load with AGP cards

(Opening this issue to track AGP support, which has not been upgraded yet. Reference: freebsd-X11 mailing list.)

There is a regression in AGP with the DRM 4.6 kernel. kldoad i915kms crashes the system with at least two Intel GMA processors:

  • G41 Express (desktop, EagleLake).
  • GM45 (mobile, Cantiga).

Those chips work very well with the 3.9 version of DRM.

FreeRDP panic

Hi!

I'm getting a repeatable panic when using FreeRDP to connect to a Windows guest after one or two minutes of what seems to be a stable connection:

freerdp panic

I've tested with two quite different chips, an old G41 Express and a more recent i3-4030U Haswell.

Normal video operation is stable besides this issue.

Best regards,
Juan

P.S.: Updated kernel (05b8680) and packages from Matthew repository.

drm46 needs to support debugfs

Periodically a ring will hang and i915_capture_error_state will report the following:

        DRM_INFO("GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.\n");
        DRM_INFO("Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel\n");
        DRM_INFO("drm/i915 developers can then reassign to the right component if it's not a kernel issue.\n");
        DRM_INFO("The gpu crash dump is required to analyze gpu hangs, so please always attach it.\n");
        DRM_INFO("GPU crash dump saved to /sys/class/drm/card%d/error\n", dev->primary->index);

Currently there is no way to retrieve that error information. This is a placeholder for tracking the addition of drm_debugfs and driver debugfs support.

QT5 redraw problems

img_0337

When a qt5 window is partially covered it doesn't get redrawn when revealed.

cftdisk_2016060605 SNA panic SB/t420s

I'm able to reliably trigger this by going to 'about:support' in Firefox 46.0 with SNA. Switching back to UXA and I can get there.

#0  doadump (textdump=1) at pcpu.h:221
221     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) #0  doadump (textdump=1) at pcpu.h:221
#1  0xffffffff80a47b05 in kern_reboot (howto=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/kern_shutdown.c:366
#2  0xffffffff80a480db in vpanic (fmt=<value optimized out>, 
    ap=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/kern_shutdown.c:767
#3  0xffffffff80a48123 in panic (fmt=0x0)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/kern_shutdown.c:690
#4  0xffffffff80a51aa1 in mi_switch (flags=<value optimized out>, 
    newtd=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/kern_synch.c:389
#5  0xffffffff80a955e6 in sleepq_switch (wchan=<value optimized out>, pri=0)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/subr_sleepqueue.c:557
#6  0xffffffff80a95bc3 in sleepq_timedwait (wchan=0xfffffe023261d2c0, pri=0)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/subr_sleepqueue.c:672
#7  0xffffffff80a51268 in _sleep (ident=0xfffffe023261d2c0, 
    lock=<value optimized out>, priority=<value optimized out>, 
    wmesg=<value optimized out>, sbt=214748350, pr=0, 
    flags=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/kern_synch.c:225
#8  0xffffffff82936adf in schedule_timeout (timeout=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:217
#9  0xffffffff827edb38 in intel_atomic_commit (dev=<value optimized out>, 
    state=<value optimized out>, async=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/intel_display.c:13439
#10 0xffffffff828d981c in drm_fb_helper_restore_fbdev_mode_unlocked (
    fb_helper=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_fb_helper.c:383
#11 0xffffffff828f2062 in vt_kms_postswitch (arg=0xfffff800079c5f40)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/linux_fb.c:76
#12 0xffffffff808d736b in vt_window_switch (vw=0xffffffff818d7f10)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/dev/vt/vt_core.c:540
#13 0xffffffff808d4e60 in vtterm_cngrab (tm=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/dev/vt/vt_core.c:1465
#14 0xffffffff809ece32 in cngrab ()
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/kern_cons.c:368
#15 0xffffffff80a886c9 in kdb_trap (type=<value optimized out>, 
    code=<value optimized out>, tf=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/subr_kdb.c:651
#16 0xffffffff80eb73f1 in trap_fatal (frame=0xfffffe023261d6f0, eva=0)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/amd64/amd64/trap.c:836
#17 0xffffffff80eb70c0 in trap (frame=0xfffffe023261d6f0)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/amd64/amd64/trap.c:203
#18 0xffffffff80e97361 in calltrap ()
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/amd64/amd64/exception.S:236
#19 0xffffffff80ad7ea5 in soreceive_generic (so=<value optimized out>, 
    psa=<value optimized out>, uio=0xfffffe023261d8d0, 
    mp0=<value optimized out>, controlp=<value optimized out>, 
    flagsp=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/uipc_socket.c:1755
#20 0xffffffff80addddb in kern_recvit (td=<value optimized out>, 
    s=<value optimized out>, mp=<value optimized out>, fromseg=UIO_USERSPACE, 
    controlp=<value optimized out>)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/uipc_syscalls.c:1041
#21 0xffffffff80ade1cf in sys_recvmsg (td=0xfffff8000e16f000, 
    uap=0xfffffe023261da40)
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/kern/uipc_syscalls.c:1153
#22 0xffffffff80eb7beb in amd64_syscall (td=0xfffff8000e16f000, traced=0)
    at subr_syscall.c:135
#23 0xffffffff80e9764b in Xfast_syscall ()
    at /usr/home/mmacy/devel/freebsd-base-graphics/sys/amd64/amd64/exception.S:396
#24 0x000000080248bb6a in ?? ()

Kernel panic in __wake_up in linux/wait.h

I get the following panic pretty frequently on Haswell:

panic: uma_zfree_arg: called with spinlock or critical section held

#1  doadump (textdump=0)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/kern_shutdown.c:298
#2  0xffffffff82670e19 in vt_kms_postswitch (arg=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/drm2/../../../dev/drm2/linux_fb.c:82
#3  0xffffffff808d774b in vt_window_switch (
    vw=0xffffffff81707860 <vt_conswindow>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/dev/vt/vt_core.c:540
#4  0xffffffff808d5240 in vtterm_cngrab (tm=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/dev/vt/vt_core.c:1465
#5  0xffffffff809ede92 in cngrab ()
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/kern_cons.c:368
#6  0xffffffff80a491d6 in vpanic (
    fmt=0xffffffff813dd934 "uma_zfree_arg: called with spinlock or critical section held", ap=0xfffffe03d259c340)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/kern_shutdown.c:745
#7  0xffffffff80a490c6 in kassert_panic (
    fmt=0xffffffff813dd934 "uma_zfree_arg: called with spinlock or critical section held")
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/kern_shutdown.c:649
#8  0xffffffff80d246f3 in uma_zfree_arg (zone=0xfffff8001103e000, 
    item=0xfffff8005d165240, udata=0x0)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/vm/uma_core.c:2644
#9  0xffffffff80aafaea in uma_zfree (zone=<unavailable>, item=<unavailable>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/vm/uma.h:364
#10 doselwakeup (sip=<optimized out>, pri=-1)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/sys_generic.c:1837
#11 0xffffffff8265b9db in __wake_up (mode=1, q=<optimized out>, 
    nr=<optimized out>, key=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/drm2/../../../compat/linuxkpi/common/include/linux/wait.h:192
#12 drm_send_event_locked (dev=<optimized out>, e=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/drm2/../../../dev/drm2/drm_fops.c:814
#13 0xffffffff826606d6 in send_vblank_event (dev=0xfffff80032090000, 
    e=0xfffff801c167b900, seq=<optimized out>, now=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/drm2/../../../dev/drm2/drm_irq.c:1050
#14 drm_send_vblank_event (dev=0xfffff80032090000, pipe=0, 
    e=0xfffff801c167b900)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/drm2/../../../dev/drm2/drm_irq.c:1132
#15 0xffffffff824e756a in page_flip_completed (intel_crtc=0xfffff800320a5000)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/intel_display.c:3897
#16 0xffffffff824e6bda in do_intel_finish_page_flip (dev=0xfffff80032090000, 
    crtc=0xfffff800320a5000)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/intel_display.c:10896
#17 0xffffffff824e6c5c in intel_finish_page_flip_plane (
    dev=0xfffff80032090000, plane=0)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/intel_display.c:10914
#18 0xffffffff824b863b in ivb_display_irq_handler (dev=0xfffff80032090000, 
    de_iir=9)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_irq.c:2161
#19 0xffffffff824af473 in ironlake_irq_handler (irq=16, arg=0xfffff80032090000)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_irq.c:2230
#20 0xffffffff826bf727 in linux_irq_handler (ent=0xfffff80011069e80)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:1590
#21 0xffffffff80a0e3dc in intr_event_handle (ie=<optimized out>, 
    frame=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/kern_intr.c:1436
#22 0xffffffff80fad0f8 in intr_execute_handlers (isrc=0xfffff800056fb490, 
    frame=0xfffffe03d259c840)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/x86/x86/intr_machdep.c:275
#23 0xffffffff80fb1f18 in lapic_handle_intr (vector=61, 
    frame=0xfffffe03d259c840)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/x86/x86/local_apic.c:1143
#24 <signal handler called>
#25 0xffffffff803b423b in acpi_cpu_idle (sbt=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/dev/acpica/acpi_cpu.c:1216
#26 0xffffffff80faaadf in cpu_idle_acpi (sbt=22751746)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/x86/x86/cpu_machdep.c:263
#27 0xffffffff80faab85 in cpu_idle (busy=0)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/x86/x86/cpu_machdep.c:415
#28 0xffffffff80a760d5 in sched_idletd (dummy=<optimized out>)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/sched_ule.c:2688
#29 0xffffffff80a0b974 in fork_exit (
    callout=0xffffffff80a75c30 <sched_idletd>, arg=0x0, 
    frame=0xfffffe03d259cac0)
    at /mnt/home/dumbbell/Projects/freebsd/src/GIT/sys/kern/kern_fork.c:1038

The kernel is at cd1bbc3.

cftdisk_2016060605 - Screen corrupt

Hello, thank you for the effort.

The screen shows a moving image like this:

imag0177

The following report it's made from a PCBSD 11.0-CURRENTMAY2016 FreeBSD with UEFI disabled:

notebookinfo.txt

I'll keep testing.

Again, thank you,
Rodrigo

6d310b5(drm-next-4.6) & xf86-video-intel-2.99.917.20160417 panic

$ uname -ar
FreeBSD boomer 11.0-ALPHA1 FreeBSD 11.0-ALPHA1 #7 6d310b5(drm-next-4.6)-dirty: Sun Jun 5 20:01:31 PDT 2016 root@boomer:/usr/obj/usr/home/pwright/git/freebsd-base-graphics/sys/GENERIC amd64
$ pkg info|grep intel
xf86-video-intel-2.99.917.20160417 Driver for Intel integrated graphics chipsets

When Xorg is configured to use SNA I get a hard crash requiring manual reboot. Reverting Xorg to UXA works, but there are artifacts in x-windows. i was able to capture a backtrace:

(kgdb) bt
#0  doadump (textdump=0) at pcpu.h:221
#1  0xffffffff82bfaf52 in drm_ut_debug_printk (function_name=0x0, format=0xffffffff82c3c71e "Set [NOFB] for plane state %p\n") at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_drv.c:97
#2  0xffffffff82be08b1 in __drm_atomic_helper_disable_plane (plane=<value optimized out>, plane_state=0xfffff80008d60c00)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_atomic_helper.c:1758
#3  0xffffffff82c037ce in drm_fb_helper_restore_fbdev_mode_unlocked (fb_helper=<value optimized out>) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_fb_helper.c:370
#4  0xffffffff82c1c039 in vt_kms_postswitch (arg=0xfffff80008c14680) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/linux_fb.c:76
#5  0xffffffff808d736b in vt_window_switch (vw=0xffffffff818d7f10) at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:540
#6  0xffffffff808d4e60 in vtterm_cngrab (tm=<value optimized out>) at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:1465
#7  0xffffffff809ece32 in cngrab () at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_cons.c:368
#8  0xffffffff80a48026 in vpanic (fmt=0xffffffff81430458 "vm_page_free: freeing PG_UNHOLDFREE page %p", ap=0xfffffe0230baf280) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:745
#9  0xffffffff80a47f16 in kassert_panic (fmt=<value optimized out>) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:649
#10 0xffffffff80d3a79b in vm_page_free_toq (m=0xfffff802639ee318) at /usr/home/pwright/git/freebsd-base-graphics/sys/vm/vm_page.c:2987
#11 0xffffffff82a509ce in __free_hot_cold_page (vm_page=0xfffff802639ee318) at gfp.h:108
#12 0xffffffff82a4f098 in i915_gem_userptr_put_pages (obj=0xfffff80100140d80) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_gem_userptr.c:691
#13 0xffffffff82a1ac41 in i915_gem_object_put_pages (obj=0xfffff80100140d80) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_gem.c:2283
#14 0xffffffff82a1ff8f in i915_gem_free_object (gem_obj=0xfffff80100140d80) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_gem.c:4651
#15 0xffffffff82c0953f in drm_gem_object_unreference_unlocked (obj=<value optimized out>) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_gem.c:793
#16 0xffffffff82c08c8d in drm_gem_object_release_handle (id=<value optimized out>, ptr=0xfffff80100140d80, data=0xfffff80008d17000)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_gem.c:265
#17 0xffffffff82c08bb7 in drm_gem_handle_delete (filp=0xfffff80008d17000, handle=18) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_gem.c:308
#18 0xffffffff82c0ac21 in drm_ioctl (filp=<value optimized out>, cmd=2148033545, arg=<value optimized out>) at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_ioctl.c:766
#19 0xffffffff82c61f8e in linux_dev_ioctl (dev=<value optimized out>, cmd=2148033545, data=0x0, fflag=<value optimized out>, td=0xfffff80100386000)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:919
#20 0xffffffff8091d6c6 in devfs_ioctl_f (fp=0xfffff80008beb690, com=2148033545, data=0xfffffe0230baf7f0, cred=0xfffff80008d29900, td=0xfffff80100386000) at /usr/home/pwright/git/freebsd-base-graphics/sys/fs/devfs/devfs_vnops.c:815
#21 0xffffffff80aac666 in kern_ioctl (td=<value optimized out>, fd=<value optimized out>, com=<value optimized out>, data=<value optimized out>) at file.h:328
#22 0xffffffff80aac3b1 in sys_ioctl (td=<value optimized out>, uap=0xfffffe0230baf940) at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/sys_generic.c:743
#23 0xffffffff80eb7beb in amd64_syscall (td=0xfffff80100386000, traced=0) at subr_syscall.c:135
#24 0xffffffff80e9764b in Xfast_syscall () at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:396
#25 0x00000008024fcc0a in ?? ()
Previous frame inner to this frame (corrupt stack?)

looks like a corrupt stack - d'oh.

video & audio disconnect abruptly

Logs are pretty quiet, just:

# /var/log/messages
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
hdac0: Unexpected unsolicited response from address 0: 00000000
hdac0: Unexpected unsolicited response from address 0: 00000000
...

hw: intel nuc referred to in #17

Very Slow Keyboard Input On Haswell

$ sysctl hw.model
hw.model: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
$ uname -a
FreeBSD pier 11.0-ALPHA5 FreeBSD 11.0-ALPHA5 #6 a76e358(drm-next-4.6)-dirty: Fri Jul 1 20:09:29 PDT 2016 root@srd0009:/usr/obj/usr/home/pwright/git/freebsd-base-graphics/sys/GENERIC amd64

When I load the i915kms module on this platform I get very slow keyboard input. The system is usable, but it takes several seconds for keyboard touches to update on the console. When I startx (doing "Xorg -configure") and then exit X keyboard inputs update as expected.

External display issues (Skylake)

I just tried plugging my Skylake laptop into an external display with 71faa5b. The xrandr support now seems to work well: I can change the display geometries and work off of the two displays. Two issues:

  1. the driver does not detect when I unplug from the external display (I need to manually deactivate it) and
  2. there are two horizontal lines of artifacts on my internal display after I disconnect from the external display.

Other than that, it's a definite improvement!

Do load time updating of intrinsics

On Linux a call to the clflushopt instruction will be replaced at boot / load time by the older clflush. There's no reason that linuxkpi consumers can't enjoy the same benefit.

linux_recvfrom doesn't support ipv6

root@planecrash:~ # ktrace -di chroot /compat/linux/ ping yahoo.com
ping: unknown host yahoo.com

6180 100671 ping 0.000673 CALL L64 poll(0x7fffffffbf50,0x1,0)
6180 100671 ping 0.000130 RET L64 poll 1
6180 100671 ping 0.000113 CALL L64 linux_sendto(0x4,0x7fffffffc0a0,0x2f,0x4000,0,0)
6180 100671 ping 0.000160 GIO L64 fd 4 wrote 47 bytes
0x0000 a7aa 0100 0001 0000 0000 0000 |............|
0x000c 0579 6168 6f6f 0363 6f6d 0468 |.yahoo.com.h|
0x0018 7364 3102 7761 0763 6f6d 6361 |sd1.wa.comca|
0x0024 7374 036e 6574 0000 0100 01 |st.net.....|

6180 100671 ping 0.000120 RET L64 linux_sendto 47/0x2f
6180 100671 ping 0.000109 CALL L64 poll(0x7fffffffbf50,0x1,0x1388)
6180 100671 ping 0.001476 RET L64 poll 1
6180 100671 ping 0.000240 CALL L64 linux_ioctl(0x4,0x541b,0x7fffffffbf3c)
6180 100671 ping 0.000165 RET L64 linux_ioctl 0
6180 100671 ping 0.000135 CALL L64 linux_recvfrom(0x4,0x7fffffffcba0,0x400,0,0x7fffffffbf60,0x7fffffffbf40)
6180 100671 ping 0.000113 RET L64 linux_recvfrom -1 errno -97 Address family not supported by protocol family

google chromium causes kernel panic on Haswell

hw.model: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz

$ uname -a
FreeBSD beastie.mydomain.local 11.0-ALPHA1 FreeBSD 11.0-ALPHA1 #0 aa431a3(drm-next-4.6): Tue May 31 21:54:56 UTC 2016 [email protected]:/usr/obj/mnt/sys/GENERIC amd64

Start X with SNA enabled using cwm as my window manager. i then start xterm and from there launch google chromium. This results in a kernel panic with the following backtrace. Looks like I need to rebuild my kernel with optimization flags disabled but hopefully this is helpful.

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0x3c0
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff82e7ecaa
stack pointer           = 0x28:0xfffffe046294e6a0
frame pointer           = 0x28:0xfffffe046294e750
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (i915-hangcheck)

<snip>

(kgdb) bt
#0  doadump (textdump=1) at pcpu.h:221
#1  0xffffffff80a462b5 in kern_reboot (howto=<value optimized out>) at /mnt/sys/kern/kern_shutdown.c:366
#2  0xffffffff80a4688b in vpanic (fmt=<value optimized out>, ap=<value optimized out>) at /mnt/sys/kern/kern_shutdown.c:767
#3  0xffffffff80a468d3 in panic (fmt=0x0) at /mnt/sys/kern/kern_shutdown.c:690
#4  0xffffffff80a50251 in mi_switch (flags=<value optimized out>, newtd=<value optimized out>) at /mnt/sys/kern/kern_synch.c:389
#5  0xffffffff80a93d96 in sleepq_switch (wchan=<value optimized out>, pri=0) at /mnt/sys/kern/subr_sleepqueue.c:557
#6  0xffffffff80a94373 in sleepq_timedwait (wchan=0xfffffe046294e930, pri=0) at /mnt/sys/kern/subr_sleepqueue.c:672
#7  0xffffffff80a4fa18 in _sleep (ident=0xfffffe046294e930, lock=<value optimized out>, priority=<value optimized out>, wmesg=<value optimized out>, 
    sbt=214748350, pr=0, flags=<value optimized out>) at /mnt/sys/kern/kern_synch.c:225
#8  0xffffffff82fefabf in schedule_timeout (timeout=<value optimized out>) at /mnt/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:214
#9  0xffffffff82ea98e8 in intel_atomic_commit (dev=<value optimized out>, state=<value optimized out>, async=<value optimized out>)
    at /mnt/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/intel_display.c:13439
#10 0xffffffff82f9471c in drm_fb_helper_restore_fbdev_mode_unlocked (fb_helper=<value optimized out>)
    at /mnt/sys/modules/drm2/drm2/../../../dev/drm2/drm_fb_helper.c:383
#11 0xffffffff82facc49 in vt_kms_postswitch (arg=0xfffff80005245d40) at /mnt/sys/modules/drm2/drm2/../../../dev/drm2/linux_fb.c:76
#12 0xffffffff808d636b in vt_window_switch (vw=0xffffffff818ce250) at /mnt/sys/dev/vt/vt_core.c:540
#13 0xffffffff808d3e60 in vtterm_cngrab (tm=<value optimized out>) at /mnt/sys/dev/vt/vt_core.c:1465
#14 0xffffffff809eb5e2 in cngrab () at /mnt/sys/kern/kern_cons.c:368
#15 0xffffffff80a86e79 in kdb_trap (type=<value optimized out>, code=<value optimized out>, tf=<value optimized out>) at /mnt/sys/kern/subr_kdb.c:651
#16 0xffffffff80eb53f1 in trap_fatal (frame=0xfffffe046294e5f0, eva=960) at /mnt/sys/amd64/amd64/trap.c:836
#17 0xffffffff80eb563d in trap_pfault (frame=0xfffffe046294e5f0, usermode=0) at /mnt/sys/amd64/amd64/trap.c:691
#18 0xffffffff80eb4b24 in trap (frame=0xfffffe046294e5f0) at /mnt/sys/amd64/amd64/trap.c:442
#19 0xffffffff80e94fd1 in calltrap () at /mnt/sys/amd64/amd64/exception.S:236
#20 0xffffffff82e7ecaa in i915_capture_error_state (dev=<value optimized out>, wedged=Unhandled dwarf expression opcode 0x9d
) at pid.h:21
#21 0xffffffff82e82eaf in i915_handle_error (dev=0xfffff8005ab4b000, wedged=Unhandled dwarf expression opcode 0x9d
) at /mnt/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_irq.c:2674
#22 0xffffffff82e85344 in i915_hangcheck_elapsed (work=<value optimized out>) at /mnt/sys/modules/drm2/i915/i915kms/../../../../dev/drm2/i915/i915_irq.c:3199
#23 0xffffffff82ff1e24 in linux_work_fn (context=0xfffffe0008a53188, pending=<value optimized out>)
    at /mnt/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:1466
#24 0xffffffff80a985fc in taskqueue_run_locked (queue=<value optimized out>) at /mnt/sys/kern/subr_taskqueue.c:463
#25 0xffffffff80a99148 in taskqueue_thread_loop (arg=<value optimized out>) at /mnt/sys/kern/subr_taskqueue.c:717
#26 0xffffffff80a090c4 in fork_exit (callout=0xffffffff80a990c0 <taskqueue_thread_loop>, arg=0xfffff8005aaeaf10, frame=0xfffffe046294eac0)
    at /mnt/sys/kern/kern_fork.c:1034
#27 0xffffffff80e9550e in fork_trampoline () at /mnt/sys/amd64/amd64/exception.S:611
#28 0x0000000000000000 in ?? ()
Current language:  auto; currently minimal

drm 4.6 radeon panic on gnome-shell load

% sysctl hw.model
hw.model: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
% sysctl dev.drmn.0.%desc
dev.drmn.0.%desc: ATI Radeon HD 4350

FreeBSD atlas.rainbow-runner.nl 11.0-ALPHA5 FreeBSD 11.0-ALPHA5 #0 3986f37(drm-next-4.6): Sun Jul 10 19:50:33 CEST 2016 [email protected]:/usr/obj/usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/GENERIC amd64

panic: page fault

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...

Unread portion of the kernel message buffer:

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address = 0x0
fault code = supervisor write data, page not present
instruction pointer = 0x20:0xffffffff80eb7f4e
stack pointer = 0x28:0xfffffe01249e71d0
frame pointer = 0x28:0xfffffe01249e71e0
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 1220 (gnome-shell)
trap number = 12
vt_kms_postswitch() at vt_kms_postswitch+0x48/frame 0xfffffe01249e6ce0
vt_window_switch() at vt_window_switch+0xdb/frame 0xfffffe01249e6d20
vtterm_cngrab() at vtterm_cngrab+0x20/frame 0xfffffe01249e6d40
cngrab() at cngrab+0x32/frame 0xfffffe01249e6d60
vpanic() at vpanic+0x106/frame 0xfffffe01249e6de0
panic() at panic+0x43/frame 0xfffffe01249e6e40
trap_fatal() at trap_fatal+0x351/frame 0xfffffe01249e6ea0
trap_pfault() at trap_pfault+0x1fd/frame 0xfffffe01249e6f00
trap() at trap+0x284/frame 0xfffffe01249e7110
calltrap() at calltrap+0x8/frame 0xfffffe01249e7110
--- trap 0xc, rip = 0xffffffff80eb7f4e, rsp = 0xfffffe01249e71e0, rbp = 0xfffffe01249e71e0 ---
bzero() at bzero+0xe/frame 0xfffffe01249e71e0
gnome-shell:101761 WARNING !(((&(&(&(dev)->mode_config)->mutex)->sx)->sx_lock & ~((0x01 | 0x02 | 0x04 | 0x08))) != (uintptr_t)((void *)0)) && !drm_modeset_is_locked(&(&(dev)->mode_config)->connection_mutex) failed at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_crtc_helper.c:575
gnome-shell:101761 WARNING !(((&(&(&(dev)->mode_config)->mutex)->sx)->sx_lock & ~((0x01 | 0x02 | 0x04 | 0x08))) != (uintptr_t)((void *)0)) && !drm_modeset_is_locked(&(&(dev)->mode_config)->connection_mutex) failed at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_crtc_helper.c:611
gnome-shell:101761 WARNING !(((&(&(&(dev)->mode_config)->mutex)->sx)->sx_lock & ~((0x01 | 0x02 | 0x04 | 0x08))) != (uintptr_t)((void *)0)) && !drm_modeset_is_locked(&(&(dev)->mode_config)->connection_mutex) failed at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_crtc_helper.c:651
panic: page fault
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01249e6d60
vpanic() at vpanic+0x182/frame 0xfffffe01249e6de0
panic() at panic+0x43/frame 0xfffffe01249e6e40
trap_fatal() at trap_fatal+0x351/frame 0xfffffe01249e6ea0
trap_pfault() at trap_pfault+0x1fd/frame 0xfffffe01249e6f00
trap() at trap+0x284/frame 0xfffffe01249e7110
calltrap() at calltrap+0x8/frame 0xfffffe01249e7110
--- trap 0xc, rip = 0xffffffff80eb7f4e, rsp = 0xfffffe01249e71e0, rbp = 0xfffffe01249e71e0 ---
bzero() at bzero+0xe/frame 0xfffffe01249e71e0
ttm_pool_populate() at ttm_pool_populate+0x3f3/frame 0xfffffe01249e72a0
radeon_ttm_tt_populate() at radeon_ttm_tt_populate+0x17a/frame 0xfffffe01249e7330
ttm_tt_bind() at ttm_tt_bind+0x2c/frame 0xfffffe01249e7350
ttm_bo_handle_move_mem() at ttm_bo_handle_move_mem+0x1bb/frame 0xfffffe01249e7410
ttm_bo_validate() at ttm_bo_validate+0x186/frame 0xfffffe01249e74b0
ttm_bo_init() at ttm_bo_init+0x4ae/frame 0xfffffe01249e7550
radeon_bo_create() at radeon_bo_create+0x33a/frame 0xfffffe01249e7640
radeon_gem_object_create() at radeon_gem_object_create+0x142/frame 0xfffffe01249e76e0
radeon_gem_create_ioctl() at radeon_gem_create_ioctl+0xc8/frame 0xfffffe01249e7770
drm_ioctl() at drm_ioctl+0x287/frame 0xfffffe01249e7880
radeon_drm_ioctl() at radeon_drm_ioctl+0x6b/frame 0xfffffe01249e78d0
linux_dev_ioctl() at linux_dev_ioctl+0x126/frame 0xfffffe01249e7940
devfs_ioctl_f() at devfs_ioctl_f+0x156/frame 0xfffffe01249e79a0
kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe01249e7a00
sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe01249e7ae0
amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe01249e7bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe01249e7bf0
--- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x80984bbca, rsp = 0x7fffffffd788, rbp = 0x7fffffffd7b0 ---
Uptime: 2m4s
Dumping 483 out of 4060 MB:..4%..14%..24%..34%..43%..53%..63%..73%..83%..93%

Reading symbols from /boot/kernel.drm/zfs.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/zfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/zfs.ko
Reading symbols from /boot/kernel.drm/opensolaris.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/opensolaris.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/opensolaris.ko
Reading symbols from /boot/kernel.drm/linux.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/linux.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/linux.ko
Reading symbols from /boot/kernel.drm/linux_common.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/linux_common.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/linux_common.ko
Reading symbols from /boot/kernel.drm/pf.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/pf.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/pf.ko
Reading symbols from /boot/kernel.drm/coretemp.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/coretemp.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/coretemp.ko
Reading symbols from /boot/kernel.drm/fdescfs.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/fdescfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/fdescfs.ko
Reading symbols from /boot/kernel.drm/linprocfs.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/linprocfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/linprocfs.ko
Reading symbols from /boot/kernel.drm/radeonkms.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/radeonkms.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/radeonkms.ko
Reading symbols from /boot/kernel.drm/drm2.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/drm2.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/drm2.ko
Reading symbols from /boot/kernel.drm/linuxkpi.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/linuxkpi.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/linuxkpi.ko
Reading symbols from /boot/kernel.drm/radeon_RV710_pfp_bin.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/radeon_RV710_pfp_bin.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/radeon_RV710_pfp_bin.ko
Reading symbols from /boot/kernel.drm/radeon_RV710_me_bin.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/radeon_RV710_me_bin.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/radeon_RV710_me_bin.ko
Reading symbols from /boot/kernel.drm/radeon_R700_rlc_bin.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/radeon_R700_rlc_bin.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/radeon_R700_rlc_bin.ko
Reading symbols from /boot/kernel.drm/uhid.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/uhid.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/uhid.ko
Reading symbols from /boot/kernel.drm/linux64.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/linux64.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/linux64.ko
Reading symbols from /boot/kernel.drm/ctl.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/ctl.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/ctl.ko
Reading symbols from /boot/kernel.drm/iscsi.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/iscsi.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/iscsi.ko
Reading symbols from /boot/kernel.drm/ums.ko...Reading symbols from /usr/lib/debug//boot/kernel.drm/ums.ko.debug...done.
done.
Loaded symbols for /boot/kernel.drm/ums.ko
#0 doadump (textdump=1) at pcpu.h:221

221 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) #0 doadump (textdump=1) at pcpu.h:221
#1 0xffffffff80a48cb5 in kern_reboot (howto=)

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/kern/kern_shutdown.c:366

#2 0xffffffff80a4928b in vpanic (fmt=,

ap=<value optimized out>)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/kern/kern_shutdown.c:767

#3 0xffffffff80a492d3 in panic (fmt=0x0)

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/kern/kern_shutdown.c:690

#4 0xffffffff80eba371 in trap_fatal (frame=0xfffffe01249e7120, eva=0)

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/amd64/amd64/trap.c:841

#5 0xffffffff80eba57d in trap_pfault (frame=0xfffffe01249e7120, usermode=0)

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/amd64/amd64/trap.c:691

#6 0xffffffff80eb9a64 in trap (frame=0xfffffe01249e7120)

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/amd64/amd64/trap.c:442

#7 0xffffffff80e9a5e1 in calltrap ()

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/amd64/amd64/exception.S:236

#8 0xffffffff80eb7f4e in esigcode ()

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/amd64/amd64/support.S:53

#9 0xffffffff828c6233 in ttm_pool_populate (ttm=)

at libkern.h:191

#10 0xffffffff8279150a in radeon_ttm_tt_populate (ttm=0xfffff80062f21800)

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_ttm.c:759

#11 0xffffffff828bce8c in ttm_tt_bind (ttm=0xfffff80062f21800,

bo_mem=0xfffffe01249e7428)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/ttm/ttm_tt.c:277

#12 0xffffffff828c2f5b in ttm_bo_handle_move_mem (bo=0xfffff80065074468,

mem=<value optimized out>, evict=Unhandled dwarf expression opcode 0x9d

)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/ttm/ttm_bo.c:326
#13 0xffffffff828bf666 in ttm_bo_validate (bo=,

placement=<value optimized out>, interruptible=<value optimized out>, 
no_wait_gpu=<value optimized out>)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/ttm/ttm_bo.c:1011

#14 0xffffffff828bfc6e in ttm_bo_init (bdev=, bo=0x0,

size=18446735279311504456, type=<value optimized out>, 
placement=<value optimized out>, page_alignment=1, 
acc_size=<value optimized out>)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/ttm/ttm_bo.c:1183

#15 0xffffffff8277b5aa in radeon_bo_create (rdev=0xfffffe000470b000,

size=65536, byte_align=4096, kernel=false, domain=2, flags=4, sg=0x0, 
resv=0x0, bo_ptr=0xfffffe01249e7698)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_object.c:262

#16 0xffffffff8275b3e2 in radeon_gem_object_create (rdev=0xfffffe000470b000,

size=65536, alignment=4096, initial_domain=2, flags=4, kernel=false, 
obj=0xfffffe01249e7730)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_gem.c:70

#17 0xffffffff8275bad8 in radeon_gem_create_ioctl (dev=0xfffff8000cd48000,

data=0xfffffe01249e77d0, filp=0xfffff80065074c00)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_gem.c:260

#18 0xffffffff828a14d7 in drm_ioctl (filp=,

cmd=3223348317, arg=<value optimized out>)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/drm_ioctl.c:766

#19 0xffffffff8274fadb in radeon_drm_ioctl (filp=0xfffff80062f21d00,

cmd=3223348317, arg=65536)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/drm2/radeonkms/../../../dev/drm2/radeon/radeon_drv.c:470

#20 0xffffffff82901d36 in linux_dev_ioctl (dev=0xfffff800095b4000,

cmd=3223348317, data=0x10000 <Address 0x10000 out of bounds>, fflag=3, 
td=0xfffff80114e74500)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:867

#21 0xffffffff8091de16 in devfs_ioctl_f (fp=0xfffff80114138b90,

com=3223348317, data=0xfffffe01249e7a30, cred=0xfffff8006c3cb300, 
td=0xfffff80114e74500)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/fs/devfs/devfs_vnops.c:815

#22 0xffffffff80aadd96 in kern_ioctl (td=,

fd=<value optimized out>, com=<value optimized out>, 
data=<value optimized out>) at file.h:328

#23 0xffffffff80aadae1 in sys_ioctl (td=,

uap=0xfffffe01249e7b80)
at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/kern/sys_generic.c:745

#24 0xffffffff80ebab2b in amd64_syscall (td=0xfffff80114e74500, traced=0)

at subr_syscall.c:135

#25 0xffffffff80e9a8cb in Xfast_syscall ()

at /usr/home/kwm/sources/freebsd/drm-freebsd-base-graphics/sys/amd64/amd64/exception.S:396

#26 0x000000080984bbca in ?? ()

Previous frame inner to this frame (corrupt stack?)
Current language: auto; currently minimal
(kgdb)

mate/marco coredump with drm-4.6-next

I am using cftdisk_nodebug_2016062423.img under MacBookPro 2015.
Try to use mate desktop, when I select TraditionalOK/Green, marco coredump:
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=1800 width=2880 depth=32
cmsize=16 size=21196800
pbase=0x90000000 vbase=0xffffffff82410000
name=drmn0 flags=0x0 stride=11776 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: inteldrmfb frame buffer device
[drm:0xffffffff838d8f95s] ERROR uncleared fifo underrun on pipe A
[drm:0xffffffff838897e5s] ERROR CPU pipe A FIFO underrun
pid 934 (marco), uid 1001: exited on signal 6 (core dumped)
pid 985 (marco), uid 1001: exited on signal 6 (core dumped)
pid 987 (marco), uid 1001: exited on signal 6 (core dumped)

No page flip (vsync) callback

User program hangs at select() on /dev/dri/card0.
Could possible be solved by adding current task to the queue in poll.h

static inline void
poll_wait(struct linux_file *filp, wait_queue_head_t *wait_address, poll_table *p)
{    
    selrecord(curthread, &filp->f_selinfo); 
}

I tried adding

    DECLARE_WAITQUEUE(entry, current);
    add_wait_queue(wait_address, &entry);
    schedule();
    remove_wait_queue(wait_address, &entry);

but all I get is a hung program that can not be killed... Need someone with more knowledge about this...

Kernel panic on i915kms module load at boot (i3-4030U)

Loading i915kms at boot time leads to this crash:

[drm:drm_pci_init]
drmn0: <drmn> on vgapci0
[drm:drm_get_pci_dev]


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address  = 0x3b0
fault code             = supervisor read data, page not present
instruction pointer    = 0x20:0xffffffff8093d680
stack pointer          = 0x20:0xffffffff81d776b0
frame pointer          = 0x20:0xffffffff81d77720
code segment           = base 0x0, limit 0xfffff, type 0x1b
                       = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags       = interrupt enabled, resume, IOPL = 0
current process        = 0 (swapper)
[ thread pid 0 tid 100000 ]
Stopped at      __mtx_lock_sleep+0x100: movl   0x3b0(%rax),%ecx

glxgears hangs system in drm_modeset_lock with MacBookPro 2015 with drm-4.6-next

Hi,
I try to test drm-next-4.6 on my MacBookPro 15(2015),
kldload i915kms show:

[drm] Initialized drm 1.1.0 20060810
bus_register unimplemented!!!
drmn0: on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Found 128MB of eLLC
WARN_ON(domain->wake_count == 0)
[drm] Memory usable by graphics device = 2048M
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] Connector eDP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.eDP-1
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-1
[drm] - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-1
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-2
[drm] - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-2
[drm] - kern.vt.fb.default_mode
[drm] Connector HDMI-A-3: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-3
[drm] - kern.vt.fb.default_mode
[drm] Initialized i915 1.6.0 20160229 for drmn on minor 0
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=1800 width=2880 depth=32
cmsize=16 size=21196800
pbase=0x90000000 vbase=0xffffffff82210000
name=drmn0 flags=0x0 stride=11776 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: inteldrmfb frame buffer device

But VT console looks like move to bottom right, I could not see the whole screen.

The mate desktop can show, but quickly panic:

vm_radix_insert: key 33 is already present:

http://sw.gddsn.org.cn/freebsd/drm-4.6-next-panic.jpg

ValleyView: screen corruption after starting "chrome"

Xorg and KDE4 run well; but after running "chrome" screen corruption occurs. Afterwards, text of the KDE menus seems to be okay.

Here's my "/var/log/messages":

valleyview.drm.log.txt

Tried using "xf86-intel-video" in versions 2.21.15_9 and the manually built 2.99.917. No difference. AccelMethod "SNA" is unusable in 2.99.917

Switching between Xorg and console works well - even after corruption has started. My laptop: "Lenovo G50-30" with
vgapci0@pci0:0:2:0: class=0x030000 card=0x381817aa chip=0x0f318086 rev=0x0e hdr=0x00 vendor = 'Intel Corporation' device = 'Atom Processor Z36xxx/Z37xxx Series Graphics & Display' class = display subclass = VGA
and
vgapci1@pci0:1:0:0: class=0x030200 card=0x381817aa chip=0x114010de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M]' class = display subclass = 3D
(Optimus system)

HDMI hotplug doesn't work correctly

adding an HDMI connection at runtime is recognized but if done after driver load will not result in the display being correctly plumbed in for X or the console.

[drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 5 - cnt: 0
[drm:i915_hotplug_work_func] running encoder hotplug functions
[drm:i915_hotplug_work_func] Connector HDMI-A-1 (pin 5) received hotplug event.
[drm:intel_hdmi_detect] [CONNECTOR:47:HDMI-A-1]

display goes grey/black on starting X using 2016060520 img

reproduce

  • boot from provided USB stick
  • kldload i915kms works, albeit screen is all wacky
  • console has overwritten text that is not cleared out
  • startx via service slim onestart
  • display flickers and the goes black
  • box is accessible by ssh
  • no interactive console response, whether switching consoles, or stopping slim xdm

hw

logs

kernel panic when exiting xfce4 using uxa acceleration on skylake

uname: 3b2e17c(drm-next-4.6)-dirty
hw.model: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz

here is the backtrace:

boomer dumped core - see /var/crash/vmcore.0

Thu Jun 16 19:32:33 PDT 2016

FreeBSD boomer 11.0-ALPHA1 FreeBSD 11.0-ALPHA1 #3 3b2e17c(drm-next-4.6)-dirty: Tue Jun 14 22:22:27 PDT 2016     root@srd0009:/usr/obj/usr/home/pwright/git/free
bsd-base-graphics/sys/GENERIC  amd64

panic: vm_page_assert_xbusied: page 0xfffff802681e9840 not exclusive busy @ /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linux
kpi/common/src/linux_compat.c:698

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...

Unread portion of the kernel message buffer:
vt_kms_postswitch() at vt_kms_postswitch+0x48/frame 0xfffffe02314342c0
vt_window_switch() at vt_window_switch+0xdb/frame 0xfffffe0231434300
vtterm_cngrab() at vtterm_cngrab+0x20/frame 0xfffffe0231434320
cngrab() at cngrab+0x32/frame 0xfffffe0231434340
vpanic() at vpanic+0x106/frame 0xfffffe02314343c0
kassert_panic() at kassert_panic+0x126/frame 0xfffffe0231434430
linux_cdev_pager_fault() at linux_cdev_pager_fault+0x5ee/frame 0xfffffe0231434560
dev_pager_getpages() at dev_pager_getpages+0x61/frame 0xfffffe02314345a0
vm_pager_get_pages() at vm_pager_get_pages+0x55/frame 0xfffffe02314345f0
vm_fault_hold() at vm_fault_hold+0x797/frame 0xfffffe0231434700
Dumping 683 out of 8040 MB:..3%..12%..22%..31%..43%..52%..61%..71%..82%..92%

<snip>

(kgdb) #0  doadump (textdump=0) at pcpu.h:221
#1  0xffffffff82d63e49 in vt_kms_postswitch (arg=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm2/drm2/../../../dev/drm2/linux_fb.c:82
#2  0xffffffff808d536b in vt_window_switch (vw=0xffffffff816ff750)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:540
#3  0xffffffff808d2e60 in vtterm_cngrab (tm=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:1465
#4  0xffffffff809eae32 in cngrab ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_cons.c:368
#5  0xffffffff80a46026 in vpanic (
    fmt=0xffffffff82dbb2fc "vm_page_assert_xbusied: page %p not exclusive busy @ %s:%d", ap=0xfffffe0231434400)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:745
#6  0xffffffff80a45f16 in kassert_panic (fmt=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:649
#7  0xffffffff82dae32e in linux_cdev_pager_fault (
    vm_obj=<value optimized out>, offset=0, prot=<value optimized out>, 
    mres=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:698
#8  0xffffffff80d178e1 in dev_pager_getpages (object=0xfffff8019d7ee210, 
    ma=0xfffffe0231434670, count=<value optimized out>, 
    rbehind=0xfffffe0231434668, rahead=0xfffffe023143466c, prot=0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/vm/device_pager.c:268
#9  0xffffffff80d40dc5 in vm_pager_get_pages (object=0xfffff8019d7ee210, 
    m=0xfffffe0231434670, count=1, rbehind=0x0, rahead=0x0, prot=0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/vm/vm_pager.c:291
#10 0xffffffff80d24807 in vm_fault_hold (map=0xfffff801476ef000, 
    vaddr=<value optimized out>, fault_type=2 '\002', fault_flags=0, 
    m_hold=0x0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/vm/vm_fault.c:652
#11 0xffffffff80d24028 in vm_fault (map=0xfffff801476ef000, 
    vaddr=<value optimized out>, fault_type=2 '\002', 
    fault_flags=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/vm/vm_fault.c:273
#12 0xffffffff80eb5555 in trap_pfault (frame=0xfffffe02314349c0, usermode=1)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:741
#13 0xffffffff80eb4be2 in trap (frame=0xfffffe02314349c0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:333
#14 0xffffffff80e95431 in calltrap ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:236
#15 0x0000000801501ed6 in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
(kgdb) 

gears strange behavior with MacBookPro 2015

While running gears, move mouse, gears look fast:
217 frames in 5.003 seconds = 43.374 FPS
311 frames in 5.016 seconds = 62.002 FPS
311 frames in 5.020 seconds = 61.952 FPS
255 frames in 5.212 seconds = 48.926 FPS

If stop moving mouse, gears look very slow:
29 frames in 5.053 seconds = 5.739 FPS
23 frames in 5.530 seconds = 4.159 FPS
19 frames in 5.004 seconds = 3.797 FPS
26 frames in 5.006 seconds = 5.194 FPS

Artifact when starting X on Intel® HD Graphics 4400

hw.model: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz

After loading the drm2 and i915kms kernel modules I generate an xorg.conf using "X --configure". This config allows me to start xfce4 but there are artifacts once xfce loads. Specifically there is no text in the login dialog. Once I click on the dialog the system kernel panics at:

dev/drm2/drm_modeset_lock.c:336

I will post a backtrace and the Xorg once I have the system back online.

Xorg Unable To Find fbdev

CPU/GPU: Intel® HD Graphics 4400

I am able to boot via the May-24 CFT disk image. Primary laptop display is unreadable. But I am able to log in as root, kldload drm2 and once i load the i915kms module the display resets and I am able to see text with out issue.

I then attempt to start X which fails with the following error:
619.959 LoadModule: "fbdev"
619.960 Warning, couldn't open module fbdev
619.960 UnloadModule: "fbdev"
619.960 Unloading fbdev
619.960 Failed to load module "fbdev" (module does not exist, 0)

I've attached the full output of Xorg.0.log from this system for further analysis. I have also attached the full /var/log/messages file which contains some debug output from drivers loading etc.

Xorg.0.log.txt
messages.txt

I also was able to generate a kernel panic on this configuration but it looks unusable, so that may be an unrelated bug.

Steam fails on access to sys/dev/char

linsysfs lacks dev/ support

3775 101370 steam.real 0.000101 NAMI L32 "/sys/dev/char/0:133"
3775 101370 steam.real 0.000141 RET L32 linux_readlinkat -1 errno -2 No such file or directory
3775 101370 steam.real 0.000074 CALL L32 write(0x2,0xffff74d0,0x33)
3775 101370 steam.real 0.000077 GIO L32 fd 2 wrote 51 bytes
"MESA-LOADER: could not create udev device for fd 6
"
3775 101370 steam.real 0.000065 RET L32 write 51/0x33
3775 101370 steam.real 0.000069 CALL L32 linux_ioctl(0x6,0xc0246400,0x12b80f8)
3775 101370 steam.real 0.000076 RET L32 linux_ioctl 0
3775 101370 steam.real 0.000067 CALL L32 linux_ioctl(0x6,0xc0246400,0x12b80f8)
3775 101370 steam.real 0.000068 RET L32 linux_ioctl 0
3775 101370 steam.real 0.000098 PSIG L32 SIGSEGV SIG_DFL code=SEGV_MAPERR
3775 101370 steam.real 0.000010 NAMI L32 "steam.real.core"

xorg kernel panic, i915_driver_load, Ergo Vista 621 notebook

Ergo Vista 621 with Intel GM45 GPU.

PC-BSD 11.0-CURRENTMAY2016 is OK.

PC-BSD 11.0-CURRENTJUNE2016 works when limited to VESA but seems to panic with any attempt to use i915.

(I can not get a core dump, but I do have photographs showing i915_driver_load… in each backtrace. If/when I get the photographs off my phone, I'll add them to this issue.)

Panic in i915kms on power mode change (HD 4400)

With a Haswell (HD 4400) GPU laptop, changing the power mode (plugging or unplugging the power cord) leads to instant panic, while with the drm-next-3.9 branch, switching AC/battery modifies backlight value up and down without issues.

To reproduce:

# kldload drm2 
# sysctl dev.drm.skip_ddb=1 
# kldload i915kms 

[plug / unplug the power cord (the result is exactly the same)]

panic: IMPLEMENT ME
…then the backtrace (picture).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.