Project

General

Profile

Actions

Action Item #309

closed

Investigate use of directFB instead of X for fbtft

Added by Hammel almost 10 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
04 - Root File System
Target version:
Start date:
05 Apr 2014
Due date:
% Done:

100%

Estimated time:
Severity:
03 - Medium

Description

I can't get the touch screen input to work correctly with X, but the ts_test program works fine. So I thought I might try switching to directFB and see if that works better. If it does, I'll try to get gtk+ running on it and build the UI that way.

If not, I may drop back to writing low level framebuffer utilities. Since I know this works (see ts_test) I at least have a fallback if I can't get more sophisticated toolsets working.

Actions #1

Updated by Hammel almost 10 years ago

  • % Done changed from 0 to 10

I compiled gtk+-2.x for use with DirectFB by porting the X11 build in Buildroot to a DirectFB package. The compile completes cleanly and I have a DirectFB-GTK2 installation on the rootfs, but this doesn't seem to work. I can start gtk-demo but it segfaults after putting a mouse pointer on the display.

So I went back to ts_calibrate and ts_test. These work perfectly. They also work directly on the framebuffer, without DirectFB (which offers a bit of windowing and application support on top of the framebuffer). So I googled "TSLIB + DirectFB" and found that these two should work together just fine.

So now I want to write a hello world program that tests this. In order, it should:
  1. Open a window with a button on the display without tslib
  2. Open a window with a button that accepts input on the button with tslib.

If I can get this to work then I'll need to spec out how to build a UI for the fbtft display, something akin to Matchbox/BUI. But it will have to be written from scratch unless SawMan can be used instead.

See
  1. http://www.raspberrypi.org/forums/viewtopic.php?f=64&t=39027
  2. http://www.directfb.org/docs/DirectFB_Tutorials/
  3. http://directfb.org/wiki/index.php/Main_Page
  4. https://github.com/kergoth/tslib
  5. http://directfb.org/downloads/Extras/DirectFB-examples-1.6.0.tar.gz (Buildroot has 1.6.x though DirectFB is at 1.7.0)
Actions #2

Updated by Hammel almost 10 years ago

I think I see the trick here: you can't use both the X.org server over the framebuffer and the fbtft DirectFB interface at the same time. This would probably be true of using fbdev or fbturbo for X.org. I had disabled fbturbo so need to rebuild it and test that theory. If fbturbo doesn't use the fb (which seems unlikely since its prefixed with fb) then having both at the same time might work.

Barring both working, I've updated the init scripts on the current test board to deal with using one or the other based on
  1. if tvservice says the HDMI is there
  2. if the /etc/init.d/fbtft stamp file exists

So, knowing this (and after saving off the modified init scripts) I can move on to writing directfb apps for the version of PiBox that will provide media services and BLE-based sensor info.

Actions #3

Updated by Hammel almost 10 years ago

Verified: can't use both X (with fbdev or fbturbo) with fbtft at the same time.

Actions #4

Updated by Hammel almost 10 years ago

  • Priority changed from Immediate to Normal
  • Target version changed from 0.9.0 to 0.10.0
  • Severity changed from 01 - Critical to 03 - Medium

Additional work on this is being pushed to 0.10.0 so I can get the media specific stuff completed in time for camping season.

Actions #5

Updated by Hammel over 9 years ago

  • Target version changed from 0.10.0 to 2.0 - Harkonnen

DirectFB isn't required until we fully support the touchscreen interface, which itself is not target until the 2.0 release for home automation.

Moving to 2.0 target version.

Actions #6

Updated by Hammel 10 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 10 to 100

This is no longer needed. X works fine on the touchscreens currently supported (7" RPi official touchscreen, TFT's for PiSentry, PiStore, even Pinephone Pro).

Closing issue.

Actions

Also available in: Atom PDF