Closed JasperNuytten closed 6 years ago
Parallel gpio bus is slow. To get any decent performance the board has to support a parallel bus natively. The Pi for example has such a bus, but there's no support in fbtft for it, since the driver isn't in mainline.
I haven't look into this, since SPI with DMA is IMO a much better solution, being supported on most boards.
gpiolib has a gpiod_set_array_value() function that can set multiple gpios at once. I tried it on the Raspbery Pi, but the gain wasn't much. This can be different on your board.
If this is the driver used on your board: http://lxr.free-electrons.com/source/drivers/gpio/gpio-mxc.c
Then it seems that .set_multiple() is supported: mxc_gpio_probe() -> bgpio_init() -> bgpio_setup_io(): gc->set_multiple =
This means that it's possible for you to try it if you want. Here's the code I used (tinydrm, fbtft successor): https://github.com/notro/tinydrm/blob/master/tinydrm-regmap-i80.c You would need to apply it to this function in fbtft: http://lxr.free-electrons.com/ident?i=fbtft_write_gpio8_wr
But be warned, you might end up with little performance gain. If your board supports SPI DMA, I suggest using a SPI display.
notro,
thanks for the information! I have to conclude that driving the data through the GPIO-interface will be too slow. When attaching one pin to an oscilloscope and having it toggle continuously I only get a frequency of 0.84 Mhz, which isn't sufficient.
So I'll have to figure out another way. I would love to try SPI, unfortunately I don't have the possibility to change the display at the moment, so that's not an option.
Thanks for your assistance!
notro
Is it possible to use DMA for a platform device (8-bit databus)? Could this not improve the speed?
kind regards
Is it possible to use DMA for a platform device (8-bit databus)?
That would require a dedicated hardware bus. As I mentioned the Pi has one, but there is no subsystem for intel8080 type busses in the kernel, so it would require a lot of work to get this supported in the kernel. A hack is ofc possible as I mentioned.
I'm sorry but maybe I'm not quite understanding what it is that you mean with "hack". Is it using that multiple set method you suggested? If so, I looked it up but unfortunately this method is not yet implemented in the kernel version I'm using (4.1) so that's probably not an option unless I'm completely missing the point.
Yes, I refer to .set_multiple().
Closing issue since there has been no activity for more than 2 months. Reopen if needed.
Hi,
I'm struggling to get this LCD (Rocketech RK020JH100, datasheet attached) properly working together with the FBTFT driver using this board: http://variwiki.com/index.php?title=DART-6UL I have a Yocto build (Jethro Release 01) running on the board, I have build Yocto and the Linux Kernel from source code and am booting from an SD-card.
I succeeded in getting any image on the LCD, unfortunately it's not running fast enough. Whenever I would load an image on the screen or whenever the console needs to output a lot of data I can see a horizontal line running over my screen, which is according to me a sign of a low FPS. (Please correct me if I'm wrong). However, the flickering cursor on the screen that indicates where you type runs smoothly. According to me this means that only new data parts are updated.
I got this result by adding the device in the Device Tree configuration, editing the kernel defconfig file for the board and by editing the fb_ili9325.c driver code. I'm not using SPI and it's also not possible (according to my conclusion using the datasheet) as Rocktech gives me no possibility to select this option. I therefore send the data using the GPIO's of the board, so I'm sending data parallel, I believe this is called a platform device?
I have read about this issue (https://github.com/notro/fbtft/issues/311) where somebody had more or less the same issue as me. The suggestion was bypassing the gpiolib, unfortunately he's working with a Raspberry Pi and I haven't figured out yet how to change the code for a board such as mine.
Anyway, here are all of the details I think are necessary for a first conclusion. Hopefully somebody here will be able to help me. I Have been breaking my head over this for a long time now. Just an FYI, my knowledge level is probably beginner - intermediate concerning Linux/LCD-technology/terminology.
Kind regards
INFO
Device Tree configuration(changed the GPIO's using the 9335 datasheet)
defconfig file
Driver code (original ILI9325.c ==> Edited to work with ILI9335 controller)
Output dmesg
RK020JH100 SPEC.PDF