All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gianluca Cinci <gianluca.cinci@giuneco.it>
To: Daiane Angolini <daiane.list@gmail.com>
Cc: "meta-freescale@yoctoproject.org" <meta-freescale@yoctoproject.org>
Subject: Re: [meta-fsl-arm] [linux-2.6.35-r45] amd-gpu : patch proposal / discussion (imx53 + Qt 5.3 + EGLFS)
Date: Thu, 13 Nov 2014 09:22:12 +0100	[thread overview]
Message-ID: <54646A34.6080201@giuneco.it> (raw)
In-Reply-To: <CA+jg_OVDDuKZgd2EVOUJrgPH8_ZXWAj8u=s59aiaUeCSOVS0MQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 8083 bytes --]

Hi Daiane,
sure , the patch is attached to this mail (let me know if I must to 
change it)
About the cinematicexperience + eglfs dependecies:
With the only inclusion  of cinematicexperience the "EGL..." error come 
out , so i must to add the "amd-gpu-bin-mx51" package to have all the 
necessary library on my fs.

Bests Regards
Gianluca

On 12/11/2014 11:47, Daiane Angolini wrote:
> On Tue, Nov 11, 2014 at 10:17 PM, Gianluca Cinci
> <gianluca.cinci@giuneco.it> wrote:
>>  From 768a9f37734a9c6acb02ac1a832127af9f15da1b Mon Sep 17 00:00:00 2001
>> From: Gianluca Cinci <gianluca.cinci@giuneco.it>
>> Date: Tue, 11 Nov 2014 22:25:17 +0100
>> Subject: [PATCH] avoid shared memory free issue on application exit
> I would start the commit subject with "imx: amd-gpu: avoid shared......"
>
>
>> ---
>>   drivers/mxc/amd-gpu/common/gsl_sharedmem.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
>> b/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
>> index 51e66f9..2529267 100644
>> --- a/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
>> +++ b/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
>> @@ -430,6 +430,9 @@ kgsl_sharedmem_free0(gsl_memdesc_t *memdesc, unsigned
>> int pid)
>>       }
>>       else
>>       {
>> +    kgsl_hal_freephysical(memdesc->gpuaddr, NULL, NULL);  // free the
>> previously allocated memory if
>> +
>> // gpuaddress is present in gsl_linux_map_list
>> +
>>           status = GSL_FAILURE;
>>       }
>>
>> --
>> 1.9.1
>>
>>
>> Hi all,
>> i finally reached to run an Qt 5.3 application on imx53(loco) board (linux
>> 2.6.35-r45)
>> My problem come out when i try to execute a previously killed application:
>> ------------------------------------------------------------------------------------------------------------------------------------
>> Unable to handle kernel paging request at virtual address 8e011800
>> pgd = cf550000
> (...)
>> Finally the step to run a Qt 5.3 application on imx53 if someone has this
>> problem (tested on a framebuffer system)
>>
>> 1) add to local.conf or wherever you want the packages:
>> ---cinematicexperience
>> ---amd-gpu-bin-mx51        (this is usefull because inside the recipe there
>> is the PACKAGES  variable that is just setted to include the all libraries
>> needed.
>>                                         The package contains only some test
>> binary of GPU acceleration
>>                                         NOTE :if the egl libraries were not
>> included the Qt 5 application failed to start with EGL Error : Could not
>> create the egl surface: error = 0x3003)
>>
> Does it means we have a dependency error?
>
>
>
>> 2)apply the patch to kernel
> Would you, please, create a patch for the kernel recipe [1] including
> your kernel patch for _mx5?
>
> [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/recipes-kernel/linux/linux-imx_2.6.35.3.bb
>
> This is something I would like to test.
>
>
> Daiane
>> 3) build a new image
>>
>> 3) run Qt5_CinematicExperience -platform eglfs
>>
>> During this analysys I didn't find any that conduce to think about some non
>> cleaned blocks during normal execution and also the gsl_sanity_app reach the
>> end with success every time.
>>
>>
>> Best Regards
>> Gianluca Cinci
>>
>> Notes:
>> (*1) : here a kgsl_sharedmem_free (without 0) is called , inside that there
>> is a subcall to kgsl_sharedmem_free0
>>
>> (*2) :
>> the other kernel message mentioned above:
>> --------------------------------------------------------------
>>
>>
>> Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0ac0edc
>> Internal error: : 1008 [#1] PREEMPT last sysfs file:
>> /sys/devices/system/cpu/online Modules linked in:
>> CPU: 0    Not tainted  (2.6.35.3-11.09.01+yocto+ged51f22 #1)
>> PC is at kgsl_yamato_regread+0xc/0x24
>> LR is at kgsl_yamato_isr+0x18/0x80
>> pc : [<80376c2c>]    lr : [<80377450>]    psr: 60070193
>> sp : c81dff58  ip : ffffab5e  fp : 00000000
>> r10: 00000000  r9 : c81de000  r8 : 00000000
>> r7 : 0000000c  r6 : 00000000  r5 : 00000000  r4 : 806a0b28
>> r3 : d0ac0000  r2 : c81dff5c  r1 : 000003b7  r0 : 806a0b28
>> Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
>> Control: 10c5387d  Table: ba6e4019  DAC: 00000015 Process QSGRenderThread
>> (pid: 1700, stack limit = 0xc81de2e8)
>> Stack: (0xc81dff58 to 0xc81e0000)
>> ff40:                                                       806a0b28
>> cff48780
>> ff60: 806a0b28 80373b5c cf263f40 803792dc 803792d0 800e9e50 00000000
>> 80641e3c
>> ff80: 0000000c cf263f40 00000001 800eb8b4 0000000c 00000000 00000001
>> 80090068
>> ffa0: 20070010 ffffffff d0800000 80090bc8 32681000 01aae330 00003910
>> 00000000
>> ffc0: 01aac450 4c298b80 002f0498 01aac450 00001850 002f8420 00000000
>> 00000000
>> ffe0: 32682ec0 3216d934 4bef37e4 4bc6a0b0 20070010 ffffffff 8e38d48b
>> 59ebdc88
>> [<80376c2c>] (kgsl_yamato_regread+0xc/0x24) from [<80377450>]
>> (kgsl_yamato_isr+)
>> [<80377450>] (kgsl_yamato_isr+0x18/0x80) from [<80373b5c>]
>> (kgsl_intr_isr+0x24/)
>> [<80373b5c>] (kgsl_intr_isr+0x24/0x28) from [<803792dc>]
>> (z430_irq_handler+0xc/)
>> [<803792dc>] (z430_irq_handler+0xc/0x18) from [<800e9e50>]
>> (handle_IRQ_event+0x)
>> [<800e9e50>] (handle_IRQ_event+0x24/0xdc) from [<800eb8b4>]
>> (handle_level_irq+0)
>> [<800eb8b4>] (handle_level_irq+0xd8/0x184) from [<80090068>]
>> (asm_do_IRQ+0x68/0)
>> [<80090068>] (asm_do_IRQ+0x68/0x88) from [<80090bc8>] (__irq_usr+0x48/0xc0)
>> Exception stack(0xc81dffb0 to 0xc81dfff8)
>> ffa0:                                     32681000 01aae330 00003910
>> 00000000
>> ffc0: 01aac450 4c298b80 002f0498 01aac450 00001850 002f8420 00000000
>> 00000000
>> ffe0: 32682ec0 3216d934 4bef37e4 4bc6a0b0 20070010 ffffffff
>> Code: e12fff1e e5903088 f57ff04f f57ff04f (e7933101) ---[ end trace
>> 0efc6cf93f26278e ]---
>> Kernel panic - not syncing: Fatal exception in interrupt [<80095144>]
>> (unwind_backtrace+0x0/0xe0) from [<804aacfc>]
>> (panic+0x68/0xdc)
>> [<804aacfc>] (panic+0x68/0xdc) from [<80094158>] (die+0x2a8/0x2f8)
>> [<80094158>] (die+0x2a8/0x2f8)
>>   from [<8009026c>] (do_DataAbort+0x84/0x98) [<8009026c>]
>> (do_DataAbort+0x84/0x98) from [<8009092c>]
>> (__dabt_svc+0x4c/0x60)
>> Exception stack(0xc81dff10 to 0xc81dff58)
>> ff00:                                     806a0b28 000003b7 c81dff5c
>> d0ac0000
>> ff20: 806a0b28 00000000 00000000 0000000c 00000000 c81de000 00000000
>> 00000000
>> ff40: ffffab5e c81dff58 80377450 80376c2c 60070193 ffffffff [<8009092c>]
>> (__dabt_svc+0x4c/0x60) from [<80376c2c>]
>> (kgsl_yamato_regread+0xc/)
>> [<80376c2c>] (kgsl_yamato_regread+0xc/0x24) from [<80377450>]
>> (kgsl_yamato_isr+)
>> [<80377450>] (kgsl_yamato_isr+0x18/0x80) from [<80373b5c>]
>> (kgsl_intr_isr+0x24/)
>> [<80373b5c>] (kgsl_intr_isr+0x24/0x28) from [<803792dc>]
>> (z430_irq_handler+0xc/)
>> [<803792dc>] (z430_irq_handler+0xc/0x18) from [<800e9e50>]
>> (handle_IRQ_event+0x)
>> [<800e9e50>] (handle_IRQ_event+0x24/0xdc) from [<800eb8b4>]
>> (handle_level_irq+0)
>> [<800eb8b4>] (handle_level_irq+0xd8/0x184) from [<80090068>]
>> (asm_do_IRQ+0x68/0)
>> [<80090068>] (asm_do_IRQ+0x68/0x88) from [<80090bc8>] (__irq_usr+0x48/0xc0)
>> Exception stack(0xc81dffb0 to 0xc81dfff8)
>> ffa0:                                     32681000 01aae330 00003910
>> 00000000
>> ffc0: 01aac450 4c298b80 002f0498 01aac450 00001850 002f8420 00000000
>> 00000000
>> ffe0: 32682ec0 3216d934 4bef37e4 4bc6a0b0 20070010 ffffffff
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>>
>>
>>
>>
>>
>> --
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>


[-- Attachment #2: imx-amd-gpu-avoid-shared-memory-free-issue.patch --]
[-- Type: text/x-patch, Size: 2402 bytes --]

From 3201b3740bd6c81e7077845bda605fd5043b0e6a Mon Sep 17 00:00:00 2001
From: gianluca <gianluca@giuneco.it>
Date: Thu, 13 Nov 2014 00:11:51 +0100
Subject: [meta-fsl-arm][PATCH] imx: amd-gpu: avoid shared memory free issue on
 application exit

Signed-off-by: gianluca <gianluca@giuneco.it>
---
 .../avoid-shared-memory-free-issue.patch           | 26 ++++++++++++++++++++++
 recipes-kernel/linux/linux-imx_2.6.35.3.bb         |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-imx-2.6.35.3/avoid-shared-memory-free-issue.patch

diff --git a/recipes-kernel/linux/linux-imx-2.6.35.3/avoid-shared-memory-free-issue.patch b/recipes-kernel/linux/linux-imx-2.6.35.3/avoid-shared-memory-free-issue.patch
new file mode 100644
index 0000000..a109cc0
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-2.6.35.3/avoid-shared-memory-free-issue.patch
@@ -0,0 +1,26 @@
+From 768a9f37734a9c6acb02ac1a832127af9f15da1b Mon Sep 17 00:00:00 2001
+From: gianluca <gianluca@giuneco.it>
+Date: Tue, 11 Nov 2014 22:25:17 +0100
+Subject: [PATCH] avoid shared memory free issue on application exit
+
+---
+ drivers/mxc/amd-gpu/common/gsl_sharedmem.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/mxc/amd-gpu/common/gsl_sharedmem.c b/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
+index 51e66f9..2529267 100644
+--- a/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
++++ b/drivers/mxc/amd-gpu/common/gsl_sharedmem.c
+@@ -430,6 +430,9 @@ kgsl_sharedmem_free0(gsl_memdesc_t *memdesc, unsigned int pid)
+     }
+     else
+     {
++	kgsl_hal_freephysical(memdesc->gpuaddr, NULL, NULL);  // free the previously allocated memory if
++							      // gpuaddress is present in gsl_linux_map_list 
++
+         status = GSL_FAILURE;
+     }
+ 
+-- 
+1.9.1
+
diff --git a/recipes-kernel/linux/linux-imx_2.6.35.3.bb b/recipes-kernel/linux/linux-imx_2.6.35.3.bb
index bfc56b7..ad1f10b 100644
--- a/recipes-kernel/linux/linux-imx_2.6.35.3.bb
+++ b/recipes-kernel/linux/linux-imx_2.6.35.3.bb
@@ -19,6 +19,7 @@ SRCBRANCH = "imx_2.6.35_maintain"
 SRC_URI += "file://NFS-Fix-nfsroot-support.patch \
             file://NFS-allow-nfs-root-mount-to-use-alternate-rpc-ports.patch \
             file://perf-avoid-use-sysroot-headers.patch \
+	     file://avoid-shared-memory-free-issue.patch \
 "
 
 SRC_URI_append_mx28 = " \
-- 
1.9.1


  reply	other threads:[~2014-11-13  8:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  0:17 [meta-fsl-arm] [linux-2.6.35-r45] amd-gpu : patch proposal / discussion (imx53 + Qt 5.3 + EGLFS) Gianluca Cinci
2014-11-12 10:47 ` Daiane Angolini
2014-11-13  8:22   ` Gianluca Cinci [this message]
2014-11-13 10:18     ` Otavio Salvador
2014-11-17 13:13       ` Gianluca Cinci
2014-11-13 10:28     ` Daiane Angolini
2014-11-18  8:54       ` Gianluca Cinci
2014-11-18 10:39         ` Simone
2014-11-18 11:05           ` Gianluca Cinci
2014-11-18 13:57             ` Simone
2014-11-18 14:45               ` Gianluca Cinci
2014-11-18 17:23                 ` Simone
2014-11-19 15:29         ` Daiane Angolini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54646A34.6080201@giuneco.it \
    --to=gianluca.cinci@giuneco.it \
    --cc=daiane.list@gmail.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.