FreeBSDDesktop / kms-drm

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

12.0-STABLE r350400 GENERIC amd64 panic when loading i915kms.ko #162

Closed dmitryluhtionov closed 4 years ago

dmitryluhtionov commented 5 years ago

drm-fbsd12.0-kmod-4.16.g20190722 DRM modules for the linuxkpi-based KMS components gpu-firmware-kmod-g20190620 Firmware modules for the linuxkpi-based KMS components core.txt

dmitryluhtionov commented 5 years ago

dmesg with drm.debug=0xf

[drm:drm_core_init] Initialized
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm:intel_detect_pch] Found Cannon Lake PCH (CNP)
[drm:get_allowed_dc_mask] Allowed DC state mask 03
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm:__intel_uncore_early_sanitize] unclaimed mmio detected on uncore init, clearing
[drm:intel_sanitize_options] ppgtt mode: 3
[drm:intel_uc_sanitize_options] enable_guc=0 (submission:no huc:no)
[drm:i915_ggtt_probe_hw] GGTT size = 4096M
[drm:i915_ggtt_probe_hw] GMADR size = 256M
[drm:i915_ggtt_probe_hw] DSM size = 128M
Successfully added WC MTRR for [0x90000000-0x9fffffff]: 0; 
[drm] Got stolen memory base 0x88000000, size 0x8000000
[drm:i915_gem_init_stolen] Memory reserved for graphics device: 131072K, usable: 130048K
[drm:intel_opregion_setup] graphic opregion physical addr: 0x8636b018
[drm:intel_opregion_setup] Public ACPI methods supported
[drm:intel_opregion_setup] SWSCI supported
[drm:swsci_setup] SWSCI GBDA callbacks 00000cb3, SBCB callbacks 00300483
[drm:intel_opregion_setup] ASLE supported
[drm:intel_opregion_setup] ASLE extension supported
[drm:intel_opregion_setup] Found valid VBT in ACPI OpRegion (Mailbox #4)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm:init_vbt_defaults] Set default to SSC at 120000 kHz
[drm:intel_bios_init] VBT signature "$VBT COFFEELAKE     ", BDB version 209
[drm:parse_general_features] BDB_GENERAL_FEATURES int_tv_support 0 int_crt_support 0 lvds_use_ssc 0 lvds_ssc_freq 120000 display_clock_mode 0 fdi_rx_polarity_inverted 0
[drm:parse_general_definitions] crt_ddc_bus_pin: 2
[drm:intel_opregion_get_panel_type] Ignoring OpRegion panel type (0)
[drm:parse_lfp_panel_data] Panel type: 2 (VBT)
[drm:parse_lfp_panel_data] DRRS supported mode is static
[drm:parse_lfp_panel_data] Found panel mode in BIOS VBT tables:
[drm:drm_mode_debug_printmodeline] Modeline 0:"1024x768" 0 65000 1024 1048 1184 1344 768 771 777 806 0x8 0xa
[drm:parse_lfp_panel_data] VBT initial LVDS value 300
[drm:parse_lfp_backlight] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 0, level 255, controller 0
[drm:parse_driver_features] DRRS State Enabled:0
[drm:parse_sdvo_device_mapping] Skipping SDVO device mapping
[drm:parse_ddi_port] Port A VBT info: DP:1 HDMI:0 DVI:0 EDP:1 CRT:0
[drm:parse_ddi_port] VBT HDMI level shift for port A: 0
[drm:parse_ddi_port] Port C VBT info: DP:0 HDMI:1 DVI:1 EDP:0 CRT:0
[drm:parse_ddi_port] VBT HDMI level shift for port C: 8
[drm:parse_ddi_port] Port D VBT info: DP:0 HDMI:1 DVI:1 EDP:0 CRT:0
[drm:parse_ddi_port] VBT HDMI level shift for port D: 8
[drm:parse_ddi_port] Port E VBT info: DP:1 HDMI:0 DVI:0 EDP:0 CRT:0
[drm:sanitize_aux_ch] port A trying to use the same AUX CH (0x40) as port E, disabling port A DP support
[drm:parse_ddi_port] VBT HDMI level shift for port E: 0
[drm:intel_update_rawclk] rawclk rate: 24000 kHz
[drm:gen9_set_dc_state] Setting DC state from 00 to 00
[drm:intel_power_well_enable] enabling power well 1
[drm:intel_power_well_enable] enabling MISC IO power well
[drm:intel_dump_cdclk_state] Current CDCLK 675000 kHz, VCO 8100000 kHz, ref 24000 kHz, voltage level 3
[drm:intel_update_max_cdclk] Max CD clock rate: 675000 kHz
[drm:intel_update_max_cdclk] Max dotclock rate: 675000 kHz
[drm:intel_power_well_enable] enabling always-on
[drm:intel_power_well_enable] enabling DC off
[drm:gen9_set_dc_state] Setting DC state from 00 to 00
[drm:intel_power_well_enable] enabling power well 2
[drm:intel_power_well_enable] enabling DDI A/E IO power well
[drm:intel_power_well_enable] enabling DDI B IO power well
[drm:intel_power_well_enable] enabling DDI C IO power well
[drm:intel_power_well_enable] enabling DDI D IO power well
[drm:intel_csr_ucode_init] Loading i915/kbl_dmc_ver1_04.bin
[drm:drm_irq_install] irq=16
Jul 29 14:31:34 m18 kernel: Successfully added WC MTRR for [0x90000000-0x9fffffff]: 0; 
[drm:intel_fbc_init] Sanitized enable_fbc value: 1
[drm:intel_print_wm_latency] Gen9 Plane WM0 latency 2 (2.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM1 latency 19 (19.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM2 latency 28 (28.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM3 latency 32 (32.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM4 latency 63 (63.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM5 latency 77 (77.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM6 latency 83 (83.0 usec)
[drm:intel_print_wm_latency] Gen9 Plane WM7 latency 99 (99.0 usec)
[drm:intel_modeset_init] 3 display pipes available.
[drm:intel_dump_cdclk_state] Current CDCLK 675000 kHz, VCO 8100000 kHz, ref 24000 kHz, voltage level 3
[drm:intel_ddi_init] VBT says port A is not DVI/HDMI/DP compatible, respect it
[drm:intel_hdmi_init_connector] Adding HDMI connector on port C
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm:intel_hdmi_ddc_pin] Using DDC pin 0x2 for port C (VBT)
[drm:intel_hdmi_init_connector] Adding HDMI connector on port D
[drm] Connector HDMI-A-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-2
[drm]   - kern.vt.fb.default_mode
[drm:intel_hdmi_ddc_pin] Using DDC pin 0x4 for port D (VBT)
[drm:intel_dp_init_connector] Adding DP connector on port E
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm:intel_aux_port] using AUX A for port E (VBT)
[drm:intel_set_plane_visible] pipe A active planes 0x0
[drm:intel_set_plane_visible] pipe A active planes 0x0
[drm:intel_set_plane_visible] pipe A active planes 0x0
[drm:intel_modeset_readout_hw_state] [CRTC:37:pipe A] hw state readout: enabled
[drm:intel_set_plane_visible] pipe B active planes 0x0
[drm:intel_set_plane_visible] pipe B active planes 0x0
[drm:intel_set_plane_visible] pipe B active planes 0x0
[drm:intel_modeset_readout_hw_state] [CRTC:47:pipe B] hw state readout: disabled
[drm:intel_set_plane_visible] pipe C active planes 0x0
[drm:intel_set_plane_visible] pipe C active planes 0x0
[drm:intel_set_plane_visible] pipe C active planes 0x0
[drm:intel_modeset_readout_hw_state] [CRTC:57:pipe C] hw state readout: disabled
[drm:intel_modeset_readout_hw_state] DPLL 0 hw state readout: crtc_mask 0x00000000, on 1
[drm:intel_modeset_readout_hw_state] DPLL 1 hw state readout: crtc_mask 0x00000001, on 1
[drm:intel_modeset_readout_hw_state] DPLL 2 hw state readout: crtc_mask 0x00000000, on 0
[drm:intel_modeset_readout_hw_state] DPLL 3 hw state readout: crtc_mask 0x00000000, on 0
[drm:intel_modeset_readout_hw_state] [ENCODER:58:DDI C] hw state readout: disabled, pipe A
[drm:intel_modeset_readout_hw_state] [ENCODER:63:DDI D] hw state readout: enabled, pipe A
[drm:intel_modeset_readout_hw_state] [ENCODER:65:DDI E] hw state readout: disabled, pipe A
[drm:intel_modeset_readout_hw_state] [CONNECTOR:59:HDMI-A-1] hw state readout: disabled
[drm:intel_modeset_readout_hw_state] [CONNECTOR:64:HDMI-A-2] hw state readout: enabled
[drm:intel_modeset_readout_hw_state] [CONNECTOR:66:DP-1] hw state readout: disabled
[drm:drm_calc_timestamping_constants] crtc 37: hwmode: htotal 2200, vtotal 1125, vdisplay 1080
[drm:drm_calc_timestamping_constants] crtc 37: clock 148500 kHz framedur 16666666 linedur 14814
[drm:intel_dump_pipe_config] [CRTC:37:pipe A][setup_hw_state]
[drm:intel_dump_pipe_config] output_types: HDMI (0x40)
[drm:intel_dump_pipe_config] cpu_transcoder: A, pipe bpp: 24, dithering: 0
[drm:intel_dump_pipe_config] audio: 0, infoframes: 0
[drm:intel_dump_pipe_config] requested mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
[drm:intel_dump_pipe_config] adjusted mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x40 0x5
[drm:intel_dump_crtc_timings] crtc timings: 148500 1920 2008 2052 2200 1080 1084 1089 1125, type: 0x40 flags: 0x5
[drm:intel_dump_pipe_config] port clock: 148500, pipe src size: 720x400, pixel rate 148500
[drm:intel_dump_pipe_config] num_scalers: 2, scaler_users: 0x80000000, scaler_id: 0
[drm:intel_dump_pipe_config] pch pfit: pos: 0x00000000, size: 0x07800438, enabled
[drm:intel_dump_pipe_config] ips: 0, double wide: 0
[drm:skl_dump_hw_state] dpll_hw_state: ctrl1: 0x21, cfgcr1: 0x80400173, cfgcr2: 0x3a5
[drm:intel_dump_pipe_config] planes on this crtc
[drm:intel_dump_pipe_config] [PLANE:28:plane 1A] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [PLANE:31:plane 2A] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [PLANE:34:cursor A] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [CRTC:47:pipe B][setup_hw_state]
[drm:intel_dump_pipe_config] output_types:  (0x0)
[drm:intel_dump_pipe_config] cpu_transcoder: B, pipe bpp: 0, dithering: 0
[drm:intel_dump_pipe_config] audio: 0, infoframes: 0
[drm:intel_dump_pipe_config] requested mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"" 0 0 0 0 0 0 0 0 0 0 0x0 0x0
[drm:intel_dump_pipe_config] adjusted mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"" 0 0 0 0 0 0 0 0 0 0 0x0 0x0
[drm:intel_dump_crtc_timings] crtc timings: 0 0 0 0 0 0 0 0 0, type: 0x0 flags: 0x0
[drm:intel_dump_pipe_config] port clock: 0, pipe src size: 0x0, pixel rate 0
[drm:intel_dump_pipe_config] num_scalers: 2, scaler_users: 0x0, scaler_id: -1
[drm:intel_dump_pipe_config] pch pfit: pos: 0x00000000, size: 0x00000000, disabled
[drm:intel_dump_pipe_config] ips: 0, double wide: 0
[drm:skl_dump_hw_state] dpll_hw_state: ctrl1: 0x0, cfgcr1: 0x0, cfgcr2: 0x0
[drm:intel_dump_pipe_config] planes on this crtc
[drm:intel_dump_pipe_config] [PLANE:38:plane 1B] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [PLANE:41:plane 2B] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [PLANE:44:cursor B] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [CRTC:57:pipe C][setup_hw_state]
[drm:intel_dump_pipe_config] output_types:  (0x0)
[drm:intel_dump_pipe_config] cpu_transcoder: C, pipe bpp: 0, dithering: 0
[drm:intel_dump_pipe_config] audio: 0, infoframes: 0
[drm:intel_dump_pipe_config] requested mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"" 0 0 0 0 0 0 0 0 0 0 0x0 0x0
[drm:intel_dump_pipe_config] adjusted mode:
[drm:drm_mode_debug_printmodeline] Modeline 0:"" 0 0 0 0 0 0 0 0 0 0 0x0 0x0
[drm:intel_dump_crtc_timings] crtc timings: 0 0 0 0 0 0 0 0 0, type: 0x0 flags: 0x0
[drm:intel_dump_pipe_config] port clock: 0, pipe src size: 0x0, pixel rate 0
[drm:intel_dump_pipe_config] num_scalers: 1, scaler_users: 0x0, scaler_id: -1
[drm:intel_dump_pipe_config] pch pfit: pos: 0x00000000, size: 0x00000000, disabled
[drm:intel_dump_pipe_config] ips: 0, double wide: 0
[drm:skl_dump_hw_state] dpll_hw_state: ctrl1: 0x0, cfgcr1: 0x0, cfgcr2: 0x0
[drm:intel_dump_pipe_config] planes on this crtc
[drm:intel_dump_pipe_config] [PLANE:48:plane 1C] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [PLANE:51:plane 2C] disabled, scaler_id = -1
[drm:intel_dump_pipe_config] [PLANE:54:cursor C] disabled, scaler_id = -1
[drm:drm_mode_object_get] OBJ ID: 64 (2)
[drm:intel_modeset_setup_hw_state] DPLL 0 enabled but not in use, disabling
[drm:i915_gem_init_ggtt] clearing unused GTT space: [1000, 100000000]
[drm:i915_gem_contexts_init] logical context support initialized
[drm:intel_engine_create_scratch] rcs0 pipe control offset: 0xfffff000
[drm:init_status_page] rcs0 hws offset: 0xfffcf000
[drm:init_status_page] bcs0 hws offset: 0xfffc8000
[drm:init_status_page] vcs0 hws offset: 0xfffc1000
[drm:init_status_page] vecs0 hws offset: 0xfffba000
[drm:gen8_init_common_ring] Execlists enabled for rcs0
[drm:init_workarounds_ring] rcs0: Number of context specific w/a: 14
[drm:gen8_init_common_ring] Execlists enabled for bcs0
[drm:gen8_init_common_ring] Execlists enabled for vcs0
[drm:gen8_init_common_ring] Execlists enabled for vecs0

Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 04
fault virtual address   = 0x1
fault code      = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff835c590f
stack pointer           = 0x28:0xffffffff8304e810
frame pointer           = 0x28:0xffffffff8304e880
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 (softirq_2)
trap number     = 12
panic: page fault
cpuid = 2
time = 1564399894
KDB: stack backtrace:
#0 0xffffffff80c24c87 at kdb_backtrace+0x67
#1 0xffffffff80bd85ed at vpanic+0x19d
#2 0xffffffff80bd8443 at panic+0x43
#3 0xffffffff810adc7c at trap_fatal+0x39c
#4 0xffffffff810adcc9 at trap_pfault+0x49
#5 0xffffffff810ad2bf at trap+0x29f
#6 0xffffffff810876e5 at calltrap+0x8
#7 0xffffffff834f7600 at tasklet_handler+0x100
#8 0xffffffff80c23544 at gtaskqueue_run_locked+0x144
#9 0xffffffff80c231a8 at gtaskqueue_thread_loop+0x98
#10 0xffffffff80b99123 at fork_exit+0x83
#11 0xffffffff810886de at fork_trampoline+0xe
Uptime: 33s
Dumping 758 out of 16115 MB:..3%..11%..22%..32%..41%..51%..62%..72%..81%..91%
iRet commented 4 years ago

Same issue after upgrade to 12.1-BETA1

valpackett commented 4 years ago

The packages are for 12.0-RELEASE, you can't just update the kernel and not update the kms-drm drivers. You have to build them from source (clone this repo, cd to it, make -jN && [doas/sudo/…] make -jN install where N is number of CPU cores to use)

It's best to rebuild from https://github.com/FreeBSDDesktop/kms-drm/tree/drm-v5.0-fbsd12.1

but the drm-v4.16-fbsd12.0 branch should also still work.

zeising commented 4 years ago

Those packages are really really old, the latest versions of drm-fbsd12.0-kmod is 4.16.g20190814. On FreeBSD 12.1 you might, as myfreeweb points out, need to build the ports locally, rather than using packages. Building them straight from git is not recommended unless you know what you are doing, and drm-v5.0-fbsd12.1 is still very much in beta, and has known regressions.

zeising commented 4 years ago

What's the status on this, are you still seeing issues?

zeising commented 4 years ago

Feedback timeout