Download Print this page
Texas Instruments OMAP35 Series Migration Manual

Texas Instruments OMAP35 Series Migration Manual

Evm linux psp migration guide - moving to open source(git)
Hide thumbs Also See for OMAP35 Series:

Advertisement

Quick Links

OMAP35x EVM Linux PSP
Migration Guide - Moving to Open source(GIT)
OMAP35x Linux PSP
02.01.03.11
Publication date 10 September 2009

Advertisement

loading
Need help?

Need help?

Do you have a question about the OMAP35 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Texas Instruments OMAP35 Series

  • Page 1 OMAP35x EVM Linux PSP Migration Guide - Moving to Open source(GIT) OMAP35x Linux PSP 02.01.03.11 Publication date 10 September 2009...
  • Page 2 Version 02.01.03.11 Platform Support Products...
  • Page 3 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
  • Page 4 Version 02.01.03.11 Platform Support Products...
  • Page 5 Table of Contents Read This First ..............ix 1. Fbdev Display Driver ............1 2. V4L2 Display Driver ............23 3. V4L2 Capture Driver ............35 Version 02.01.03.11 Platform Support Products...
  • Page 6 Version 02.01.03.11 Platform Support Products...
  • Page 7 List of Figures 1.1. Configure DVI Modes (720P/480P): Step 2 ......21 Version 02.01.03.11 Platform Support Products...
  • Page 8 Version 02.01.03.11 Platform Support Products...
  • Page 9 List of Tables 1.1. Memory requirement for FBDEV driver Buffers ......5 1.2. Frame-buffer Driver: Standard sysfs attributes ..... 14 1.3. DSS Library: sysfs attributes ..........15 1.4. Frame-buffer Driver: Custom sysfs attributes ....... 16 1.5. Frame-buffer Driver: Custom sysfs attributes ....... 17 Version 02.01.03.11 Platform Support Products...
  • Page 10 Version 02.01.03.11 Platform Support Products viii...
  • Page 11: Read This First

    Read This First About This Manual This document describes interface level changes with respect to the 2.6.22 kernel based Linux PSP releases and should serve as an aid for migrating existing applications from PSP 1.0.x releases to the open source(GIT) based Linux PSP releases. How to Use This Manual This document includes the following chapters: •...
  • Page 12 This is an example of a useful tip. If You Need Assistance For any assistance, please send an mail to software support [mailto:softwaresupport@ti.com]. Trademarks OMAP™ is a trademark of Texas Instruments Incorporated. All other trademarks are the property of the respective owner. Platform Support Products Version 02.01.03.11...
  • Page 13: Fbdev Display Driver

    Fbdev Display Driver Abstract 1.1. Frame-buffer Driver This document provides an detailed information of the User interface changes in Frame-buffer driver as compared with PSP1.0.x release, and plays the role of migration guide for the users from PSP1.0.x to GIT based release.
  • Page 14 Fbdev Display Driver Frame-buffer Driver Supports all the three planes (GFX, Vid1 and Vid2) via compile time option. The default configuration is GFX - FBDEV, Vid 1 - V4L2 and Vid2 - V4L2. Supported color format: RGB888 and RGB565, RGB24(unpacked), ARGB, RGBA.
  • Page 15 Fbdev Display Driver Frame-buffer Driver 1.1.5. List of new IOCTLs in Git release Following is the list of new IOCTLs supported in Git release compared to PSP1.0.2 release • OMAPFB_QUERY_PLANE • OMAPFB_SETUP_MEM • OMAPFB_QUERY_MEM • OMAPFB_GET_CAPS • OMAPFB_SET_UPDATE_MODE • OMAPFB_GET_UPDATE_MODE •...
  • Page 16 Fbdev Display Driver Frame-buffer Driver Note The entire command should be entered in a single line. 1.1.6.2. Back-light control User can control the backlight through SYSFS interface - PSP1.0.x Method SYSFS Attribute - /sys/class/display_control/omap_disp_control/ lcdbacklight Parameter - on - To turn on the LCD backlight Off - To turn off the LCD backlight GIT Method SYSFS Attribute - /sys/class/backlight/omap3evm-...
  • Page 17 Fbdev Display Driver Frame-buffer Driver var.rotate = 90; /* To set rotation angle to 90 degree */ if (ioctl(fb, FBIOPUT_VSCREENINFO, &var)<0) { perror("Error:FBIOPUT_VSCREENINFO\n"); exit(4); GIT Method The rotation has been supported either through SYSFS entry or ioctl SYSFS Interface SYSFS Attribute - /sys/class/graphics/fb0/rotate 0 - 0 degree, 1 - 90 degree, 2 - 180 degree and 3 - 270 degree respectively IOCTL interface...
  • Page 18 Fbdev Display Driver Frame-buffer Driver makes the hardware to reload the CLUT. Following example shows how to change CLUT struct fb_cmap cmap; unsigned short r[4]={0xFF,0x00, 0x00, 0xFF}; unsigned short g[4]={0x00, 0xFF, 0x00, 0xFF}; unsigned short b[4]={0x00, 0x00, 0xFF, 0x00}; cmap.len = 4; cmap.red = r;...
  • Page 19 Fbdev Display Driver Frame-buffer Driver 1.1.6.8. Panning the Display The PSP1.0.x release was supporting panning of display without any constraint on user. While PSP02.0x.0x release has buffer limitation, it expects user to allocate sufficient buffer size through bootargs. PSP1.0.x Method Follows standard FBDEV interface.
  • Page 20 Fbdev Display Driver Frame-buffer Driver GIT Method /* Wait for the current frame buffer to get displayed. */ ret = ioctl(fd, OMAPFB_WAIT_FOR_VSYNC, 0); if(ret < 0) { perror("OMAPFB_WAIT_FOR_VSYNC\n"); close(fd); exit(0); 1.1.7. New Custom IOCTL's 1.1.7.1. OMAPFB_SYNC_GFX Not being Tested. 1.1.7.2. OMAPFB_UPDATE_WINDOW Not being Tested.
  • Page 21 Fbdev Display Driver Frame-buffer Driver 1.1.7.5. OMAPFB_SETUP_MEM Allows user to setup the frame buffer memory, like size and type. Data Structure #define OMAPFB_MEMTYPE_SDRAM #define OMAPFB_MEMTYPE_SRAM #define OMAPFB_MEMTYPE_MAX struct omapfb_mem_info { __u32 size; __u8 type; __u8 reserved[3]; Usage: struct omapfb_mem_info mi; mi.size = >...
  • Page 22 Fbdev Display Driver Frame-buffer Driver Usage: struct omapfb_mem_info mi; if (ioctl(fb, OMAPFB_QUERY_MEM, &mi)) { perror("Error: OMAPFB_QUERY_MEM.\n"); exit(1); printf("size - %d\n", mi.size); printf("type - %d\n", mi.type); 1.1.7.7. OMAPFB_GET_CAPS Not being Tested. 1.1.7.8. OMAPFB_SET_UPDATE_MODE Sets the current update mode. enum omap_dss_update_mode { OMAP_DSS_UPDATE_DISABLED = 0, OMAP_DSS_UPDATE_AUTO, OMAP_DSS_UPDATE_MANUAL,...
  • Page 23 Fbdev Display Driver Frame-buffer Driver OMAP_DSS_UPDATE_DISABLED = 0, OMAP_DSS_UPDATE_AUTO, OMAP_DSS_UPDATE_MANUAL, OMAP_DSS_UPDATE_MANUAL is not supported currently. OMAP_DSS_UPDATE_AUTO - indicates the DSS is enabled. OMAP_DSS_UPDATE_DISABLED - indicates DSS is disabled. Usage: enum omapfb_update_mode mode; if (ioctl(fb, OMAPFB_GET_UPDATE_MODE, &mode)) { perror("Error: OMAPFB_GET_UPDATE_MODE.\n"); exit(1); printf("mode - %d\n", mode);...
  • Page 24 Fbdev Display Driver Frame-buffer Driver Note The entire command should be entered in a single line. 1.1.8.2. Frame-Buffer Driver Supported Params 1.1.8.2.1. Default FrameBuffer size User can configure the maximum size of the framebuffer through boot- agrs, as shown below - OMAP3EVM# setenv bootargs console=ttyS0,115200n8 mem=128M noinitrd root=/dev/nfs nfsroot=172.24.133.229:/home/user/ remote/_install, nolock, size=1024, wsize=1024 ip=dhcp vram=10M...
  • Page 25 Fbdev Display Driver Frame-buffer Driver 720x576@50 : width x height @ Hz. Please make sure that the mode setting is being supported by FB. To add new mode setting to FB please edit modedb.c file with appropiate parameters. Note The entire command should be entered in a single line. 1.1.8.2.3.
  • Page 26 Fbdev Display Driver Frame-buffer Driver SYSFS attribute Description bits_per_pixel Allows user to control bits per pixel configuration, currently the supported values are 16 and 24. # echo 16/24 > /sys/class/graphics/fb0/ bits_per_pixel blank Allows user to control lcd display blanking configuration independently. echo 0/4 >...
  • Page 27 Fbdev Display Driver Frame-buffer Driver [root@OMAP3EVM]# ls -l /sys/devices/platform/omap-dss/ lrwxrwxrwx 1 root root 0 Jan 1 01:46 bus -> ../../../bus/ platform -r--r--r-- 1 root root 4096 Jan 1 01:46 clk lrwxrwxrwx 1 root root 0 Jan 1 01:46 driver -> ../../../bus/ platform/drivers/omap-dss -r--r--r-- 1 root root 4096 Jan 1 01:46 modalias...
  • Page 28 Fbdev Display Driver Frame-buffer Driver lrwxrwxrwx 1 root root 0 Jan 1 01:54 subsystem -> ../../../ bus/platform -rw-r--r-- 1 root root 4096 Jan 1 01:54 uevent [root@OMAP3EVM]# SYSFS attribute Description displays Lists all the available supported displays with the following format - <display name>...
  • Page 29 Fbdev Display Driver Frame-buffer Driver SYSFS attribute Description <manager name> t:<target display> [root@OMAP3EVM]# cat /sys/devices/platform/ omapfb/managers lcd t:lcd tv t:tv l4 t:none [root@OMAP3EVM]# overlays Lists all the overlays with the following format - <overlay name> t:<target manager> x:<xpos> y:<ypos> iw:<input width, read only> ih:<input height, read only>...
  • Page 30 Fbdev Display Driver Frame-buffer Driver SYSFS attribute Description To over-write default timeout value # echo 100 > /sys/devices/platform/omapfb/ sleep_timeout Note Please note that, with current FileSystem the FBDEV keeps on refreshing the timer value after timeout, due to demo application. Table 1.5.
  • Page 31 Fbdev Display Driver Frame-buffer Driver 1.1.9.4.3. Switching GFX plane from LCD to TV Issue following commands to switch GFX plane output from LCD to TV - # echo "gfx e:0" > /sys/devices/platform/omapfb/overlays # echo "gfx t:tv e:0" > /sys/devices/platform/omapfb/overlays # echo "tv e:1" > /sys/devices/platform/omapfb/displays # Set the Frame buffer parameters like xres, xres_virtual, y_res, yres_virtual again before running below command.
  • Page 32 Fbdev Display Driver Frame-buffer Driver # echo "tv e:1" > /sys/devices/platform/omapfb/displays 1.1.9.4.8. Switching Vid2 Plane from TV to LCD Issue following commands to switch Vid2 plane output from TV to LCD - # echo "vid2 e:0" > /sys/devices/platform/omapfb/overlays # echo "vid2 t:lcd e:0" > /sys/devices/platform/omapfb/overlays # echo "lcd e:1"...
  • Page 33 Fbdev Display Driver Frame-buffer Driver Open menuconfig options from kernel command prompt. Go to the Device Drivers => Graphics support => OMAP2/3 Display Device Drivers, enable Generic Panel and choose default mode as either 480P or 720P as shown below. Select Device Drivers as shown here: Figure 1.1.
  • Page 34 Version 02.01.03.11 Platform Support Products...
  • Page 35: V4L2 Display Driver

    V4L2 Display Driver Abstract 2.1. V4L2 display Driver This document provides the detailed usage of the user interface API changes in the V4L2 driver of GIT release of PSP compared to PSP1.0.2 release. This user interface changes are primarily because of the open source comments and new display library submitted to community.
  • Page 36 V4L2 Display Driver V4L2 display Driver Scaling supported from 8X to 1/2x. Scaling coefficients are not updated as per PSP1.0.2 release. Scaling coefficients are from the open source DSS library Cropping and Windowing supported. Configuration of parameters such as height and width of display screen, bits-per-pixel etc.
  • Page 37 V4L2 Display Driver V4L2 display Driver • VIDIOC_G_FMT • VIDIOC_ENUM_FMT • VIDIOC_TRY_FMT • VIDIOC_S_CROP • VIDIOC_G_CROP • VIDIOC_QUERYCAP • VIDIOC_CROPCAP 2.1.4. List of IOCTLs not supported Following ioctls are not supported compared to PSP1.0.2 release. Failing to remove them from the application may result in compilation errors. •...
  • Page 38 V4L2 Display Driver V4L2 display Driver 2.1.5. List of new IOCTLs in Git release Following is the list of new IOCTLs supported in Git release compared to PSP1.0.2 release • VIDIOC_G_CTRL • VIDIOC_S_CTRL • VIDIOC_QUERYCTRL • VIDIOC_S_FBUF • VIDIOC_G_FBUF 2.1.6. Usage of New/Changed ioctls in GIT release. Following section describes the usage of the new/changed ioctls in the Git version of the V4L2 display driver compared to PSP1.0.2 release.
  • Page 39 V4L2 Display Driver V4L2 display Driver 2.1.6.2. Getting rotation value PSP1.0.2 release is supporting the rotation through custom ioctls. While git release will support the rotation through the control id. Patch is submitted on to community to add the control id for rotation. PSP1.0.x Method int degree;...
  • Page 40 V4L2 Display Driver V4L2 display Driver omap_vout_qctrl.maximum, omap_vout_qctrl.step, omap_vout_qctrl.default_value, omap_vout_qctrl.flags, omap_vout_qctrl.type); 2.1.6.4. Enabling/Disabling the alpha blending PSP1.0.x was supporting the alpha blending through sysfs entries. PSP02.0x.0x supports the alpha blending through standard V4L2 ioctl. In PSP02.0x.0x release alpha blending will be enabled on the overlay manager on which the video pipeline is currently connected.
  • Page 41 V4L2 Display Driver V4L2 display Driver if (ret < 0) { perror ("VIDIOC_S_FBUF"); return 0; framebuffer.flags &= ~V4L2_FBUF_FLAG_LOCAL_ALPHA; ret = ioctl (fd, VIDIOC_S_FBUF, &framebuffer); if (ret < 0) { perror ("VIDIOC_S_FBUF"); return 0; 2.1.6.5. Setting/Getting the global alpha value for video2 pipeline PSP1.0.x was supporting the global alpha value through sysfs entries.
  • Page 42 V4L2 Display Driver V4L2 display Driver if (ret < 0) { perror("VIDIOC_G_FMT\n"); close(fd); exit(0); printf("Global alpha value read is %d\n", fmt.fmt.win.global_alpha); 2.1.6.6. Background color. PSP1.0.x was supporting the background color setting through custom V4L2 ioctl on any of the output device. PSP02.0x.0x supports the background color setting through v4l2 control ioctl.
  • Page 43 V4L2 Display Driver V4L2 display Driver control.value = color; ret = ioctl(fd, VIDIOC_S_CTRL, &control); if (ret < 0) { perror("VIDIOC_S_CTRL\n"); close(fd); exit(0); Getting the background color struct v4l2_control control; unsigned int color = 0xFF0000 /* Red color */ control.id = V4L2_CID_BG_COLOR; ret = ioctl(fd, VIDIOC_G_CTRL, &control);...
  • Page 44 V4L2 Display Driver V4L2 display Driver ret = ioctl (fd, VIDIOC_G_FBUF, &framebuffer); if (ret < 0) { perror ("VIDIOC_G_FBUF"); exit(1); /* Set SRC_COLOR_KEYING if device supports that */ if(framebuffer.capability & V4L2_FBUF_CAP_SRC_CHROMAKEY) { framebuffer.flags |= V4L2_FBUF_FLAG_SRC_CHROMAKEY; ret = ioctl (fd, VIDIOC_S_FBUF, &framebuffer); if (ret <...
  • Page 45 V4L2 Display Driver V4L2 display Driver if (ret < 0) { perror ("VIDIOC_S_FBUF"); exit(1); To disable the source color keying on the overlay manager to which the video pipeline is connected struct v4l2_framebuffer framebuffer; ret = ioctl (fd, VIDIOC_G_FBUF, &framebuffer); if (ret <...
  • Page 46 V4L2 Display Driver V4L2 display Driver colorkey.outputdev = OMAP2_OUTPUT_LCD; ret = ioctl(fd, VIDIOC_G_OMAP2_COLORKEY, &colorkey); if (ret < 0) { perror("VIDIOC_S_OMAP2_COLORKEY\n"); close(fd); exit(0); printf("Color key type %d color key value %d\n", colorkey.type, colorkey.val); GIT Method Below program listing shows how to set the chromakey value using the git method.
  • Page 47: V4L2 Capture Driver

    V4L2 Capture Driver Abstract 3.1. V4L2 Capture Driver This document provides the detailed usage of the user interface API changes in the V4L2 Capture driver of GIT release of PSP compared to PSP1.0.2 release. This user interface changes are primarily because of the open source comments and new ISP-Camera library submitted to community.
  • Page 48 V4L2 Capture Driver V4L2 Capture Driver Supports NTSC and PAL standard on Composite and S-Video interfaces. Supports standard V4L2 IOCTLs to get/set various control parameters like brightness, contrast, saturation, hue and auto gain control. TVP5146 (TVP514x) decoder driver module can be used statically or dynamically (insmod and rmmod supported).
  • Page 49 V4L2 Capture Driver V4L2 Capture Driver 3.1.6. Usage of New/Changed ioctls in GIT release. Following section describes the usage of the new/changed ioctls in the Git version of the V4L2 Capture driver compared to PSP1.0.x release. 3.1.6.1. VIDIOC_G_INPUT ioctl Ioctl VIDIOC_G_INPUT takes pointer to integer using which the detected inputs will be returned to applicaion space.
  • Page 50 Version 02.01.03.11 Platform Support Products...