This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using GLP1.6.1 on the OMAP4. The kernel source is from git://dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.git (branch: ti-ubuntu-3.3-1482). The SGX kernel module source (eurasia_km) is from sgx-lib_188.8.131.52.1.orig.tar.gz in OPBU_GFX_DDK_GLP1.6.1
It appears as though the GLP1.6.1 SGX kernel module source does not match the GLP1.6.1 Linux kernel source.
The SGX kernel module source uses the kernel's direct rendering manager (DRM) to access the frame buffer. But the SGX driver passes incorrect parameters to the kernel's DRM driver's routines. It also calls non-existent DRM functions.
For example, In omaplfb_displayclass.c, call to omap_framebuffer_init() with incorrect 2nd parameter type and missing 3rd parameter. Also, In omaplfb_displayclass.c, call to omap_framebuffer_get_buffer() which is not in the kernel.
Where can I obtain SGX driver source that matches the kernel?
Are you using pandaboard for your testing or custom board? When you say there is a mismatch between kernel and SGX DDK, is there any visible artifacts on TV? Or any error log?
Please click the Verify Answer button on this post if it answers your question.------------------------------------------------------------------------------------------------------------------
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Chintan Patel:
The target is a custom board. I have already ported the GLP1.6.1 Linux kernel to it and am now trying to port the GLP1.6.1 DDK.
The problem is a compile problem, not a runtime problem.
Because of the above mentioned problem, I can't compile the SGX kernel module so I haven't gotten to be able to run it yet.
In reply to Steve Schefter:
Are you doing cross-compilation or native-compilation for kernel and module?
I am doing cross-compilation. Although the problem of missing and inconsistent DRM functions would be the same for native-compilation.
Needed some more information:
1) Is this first time you are doing this porting on any GLP release? Or have you done similar activity on earlier releases?
2) Are you seeing kernel compilation failure or module compilation failure? Please give us some failure logs.
3) Also provide us the steps/procedure you are using for kernel and module build.
We would like to reproduce this issue at our side. The above information will be very helpful for it.
<blockquote>1) Is this first time you are doing this porting on any GLP release? Or have you done similar activity on earlier releases?</blockquote>
I've worked with TI's Android and Linux code from their git trees and was on the team that ported Gingerbread and 2.6.35 (including the SGX kernel module) to OMAP3 for TI. But this is the first time I've used a GLP release tarball.
<blockquote>2) Are you seeing kernel compilation failure or module compilation failure? Please give us some failure logs.</blockquote>
As stated earlier, I've ported the kernel to the board. No problem there. It is with the SGX kernel module that there's a problem.
<blockquote>3) Also provide us the steps/procedure you are using for kernel and module build.</blockquote>
The easiest way to see the problem is to read the code.
From the earlier mentioned example of omap_framebuffer_init() in omaplfb_displayclass.c:
In the kernel (drivers/staging/omapdrm/omap_drv.h:
struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
The call in the SGX kernel module (eurasia_km/services4/3rdparty/dc_omapdrm/omaplfb_displayclass.c):
struct drm_mode_fb_cmd mode_cmd
psBuffer[i].fb = omap_framebuffer_init(psDevInfo->dev, &mode_cmd);
Note that the number of parameters passed to omap_framebuffer_init() is incorrect and the second parameter is a pointer to struct drm_mode_fb_cmd when it should be a pointer to struct drm_mode_fb_cmd2.
Another example (same omaplfb_displayclass.c):
omap_framebuffer_get_buffer(psBuffer[i].fb, 0, 0, &vaddr, &paddr, &screen_width);
If you grep the entire kernel source, you will find that there is no function omap_framebuffer_get_buffer. According to the git history, this function was removed from the kernel file drivers/staging/omapdrm/omap_fb.c on Jan 16 2012.
If you wish to see the error with a compile instead of reading the source, that is a problem because there are other issues with the SGX kernel module source which I have already made code changes to get around. For example, source files try to include linux/omap_drv.h which is not the proper location of that file in the kernel source. After fixing those items, I compile the code using:
export KERNELDIR=<kernel location>
make ARCH=arm CROSS_COMPILE=arm-cortexa9-linux-gnueabi-
Here is the output of make.
If you unpack the OPBU_GFX_DDK_1.6.1.zip, you would find there are several other files apart from sgx-lib_184.108.40.206.1.orig.tar.gz. I do not want to go in detail about these files since this is an open forum, however these files may need to be patched on top of the source file zip you have mentioned. My recommendation is to try a native compile as described in the release notes before doing a cross compile on the PC. If you still see issues like mismatch, please report the same.
In reply to Satheesh Radhakrishnan:
As per the build instructions for the DDK source code summarized in TI_Linux_OMAP_SGX_DDK.txt (see attachment), the officially supportedkernel is as follows:git tree: dev.omapzoom.org/pub/scm/integration/kernel-ubuntu.gitgit branch: ti-ubuntu-3.1-1282git tag: ti-ubuntu-3.1-1282.10commit id: 24e61cacc02cf3bd4825a4ca5c43c22633d7a308If you look at the kernel source code corresponding to above mentioned git branch and git tag, the definition for the omap_framebuffer_init is defined in the following file namely include/linux/omap_drm.h with 2 parameters as arguments. (This is in alignment with the SGX DDK kernel module source namely OPBU_GFX_DDK_GLP1.6.1.zip)In the case of latest kernel source with git branch: ti-ubuntu-3.3-1482, the include/linux/omap_drm.h is a symbolic link to drivers/staging/omapdrm/omap_drm.h. Moreover the definition for the omap_framebuffer_init is defined in the drivers/staging/omapdrm/omap_drv.h with 3 arguments. (This is not in alignment with the kernel module source namely OPBU_GFX_DDK_GLP1.6.1.zip).The best solution is to use the officially supported kernel version (ti-ubuntu-3.1-1282.10) as mentioned above in order to be able to successfully compile the kernel module source of DDK package.
Please provide your feedback after trying the above suggestion.
Thanks & Best Regards,Venkat
Please click the Verify Answer button on this post if it answers your question_____________________________________________
Be sure to read the OMAP4 Forum Guidelines & FAQ-
In reply to Venkat Ramana Peddigari:
Hi Steve,Here is the summary of the two possible solutions to address the compilation issues you are facing in building the GFX DDK 1.6.1 package on to Ubuntu Kernel versions namely ti-ubuntu-3.3-1482.6 & ti-ubuntu-3.1-1282.10.Solution 1: Porting of GFX DDK 1.6.1 Package on to ti-ubuntu-3.3-1482.6Background: The function "omap_framebuffer_init" is called into services4/3rdparty/dc_omapdrm_linux/omaplfb_displayclass.c that is not compiled/used/maintained anymore. This code is by the way removed from the DDK1.9 that will be delivered with GLP1.6.3.In GLP 1.6.x, we are no longer using the omaplfb driver from IMG. Instead we have moved to TI GEM based omapdrm driver. In order to get these changes into effect, you need to apply the debian/patches for sgx-lib source using the Quilt command. See further details on these steps below.Exact Build Instructions To Avoid Any Build Issues1. Download sgx-lib_220.127.116.11.1.orig.tar.gz + sgx-lib_18.104.22.168.1-1glp57.diff.gz + sgx-lib_22.214.171.124.1-1glp57.dsc2. Use command like "dpkg-source -x <dsc file>" to expand the code. i.e., "dpkg-source -x sgx-lib_126.96.36.199.1-1glp57.dsc"3. Go the directory created and execute following commands to get the final patched source code$ export QUILT_PATCHES=debian/patches$ quilt push -aNow you can build this source code and install accordingly.NOTE: Since debian/patches have not been applied, it is leading to build issues such as incompatible definitions of API's such as omap_framebuffer_init and also including the build of omaplfb driver which is not used anymore. Instead, GLP 1.6.x releases are using omapdrm driver.Solution 2: Porting of GFX DDK 1.6.1 Package on to ti-ubuntu-3.1-1282.10 VersionUntar the sgx-lib source for GFX DDK 1.6.1 and follow the instructions as outlined in TI_Linux_OMAP_SGX_DDK.txt to build the kernel module source of GFX DDK 1.6.1Please provide your valuable feedback for the above mentioned solutions.Thanks & Best Regards,Venkat
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.