ATI Mobility Radeon graphics card

782 views
Skip to first unread message

walter

unread,
Apr 24, 2014, 10:32:20 AM4/24/14
to andro...@googlegroups.com
I have ATI Mobility Radeon X1450 graphics card,

can you guide me how to check if this card has support already for OpenGL in the current Android-x86 kernel and how to enable it in the compilation, and if not how to find and integrate the drivers in the kernel source

many thanks for any help,
Walter

walter

unread,
May 7, 2014, 5:13:32 PM5/7/14
to andro...@googlegroups.com
according to https://wiki.gentoo.org/wiki/Radeon it is in R500 family chip and the description how to configure the kernel is vage (at least for me)

can you help?

pstglia

unread,
May 7, 2014, 9:48:14 PM5/7/14
to andro...@googlegroups.com
Hi, it is already supported in Kitkat 4.4 RC1 kernel (3.10.30 - radeon driver module)

I think OpenGL ES/EGL for this card it is supported by Mesa version provided with this release (9.2.1). If you have problems, you can try an alternative iso compiled with a newer mesa release (10.1.1)
https://drive.google.com/file/d/0BxO6THtB865fS3dIbzBCNTFjcGs/edit?usp=sharing

Warning: This iso is not official. Created it for testing purposes. Use it at your own risk

walter

unread,
May 13, 2014, 5:32:26 PM5/13/14
to andro...@googlegroups.com
Hi pstglia,

when I am in DEBUG=2 mode I see during booting the radeon driver and radeonfb are loaded but the booting ends on android prompt and will not enter into graphic mode. What parameters for kernel should I actually use for booting ?

I am using your iso from 27/04

many thanks in advance for your help!

pstglia

unread,
May 13, 2014, 9:00:51 PM5/13/14
to andro...@googlegroups.com
Hi, 

I think no special kernel parameters are needed to boot using radeon drivers (at least not need for my config, a radeon 7660D - amd 5800k apu). You can use a "nomodeset" to use vesa mode, however you'll have no opengl support

Does "dmesg" and "logcat" commands result in some hint?

Maybe R500 family is not fully supported. We can try to use a newer mesa version (10.1.3 in the moment I write). If you want to try it, I can compile for you on weekend.

Note: I'm just interested in android-x86, but my knowledge is very basic. I wish I could help more :)

walter

unread,
May 14, 2014, 3:49:46 PM5/14/14
to andro...@googlegroups.com
Hi, I get this in /data/log.txt.

05-14 23:22:16.380  3600  3600 I SurfaceFlinger: SurfaceFlinger is starting
05-14 23:22:16.380  3600  3600 I SurfaceFlinger: SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
05-14 23:22:16.380  3600  3600 D libEGL  : loaded /system/lib/egl/libGLES_mesa.so
05-14 23:22:16.380  3600  3600 E GRALLOC-RADEON: failed to get tiling config
05-14 23:22:16.380  3600  3600 E GRALLOC-DRM: unsupported driver: radeon
05-14 23:22:16.380  3600  3600 W EGL-GALLIUM: failed to create DRM screen
05-14 23:22:16.380  3600  3600 W EGL-GALLIUM: will fall back to other EGL drivers if any
05-14 23:22:16.380  3600  3600 I EGL-GALLIUM: using SW screen
05-14 23:22:16.380  3600  3600 E GRALLOC-RADEON: failed to get tiling config
05-14 23:22:16.380  3600  3600 E GRALLOC-DRM: unsupported driver: radeon
05-14 23:22:16.380  3600  3600 E SurfaceFlinger: hwcomposer module not found
05-14 23:22:16.380  3600  3600 E SurfaceFlinger: ERROR: failed to open framebuffer (Invalid argument), aborting
05-14 23:22:16.380  3600  3600 F libc    : Fatal signal 6 (SIGABRT) at 0x00000e10 (code=-6), thread 3600 (surfaceflinger)
05-14 23:22:16.410  3602  3602 I mediaserver: ServiceManager: 0x41413d40

but when the system boots up in debug mode I see before the 2nd stop that radeon and radeondrmfb are lodaded successfully and fb0 is initialised
and then after typing exit to run Android, the prompt is "failed to import /init_androidx86.rc from /init.rc

can you see a possible error somewhere?

pstglia

unread,
May 14, 2014, 10:13:41 PM5/14/14
to andro...@googlegroups.com
The fact you're loading radeon and radeondrmfb means your kernel drivers are being loaded (kernel driver and direct rendering)

However, GRALLOC (ṕart of Android layer for graphics) is unable to use to initialize. This seems to be the problem:
  ==> 05-14 23:22:16.380  3600  3600 E GRALLOC-RADEON: failed to get tiling config

As I could check, these tiling configs are provided by a function named radeon_init_tile_config (defined in ANDROID_SRC/hardware/drm_gralloc/gralloc_drm_radeon.c). It returns attributes named  num_channels, num_banks and group_bytes.

First, it does a IOCTL call to get these info (DRM_RADEON_INFO/RADEON_INFO_TILING_CONFIG). If success, tries to get the attributes I mentioned above. In you case, it's failing in one of these 2 steps.

If the failure occurs in the 2nd step (getting the attributes) maybe we could set it with fixed values matching your video card to check if it is able to display. This requires changing the source code and compiling a new iso.

pstglia

unread,
May 14, 2014, 10:47:49 PM5/14/14
to andro...@googlegroups.com
It seems this "tiling config" is available for R600 or newer family chip only:


255 case RADEON_INFO_TILING_CONFIG:
256 if (rdev->family >= CHIP_BONAIRE)
257 *value = rdev->config.cik.tile_config;
258 else if (rdev->family >= CHIP_TAHITI)
259 *value = rdev->config.si.tile_config;
260 else if (rdev->family >= CHIP_CAYMAN)
261 *value = rdev->config.cayman.tile_config;
262 else if (rdev->family >= CHIP_CEDAR)
263 *value = rdev->config.evergreen.tile_config;
264 else if (rdev->family >= CHIP_RV770)
265 *value = rdev->config.rv770.tile_config;
266 else if (rdev->family >= CHIP_R600)
267 *value = rdev->config.r600.tile_config;
268 else {
>>>> 269 DRM_DEBUG_KMS("tiling config is r6xx+ only!\n");
270 return -EINVAL;
271 }
272 break;
In this case, we could try to set "info->have_tiling_info" to 0 instead of 1 on radeon_init_tile_config function...



pstglia

unread,
May 17, 2014, 10:49:39 PM5/17/14
to andro...@googlegroups.com
Hi Walter,

I did a small change in source code in order to avoid failure calling the tiling config function for radeons older than 6xx (your case).

Do you mind testing this change in your machine/config (Mobility X1450) ? I also put some debug messages ("DEBUG Paulo/Walter" prefix) you can grep on logcat. 

The link for new iso is:


Thank you very much!
pstglia

walter

unread,
May 18, 2014, 10:59:55 AM5/18/14
to andro...@googlegroups.com
WOW :) well done Paolo ! seems graphics works perfect. Maps, OpenGL ES examples, and live wallpapers look beatiful :) Thank you so much !

What have you done ? Can you tell me so I can modify the source code myself ?

pstglia

unread,
May 18, 2014, 12:29:23 PM5/18/14
to andro...@googlegroups.com
Good this worked! :)

I changed the return of the function radeon_init_tile_config in ANDROID_SRC/hardware/drm_gralloc/gralloc_drm_radeon.c. 

As I mentioned before, this function/resource is only available for radeon family greater than R600.
Your video card is from a older family (R500), so this should not be called (this is checked the entire source file, except when calling this function)

My change basically consisted in returning true on radeon_init_tile_config even when ioctl call failed or when trying to get the attributes. Here is the diff output:

362c362,367
<               return ret;
---
>       {
>               ALOGE("DEBUG Paulo/Walter - ioctl failed (DRM_RADEON_INFO / RADEON_INFO_TILING_CONFIG) - forcing info->have_tiling_info = 0 ");
>               /*return ret;*/
>               info->have_tiling_info = 0;
>               return 0;
>       }
411a417,422
>       else if ( info->chip_family <= CHIP_FAMILY_RS300 ) {
>               /* No tiling config for family older than 06xx - pstglia */
>               ALOGE("DEBUG Paulo/Walter - Avoiding tiling config - Chip family older than 6xx ");
>               info->have_tiling_info = 0;
>               return 0;
>       }
472a484,515


After doing this change, I realized it would be mucher simpler just testing if chip family is greater or equal than R600 before calling radeon_init_tile_config. But I had already created and uploaded the iso :)

Cheers,
pstglia (My name is Paulo - the Brazilian version for Paolo :D )

pstglia

unread,
May 18, 2014, 1:51:22 PM5/18/14
to andro...@googlegroups.com
Walter, I think this is a best way to change the code:

Inside function radeon_probe, change this part of code:

# Before
   err = radeon_init_tile_config(info);
   if (err) {
      ALOGE("failed to get tiling config");
      return err;
   }



# After

        if (info->chip_family >= CHIP_FAMILY_R600) {
                err = radeon_init_tile_config(info);
                if (err) {
                        ALOGE("failed to get tiling config");
                        return err;
                }
        }
        else
        {
                info->have_tiling_info = 0;
        }


Hi Mr Wei,
 I think this is a bug in radeon drm gralloc code. Could you confirm it please?
  Thanks

Chih-Wei Huang

unread,
May 18, 2014, 11:57:36 PM5/18/14
to Android-x86
2014-05-19 1:51 GMT+08:00 pstglia <pst...@gmail.com>:
> # After
>
> if (info->chip_family >= CHIP_FAMILY_R600) {
> err = radeon_init_tile_config(info);
> if (err) {
> ALOGE("failed to get tiling config");
> return err;
> }
> }
> else
> {
> info->have_tiling_info = 0;
> }
>
>
> Hi Mr Wei,
> I think this is a bug in radeon drm gralloc code. Could you confirm it
> please?

I'm not familiar with it and no hardware to test.
I think your analysis is promising.
I'll apply the patch.
Thanks a lot!


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Somebody

unread,
May 22, 2014, 11:34:28 AM5/22/14
to andro...@googlegroups.com
This needs to be incorporated. It makes a huge difference.
Visually, I wasn't having any problems with RC2 on AMD hardware, but some operations were falling back to software rendering, and were quite slow. In particular, some kineticjs inside a webview. It would go back to software rendering and take a good 10 seconds to render a screen.

With mesa 10.1, it just flies. Finally, its actually *USABLE*.

pstglia

unread,
May 22, 2014, 12:56:45 PM5/22/14
to andro...@googlegroups.com
The main problem now with 10.1 is that it break compatibility with classic drivers used by intel igps (i915 and i965). when enabled, mesa compiling fails.

If someone fix this maybe Android developers may consider upgrading. They have to be sure that every wornking hardware with current mesa will work with this new releases of mesa

Somebody

unread,
May 22, 2014, 1:48:29 PM5/22/14
to andro...@googlegroups.com
Aren't those devices covered by i915g gallium driver though?

pstglia

unread,
May 22, 2014, 10:53:15 PM5/22/14
to andro...@googlegroups.com
Hi, 

i965g was removed from mesa mainline since 2011. They use i915g on gallium src tree. 
Based on info/reviews on web, it is not as mature as classic drivers are. Requires more development. 

Abu Al

unread,
Dec 17, 2015, 8:32:58 PM12/17/15
to Android-x86
Hello foremost thank you very much for the work of Androidx86 system, I have a problem with the card ati xpress 1270 (RS690) can not have graphics acceleration. My question and how to have kitkat graphic with openGL acceleration? I have exactly the same problem with them 14 Ubuntu :( I do not find a solution with Android. Sorry for the mistake I use Google translation.
Reply all
Reply to author
Forward
0 new messages