Re: [PATCH 1/1] v4l: subdev: Register the entity before calling subdev's registered op
Em Mon, 28 Dec 2015 01:45:00 +0200 Sakari Ailusescreveu: > Registering a V4L2 sub-device includes, among other things, registering > the related media entity and calling the sub-device's registered op. Since > patch "media: convert links from array to list", creating a link between > two pads requires registering the entity first. If the registered() op > involves link creation, the link list head will not be initialised before > it is used. > > Resolve this by first registering the entity, then calling its > registered() op. > > Signed-off-by: Sakari Ailus > --- > Hi Mauro, > > You seem to be missing this patch from your media-controller-rc4 branch. > Not having it breaks at least the smiapp driver. I was pretty sure to have > sent it but I can't find it on linux-media. Oh well. Perhaps it was on some of your replies. There were too many OOT media controller patches floating around ;) Anyway, I applied the patches at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=media-controller-rc6 > > Speaking of the entity function warnings --- I'd omit them until we've > agreed that this is what we should really have (I don't think so). I can > submit a patch to remove them if you like. There were some discussions about that and I was thinking that we had an agreement about that. Anyway, I don't object to remove the warning for now, and discuss that a little more. > > --8< > [ 108.919189] omap3isp 480bc000.isp: Entity type for entity jt8ew9 binner > 1-0010 was not initialized! > [ 108.929046] Unable to handle kernel NULL pointer dereference at virtual > address > [ 108.937652] pgd = ed0b8000 > [ 108.940521] [] *pgd=aefc3831, *pte=, *ppte= > [ 108.947204] Internal error: Oops: 817 [#1] ARM > [ 108.951904] Modules linked in: smiapp(+) smiapp_pll omap3_isp > videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core > v4l2_common videodev media > [ 108.966735] CPU: 0 PID: 1163 Comm: modprobe Not tainted > 4.4.0-rc2-00328-g40e950d #507 > [ 108.975006] Hardware name: Generic OMAP36xx (Flattened Device Tree) > [ 108.981597] task: eeb91340 ti: eec6e000 task.ti: eec6e000 > [ 108.987335] PC is at media_add_link+0x34/0x44 [media] > [ 108.992645] LR is at 0x0 > [ 108.995330] pc : []lr : [<>]psr: a013 > [ 108.995330] sp : eec6fc78 ip : fp : > [ 109.007415] r10: r9 : 0003 r8 : 1c40 > [ 109.012939] r7 : r6 : 001c r5 : ee9a7248 r4 : ee9a70c4 > [ 109.019805] r3 : r2 : 1c10 r1 : ee8000c0 r0 : 1c00 > [ 109.026672] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment > none > [ 109.034210] Control: 10c5387d Table: ad0b8019 DAC: 0051 > [ 109.040252] Process modprobe (pid: 1163, stack limit = 0xeec6e208) > [ 109.046752] Stack: (0xeec6fc78 to 0xeec7) > [ 109.051361] fc60: > ee9a7098 bf0021b4 > [ 109.059997] fc80: ee9a7010 eec6fcbc eea1fc00 ee9a7248 > eec6fcc0 ee9a7098 > [ 109.068634] fca0: 0136 bf09c520 0003 ee9a7140 eeb91340 ee9a7098 > ee9a7248 ee9a73f8 > [ 109.077270] fcc0: ee9a7010 ee9a7098 eefd0010 ed08f620 bf024d8c > 035a 1dc13000 > [ 109.085906] fce0: bf014488 eefd0084 ee9a7098 ed08f620 > bf024d8c bf01d384 > [ 109.094543] fd00: ee9a7140 eefd0090 ed08f620 bf024d48 ee9a7098 eefd0084 > ee9a7140 bf01d444 > [ 109.103179] fd20: 6650 eea1fc00 ee9a7010 66c0 0003 bf09c3f8 > 1dc13000 > [ 109.111785] fd40: 0002 c02bab44 ef7e2994 eea1fc00 bf09c13c > bf09eba4 eea1fc04 > [ 109.120422] fd60: eea1fc20 eec6ff0c c028b7dc eea1fc20 bf09ebc0 > c0dce564 > [ 109.129058] fd80: 0002 c02112dc bf09ebc0 eea1fc20 > 0002 > [ 109.137695] fda0: eea1fc20 eea1fc54 bf09ebc0 c05908e0 c02115c8 > bf09ebc0 eec6fdc8 > [ 109.146331] fdc0: c0211560 c020f8ac ee92c6a4 eea78410 bf09ebc0 bf09ebc0 > ee9ec240 c05d1e74 > [ 109.154968] fde0: c05908e0 c0210110 bf09d8ec eec6fd90 bf09ebc0 bf0a3000 > c0211cc4 > [ 109.163604] fe00: bf09eba4 bf0a3000 c028bd94 6780 bf0a3000 > c0009784 > [ 109.172241] fe20: efdd6ca0 efdd6cc0 0001 c009709c > eeb91340 efdd6ca0 > [ 109.180877] fe40: c0063428 eeb91340 0001 > c00c4f1c eedb13c0 > [ 109.189514] fe60: 0018 c005fdc8 024000c0 ee8000c0 6013 bf09f340 > eec6ff48 eedb13c0 > [ 109.198150] fe80: 0001 0018 eec6ff0c c008ac94 > bf09f340 > [ 109.206756] fea0: efd99ff4 bf09f340 eec6ff48 bf09f34c 0001 c008c634 > 8000 7fff > [ 109.215393] fec0: c008a8f4 f163a300 f163a448 07d0 0186 > 0001cfc0 f16b9e80 > [ 109.224029] fee0: >
Re: [PATCH 1/1] v4l: subdev: Register the entity before calling subdev's registered op
Hi Mauro, On Mon, Dec 28, 2015 at 10:41:58AM -0200, Mauro Carvalho Chehab wrote: > Em Mon, 28 Dec 2015 01:45:00 +0200 > Sakari Ailusescreveu: > > > Registering a V4L2 sub-device includes, among other things, registering > > the related media entity and calling the sub-device's registered op. Since > > patch "media: convert links from array to list", creating a link between > > two pads requires registering the entity first. If the registered() op > > involves link creation, the link list head will not be initialised before > > it is used. > > > > Resolve this by first registering the entity, then calling its > > registered() op. > > > > Signed-off-by: Sakari Ailus > > --- > > Hi Mauro, > > > > You seem to be missing this patch from your media-controller-rc4 branch. > > Not having it breaks at least the smiapp driver. I was pretty sure to have > > sent it but I can't find it on linux-media. Oh well. > > Perhaps it was on some of your replies. There were too many OOT media > controller patches floating around ;) > > Anyway, I applied the patches at: > > > https://git.linuxtv.org/mchehab/experimental.git/log/?h=media-controller-rc6 Thanks! > > > > > Speaking of the entity function warnings --- I'd omit them until we've > > agreed that this is what we should really have (I don't think so). I can > > submit a patch to remove them if you like. > > There were some discussions about that and I was thinking that we had an > agreement about that. Anyway, I don't object to remove the warning for > now, and discuss that a little more. > > > > > --8< > > [ 108.919189] omap3isp 480bc000.isp: Entity type for entity jt8ew9 binner > > 1-0010 was not initialized! > > [ 108.929046] Unable to handle kernel NULL pointer dereference at virtual > > address > > [ 108.937652] pgd = ed0b8000 > > [ 108.940521] [] *pgd=aefc3831, *pte=, *ppte= > > [ 108.947204] Internal error: Oops: 817 [#1] ARM > > [ 108.951904] Modules linked in: smiapp(+) smiapp_pll omap3_isp > > videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core > > v4l2_common videodev media > > [ 108.966735] CPU: 0 PID: 1163 Comm: modprobe Not tainted > > 4.4.0-rc2-00328-g40e950d #507 > > [ 108.975006] Hardware name: Generic OMAP36xx (Flattened Device Tree) > > [ 108.981597] task: eeb91340 ti: eec6e000 task.ti: eec6e000 > > [ 108.987335] PC is at media_add_link+0x34/0x44 [media] > > [ 108.992645] LR is at 0x0 > > [ 108.995330] pc : []lr : [<>]psr: a013 > > [ 108.995330] sp : eec6fc78 ip : fp : > > [ 109.007415] r10: r9 : 0003 r8 : 1c40 > > [ 109.012939] r7 : r6 : 001c r5 : ee9a7248 r4 : ee9a70c4 > > [ 109.019805] r3 : r2 : 1c10 r1 : ee8000c0 r0 : 1c00 > > [ 109.026672] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment > > none > > [ 109.034210] Control: 10c5387d Table: ad0b8019 DAC: 0051 > > [ 109.040252] Process modprobe (pid: 1163, stack limit = 0xeec6e208) > > [ 109.046752] Stack: (0xeec6fc78 to 0xeec7) > > [ 109.051361] fc60: > > ee9a7098 bf0021b4 > > [ 109.059997] fc80: ee9a7010 eec6fcbc eea1fc00 ee9a7248 > > eec6fcc0 ee9a7098 > > [ 109.068634] fca0: 0136 bf09c520 0003 ee9a7140 eeb91340 ee9a7098 > > ee9a7248 ee9a73f8 > > [ 109.077270] fcc0: ee9a7010 ee9a7098 eefd0010 ed08f620 bf024d8c > > 035a 1dc13000 > > [ 109.085906] fce0: bf014488 eefd0084 ee9a7098 ed08f620 > > bf024d8c bf01d384 > > [ 109.094543] fd00: ee9a7140 eefd0090 ed08f620 bf024d48 ee9a7098 eefd0084 > > ee9a7140 bf01d444 > > [ 109.103179] fd20: 6650 eea1fc00 ee9a7010 66c0 0003 bf09c3f8 > > 1dc13000 > > [ 109.111785] fd40: 0002 c02bab44 ef7e2994 eea1fc00 bf09c13c > > bf09eba4 eea1fc04 > > [ 109.120422] fd60: eea1fc20 eec6ff0c c028b7dc eea1fc20 bf09ebc0 > > c0dce564 > > [ 109.129058] fd80: 0002 c02112dc bf09ebc0 eea1fc20 > > 0002 > > [ 109.137695] fda0: eea1fc20 eea1fc54 bf09ebc0 c05908e0 c02115c8 > > bf09ebc0 eec6fdc8 > > [ 109.146331] fdc0: c0211560 c020f8ac ee92c6a4 eea78410 bf09ebc0 bf09ebc0 > > ee9ec240 c05d1e74 > > [ 109.154968] fde0: c05908e0 c0210110 bf09d8ec eec6fd90 bf09ebc0 bf0a3000 > > c0211cc4 > > [ 109.163604] fe00: bf09eba4 bf0a3000 c028bd94 6780 bf0a3000 > > c0009784 > > [ 109.172241] fe20: efdd6ca0 efdd6cc0 0001 c009709c > > eeb91340 efdd6ca0 > > [ 109.180877] fe40: c0063428 eeb91340 0001 > > c00c4f1c eedb13c0 > > [ 109.189514] fe60: 0018 c005fdc8 024000c0 ee8000c0 6013 bf09f340 > > eec6ff48 eedb13c0 > > [ 109.198150] fe80: 0001 0018 eec6ff0c c008ac94 > >
Re: [PATCH 1/1] v4l: subdev: Register the entity before calling subdev's registered op
Em Mon, 28 Dec 2015 15:18:06 +0200 Sakari Ailusescreveu: > Hi Mauro, > > On Mon, Dec 28, 2015 at 10:41:58AM -0200, Mauro Carvalho Chehab wrote: > > Em Mon, 28 Dec 2015 01:45:00 +0200 > > Sakari Ailus escreveu: > > > > > Registering a V4L2 sub-device includes, among other things, registering > > > the related media entity and calling the sub-device's registered op. Since > > > patch "media: convert links from array to list", creating a link between > > > two pads requires registering the entity first. If the registered() op > > > involves link creation, the link list head will not be initialised before > > > it is used. > > > > > > Resolve this by first registering the entity, then calling its > > > registered() op. > > > > > > Signed-off-by: Sakari Ailus > > > --- > > > Hi Mauro, > > > > > > You seem to be missing this patch from your media-controller-rc4 branch. > > > Not having it breaks at least the smiapp driver. I was pretty sure to have > > > sent it but I can't find it on linux-media. Oh well. > > > > Perhaps it was on some of your replies. There were too many OOT media > > controller patches floating around ;) > > > > Anyway, I applied the patches at: > > > > > > https://git.linuxtv.org/mchehab/experimental.git/log/?h=media-controller-rc6 > > Thanks! > > > > > > > > > Speaking of the entity function warnings --- I'd omit them until we've > > > agreed that this is what we should really have (I don't think so). I can > > > submit a patch to remove them if you like. > > > > There were some discussions about that and I was thinking that we had an > > agreement about that. Anyway, I don't object to remove the warning for > > now, and discuss that a little more. > > > > > > > > --8< > > > [ 108.919189] omap3isp 480bc000.isp: Entity type for entity jt8ew9 > > > binner 1-0010 was not initialized! > > > [ 108.929046] Unable to handle kernel NULL pointer dereference at > > > virtual address > > > [ 108.937652] pgd = ed0b8000 > > > [ 108.940521] [] *pgd=aefc3831, *pte=, *ppte= > > > [ 108.947204] Internal error: Oops: 817 [#1] ARM > > > [ 108.951904] Modules linked in: smiapp(+) smiapp_pll omap3_isp > > > videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core > > > v4l2_common videodev media > > > [ 108.966735] CPU: 0 PID: 1163 Comm: modprobe Not tainted > > > 4.4.0-rc2-00328-g40e950d #507 > > > [ 108.975006] Hardware name: Generic OMAP36xx (Flattened Device Tree) > > > [ 108.981597] task: eeb91340 ti: eec6e000 task.ti: eec6e000 > > > [ 108.987335] PC is at media_add_link+0x34/0x44 [media] > > > [ 108.992645] LR is at 0x0 > > > [ 108.995330] pc : []lr : [<>]psr: a013 > > > [ 108.995330] sp : eec6fc78 ip : fp : > > > [ 109.007415] r10: r9 : 0003 r8 : 1c40 > > > [ 109.012939] r7 : r6 : 001c r5 : ee9a7248 r4 : ee9a70c4 > > > [ 109.019805] r3 : r2 : 1c10 r1 : ee8000c0 r0 : 1c00 > > > [ 109.026672] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM > > > Segment none > > > [ 109.034210] Control: 10c5387d Table: ad0b8019 DAC: 0051 > > > [ 109.040252] Process modprobe (pid: 1163, stack limit = 0xeec6e208) > > > [ 109.046752] Stack: (0xeec6fc78 to 0xeec7) > > > [ 109.051361] fc60: > > > ee9a7098 bf0021b4 > > > [ 109.059997] fc80: ee9a7010 eec6fcbc eea1fc00 ee9a7248 > > > eec6fcc0 ee9a7098 > > > [ 109.068634] fca0: 0136 bf09c520 0003 ee9a7140 eeb91340 > > > ee9a7098 ee9a7248 ee9a73f8 > > > [ 109.077270] fcc0: ee9a7010 ee9a7098 eefd0010 ed08f620 > > > bf024d8c 035a 1dc13000 > > > [ 109.085906] fce0: bf014488 eefd0084 ee9a7098 ed08f620 > > > bf024d8c bf01d384 > > > [ 109.094543] fd00: ee9a7140 eefd0090 ed08f620 bf024d48 ee9a7098 > > > eefd0084 ee9a7140 bf01d444 > > > [ 109.103179] fd20: 6650 eea1fc00 ee9a7010 66c0 0003 > > > bf09c3f8 1dc13000 > > > [ 109.111785] fd40: 0002 c02bab44 ef7e2994 eea1fc00 > > > bf09c13c bf09eba4 eea1fc04 > > > [ 109.120422] fd60: eea1fc20 eec6ff0c c028b7dc eea1fc20 > > > bf09ebc0 c0dce564 > > > [ 109.129058] fd80: 0002 c02112dc bf09ebc0 > > > eea1fc20 0002 > > > [ 109.137695] fda0: eea1fc20 eea1fc54 bf09ebc0 c05908e0 > > > c02115c8 bf09ebc0 eec6fdc8 > > > [ 109.146331] fdc0: c0211560 c020f8ac ee92c6a4 eea78410 bf09ebc0 > > > bf09ebc0 ee9ec240 c05d1e74 > > > [ 109.154968] fde0: c05908e0 c0210110 bf09d8ec eec6fd90 bf09ebc0 > > > bf0a3000 c0211cc4 > > > [ 109.163604] fe00: bf09eba4 bf0a3000 c028bd94 6780 > > > bf0a3000 c0009784 > > > [ 109.172241] fe20: efdd6ca0 efdd6cc0 0001 > > > c009709c eeb91340 efdd6ca0 > > > [
Re: [PATCH 1/1] v4l: subdev: Register the entity before calling subdev's registered op
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system] Hi Sakari, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.4-rc6 next-20151223] url: https://github.com/0day-ci/linux/commits/Sakari-Ailus/v4l-subdev-Register-the-entity-before-calling-subdev-s-registered-op/20151228-074927 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-x016-201552 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/media/v4l2-core/v4l2-device.c: In function 'v4l2_device_register_subdev': >> drivers/media/v4l2-core/v4l2-device.c:210:33: error: 'entity' undeclared >> (first use in this function) media_device_unregister_entity(entity); ^ drivers/media/v4l2-core/v4l2-device.c:210:33: note: each undeclared identifier is reported only once for each function it appears in vim +/entity +210 drivers/media/v4l2-core/v4l2-device.c 204 list_add_tail(>list, _dev->subdevs); 205 spin_unlock(_dev->lock); 206 207 return 0; 208 209 error_unregister: > 210 media_device_unregister_entity(entity); 211 error_module: 212 if (!sd->owner_v4l2_dev) 213 module_put(sd->owner); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH 1/1] v4l: subdev: Register the entity before calling subdev's registered op
Registering a V4L2 sub-device includes, among other things, registering the related media entity and calling the sub-device's registered op. Since patch "media: convert links from array to list", creating a link between two pads requires registering the entity first. If the registered() op involves link creation, the link list head will not be initialised before it is used. Resolve this by first registering the entity, then calling its registered() op. Signed-off-by: Sakari Ailus--- Hi Mauro, You seem to be missing this patch from your media-controller-rc4 branch. Not having it breaks at least the smiapp driver. I was pretty sure to have sent it but I can't find it on linux-media. Oh well. Speaking of the entity function warnings --- I'd omit them until we've agreed that this is what we should really have (I don't think so). I can submit a patch to remove them if you like. --8< [ 108.919189] omap3isp 480bc000.isp: Entity type for entity jt8ew9 binner 1-0010 was not initialized! [ 108.929046] Unable to handle kernel NULL pointer dereference at virtual address [ 108.937652] pgd = ed0b8000 [ 108.940521] [] *pgd=aefc3831, *pte=, *ppte= [ 108.947204] Internal error: Oops: 817 [#1] ARM [ 108.951904] Modules linked in: smiapp(+) smiapp_pll omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media [ 108.966735] CPU: 0 PID: 1163 Comm: modprobe Not tainted 4.4.0-rc2-00328-g40e950d #507 [ 108.975006] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 108.981597] task: eeb91340 ti: eec6e000 task.ti: eec6e000 [ 108.987335] PC is at media_add_link+0x34/0x44 [media] [ 108.992645] LR is at 0x0 [ 108.995330] pc : []lr : [<>]psr: a013 [ 108.995330] sp : eec6fc78 ip : fp : [ 109.007415] r10: r9 : 0003 r8 : 1c40 [ 109.012939] r7 : r6 : 001c r5 : ee9a7248 r4 : ee9a70c4 [ 109.019805] r3 : r2 : 1c10 r1 : ee8000c0 r0 : 1c00 [ 109.026672] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 109.034210] Control: 10c5387d Table: ad0b8019 DAC: 0051 [ 109.040252] Process modprobe (pid: 1163, stack limit = 0xeec6e208) [ 109.046752] Stack: (0xeec6fc78 to 0xeec7) [ 109.051361] fc60: ee9a7098 bf0021b4 [ 109.059997] fc80: ee9a7010 eec6fcbc eea1fc00 ee9a7248 eec6fcc0 ee9a7098 [ 109.068634] fca0: 0136 bf09c520 0003 ee9a7140 eeb91340 ee9a7098 ee9a7248 ee9a73f8 [ 109.077270] fcc0: ee9a7010 ee9a7098 eefd0010 ed08f620 bf024d8c 035a 1dc13000 [ 109.085906] fce0: bf014488 eefd0084 ee9a7098 ed08f620 bf024d8c bf01d384 [ 109.094543] fd00: ee9a7140 eefd0090 ed08f620 bf024d48 ee9a7098 eefd0084 ee9a7140 bf01d444 [ 109.103179] fd20: 6650 eea1fc00 ee9a7010 66c0 0003 bf09c3f8 1dc13000 [ 109.111785] fd40: 0002 c02bab44 ef7e2994 eea1fc00 bf09c13c bf09eba4 eea1fc04 [ 109.120422] fd60: eea1fc20 eec6ff0c c028b7dc eea1fc20 bf09ebc0 c0dce564 [ 109.129058] fd80: 0002 c02112dc bf09ebc0 eea1fc20 0002 [ 109.137695] fda0: eea1fc20 eea1fc54 bf09ebc0 c05908e0 c02115c8 bf09ebc0 eec6fdc8 [ 109.146331] fdc0: c0211560 c020f8ac ee92c6a4 eea78410 bf09ebc0 bf09ebc0 ee9ec240 c05d1e74 [ 109.154968] fde0: c05908e0 c0210110 bf09d8ec eec6fd90 bf09ebc0 bf0a3000 c0211cc4 [ 109.163604] fe00: bf09eba4 bf0a3000 c028bd94 6780 bf0a3000 c0009784 [ 109.172241] fe20: efdd6ca0 efdd6cc0 0001 c009709c eeb91340 efdd6ca0 [ 109.180877] fe40: c0063428 eeb91340 0001 c00c4f1c eedb13c0 [ 109.189514] fe60: 0018 c005fdc8 024000c0 ee8000c0 6013 bf09f340 eec6ff48 eedb13c0 [ 109.198150] fe80: 0001 0018 eec6ff0c c008ac94 bf09f340 [ 109.206756] fea0: efd99ff4 bf09f340 eec6ff48 bf09f34c 0001 c008c634 8000 7fff [ 109.215393] fec0: c008a8f4 f163a300 f163a448 07d0 0186 0001cfc0 f16b9e80 [ 109.224029] fee0: bf09f344 eec6ff1c [ 109.232666] ff00: 1c02 c019cf24 2013 c050e0b8 0055 0001 0001 b6dfdea8 [ 109.241302] ff20: 6ea8 0001cfc0 f16b9ea8 eec6e000 0051 0001cf48 c008cb04 [ 109.249938] ff40: 6013 c005dcf4 f1633000 00086ea8 f16b96b0 f1697f05 f1699958 7560 [ 109.258575] ff60: 8670 bf09ef90 0025 0031 0032 0017 001b [ 109.267211] ff80: 0010 0001b070 0001b070 0080 c000fa44 [ 109.275848] ffa0: c000f8a0 0001b070 b6d77000 00086ea8 0001cfc0 [ 109.284484] ffc0: 0001b070 0080 0001cfe0 0001cf48 [