Closed dmitryluhtionov closed 4 years ago
Are you sure you are loading /boot/modules/i915kms.ko? Have you compiled the driver, or are you using the package? If you are using the package, can you try compiling the driver from ports instead?
I load drm.ko and i915kms.ko both from /boot/modules I use package. latest package has build from this commit: https://github.com/FreeBSDDesktop/kms-drm/commit/2ada4e8ac2b9a4a437374ced0d4222a08437a5cb And not new version in ports.
There is no need to load drm.ko separately, it should be loaded by i915kms.ko. In any case, can you try to build the port locally, instead of using the package? I want to rule out kernel changes in STABLE, that might affect drm-kmod.
If you try to load only i915kms.ko, it load drm.ko from /boot/kernel, instead from /boot/modules. I trying to build drm-fbsd12.0-kmod from ports. And will write result later.
If you try to load only i915kms.ko, it load drm.ko from /boot/kernel, instead from /boot/modules. I trying to build drm-fbsd12.0-kmod from ports. When I build from ports - all work fine.
dmesg
Aug 8 12:01:05 m18 kernel: [drm:drm_core_init] Initialized
Aug 8 12:01:16 m18 kernel: drmn0:
I never had the issue that i915kms.ko loaded the wrong drm.ko, but no matter. In any case, somewhere, there's a change in the kernel that made the driver incompatible. I have to look into this.
If you try to load only i915kms.ko, it load drm.ko from /boot/kernel, instead from /boot/modules. I trying to build drm-fbsd12.0-kmod from ports. When I build from ports - all work fine.
dmesg
Aug 8 12:01:05 m18 kernel: [drm:drm_core_init] Initialized
Aug 8 12:01:16 m18 kernel: drmn0:
Any chance to create port "drm-fbsd12.1-kmod" ?
The problem is that the package build cluster builds packages for FreeBSD 12-stable on FreeBSD 12.0, so it does not have any effect, even if I create a separate port. Until we can come up with a better solution, it's probably easier for you to just build drm-kmod locally from ports, even if you use pkg for everything else.
You can simple add in Makefile
.if ${OPSYS} == FreeBSD && (${OSVERSION} < 1200514 || ${OSVERSION} > 1300000) IGNORE= only supported on FreeBSD 12.1. .endif
And modify Makefile in drm-fbsd12.0-kmod .if ${OPSYS} == FreeBSD && (${OSVERSION} < 1200058 || ${OSVERSION} > 1200513) IGNORE= only supported on FreeBSD 12.0. .endif
Another question: Can linuxkpi and drm-fbsd-kmod support arm or arm64 ? I want to run FreeBSD on Raspberry Pi.
No, it is not enough to edit the Makefile. That just means the package won't be built at all. Packages for a release branch or stable branch are built to the lowest common denominator, that means that packages for 12-STABLE are built for FreeBSD 12.0. Adding those version checks simply means the package won't be built at all, since the builder for packages for FreeBSD 12 is too old.
There is work in progress on supporting aarch64. However, as far as I know, Raspberry Pi uses an integrated graphics card, which required proprietary firmware and drivers.
Here is some info and a patch to get the radeon driver working on aarch64: https://github.com/FreeBSDDesktop/kms-drm/pull/154
FreeBSD-13 has native support for pinebook
with Mali 400 MP2 GPU.
But we are not have drivers for this GPU.
Raspberry Pi uses an integrated graphics card, which required proprietary firmware and drivers
VC4 (RPi1-3) and V3D (RPi4) drivers are open source, proprietary drivers have not been required for a long time (and on RPi4 they don't exist)
Anyway, the missing piece for supporting embedded GPUs in FreeBSD is devicetree/OFW attachment in LinuxKPI.
@evadot made a display driver for Allwinner and mentioned looking into porting the Lima GPU driver in the future. But right now, only PCIe GPUs are supported here. Somebody would have to do the (rather tedious) work required to make it possible to port non-PCIe GPU drivers.
drm-fbsd12.0-kmod already have vc4 support, but it not enable by default. Can anybody port linuxkpi functionality to arm ?
New version of display driver for Allwiner https://github.com/evadot/freebsd/tree/drm_aw_de2_20190715
drm-fbsd12.0-kmod already have vc4 support, but it not enable by default.
No it doesn't. @johalun imported the vc4 code into this repo back then, but it was never actually ported, no one made it run.
Is this still relevant?
Feedback timeout.
drm-fbsd12.0-kmod-4.16.g20190722_1 gpu-firmware-kmod-g20190620
dmesg
[drm:drm_core_init] Initialized drmn0: 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
Aug 8 10:12:00 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 = 0; apic id = 00 fault virtual address = 0x1 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff835c590f stack pointer = 0x28:0xffffffff83044810 frame pointer = 0x28:0xffffffff83044880 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_0) trap number = 12 Timeout initializing vt_vga panic: page fault cpuid = 0 time = 1565248321 KDB: stack backtrace:
0 0xffffffff80c25607 at kdb_backtrace+0x67
1 0xffffffff80bd8f6d at vpanic+0x19d
2 0xffffffff80bd8dc3 at panic+0x43
3 0xffffffff810aec7c at trap_fatal+0x39c
4 0xffffffff810aecc9 at trap_pfault+0x49
5 0xffffffff810ae2bf at trap+0x29f
6 0xffffffff81088845 at calltrap+0x8
7 0xffffffff834f7600 at tasklet_handler+0x100
8 0xffffffff80c23ec4 at gtaskqueue_run_locked+0x144
9 0xffffffff80c23b28 at gtaskqueue_thread_loop+0x98
10 0xffffffff80b99aa3 at fork_exit+0x83
11 0xffffffff8108983e at fork_trampoline+0xe
Uptime: 43s