[HTC One S] pirlano:
Help needed

I've ported 99% of Android 4.3 GE code to One S, but i'm currently stuck here running stock Android 4.3 GE (only ramdisk changes to match One S partition layout):

[ 4.581596] c0 358 ion_client_create: create ion_client (Binder_2) at d66b8280

[ 4.587944] c0 373 ion_client_create: create ion_client (bootanimation) at d64ef480

[ 4.864733] c1 38 kgsl kgsl-3d0: |kgsl_iommu_fault_handler| GPU PAGE FAULT: addr = F811A1A0 pid = 186

[ 4.864764] c1 38 kgsl kgsl-3d0: |kgsl_iommu_fault_handler| context = 0 FSR = 4001000A FSYNR0 = 8 FSYNR1 = 8(read fault)

[ 4.864794] c1 38 kgsl kgsl-3d0: ---- nearby memory ----

[ 4.864794] c1 38 kgsl kgsl-3d0: [C0400000 - C05FE000] (+guard) (pid = 186) (egl_surface)

[ 4.864825] c1 38 kgsl kgsl-3d0: <- fault @ F811A1A0

[ 4.864825] c1 38 kgsl kgsl-3d0: *EMPTY*

than

[ 485.398199,0] kgsl kgsl-3d0: |mh_axi_error| axi read error: 00000017 pt 921f8000 gpu c0008023 phys c0008023

(copied from web, but the same error, it's not running for 485 seconds)

I have updated MDP+KGSL+ADRENO (they match Android 4.3 GE rom and they are loaded ok, i can read it in logcat, surfaceflinger is started ok, no problem at all in logcat)

To have kgsl+adreno driver working, i had to enable ION, MULTIMEDIA ION, IOMMU, etc,etc and i ported all code from HTC One (big changes in board-ville.c, and almost finished to fix/update board-ville-display/panel.c code):

[ 0.292476] c0 1 ION heap vmalloc created

[ 0.292537] c0 1 ION heap mm created at a0000000 with size 8600000

[ 0.292568] c0 1 ION heap mm_fw created at 9fe00000 with size 1e0000

[ 0.292629] c0 1 ION heap mfc created at a8600000 with size 2000

[ 0.292659] c0 1 msm_ion_allocate: could not get memory for heap sf (id 18) <- expected since size is 0x0 in htc one source

[ 0.292659] c0 1 ION heap sf created

[ 0.292690] c0 1 ION heap iommu created

[ 0.292751] c0 1 ION heap qsecom created at bf203000 with size 600000

[ 0.292812] c0 1 ION heap audio created at bf803000 with size 4cf000

[ 0.297665] c0 1 msm_iommu_dev: device vpe mapped at d9c00000, with 2 ctx banks

[ 0.297817] c0 1 msm_iommu_dev: device mdp0 mapped at d9e00000, with 2 ctx banks

[ 0.297970] c0 1 msm_iommu_dev: device mdp1 mapped at da000000, with 2 ctx banks

[ 0.298122] c0 1 msm_iommu_dev: device rot mapped at da200000, with 2 ctx banks

[ 0.298275] c0 1 msm_iommu_dev: device ijpeg mapped at da400000, with 2 ctx banks

[ 0.298428] c0 1 msm_iommu_dev: device vfe mapped at da600000, with 2 ctx banks

[ 0.298580] c0 1 msm_iommu_dev: device vcodec_a mapped at da800000, with 2 ctx banks

[ 0.298733] c0 1 msm_iommu_dev: device vcodec_b mapped at daa00000, with 2 ctx banks

[ 0.298947] c0 1 msm_iommu_dev: device gfx3d mapped at dac00000, with 3 ctx banks

[ 0.299099] c0 1 msm_iommu_dev: device jpegd mapped at dae00000, with 2 ctx banks

[ 0.299282] c0 1 msm_iommu_dev: device gfx2d0 mapped at db000000, with 2 ctx banks

[ 0.299465] c0 1 msm_iommu_dev: device gfx2d1 mapped at db200000, with 2 ctx banks

[ 0.299893] c0 1 msm_iommu_ctx msm_iommu_ctx.2: context vpe_src using bank 0

[ 0.300076] c0 1 msm_iommu_ctx msm_iommu_ctx.3: context vpe_dst using bank 1

[ 0.300259] c0 1 msm_iommu_ctx msm_iommu_ctx.4: context mdp_port0_cb0 using bank 0

[ 0.300442] c0 1 msm_iommu_ctx msm_iommu_ctx.5: context mdp_port0_cb1 using bank 1

[ 0.300686] c0 1 msm_iommu_ctx msm_iommu_ctx.6: context mdp_port1_cb0 using bank 0

[ 0.300900] c0 1 msm_iommu_ctx msm_iommu_ctx.7: context mdp_port1_cb1 using bank 1

[ 0.301052] c0 1 msm_iommu_ctx msm_iommu_ctx.8: context rot_src using bank 0

[ 0.301236] c0 1 msm_iommu_ctx msm_iommu_ctx.9: context rot_dst using bank 1

[ 0.301419] c0 1 msm_iommu_ctx msm_iommu_ctx.10: context ijpeg_src using bank 0

[ 0.301571] c0 1 msm_iommu_ctx msm_iommu_ctx.11: context ijpeg_dst using bank 1

[ 0.301785] c0 1 msm_iommu_ctx msm_iommu_ctx.12: context vfe_imgwr using bank 0

[ 0.301938] c0 1 msm_iommu_ctx msm_iommu_ctx.13: context vfe_misc using bank 1

[ 0.302151] c0 1 msm_iommu_ctx msm_iommu_ctx.14: context vcodec_a_stream using bank 0

[ 0.302334] c0 1 msm_iommu_ctx msm_iommu_ctx.15: context vcodec_a_mm1 using bank 1

[ 0.302548] c0 1 msm_iommu_ctx msm_iommu_ctx.16: context vcodec_b_mm2 using bank 0

[ 0.302853] c0 1 msm_iommu_ctx msm_iommu_ctx.17: context gfx3d_user using bank 0

[ 0.303128] c0 1 msm_iommu_ctx msm_iommu_ctx.18: context gfx3d_priv using bank 1

[ 0.303311] c0 1 msm_iommu_ctx msm_iommu_ctx.0: context jpegd_src using bank 0

[ 0.303494] c0 1 msm_iommu_ctx msm_iommu_ctx.1: context jpegd_dst using bank 1

[ 0.303738] c0 1 msm_iommu_ctx msm_iommu_ctx.19: context gfx2d0_2d0 using bank 0

[ 0.303982] c0 1 msm_iommu_ctx msm_iommu_ctx.20: context gfx2d1_2d1 using bank 0

[ 0.516923] c0 1 ion_client_create: create ion_client (msm_fb) at d7758b80

[ 0.516984] c0 1 ion_client_create: create ion_client (msmfb_projector) at d7758cc0

etc etc

i was having a NULL pointer before, than i edited:

adreno_perfcounter_init(device);

to:

if (adreno_is_a3xx(adreno_dev)) {

adreno_perfcounter_init(device);

}

because Adreno+KGSL driver are compiled by HTC to work with Adreno 3xx devices, i think they didn't tested them on a2xx devices (infact there is no adreno performance counter in a2xx).

After that, everything is loading good, no problem in logcat, but with dmesg i get this error.

(I'll upload current source code to git when i have a nice connection)

Any suggestion?