Giter Site home page Giter Site logo

fl2000's Introduction

Fresco Logic FL2000 Linux/Android kernel driver

1. What is this?

This is an official driver release from Fresco Logic in an attempt to help the open-source community adopting the development and use of the FL2000DX device. This driver only covers the USB part of the display logic. It does not support the Linux desktop logic (eg. extended desktop vs mirrored desktop).

2. On which kernel versions does this driver work?

This driver is tested on Ubuntu 14 LTS as well as some Android platforms with kernel version 3.10.x. This driver source might not compile on newer kernels (eg. 4.0 or above) because of the fast-moving API changes in the mainstream kernel. You might need to adapt it for your own use.

3. Target audience

This release is targeted to open-source developers, as opposed to end-users.

4. How do I enable extended desktop/mirrored desktop on my X Window?

Currently Fresco Logic does not provide desktop related manipulation. Fresco Logic hopes the community will contribute to this area so that end-users can easily adopt this solution.

5. FL2000DX limitation.

The FL2000DX chip is cheap by design where it doesn't have a frame buffer on its own. It relies heavily on USB 3.0 transfer speed to accommodate continuous USB flow. The larger the image is, the heavier it depends on USB bandwidth. A typical 1920x1080@60 Hz requires 1920 * 1080 * 24bpp * 60 = 373,248,000 bytes/sec of traffic over the USB bus. As such, USB2.0 speed is not supported.

Connecting more than one FL2000DX device to the same bus is deprecated.

6. How do I compile & test the kernel driver?

6a. Compile the driver

Find your kernel source tree, and edit src/Makefile. Locate the following line:

KERNEL_PATH = /usr/src/linux-headers-4.4.0-72-generic`

Modify this line so that it points to the correct source tree. After that, run make to create fl2000.ko and run insmod fl2000.ko to load the driver.

6b. Test the driver

In the sample folder, run make to create fltest. If you you are using a cross compiler to build the binary for specific platforms, you need to specify that specific compiler in src/Makefile.

Run ./fltest 0 as superuser to run the test. The driver provides several user mode buffer access methods (e.g copy to kernel internal buffer, or directly locking down user buffer). Look at fl2000_ioctl.h for detailed information.

7. How do I file a bug to the Fresco Logic developers?

You can file bugs to Github Issues

fl2000's People

Contributors

benpicco avatar c-bouthoorn avatar fresco-fl2000 avatar linjiabang avatar sarman1998 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fl2000's Issues

Chromebook crash/shutdown every time I do insmod fl2000.ko

Hello I'm happy when I buy a USB to VGA adapter online, the cd driver that they gave me is a FL2000 driver for windows. So I immediately compile this myself and even downloading the full original kernel source tree from google. Everything seems like allright I already following all the problems like the kernel config must be set to preempted and etc. And then the compilation is finished. When I do insmod my chromebook immediately crashes and shutdown. What can I do to find the problem?

build error on fl2000_fops.c

/FL2000/src/fl2000_fops.c:120:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .fault = fl2000_vm_fault,
           ^~~~~~~~~~~~~~~
/FL2000/src/fl2000_fops.c:120:11: note: (near initialization for ‘fl2000_vma_ops.fault’)

I used KERNEL_PATH = /usr/lib/modules/uname -r/build in the Makefile.

uname -r gives 4.12.8-2-ARCH

I have the linux-headers package installed (version 4.12.8-2)

Android phone support?

Can I build a kernel and use this dongle on my usb 3.0 type-c android device which doesn't has hdmi alt mode or mhl?

Error Make

Hi,

I have this error when try command make:

rod@sereitei:~/Descargas/FL2000-master/src$ make
make -C /usr/src/linux-headers-4.12.0-041200-generic M=/home/rod/Descargas/FL2000-master/src modules
make[1]: se entra en el directorio '/usr/src/linux-headers-4.12.0-041200-generic'
CC [M] /home/rod/Descargas/FL2000-master/src/fl2000_module.o
In file included from /home/rod/Descargas/FL2000-master/src/fl2000_include.h:54:0,
from /home/rod/Descargas/FL2000-master/src/fl2000_module.c:11:
/home/rod/Descargas/FL2000-master/src/fl2000_module.c: In function ‘fl2000_disconnect’:
/home/rod/Descargas/FL2000-master/src/fl2000_module.c:236:25: error: ‘refcount_t {aka struct refcount_struct}’ has no member named ‘counter’
dev_ctx->kref.refcount.counter);
^
/home/rod/Descargas/FL2000-master/src/fl2000_log.h:44:39: note: in definition of macro ‘dbg_msg’
printk("%s:" msg "\n", func, ##VA_ARGS);
^~~~~~~~~~~
scripts/Makefile.build:302: fallo en las instrucciones para el objetivo '/home/rod/Descargas/FL2000-master/src/fl2000_module.o'
make[2]: *** [/home/rod/Descargas/FL2000-master/src/fl2000_module.o] Error 1
Makefile:1512: fallo en las instrucciones para el objetivo 'module/home/rod/Descargas/FL2000-master/src'
make[1]: *** [module/home/rod/Descargas/FL2000-master/src] Error 2
make[1]: se sale del directorio '/usr/src/linux-headers-4.12.0-041200-generic'
Makefile:44: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 2

I hope you can help me.

Regards...

Windows system interruptions

I'm using an HDMI adaptor to connect my third monitor when Windows install Fresco Logic FL2000 USB Display Adapter starts the systems interruptions as showing the attached image. When the interruption occurs, the monitor starts to blink...

image

Pixel compression on USB2.0(HS)

About pixel compression on USB2.0(HS),
It would be greatly appreciated if you could explain the details.

As I looked at the sample source code,
Pixel data was being converted by fl2000_ioctl.c:pixel_swap() when USB3.0(SS).
As it is, converted data was being transmitted by bulkout transfer.

On Windows and USB 2.0(HS) connection,
When I try to analyze with USB analyzer, It looks like the pixel data is compressed and transmitted.
Do you need similar processing on Linux?

As I looked at the sample source code,
I think "fl2000_compression.c" seems to be compression processing, is it correct?
If correct, could you tell me how to use "fl2000_compression.c"?

build error on fl2000_surface.c

/FL2000/src/fl2000_surface.c: In function ‘fl2000_surface_pin_down’:
/FL2000/src/fl2000_surface.c:182:3: error: implicit declaration of function ‘page_cache_release’; did you mean ‘pagecache_get_page’? [-Werror=implicit-function-declaration]
   page_cache_release(pages[i]);
   ^~~~~~~~~~~~~~~~~~
   pagecache_get_page

I used KERNEL_PATH = /usr/lib/modules/`uname -r`/build in the Makefile.

uname -r gives 4.12.8-2-ARCH

I have the linux-headers package installed (version 4.12.8-2)

Linear RGB instead of sRGB input

Hello FL2000 team

It seems that FL2000 expects sRGB non-linear data in RGB24 mode. Is there any register setting that can be used to switch to linear RGB instead?

make fails

Hello all,
I am on ubuntu 17 and with kernel linux-headers-4.10.0-22-generic

I have followed your instructions, and went to the src/ folder, changed the Makefile so that it used
KERNEL_PATH = /usr/src/linux-headers-4.10.0-22-generic

installed any dependencies copy/pasting the command from your readme

then I used "make" in the src directory and this is the output, any suggestions?

make -C /usr/src/linux-headers-4.10.0-22-generic M=/home/mau/Downloads/fl2000-master/src modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-22-generic'
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_module.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_bulk.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_ioctl.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_render.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_dev.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_dongle.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_big_table.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_i2c.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_register.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_monitor.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_desc.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_interrupt.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_compression.o
CC [M] /home/mau/Downloads/fl2000-master/src/fl2000_surface.o
In file included from ./include/linux/thread_info.h:20:0,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:59,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:26,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c: In function ‘fl2000_surface_pin_down’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()
^
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:57:5: note: in expansion of macro ‘current’
current,
^~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
In file included from ./include/linux/thread_info.h:20:0,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:59,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:26,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()
^
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:58:5: note: in expansion of macro ‘current’
current->mm,
^~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:60:5: warning: passing argument 4 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
nr_pages,
^~~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: expected ‘struct page **’ but argument is of type ‘long unsigned int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:56:19: error: too many arguments to function ‘get_user_pages’
pages_pinned = get_user_pages(
^~~~~~~~~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: declared here
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
In file included from ./include/linux/thread_info.h:20:0,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:59,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:26,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()
^
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:89:4: note: in expansion of macro ‘current’
current,
^~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
In file included from ./include/linux/thread_info.h:20:0,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:59,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:26,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()
^
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:90:4: note: in expansion of macro ‘current’
current->mm,
^~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:92:4: warning: passing argument 4 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
nr_pages,
^~~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: expected ‘struct page **’ but argument is of type ‘long unsigned int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:88:18: error: too many arguments to function ‘get_user_pages’
pages_pinned = get_user_pages(
^~~~~~~~~~~~~~
In file included from /home/mau/Downloads/fl2000-master/src/fl2000_include.h:31:0,
from /home/mau/Downloads/fl2000-master/src/fl2000_surface.c:11:
./include/linux/mm.h:1293:6: note: declared here
long get_user_pages(unsigned long start, unsigned long nr_pages,
^~~~~~~~~~~~~~
/home/mau/Downloads/fl2000-master/src/fl2000_surface.c:133:3: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
page_cache_release(pages[i]);
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/home/mau/Downloads/fl2000-master/src/fl2000_surface.o' failed
make[2]: *** [/home/mau/Downloads/fl2000-master/src/fl2000_surface.o] Error 1
Makefile:1524: recipe for target 'module/home/mau/Downloads/fl2000-master/src' failed
make[1]: *** [module/home/mau/Downloads/fl2000-master/src] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-22-generic'
Makefile:43: recipe for target 'all' failed
make: *** [all] Error 2

insmod error...

➜ insmod fl2000.ko
insmod: ERROR: could not insert module fl2000.ko: Operation not permitted

➜ sudo insmod fl2000.ko
insmod: ERROR: could not insert module fl2000.ko: Required key not available

I got this problem after the fl2000 complication... I am using Linux Mint 18 with 4.15.0-43-generic.

OSX support?

Hi - on work we recently bought a few, since it was sold to us with the promise of OSX compatibility.
But after doing a little google search, we found it was not supported by mac. Anyone has a fix/can tweak this, so it can be used for mac?

fltest works but no image / freezes some monitors

Today I've bought this USB to VGA adapter that has your logic/driver imbued within. Linux user here, especifically Pop-OS 20.04. I installed the driver and fltest works, with the following error on fltest_arm

/opt/hi3798/arm-hisiv200-linux/bin/arm-hisiv200-linux-gnueabi-gcc main.c -Xlinker -static -static-libgcc -o fltest_arm
make: /opt/hi3798/arm-hisiv200-linux/bin/arm-hisiv200-linux-gnueabi-gcc: Command not found
make: *** [Makefile:9: fltest_arm] Error 127

but fltest itself build and works. When I connect some monitor and run the script, it gives the following:

$ sudo ./fltest

usage: ./fltest mem_type [[width] [height]]
mem_type is 0..3
eg1: to test with SURFACE_TYPE_VIRTUAL_FRAGMENTED_VOLATILE, type
./fltest 0
eg2: to test without SURFACE_TYPE_VIRTUAL_FRAGMENTED_PERSISTENT, type
./fltest 1
eg3: to test 1920x1080 with SURFACE_TYPE_VIRTUAL_FRAGMENTED_PERSISTENT, type
./fltest 1 1920 1080

So I guess its recognizing the connection with the monitor, but I cant get any image. I've tried in 2 monitors, one FullHD(1920x1080) and another HD(1360x760).

Does this driver work on linux kernels above 3? PopOS 20.04 Kernel actually uses version 5

Linux 54, xrandr shows device as disconnected.

I've compiled the driver for linux54 5.4.40-1-MANJARO and loaded the kernel driver via insmod

dmesg shows the driver is loaded:

fl2000: loading out-of-tree module taints kernel.
fl2000: module verification failed: signature and/or required key missing - tainting kernel
fl2000_device_probe:bInterfaceNumber:1 bAlternateSetting:0
fl2000_device_probe:streaming interface detected
fl2000_device_probe:usb_dev(00000000e1e4e4d2), minor_num(1), dev_name(fl2000-1) created
fl2000_dongle_card_initialize:found ITE hdmi chip, initializing it.
fl2000_dongle_card_initialize:ITE hdmi chip powered up
fl2000_monitor_read_edid:169 EDID extensions found
fl2000_monitor_plugin_handler:Notify system to add monitor.
fl2000_device_probe:bInterfaceNumber:2 bAlternateSetting:0
fl2000_device_probe:Detect interrupt interface.
fl2000_intr_pipe_create:found ep_num_intr_in(3)
usbcore: registered new interface driver fl2000
fl2000_monitor_vga_status_handler:WARNING Ignore MonitorPlugin event
fl2000_monitor_plugout_handler:Notify system to delete monitor.
fl2000_render_stop:busy_list_count(0)
fl2000_render_stop:waited 0 ms
fl2000_monitor_read_edid:169 EDID extensions found
fl2000_monitor_plugin_handler:Notify system to add monitor.
fl2000_monitor_vga_status_handler:WARNING Ignore MonitorPlugin event
fl2000_monitor_vga_status_handler:WARNING Ignore MonitorPlugin event

But xrandr shows the device VIRTUAL1 as disconnected:

VIRTUAL1 disconnected (normal left inverted right x axis y axis)

What's needed to get xrandr to emit output to the device?

I have a dual boot with Windows 10 and this worked correctly there, so the device isn't defective or anything like that.

Q:After make and load fl2000 , audio ok , no display

4.4.0-138-generic
Ubuntu 14.04.1
After make and load fl2000.ko ,
use lsmod , "fl2000" can be found , USB PnP audio Device can be found and work ,
but my display device do not work , and I change another display device ,do not work too.

Error during make

valerio@tron:~/Downloads/FL2000-master/src$ sudo make
make -C /usr/src/linux-headers-4.4.0-116-generic M= modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-116-generic'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Stop.
arch/x86/Makefile:207: recipe for target 'archheaders' failed
make[1]: *** [archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-116-generic'
Makefile:46: recipe for target 'all' failed
make: *** [all] Error 2

mutex_unlock

Hi

I managed to compile driver but it doesn't seems to work. I think this is error message RIP: mutex_unlock+0x17/0x30 RSP: ffffa16e44093db8

My kernel:
4.15.0-64-generic #73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

dmesg

[244722.113984] RIP: 0010:mutex_unlock+0x17/0x30
[244722.113986] RSP: 0018:ffffa16e44093db8 EFLAGS: 00010246
[244722.113988] RAX: ffff934e507c4080 RBX: ffff934eae0517a8 RCX: 0000000000000000
[244722.113989] RDX: ffff934e507c4080 RSI: 000000000000000c RDI: 00000000b64273f8
[244722.113991] RBP: ffffa16e44093db8 R08: 0000000000000000 R09: ffffa16e44093bc8
[244722.113992] R10: ffffe3b6c1b81400 R11: 0000000000000238 R12: ffff934f6c417548
[244722.113994] R13: 0000000000000003 R14: ffff934eae0517a8 R15: ffff934e507c4080
[244722.114002] FS:  0000000000000000(0000) GS:ffff934f77d00000(0000) knlGS:0000000000000000
[244722.114006] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[244722.114009] CR2: 00000000b64273f8 CR3: 000000007660a002 CR4: 00000000000206e0
[244722.114012] Call Trace:
[244722.114026]  usb_stor_port_reset+0x4c/0x70 [usb_storage]
[244722.114035]  usb_stor_invoke_transport+0x97/0x540 [usb_storage]
[244722.114041]  ? wait_for_completion_interruptible+0xb7/0x180
[244722.114049]  usb_stor_transparent_scsi_command+0xe/0x10 [usb_storage]
[244722.114056]  usb_stor_control_thread+0x1ca/0x290 [usb_storage]
[244722.114063]  kthread+0x121/0x140
[244722.114070]  ? usb_stor_disconnect+0xc0/0xc0 [usb_storage]
[244722.114074]  ? kthread_create_worker_on_cpu+0x70/0x70
[244722.114080]  ret_from_fork+0x35/0x40
[244722.114084] Code: ef 48 8b 70 10 e8 ea 41 70 ff eb a2 e8 e3 80 6d ff 0f 1f 00 66 66 66 66 90 55 31 c9 65 48 8b 14 25 00 5c 01 00 48 89 e5 48 89 d0 <f0> 48 0f b1 0f 48 39 c2 74 05 e8 ba fe ff ff 5d c3 0f 1f 84 00 
[244722.114149] **RIP: mutex_unlock+0x17/0x30 RSP: ffffa16e44093db8**
[244722.114152] CR2: 00000000b64273f8
[244722.114157] ---[ end trace 86465dd81569e04c ]---
[244758.858575] fl2000_monitor_plugout_handler:Notify system to delete monitor.
[244758.858585] fl2000_render_stop:busy_list_count(0)
[244758.858588] fl2000_render_stop:waited 0 ms
[244775.544579] fl2000_monitor_read_edid:61 EDID extensions found
[244775.544586] fl2000_monitor_plugin_handler:Notify system to add monitor.
[244866.589643] fl2000_open:open_count(1)
[244866.589725] fl2000_ioctl_query_monitor_event:current plugged_in(1)
[244866.713520] fl2000_surface_create:surface(00000000599cb438) created for
                user_buffer(af623060)/buffer_length(0x272539b)
                width(3951)/height(3463)/pitch(11853)/type(0),
                render_buffer(00000000932bd212), system_buffer(          (null)), shadow_buffer(00000000932bd212),
                surface_list_count(1)
[244866.713535] fl2000_set_display_mode:Display information width:3951 height:3463.
[244866.713537] fl2000_render_stop:busy_list_count(0)
[244866.713538] fl2000_render_stop:waited 0 ms
[244866.713955] fl2000_set_display_mode:Turn on usb2 compression.
[244866.713958] fl2000_dongle_set_params:ERROR fl2000_table_get_entry failed.
[244866.713959] fl2000_set_display_mode:[ERR] fl2000_dongle_set_params failed?
[244866.713960] fl2000_ioctl_set_display_mode:fl2000_set_display_mode(width:3951 height:3463.) failed
[244866.741413] fl2000_surface_create:duplicated surface(af623060)?
[244866.834263] fl2000_surface_create:duplicated surface(af623060)?
[244866.837612] fl2000_surface_create:duplicated surface(af623060)?
[244866.837626] fl2000_render_stop:busy_list_count(0)
[244866.837631] fl2000_render_stop:waited 0 ms
[244866.837955] fl2000_surface_destroy_all:destroying surface(00000000599cb438), surface_list_count(0)

tested with ./fltest 0

found (800, 600) detailed timing desc
entry [0] = (800, 600) added
found (3325, 3838) detailed timing desc
entry [1] = (3325, 3838) added
found (999, 3510) detailed timing desc
entry [2] = (999, 3510) added
found (3951, 3463) detailed timing desc
entry [3] = (3951, 3463) added
create_surface(3951, 3463) , type(0x0)
IOCTL_FL2000_SET_DISPLAY_MODE failed -1
create_surface(999, 3510) , type(0x0)
IOCTL_FL2000_CREATE_SURFACE failed -1
create_surface(3325, 3838) , type(0x0)
IOCTL_FL2000_CREATE_SURFACE failed -1
create_surface(800, 600) , type(0x0)
IOCTL_FL2000_CREATE_SURFACE failed -1

dmesg

Oct  6 21:21:39 ppq kernel: [245215.725655] fl2000_open:open_count(1)
Oct  6 21:21:39 ppq kernel: [245215.725734] fl2000_ioctl_query_monitor_event:current plugged_in(1)
Oct  6 21:21:39 ppq kernel: [245215.839668] fl2000_surface_create:surface(0000000099543730) created for
Oct  6 21:21:39 ppq kernel: [245215.839668] user_buffer(f7ea5060)/buffer_length(0x272539b)
Oct  6 21:21:39 ppq kernel: [245215.839668] width(3951)/height(3463)/pitch(11853)/type(0),
Oct  6 21:21:39 ppq kernel: [245215.839668] render_buffer(00000000932bd212), system_buffer(          (null)), shadow_buffer(00000000932bd212),
Oct  6 21:21:39 ppq kernel: [245215.839668] surface_list_count(1)
Oct  6 21:21:39 ppq kernel: [245215.839679] fl2000_set_display_mode:Display information width:3951 height:3463.
Oct  6 21:21:39 ppq kernel: [245215.839681] fl2000_render_stop:busy_list_count(0)
Oct  6 21:21:39 ppq kernel: [245215.839681] fl2000_render_stop:waited 0 ms
Oct  6 21:21:39 ppq kernel: [245215.839685] fl2000_set_display_mode:Turn on usb2 compression.
Oct  6 21:21:39 ppq kernel: [245215.839688] fl2000_dongle_set_params:ERROR fl2000_table_get_entry failed.
Oct  6 21:21:39 ppq kernel: [245215.839689] fl2000_set_display_mode:[ERR] fl2000_dongle_set_params failed?
Oct  6 21:21:39 ppq kernel: [245215.839690] fl2000_ioctl_set_display_mode:fl2000_set_display_mode(width:3951 height:3463.) failed
Oct  6 21:21:39 ppq kernel: [245215.863404] fl2000_surface_create:duplicated surface(f7ea5060)?
Oct  6 21:21:39 ppq kernel: [245215.949064] fl2000_surface_create:duplicated surface(f7ea5060)?
Oct  6 21:21:39 ppq kernel: [245215.952329] fl2000_surface_create:duplicated surface(f7ea5060)?
Oct  6 21:21:39 ppq kernel: [245215.952341] fl2000_render_stop:busy_list_count(0)
Oct  6 21:21:39 ppq kernel: [245215.952346] fl2000_render_stop:waited 0 ms
Oct  6 21:21:39 ppq kernel: [245215.952353] fl2000_surface_destroy_all:destroying surface(0000000099543730), surface_list_count(0)
Oct  6 21:21:39 ppq kernel: [245215.952353] 
Oct  6 21:21:39 ppq kernel: [245215.952355] fl2000_surface_destroy:deleting surface(0000000099543730) user_buffer(0xf7ea5060)/buffer_length(41046939)/width(3951)/height(3463)/pitch(11853)/type(0),render_buffer(00000000932bd212), surface_list_count(0)
Oct  6 21:21:39 ppq kernel: [245215.952355] 
Oct  6 21:21:39 ppq kernel: [245215.953769] fl2000_release:open_count(0)

Arch Linux 4.15.2-2

Hi :)
I run the build that's in the title. I successfully compiled the ko and the tests.
sudo ./fltest 0 recognizes the device (USB3-HDMI):
found (1024x768) @ 60 fps (wrong resolution - 1920x1080 - but still something)

but nothing is displayed on the screen.

How do I make it work?

Important notes:
This is what I set KERNEL_PATH to be: /lib/modules/4.15.2-2/build
And in sample/Makefile I commented fltest_arm out (all: fltest)

fltest Does Not Output

The insmod seemed to work, but fltest doesn't actually draw anything on the screen.

$ uname -a
Linux laptop 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ sudo ./fltest 0
found (1024, 768) @ 60 fps
entry [0] = (1024, 768) added
found (1024, 768) @ 60 fps
found (1024, 768) @ 60 fps
found (1024, 768) @ 60 fps
found (1024, 768) @ 60 fps
found (1024, 768) @ 60 fps
found (1024, 768) @ 60 fps
found (1024, 768) @ 60 fps
found (1920, 1080) detailed timing desc
entry [1] = (1920, 1080) added
found (1920, 1080) detailed timing desc
found (1920, 1080) detailed timing desc
found (1920, 1080) detailed timing desc
create_surface(1920, 1080) , type(0x0)
display_mode(1920, 1080), press any key to continue

create_surface(1024, 768) , type(0x0)
display_mode(1024, 768), press any key to continue

FL2000 crashing on Windows 10 wake up

Hi folks, I'm using FL2000-2.1.34054.0.exe driver for a USB 3.0 to HDMI/VGA adapter, it is working fine, but Win10 is crashing when returning from sleeping. The blue screen says FAULT NOT PAGED AREA (fl2000.sys). Any help?

Issues with multiple displays

When attempting to use 2 of these adapters for extending the desktop by 2 monitors, the screens flicker and dont actually display any images. When one of them is disconnected (or disabled in the OS), the other will start to work. It doesnt matter which one is disabled.

build error on sample code

/home/user/gcc-linaro-aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/4.9.2/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
unwind-dw2-fde-dip.c:(.text+0x1c68): undefined reference to `dl_iterate_phdr'
collect2: error: ld returned 1 exit status
make: *** [fltest_arm] Error 1

I used "arm_prefix = /home/user/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu" build in the Makefile.

For compiling the sample i use the Linaro toolchain.

ubuntu kernel 5

Hello.
why do not write driver for kernel 5 i bought usb to vga adapter and i can not connect to my ubuntu 19.04? please change previous drivers for new kernels.
any body have alternative way to have 2 monitor to my laptop?
thanks

IOCTL_FL2000_SET_DISPLAY_MODE failed -1

I get this error.

found (248, 150) @ 60 fps entry [0] = (248, 150) added found (248, 150) @ 60 fps found (248, 150) @ 60 fps found (248, 150) @ 60 fps found (248, 150) @ 60 fps found (248, 150) @ 60 fps found (248, 150) @ 60 fps found (248, 150) @ 60 fps create_surface(248, 150) , type(0x0) IOCTL_FL2000_SET_DISPLAY_MODE failed -1

Also /dev/fl2000-0 was defined wrong in main.c. For me device was /dev/fl2000-1

I have arch linux, kernel 4.17.11-6-ck-haswell.
Thinkpad t440s. I have only intel GPU hd 4400.

I'm getting an error when the device plugged in

[ 677.053384] fl2000_dongle_card_initialize:ITE hdmi chip powered up
[ 677.829477] fl2000_monitor_vga_status_handler:WARNING Ignore MonitorPlugin event
[ 677.829640] fl2000_device_probe:bInterfaceNumber:2 bAlternateSetting:0
[ 677.829642] fl2000_device_probe:Detect interrupt interface.
[ 677.829644] fl2000_intr_pipe_create:found ep_num_intr_in(3)
[ 693.087211] fl2000_monitor_vga_status_handler:WARNING Ignore MonitorPlugin event
[ 693.363202] fl2000_monitor_vga_status_handler:WARNING Ignore MonitorPlugin event

PLL settings calculation for custom monitor modes?

Hello FL2000 team
Do you have some code to calculate PLL settings from monitor mode data instead of the "big table"? Windows driver seem to be able to handle more resolutions than Linux.

Also, ISO transfers require custom computation of PLL settings, can you share those as well?

800x480 resolution support

Any chance to get values for big_table_<24,16,8>bit_r<0,1> resolution_entry structures that support 800x480 displays? I'd like to connect standard Raspberry Pi HDMI display

EDIT some more information below

Based on EDID information from monitor

Looks like i2c was successful. Have a good day.
Checksum Correct
Section "Monitor"
	Identifier " 
                     @"
	ModelName " 
                    @"
	VendorName "ADA"
	# Monitor Manufactured week 1 of 2007
	# EDID version 1.3
	# Digital Display
	DisplaySize 150 100
	Gamma 1.00
	Option "DPMS" "false"
	Modeline 	"Mode 0" 32.00 800 840 888 928 480 493 496 525 -hsync -vsync 
EndSection

I have built table with display values:

  h v
res 800 480
front 40 13
sync 48 3
back 40 29
total 928 525

and filled register values in the 'big_table':

  resolution total  reg
h_sync_reg_1 0x0320 0x03A0 0x032003A0
v_sync_reg_1 0x01E0 0x020D 0x01E0020D
  sync sync+back+1  reg
h_sync_reg_2 0x30 0x59 0x00300059
v_sync_reg_2 0x03 0x21 0x02130021

From the code it seems that in addition to these registers driver also sets bulk_asic_pll register. Checking the big_table it seems that this register configures pll for pixel clock (32MHz according to EDID) and has at least 3 groups of fields (MSB to LSB):

  • 12-22: clock multiplier
  • 6-12: clock base, BIT2 is baseclk/8, BIT3 is baseclk/16
  • 0-5: clock divisor

With 10MHz XTAL I have have value of 0x00100105 for pll register (32MHz = 10MHz / 8 * 128 / 5)

Based on the data above I have created an extra line for the big_table, but right now it still does not work and I am a bit puzzled why. Also I am wondering why driver does not use EDIDs properly? BTW, the device works perfectly (well, except known issue with flickering) with this monitor with Windows 10...

three display in Manjaro

Sorry, i'm newbie here...
Hi, i have two display working perfectly (my laptop and one monitor) and i wanna use one monitor more.

I bought an USB to VGA Adapter but I don't know how can I install or setup.
This is my adapter: https://www.newegg.com/p/2VR-00D3-00042 1

Is it possible use FL2000 in Manjaro to use 3 display?

FL2000-2.1.33676.0

Hello;

I would like to know if this driver work for usb3.0 to HDMI FL2000-2.1.33676.0 ????

I compiled this with some changes to my kernel, i use debian stretch!! when i try to use the sample i have "this fl2000 device not connected?"

Is there a driver for usb to hdmi????

Thanks

在Linux内核 3.0.35编译时出现的问题该如何解决

版主好!感谢分享。尽管要求内核版本在3.10以上,但目前我们使用的核心板内核版本为3.0.35,所以试图在该内核版本上编译:
遇到如下问题:
1、fl2000_ioctl.c :500行,vm_mmap函数未声明;
2、fl2000_ioctl.c : 552行 vm_munmap 函数未声明;
3、fl2000_interrupt.c 151行 drain_workqueue函数未声明
4、fl2000_fops.c 158行 VM_DONTDUMP 未定义

请问有对于这些函数有没有可以替代的函数或者有其他解决办法? 谢谢!期待您的回复。

Issue with Kernel 5.3

So... I know that only the kernel 4 is compatible, and there is other tickets open here for the same issue, but i wanted to share my dmesg.
I had no problems compiling it, and loading, but i just did not worked...

[ 1012.391492] fl2000: loading out-of-tree module taints kernel.
[ 1012.391552] fl2000: module verification failed: signature and/or required key missing - tainting kernel
[ 1012.392015] usbcore: registered new interface driver fl2000  
[ 1020.115722] usb 2-1: new SuperSpeed Gen 1 USB device number 45 using xhci_hcd  
[ 1020.136065] usb 2-1: New USB device found, idVendor=1d5c, idProduct=2000, bcdDevice= 2.00
[ 1020.136071] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1020.138128] fl2000_device_probe:bInterfaceNumber:1 bAlternateSetting:0
[ 1020.138133] fl2000_device_probe:streaming interface detected
[ 1020.138272] fl2000_device_probe:usb_dev(0000000091545f0f), minor_num(1), dev_name(fl2000-1) created
[ 1020.927915] fl2000_monitor_vga_status_handler:Ignore MonitorPlugout evethjent, monitor not attached.
[ 1020.928133] fl2000_device_probe:bInterfaceNumber:2 bAlternateSetting:0
[ 1020.928136] fl2000_device_probe:Detect interrupt interface.
[ 1020.928138] fl2000_intr_pipe_create:found ep_num_intr_in(3)
[ 1033.596363] nouveau 0000:01:00.0: Enabling HDA controller
[ 1033.696731] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 6013d4 [ IBUS ]
[ 1036.603524] fl2000_monitor_plugin_handler:Notify system to add monitor.

Good luck with your projects.

BUG: unable to handle kernel NULL pointer dereference at 0000000000000100

OS: PureOS (debian testing based)
Kernel: 4.19.0-4-amd64

After plugging in the adapter, the kernel throws a bug in usb-storage, trace:

[69845.103182] Call Trace:
[69845.103225] usb_stor_port_reset+0x43/0x60 [usb_storage]
[69845.103266] usb_stor_invoke_transport+0x127/0x500 [usb_storage]
[69845.103289] ? storage_probe+0x320/0x320 [usb_storage]
[69845.103305] ? wait_for_completion_interruptible+0x135/0x1e0
[69845.103322] ? wake_up_q+0x70/0x70
[69845.103344] usb_stor_control_thread+0x1c9/0x280 [usb_storage]
[69845.103360] ? __kthread_parkme+0x4c/0x70
[69845.103373] kthread+0x112/0x130
[69845.103386] ? kthread_bind+0x30/0x30
[69845.103402] ret_from_fork+0x35/0x40

Full log attached.
fl2000_nullptr_bug.txt

insmod error

insmod: ERROR: could not insert module fl2000.ko: File exists

sample, make error

insmod fl2000.ko command working but in sample directory make step gives the following error:

root@debian:~/FL2000/sample# make 
/opt/hi3798/arm-hisiv200-linux/bin/arm-hisiv200-linux-gnueabi-gcc main.c -Xlinker -static -static-libgcc -o fltest_arm
make: /opt/hi3798/arm-hisiv200-linux/bin/arm-hisiv200-linux-gnueabi-gcc: Command not found
Makefile:9: recipe for target 'fltest_arm' failed
make: *** [fltest_arm] Error 127
root@debian:~/FL2000/sample# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.6 (stretch)
Release:	9.6
Codename:	stretch```

Isochronous Transfer

I tried to send data by isochronous transfer, thought it would be more stable and fast, as USB2 bandwith access is guaranteed. However, the result shows that's not the case. see pic here: http://imageshack.com/a/img923/57/2Gco9s.jpg
I activated sb_ifc_streaming->altsetting[1], the Max. payload for isochronous endpoint EP2(OUT) is 3x1024 bytes. Some hardware setting must be forgotten??

Manager desktop

hi my post is not a problem but is question for use this driver (fl2000.ko) on linux...
with success make it and insmod this driver and i test it success,
but use this driver in Linux it's possible?
your know some program for use this in "normal mode" normal mirror desktop and others?
I understand perfectly that this repository for driver and testing on Linux.
but in addition to testing there were additions on linux?

thanks for reading

Mainline?

Any possibility of getting the driver code into the mainline? Which would allow newer versions of Linux to use the hardware automatically after that.

8bit palette mode / grayscale possible?

How does the hardware 8bit palette mode work?
Experimenting with the code I can enable it by setting bits 25 and 26 in REG_OFFSET_8004. That seems to work and unlike 8bit mode, where RGB is packed into single byte, I get various colors for various byte values.
Is this palette fixed or stored somewhere in the memory? Can it be changed?
I would like to run adapter in 256 grayscale mode if possible... can this be done?

Thanks.

Does the driver support Fedora?

Hello and thanks for the diligent work.

I'm willing to know if the driver supports Fedora?

I'm current on Fedora 29 over Kernel 4.18.16-300.fc29.x86_64

How to recognize the fl2000 on system.

It seems like the driver can be used on my linux, and the sample on github work well: the new screen can output color out, but the display setting of system can't recognize the new screen which connect with usb2vga device which use fl2000. Is there anything lost for me?
Btw, there happened some error which fltest just stop after create_surface when I copy ko to /lib/modules/uname -r/ and modprobe fl2000, I do this hope the driver can be insmod auto when system startup.

Bad license

// fl2000_module.c
//
// (c)Copyright 2017, Fresco Logic, Incorporated.
//
// The contents of this file are property of Fresco Logic, Incorporated and are strictly protected
// by Non Disclosure Agreements. Distribution in any form to unauthorized parties is strictly prohibited.

Had to stop reading right here.

Please consider licensing the code under a free-software license instead. Otherwise it does a disservice to whoever would wish tho a proper DRM driver to Linux.

A good choice that's favored by display driver writers seems to be the MIT license:
https://opensource.org/licenses/MIT

Thanks!

fl2000 device not connected?

» lsusb 29 ↵
Bus 002 Device 004: ID 1d5c:2000 Fresco Logic FL2000/FL2000DX VGA/DVI/HDMI Adapter

» sudo ./fltest 0
fl2000 device not connected?

» sudo insmod ../src/fl2000.ko 29 ↵
insmod: ERROR: could not insert module ../src/fl2000.ko: File exists

work on windows 10, not work linux in ubuntu 20.04

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.