Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.

Changed board name to gc573#8

Open
cdorn0 wants to merge 23 commits intoderrod:masterfrom
cdorn0:development
Open

Changed board name to gc573#8
cdorn0 wants to merge 23 commits intoderrod:masterfrom
cdorn0:development

Conversation

@cdorn0
Copy link

@cdorn0 cdorn0 commented Mar 23, 2021

Changed board name to gc573; Changed printk to use the module name for kernel messages; extracted library and patched to a working version

@derrod
Copy link
Owner

derrod commented Mar 23, 2021

Hey, first of all thanks, that seems like a decent amount of work. But have you checked if those patches also work with the newer driver version? Getting that one to work properly is imo more desireable since it finally added support for RGB/444 video modes rather than being limited to 422.

@cdorn0
Copy link
Author

cdorn0 commented Mar 23, 2021

Hi,
the development branch is a mix of the new driver version and the older one. The only thing missing is the actual FPGA control file (aver_xilinx.o) and the bmp loader (pic_bmp.o) as I did not get it to work with the board source files. Furthermore I did not add the new color schemes NV12/YV12, as they require some rework. It might be possible that it works better with the board objects they shipped with the new driver. I am working on the RGB3 support right now, but I am a little short on time.
The other open point is the RGB LED stuff, because the red blinking is a little bit annoying. Unfortunately I am not familiar with the windows driver model and windows driver debugging, so I am still not sure how to start there.
Yet I was able to find out, that the LEDs are directly controlled by the FPGA, there is no special driver used.
Furthermore the 6-Pin Header is in fact a XILINX JTAG port and the FPGA identifies itself to be a Artix7 XC7A100.
Unfortunately the PCIe BAR config indicates that it is not a simple AXI GPIO attached to a AXI2PCIe bridge.

@antpk
Copy link

antpk commented Apr 9, 2021

Firstly I wanted to say thank you to both of you. I found this PR really useful, I'm on Archlinux and I can confirm this compiles and I can get the card working with the latest 5.11.12 kernel. Initial basic tests show video is playing back nicely - audio seems to drift a lot. There seems to be something up kworker as i'm getting a lot of:

BUG: scheduling while atomic: kworker/3:3/1224/0x00000002
and
BUG: workqueue leaked lock or atomic: kworker/3:3/0x7fffffff/1224
last function: sys_work_func [gc573]

This version is a lot better because at least I can poweroff/reboot without forcing the machine off.
I'm going to see if I can get my head around some of the issues I'm experiencing - I've got some basic kernel knowledge so this will be a good learning exercise.
If this works well under other distros then I think it's worth considering merging.

dkms.conf

#IntelliJ CLion Files
.idea/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set up a global gitignore for all your local clones with this global gitignore being local to your computer this way:

git config --global core.excludesfile ~/some/path/to/your/global/gitignore

This way you won't have to add lines specific to your own setup on any project you work on. =)

@Gelmo
Copy link

Gelmo commented Nov 18, 2021

@derrod I will be creating an AUR package for ArchLinux this week to make it easier to use this driver. Take a look at this branch:

https://github.com/antpk/lg4k-linux/tree/devwithlatestdriver

This is @antpk's branch that adds the new driver to @cdorn0's branch. There are a couple of changes necessary. The install.sh script needs to be updated to point to cx511h.ko instead of gc573.ko (unless making other adjustments), and the comment at this commit needs to be reviewed/resolved:

antpk@d5fcb46

I will be doing testing tonight.

It would be ideal if the AUR package referred to this repo rather than antpk's, assuming you intend to continue maintaining this driver. Please let me know your thoughts.

Also, hi @illwieckz I see you everywhere I swear

@derrod
Copy link
Owner

derrod commented Nov 21, 2021

I don't see why it would be an issue if the AUR package referred to a different repo. This isn't my original work in the first place. If and when I can successfully test the work on any forks I'll merge it.

@Gelmo
Copy link

Gelmo commented Nov 21, 2021

Sounds good, thanks.

@illwieckz
Copy link

I haven't managed to get the card working (i.e. with the driver not crashing the whole system) with any of the patches I tested (including this PR), but I haven't tested https://github.com/antpk/lg4k-linux/tree/devwithlatestdriver yet. Hi @Gelmo 👋, did you get something working and usable on your end?

@Gelmo
Copy link

Gelmo commented Dec 1, 2021

@illwieckz Not yet, no. I have the module building via dkms, but it is not functional. Looks like additional adjustments to the board binaries are needed:

[    2.004870] cx511h: pci_model_driver_init, 604: pci_model_driver_init
[    2.004872] cx511h: pci_model_driver_init, 643: id->device=54
[    2.004884] cx511h: pci_model_probe, 134: pci_model_probe prepare
[    2.004895] CL511H 0000:03:00.0: enabling device (0000 -> 0002)
[    2.005033] cx511h: pci_model_probe, 189: set 32bit DMA mask
[    2.005116] cx511h: pci_model_probe, 257: pci_model_probe sub_id=5730
[    2.005117] cx511h: board_probe start
[    2.005146] cx511h: >>aver_xilinx_init
[    2.005160] cx511h: aver_xilinx_init ok
[    2.005161] cx511h: >>aver_xilinx_init_registers
[    2.110173] cx511h: ****************************
[    2.110175] cx511h: chip_version:20201015
[    2.110176] cx511h: ****************************
[    2.110177] cx511h: aver_xilinx_set_i2c_speed bus 0 value 3d
[    2.110178] cx511h: aver_xilinx_set_i2c_speed bus 1 value 138
[    2.110179] cx511h: AVER Xilinx Set I2C Bus:2 Speed:0 value:f9
[    2.180934] cx511h: aver_xilinx_init_registers ok
[    2.180963] cx511h: board_i2c_init
[    2.180963] cx511h: >>>board_probe fail
[    2.180964] cx511h: pci_model_probe, 262: board_probe=8
[    2.180965] CL511H 0000:03:00.0: Driver probe function unexpectedly returned 8
[    2.180977] cx511h: pci_model_driver_init, 679: >>>pci_register_driver ok

cdorn0 added 2 commits January 9, 2022 15:45
… work; fixed singleplane support for NV12 and YV12; fixed multiplane buffers; fixed ioctl for v4l2 compliance; started development on multiplane support
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants