burzumishi / linux-baytrail-flexx10

Install GNU/Linux on NextBook Flexx 10.1
GNU General Public License v2.0
82 stars 18 forks source link

Anyone manage to make KMS work #8

Closed ghost closed 6 years ago

ghost commented 8 years ago

Does kernel modesetting work, and if so what did you do to achieve this? Running Debian Stretch w/kernel 4.5.7 and the 5 patches for wireless, and the three recommended "intel" patches for i915.

So far, I can only run X over intelfb :(.

ghost commented 8 years ago

Beuler???

Anyone here running with i915/KMS on these tablets?

burzumishi commented 7 years ago

Right, it's working for me without patches for i915.

glxinfo reports:

root@flexx10:/home/burzum-ishi# glxinfo | grep -i "direct render"
direct rendering: Yes

Modules loaded:

root@flexx10:/home/burzum-ishi# lsmod | grep -i -e drm -e i915 -e kms 
i915                 1208320  4
i2c_algo_bit           16384  1 i915
drm_kms_helper        143360  1 i915
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
drm                   364544  6 i915,drm_kms_helper
button                 16384  1 i915
video                  40960  1 i915

xrandr report:

burzum-ishi@flexx10:~$ xrandr
Screen 0: minimum 8 x 8, current 1280 x 800, maximum 32767 x 32767
DSI1 connected primary 1280x800+0+0 right (normal left inverted right x axis y axis) 0mm x 0mm
   800x1280      59.99*+
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

I'm attaching dmesg files with drm with debug enabled for driver and kms:

dmesg.drm.2.txt dmesg.drm.1.txt

Xorg log:

Xorg.0.log.txt

Kernel config (be careful with this config please, it's not updated with latest sound patches, I'm reviewing your post about sound and making a new one ... but i915, drm, and kms should work):

config-4.8.0-flexx-2.txt

I have blacklisted all FB modules (including intelfb) except vesafb. As I know, this is the default configuration on debian based distros.

I hope this helps you to figure out what's going on there, let me know if you need more information.

nicman23 commented 7 years ago

ditto

dmesg.txt

Xorg.0.log.txt

ghost commented 7 years ago

Thanks a bunch. Those logs are gold. Will be combing over them and the kernel config.

ghost commented 7 years ago

Which one of you has the Flexx? nicman23's panel is eDP while burzumishi's is MIPI DSI.

burzumishi commented 7 years ago

I have the Flexx10.1 one:

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: YIFANG
    Product Name: NXW101QC232
    Version: Type1 - TBD by OEM
    Wake-up Type: Power Switch
    SKU Number: Type1 - SKU0
    Family: M1015BFP T11220300

I have pushed all info files from my device to the repo, dmidecode, DSDT, acpidump, etc ...

nicman23 commented 7 years ago

again. i do not have a flexx but a rebrand :)

the only differences is that and that the touchscreen is another model

ghost commented 7 years ago

Alright, I just made modesetting work for the first time on this tablet --

[ 1.092476] [drm:intel_opregion_setup] Found valid VBT in ACPI OpRegion (Mailbox #4) << -- this is key (from nicman23's log), and where my tablet falls on it's ass.

I'll cut to the chase right here -- this tablet (Flexx 9) doesn't have a full video BIOS and will probably never work 'out of the box' without the following work around. There's a 2K blob of "something" where at least the Venue 8 (and presumably your tablet) has a full Intel reference Valley View video BIOS (verified by copyright notice in header, from the Dell 8 tablet). The BIOS is signed with a key that Intel has used to sign other drivers (same as on an Optiplex I have close-by). The hardware and/or driver don't care about the signature (on Linux, at least - this is probably the signature Windows uses).

This is really a very dirty work-around, and I'll do a proper write-up (offtopic for Flexx 10, it appears), but the only solution that I can make work is to have grub load a (modified *) copy of the reference Intel VV/Baytrail video BIOS with the 'loadbios' command prior to booting the kernel. Further, the i915 module needs to be patched to acquire the location of the VBIOS by scanning kmem for the BIOS signature, then changing the expected location of the BIOS in i915 before it finally bootstraps the hardware.

ghost commented 7 years ago

IntelGraphicsMem

First 16 bytes of proper VBT. Flexx 9 has garbage. So, i915 is looking in the wrong place in case of Flexx 9, or this tablet has reduced (or junk) video routines.

ghost commented 7 years ago

Modified Intel Valley View (Baytrail) reference VBIOS (re-worked relocation table for Grub load): http://home.ix.netcom.com/~jjingber/vbios.bin

ghost commented 7 years ago

FYI -- That's 32-bit software.

nicman23 commented 7 years ago

does the 32 bit blob work with amd64 kernels?

ghost commented 7 years ago

Yes. It's a 32-bit VBIOS (because the UEFI is 32-bit). I have to re-up it to my site when I get a chance - the link seems to go to a zero-byte file.

The modification was removing the first (IIRC 8 bytes of the header) and padding the BIOS out to 64K with zeroes. For some reason, this is a hard requirement imposed by GRUB.

nicman23 commented 7 years ago

figured as much but it does not hurt to ask :) anyways, I m going to add it to the repo and write some documentation for it, when I ll have the chance

RussianNeuroMancer commented 7 years ago

@jharrison022 @burzumishi is there no changes with intel-drm-next or 4.11rc2?

nicman23 commented 6 years ago

closing as it is probably fixed?

RussianNeuroMancer commented 6 years ago

There is still some exceptions, like this: https://bugs.freedesktop.org/show_bug.cgi?id=104705 But most of hardware should work.