Re: Fw: + media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held.patch added to -mm tree
On 04/28/2014 11:51 PM, Mauro Carvalho Chehab wrote: > Hi Hans, > > Could you please take a look at this patch? I was planning to do that, but I won't have time for it until Monday. > I remember you had to revert a > VB2 patch from Al Viro, as it caused some regressions. Not sure if this one > is similar to the one that was reverted. That was a patch for videobuf, not vb2. But this still needs to be reviewed carefully for pretty much the same reasons. Regards, Hans > > Thanks, > Mauro > > Forwarded message: > > Date: Mon, 28 Apr 2014 15:04:06 -0700 > From: a...@linux-foundation.org > To: mm-comm...@vger.kernel.org, pa...@osciak.com, m.szyprow...@samsung.com, > m.che...@samsung.com, kyungmin.p...@samsung.com, davidl...@hp.com > Subject: + media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held.patch > added to -mm tree > > > Subject: + media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held.patch > added to -mm tree > To: > davidl...@hp.com,kyungmin.p...@samsung.com,m.che...@samsung.com,m.szyprow...@samsung.com,pa...@osciak.com > From: a...@linux-foundation.org > Date: Mon, 28 Apr 2014 15:04:06 -0700 > > > The patch titled > Subject: drivers/media/v4l2-core/videobuf2-dma-sg.c: call find_vma with > the mmap_sem held > has been added to the -mm tree. Its filename is > media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held.patch > > This patch should soon appear at > > http://ozlabs.org/~akpm/mmots/broken-out/media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held.patch > and later at > > http://ozlabs.org/~akpm/mmotm/broken-out/media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held.patch > > Before you just go and hit "reply", please: >a) Consider who else should be cc'ed >b) Prefer to cc a suitable mailing list as well >c) Ideally: find the original patch on the mailing list and do a > reply-to-all to that, adding suitable additional cc's > > *** Remember to use Documentation/SubmitChecklist when testing your code *** > > The -mm tree is included into linux-next and is updated > there every 3-4 working days > > -- > From: Davidlohr Bueso > Subject: drivers/media/v4l2-core/videobuf2-dma-sg.c: call find_vma with the > mmap_sem held > > Performing vma lookups without taking the mm->mmap_sem is asking for > trouble. While doing the search, the vma in question can be modified or > even removed before returning to the caller. Take the lock in order to > avoid races while iterating through the vmacache and/or rbtree. > > Also do some very minor cleanup changes. > > Signed-off-by: Davidlohr Bueso > Cc: Pawel Osciak > Cc: Marek Szyprowski > Cc: Kyungmin Park > Cc: Mauro Carvalho Chehab > Signed-off-by: Andrew Morton > --- > > drivers/media/v4l2-core/videobuf2-dma-sg.c | 12 > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff -puN > drivers/media/v4l2-core/videobuf2-dma-sg.c~media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held > drivers/media/v4l2-core/videobuf2-dma-sg.c > --- > a/drivers/media/v4l2-core/videobuf2-dma-sg.c~media-videobuf2-dma-sg-call-find_vma-with-the-mmap_sem-held > +++ a/drivers/media/v4l2-core/videobuf2-dma-sg.c > @@ -168,8 +168,9 @@ static void *vb2_dma_sg_get_userptr(void > unsigned long first, last; > int num_pages_from_user; > struct vm_area_struct *vma; > + struct mm_struct *mm = current->mm; > > - buf = kzalloc(sizeof *buf, GFP_KERNEL); > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > if (!buf) > return NULL; > > @@ -178,7 +179,7 @@ static void *vb2_dma_sg_get_userptr(void > buf->offset = vaddr & ~PAGE_MASK; > buf->size = size; > > - first = (vaddr & PAGE_MASK) >> PAGE_SHIFT; > + first = (vaddr & PAGE_MASK) >> PAGE_SHIFT; > last = ((vaddr + size - 1) & PAGE_MASK) >> PAGE_SHIFT; > buf->num_pages = last - first + 1; > > @@ -187,7 +188,8 @@ static void *vb2_dma_sg_get_userptr(void > if (!buf->pages) > goto userptr_fail_alloc_pages; > > - vma = find_vma(current->mm, vaddr); > + down_write(&mm->mmap_sem); > + vma = find_vma(mm, vaddr); > if (!vma) { > dprintk(1, "no vma for address %lu\n", vaddr); > goto userptr_fail_find_vma; > @@ -218,7 +220,7 @@ static void *vb2_dma_sg_get_userptr(void > buf->pages[num_pages_from_user] = pfn_to_page(pfn); > } > } else > - num_pages_from_user = get_user_pages(current, current->mm, > + num_pages_from_user = get_user_pages(current, mm, >vaddr & PAGE_MASK, >buf->num_pages, >write, > @@ -233,6 +235,7 @@ static void *vb2_dma_sg_get_userptr(void > buf->num_pages, buf->offset, size, 0)) >
Re: [PATCH 7/6] media: videobuf2-dma-sg: call find_vma with the mmap_sem held
Hello, On 2014-04-28 20:09, Davidlohr Bueso wrote: Performing vma lookups without taking the mm->mmap_sem is asking for trouble. While doing the search, the vma in question can be modified or even removed before returning to the caller. Take the lock in order to avoid races while iterating through the vmacache and/or rbtree. Also do some very minor cleanup changes. This patch is only compile tested. NACK. mm->mmap_sem is taken by videobuf2-core to avoid AB-BA deadlock with v4l2 core lock. For more information, please check videobuf2-core.c. However you are right that this is a bit confusing and we need more comments about the place where mmap_sem is taken. Here is some background for this decision: https://www.mail-archive.com/linux-media@vger.kernel.org/msg38599.html http://www.spinics.net/lists/linux-media/msg40225.html Signed-off-by: Davidlohr Bueso Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org --- It would seem this is the last offending user. v4l2 is a maze but I believe that this is needed as I don't see the mmap_sem being taken by any callers of vb2_dma_sg_get_userptr(). drivers/media/v4l2-core/videobuf2-dma-sg.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c index c779f21..2a21100 100644 --- a/drivers/media/v4l2-core/videobuf2-dma-sg.c +++ b/drivers/media/v4l2-core/videobuf2-dma-sg.c @@ -168,8 +168,9 @@ static void *vb2_dma_sg_get_userptr(void *alloc_ctx, unsigned long vaddr, unsigned long first, last; int num_pages_from_user; struct vm_area_struct *vma; + struct mm_struct *mm = current->mm; - buf = kzalloc(sizeof *buf, GFP_KERNEL); + buf = kzalloc(sizeof(*buf), GFP_KERNEL); if (!buf) return NULL; @@ -178,7 +179,7 @@ static void *vb2_dma_sg_get_userptr(void *alloc_ctx, unsigned long vaddr, buf->offset = vaddr & ~PAGE_MASK; buf->size = size; - first = (vaddr & PAGE_MASK) >> PAGE_SHIFT; + first = (vaddr & PAGE_MASK) >> PAGE_SHIFT; last = ((vaddr + size - 1) & PAGE_MASK) >> PAGE_SHIFT; buf->num_pages = last - first + 1; @@ -187,7 +188,8 @@ static void *vb2_dma_sg_get_userptr(void *alloc_ctx, unsigned long vaddr, if (!buf->pages) goto userptr_fail_alloc_pages; - vma = find_vma(current->mm, vaddr); + down_write(&mm->mmap_sem); + vma = find_vma(mm, vaddr); if (!vma) { dprintk(1, "no vma for address %lu\n", vaddr); goto userptr_fail_find_vma; @@ -218,7 +220,7 @@ static void *vb2_dma_sg_get_userptr(void *alloc_ctx, unsigned long vaddr, buf->pages[num_pages_from_user] = pfn_to_page(pfn); } } else - num_pages_from_user = get_user_pages(current, current->mm, + num_pages_from_user = get_user_pages(current, mm, vaddr & PAGE_MASK, buf->num_pages, write, @@ -233,6 +235,7 @@ static void *vb2_dma_sg_get_userptr(void *alloc_ctx, unsigned long vaddr, buf->num_pages, buf->offset, size, 0)) goto userptr_fail_alloc_table_from_pages; + up_write(&mm->mmap_sem); return buf; userptr_fail_alloc_table_from_pages: @@ -244,6 +247,7 @@ userptr_fail_get_user_pages: put_page(buf->pages[num_pages_from_user]); vb2_put_vma(buf->vma); userptr_fail_find_vma: + up_write(&mm->mmap_sem); kfree(buf->pages); userptr_fail_alloc_pages: kfree(buf); Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] videobuf2-dma-sg: Fix NULL pointer dereference BUG
Hello, On 2014-04-25 18:11, Ricardo Ribalda Delgado wrote: vb2_get_vma() copy the content of the vma to a new structure but set some of its pointers to NULL. One of this pointer is used by follow_pte() called by follow_pfn() on io memory. This can lead to a NULL pointer derreference. The version of vma that has not been cleared must be used. [ 406.143320] BUG: unable to handle kernel NULL pointer dereference at 0040 [ 406.143427] IP: [] follow_pfn+0x2c/0x70 [ 406.143491] PGD 6c3f0067 PUD 6c3ef067 PMD 0 [ 406.143546] Oops: [#1] SMP [ 406.143587] Modules linked in: qtec_mem qt5023_video qtec_testgen qtec_xform videobuf2_core gpio_xilinx videobuf2_vmalloc videobuf2_dma_sg qtec_cmosis videobuf2_memops qtec_pcie qtec_white fglrx(PO) qt5023 spi_xilinx spi_bitbang [ 406.143852] CPU: 0 PID: 299 Comm: tracker Tainted: P O 3.13.0-qtec-standard #10 [ 406.143927] Hardware name: QTechnology QT5022/QT5022, BIOS PM_2.1.0.309 X64 04/04/2013 [ 406.144000] task: 880085c82d60 ti: 880085abe000 task.ti: 880085abe000 [ 406.144067] RIP: 0010:[] [] follow_pfn+0x2c/0x70 [ 406.144145] RSP: 0018:880085abf888 EFLAGS: 00010296 [ 406.144195] RAX: RBX: 880085abf8e0 RCX: 880085abf888 [ 406.144260] RDX: 880085abf890 RSI: 7fc52e173000 RDI: 8800863cbe40 [ 406.144325] RBP: 880085abf8a8 R08: 0018 R09: 8800863cbf00 [ 406.144388] R10: 880086703b80 R11: 01e0 R12: 00018000 [ 406.144452] R13: R14: ea00 R15: 88015922fea0 [ 406.144517] FS: 7fc536e7c740() GS:88015ec0() knlGS: [ 406.144591] CS: 0010 DS: ES: CR0: 80050033 [ 406.144644] CR2: 0040 CR3: 66c9d000 CR4: 07f0 [ 406.144708] Stack: [ 406.144731] 00018000 7fc52e18b000 7fc52e173000 [ 406.144813] 880085abf918 a083b2fd 880085ab1ba8 [ 406.144894] 0001 880085abf928 880159a20800 [ 406.144976] Call Trace: [ 406.145011] [] vb2_dma_sg_get_userptr+0x14d/0x310 [videobuf2_dma_sg] [ 406.145089] [] __qbuf_userptr+0xbf/0x3e0 [videobuf2_core] [ 406.147229] [] ? mc_heap_lock_memory+0x1f4/0x490 [fglrx] [ 406.149234] [] ? cpumask_next_and+0x23/0x50 [ 406.151223] [] ? enqueue_task_fair+0x658/0xde0 [ 406.153199] [] ? native_smp_send_reschedule+0x48/0x60 [ 406.155184] [] ? get_ctrl+0xa9/0xd0 [ 406.157161] [] ? __kmalloc+0x1a4/0x1b0 [ 406.159135] [] ? __vb2_queue_alloc+0x9c/0x4a0 [videobuf2_core] [ 406.161130] [] __buf_prepare+0x1a8/0x210 [videobuf2_core] [ 406.163171] [] __vb2_qbuf+0x27/0xcc [videobuf2_core] [ 406.165229] [] vb2_queue_or_prepare_buf+0x1ed/0x270 [videobuf2_core] [ 406.167325] [] ? vb2_ioctl_querybuf+0x30/0x30 [videobuf2_core] [ 406.169419] [] vb2_qbuf+0x1c/0x20 [videobuf2_core] [ 406.171508] [] vb2_ioctl_qbuf+0x58/0x70 [videobuf2_core] [ 406.173604] [] v4l_qbuf+0x48/0x60 [ 406.175681] [] __video_do_ioctl+0x2bc/0x340 [ 406.19] [] ? __kmalloc+0xfc/0x1b0 [ 406.179883] [] ? video_usercopy+0x7e/0x470 [ 406.181961] [] video_usercopy+0x1f1/0x470 [ 406.184021] [] ? v4l_printk_ioctl+0xb0/0xb0 [ 406.186085] [] ? account_system_time+0x8d/0x190 [ 406.188149] [] video_ioctl2+0x15/0x20 [ 406.190216] [] v4l2_ioctl+0x123/0x160 [ 406.192251] [] ? rcu_eqs_enter+0x65/0xa0 [ 406.194256] [] do_vfs_ioctl+0x88/0x560 [ 406.196258] [] ? account_user_time+0x95/0xb0 [ 406.198262] [] ? vtime_account_user+0x44/0x70 [ 406.200215] [] SyS_ioctl+0x91/0xb0 [ 406.202107] [] tracesys+0xd0/0xd5 [ 406.203946] Code: 66 66 66 90 48 f7 47 50 00 44 00 00 b8 ea ff ff ff 74 52 55 48 89 e5 53 48 89 d3 48 8d 4d e0 48 8d 55 e8 48 83 ec 18 48 8b 47 40 <48> 8b 78 40 e8 8b fe ff ff 85 c0 75 27 48 8b 55 e8 48 b9 00 f0 [ 406.208011] RIP [] follow_pfn+0x2c/0x70 [ 406.209908] RSP [ 406.211760] CR2: 0040 [ 406.213676] ---[ end trace 996d9f64e6739a04 ]--- Signed-off-by: Ricardo Ribalda Delgado Acked-by: Marek Szyprowski I wasn't aware that follow_pfn might need to access some vma internals. You are right that the real vma should be used here instead of the dummy copy. --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c index c779f21..adefc31 100644 --- a/drivers/media/v4l2-core/videobuf2-dma-sg.c +++ b/drivers/media/v4l2-core/videobuf2-dma-sg.c @@ -211,7 +211,7 @@ static void *vb2_dma_sg_get_userptr(void *alloc_ctx, unsigned long vaddr, ++num_pages_from_user, vaddr += PAGE_SIZE) { unsigned long pfn; - if (follow_pfn(buf->vma, vaddr, &pfn)) { + if (follow_pfn(vma, vaddr, &pfn)) { dprintk(1, "no page for address %lu\
Re: [PATCH] Kernel 3.15-rc2 : Peak DVB-T USB tuner device ids for rtl28xxu driver
Em Mon, 28 Apr 2014 22:40:00 +0100 Brian Healy escreveu: > From: Brian Healy > To: Antti Palosaari , Mauro Carvalho Chehab > > Cc: Linus Torvalds , Linux Kernel Mailing List > , Linux Media Mailing List > > Subject: Re: [PATCH] Kernel 3.15-rc2 : Peak DVB-T USB tuner device ids for > rtl28xxu driver > Date: Mon, 28 Apr 2014 22:40:00 +0100 > Sender: linux-media-ow...@vger.kernel.org > User-Agent: Mutt/1.5.21 (2010-09-15) > > On Sun, Apr 27, 2014 at 03:19:12PM -0700, Linus Torvalds wrote: > > Hi Linus, > > apologies, i've changed email clients in order to preserve the > formatting this time around. The patch is now included inline as an > attachment. I ran the script but noticed you've already cc'd the > appropriate people. > > Brian. > > > Resubmitting modified patch. It's purpose is to add the appropriate > device/usb ids for the "Peak DVT-B usb dongle" to the rtl28xxu.c driver. > > Signed-off-by: Brian Healy gmail.com> > > > > Brian, please use > > > > ./scripts/get_maintainer -f drivers/media/usb/dvb-usb-v2/rtl28xxu.c > > > > to get the proper people to send this to, so that it doesn't get lost > > in the flood in lkml. > > > > The indentation of that new entry also seems to be suspect, in that it > > doesn't match the ones around it. > > > > Quoting full email for context for people added. > > > > Linus > > > > diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c > b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c > index 61d196e..b6e20cc 100644 > --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c > +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c > @@ -1499,6 +1499,8 @@ static const struct usb_device_id rtl28xxu_id_table[] = > { > &rtl2832u_props, "Crypto ReDi PC 50 A", NULL) }, > { DVB_USB_DEVICE(USB_VID_KYE, 0x707f, > &rtl2832u_props, "Genius TVGo DVB-T03", NULL) }, > +{ DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd395, > +&rtl2832u_props, "Peak DVB-T USB", NULL) }, Patch is still a little odd, as you're using spaces for indenting, instead of tabs, but I can fix it with my scripts. Next time, please use tabs. Also, specifically in the case of patches for linux-media, you don't need to c/c me. Just send the patch to linux-media and to the driver maintainer (Antti, in this case). My workflow is to pick the patches from patchwork: https://patchwork.linuxtv.org/patch/23792/ after receiving Antti's ack. Alternatively, Antti may opt to put it on his git tree, sending it to me latter together of other patches he may have for the devices he maintains. > > /* RTL2832P devices: */ > { DVB_USB_DEVICE(USB_VID_HANFTEK, 0x0131, Thanks, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 2/2 with seqcount v3] reservation: add suppport for read-only access using rcu
op 23-04-14 13:15, Maarten Lankhorst schreef: This adds 4 more functions to deal with rcu. reservation_object_get_fences_rcu() will obtain the list of shared and exclusive fences without obtaining the ww_mutex. reservation_object_wait_timeout_rcu() will wait on all fences of the reservation_object, without obtaining the ww_mutex. reservation_object_test_signaled_rcu() will test if all fences of the reservation_object are signaled without using the ww_mutex. reservation_object_get_excl() is added because touching the fence_excl member directly will trigger a sparse warning. Signed-off-by: Maarten Lankhorst --- Using seqcount and fixing some lockdep bugs. Changes since v2: - Fix some crashes, remove some unneeded barriers when provided by seqcount writes - Fix code to work correctly with sparse's RCU annotations. - Create a global string for the seqcount lock to make lockdep happy. Can I get this version reviewed? If it looks correct I'll mail the full series because it's intertwined with the TTM conversion to use this code. Ping, can anyone review this? -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media: coda: Use full device name for request_irq()
Am Samstag, den 26.04.2014, 13:14 +0400 schrieb Alexander Shiyan: > This will help to debug driver, allows us to see the full name of > the device through /proc/interrupts. > >CPU0 > ... > 69: 0 mxc-avic 53 10023000.coda > ... > > Signed-off-by: Alexander Shiyan Acked-by: Philipp Zabel > --- > drivers/media/platform/coda.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c > index 3e5199e..11023b1 100644 > --- a/drivers/media/platform/coda.c > +++ b/drivers/media/platform/coda.c > @@ -3235,7 +3235,7 @@ static int coda_probe(struct platform_device *pdev) > } > > if (devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler, > - IRQF_ONESHOT, CODA_NAME, dev) < 0) { > + IRQF_ONESHOT, dev_name(&pdev->dev), dev) < 0) { > dev_err(&pdev->dev, "failed to request irq\n"); > return -ENOENT; > } regards Philipp -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] [media] coda: Propagate the correct error on devm_request_threaded_irq()
Am Montag, den 28.04.2014, 13:57 -0300 schrieb Fabio Estevam: > If devm_request_threaded_irq() fails, we should better propagate the real > error. > > Also, print out the error code in the dev_err message. > > Signed-off-by: Fabio Estevam Both look fine to me. Acked-by: Philipp Zabel 2/2 trivially conflicts with "[PATCH] media: coda: Use full device name for request_irq()" by Alexander Shiyan. > --- > drivers/media/platform/coda.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c > index ba7cb3f..1360b91 100644 > --- a/drivers/media/platform/coda.c > +++ b/drivers/media/platform/coda.c > @@ -3234,10 +3234,11 @@ static int coda_probe(struct platform_device *pdev) > return irq; > } > > - if (devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler, > - IRQF_ONESHOT, CODA_NAME, dev) < 0) { > - dev_err(&pdev->dev, "failed to request irq\n"); > - return -ENOENT; > + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler, > + IRQF_ONESHOT, CODA_NAME, dev); > + if (ret < 0) { > + dev_err(&pdev->dev, "failed to request irq: %d\n", ret); > + return ret; > } > > /* Get IRAM pool from device tree or platform data */ regards Philipp -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] [media] s5p-mfc: Core support to add v8 decoder
Hi Arun, On 23 April 2014 18:27, Arun Kumar K wrote: > From: Kiran AVND > > This patch adds variant data and core support for > V8 decoder. This patch also adds the register definition > file for new firmware version v8 for MFC. > > Signed-off-by: Kiran AVND > Signed-off-by: Pawel Osciak > Signed-off-by: Arun Kumar K > --- <...> > + > +/* Returned value register for specific setting */ > +#define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V8 0xf674 > +#define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V8 0xf678 > +#define S5P_FIMV_D_MVC_VIEW_ID_V8 0xf6d8 > + > +/* SEI related information */ > +#define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V8 0xf6dc > + > +/* MFCv8 Context buffer sizes */ > +#define MFC_CTX_BUF_SIZE_V8(30 * SZ_1K)/* 30KB */ Please include header file for size macros. <...> > }; > diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h > b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h > index 48a14b5..f0e63f5 100644 > --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h > +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h > @@ -23,8 +23,7 @@ > #include > #include > #include "regs-mfc.h" > -#include "regs-mfc-v6.h" > -#include "regs-mfc-v7.h" > +#include "regs-mfc-v8.h" > > /* Definitions related to MFC memory */ > > @@ -705,5 +704,6 @@ void set_work_bit_irqsave(struct s5p_mfc_ctx *ctx); > #define IS_TWOPORT(dev)(dev->variant->port_num == 2 ? 1 : 0) > #define IS_MFCV6_PLUS(dev) (dev->variant->version >= 0x60 ? 1 : 0) > #define IS_MFCV7(dev) (dev->variant->version >= 0x70 ? 1 : 0) Is MFC v8 superset of MFC v7? > +#define IS_MFCV8(dev) (dev->variant->version >= 0x80 ? 1 : 0) -- With warm regards, Sachin -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Question about implementation of __qbuf_dmabuf() in videobuf2-core.c
Hi, Is there a work around for this bug without upgrading to 3.16 kernel? Is it safe to manually set the length to be data_offset + size + 1 to make sure planes[plane].length is greater than planes[plane].data_offset + q->plane_sizes[plane]? Thank you. On Wed, Apr 23, 2014 at 12:24 AM, Hans Verkuil wrote: > On 04/23/2014 02:18 AM, n179911 wrote: >> In __qbuf_dmabuf(), it check the length and size of the buffer being >> queued, like this: >> http://lxr.free-electrons.com/source/drivers/media/v4l2-core/videobuf2-core.c#L1158 >> >> My question is why the range check is liked this: >> >> 1158 if (planes[plane].length < planes[plane].data_offset + >> 1159 q->plane_sizes[plane]) { > > It's a bug. It should be: > > if (planes[plane].length < q->plane_sizes[plane]) { > > This has been fixed in our upstream code and will appear in 3.16. > > Regards, > > Hans > >> . >> >> Isn't planes[plane].length + planes[plane].data_offset equals to >> q->plane_sizes[plane]? >> >> So the check should be? >> if (planes[plane].length < q->plane_sizes[plane] - >> planes[plane].data_offset) >> >> Please tell me what am I missing? >> >> Thank you >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-media" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 2/2 with seqcount v3] reservation: add suppport for read-only access using rcu
On 04/29/2014 04:32 PM, Maarten Lankhorst wrote: > op 23-04-14 13:15, Maarten Lankhorst schreef: >> This adds 4 more functions to deal with rcu. >> >> reservation_object_get_fences_rcu() will obtain the list of shared >> and exclusive fences without obtaining the ww_mutex. >> >> reservation_object_wait_timeout_rcu() will wait on all fences of the >> reservation_object, without obtaining the ww_mutex. >> >> reservation_object_test_signaled_rcu() will test if all fences of the >> reservation_object are signaled without using the ww_mutex. >> >> reservation_object_get_excl() is added because touching the fence_excl >> member directly will trigger a sparse warning. >> >> Signed-off-by: Maarten Lankhorst >> --- >> Using seqcount and fixing some lockdep bugs. >> Changes since v2: >> - Fix some crashes, remove some unneeded barriers when provided by >> seqcount writes >> - Fix code to work correctly with sparse's RCU annotations. >> - Create a global string for the seqcount lock to make lockdep happy. >> >> Can I get this version reviewed? If it looks correct I'll mail the >> full series >> because it's intertwined with the TTM conversion to use this code. > Ping, can anyone review this? Hi, Maarten. It's on my todo-list. Been away from office for a while. /Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] media: dvb-fe changes to use tuner token
Add a new field tuner_tkn to struct dvb_frontend. Drivers can create tuner token using devm_token_create() and initialize the tuner_tkn when frontend is registered with the dvb-core. This change enables drivers to provide a token devres for tuner access control. Change dvb_frontend to lock tuner token for exclusive access to tuner function for digital TV function use. When Tuner token is present, dvb_frontend_start() calls devm_token_lock() to lock the token. If token is busy, -EBUSY is returned to the user-space. Tuner token is unlocked if kdvb adapter fe kthread fails to start. This token is held in use as long as the kdvb adapter fe kthread is running. Tuner token is unlocked in dvb_frontend_thread() when kdvb adapter fe thread exits. Signed-off-by: Shuah Khan --- drivers/media/dvb-core/dvb_frontend.c | 15 +++ drivers/media/dvb-core/dvb_frontend.h |1 + 2 files changed, 16 insertions(+) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 6ce435a..2b35e3f 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -41,6 +41,7 @@ #include #include #include +#include #include "dvb_frontend.h" #include "dvbdev.h" @@ -747,6 +748,9 @@ restart: if (semheld) up(&fepriv->sem); dvb_frontend_wakeup(fe); + + if (fe->tuner_tkn) + devm_token_unlock(fe->dvb->device, fe->tuner_tkn); return 0; } @@ -840,6 +844,15 @@ static int dvb_frontend_start(struct dvb_frontend *fe) fepriv->state = FESTATE_IDLE; fepriv->exit = DVB_FE_NO_EXIT; fepriv->thread = NULL; + + if (fe->tuner_tkn) { + ret = devm_token_lock(fe->dvb->device, fe->tuner_tkn); + if (ret) { + dev_info(fe->dvb->device, "Tuner is busy %d\n", ret); + return ret; + } + } + mb(); fe_thread = kthread_run(dvb_frontend_thread, fe, @@ -850,6 +863,8 @@ static int dvb_frontend_start(struct dvb_frontend *fe) "dvb_frontend_start: failed to start kthread (%d)\n", ret); up(&fepriv->sem); + if (fe->tuner_tkn) + devm_token_unlock(fe->dvb->device, fe->tuner_tkn); return ret; } fepriv->thread = fe_thread; diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h index 371b6ca..c9ba5fd 100644 --- a/drivers/media/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb-core/dvb_frontend.h @@ -418,6 +418,7 @@ struct dvb_frontend { #define DVB_FRONTEND_COMPONENT_DEMOD 1 int (*callback)(void *adapter_priv, int component, int cmd, int arg); int id; + char *tuner_tkn; }; extern int dvb_register_frontend(struct dvb_adapter *dvb, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] media: em28xx dvb changes to initialze tuner token
Changes to em28xx-dvb to initialze dvb fe tuner token when dvb fe is registered. This will provide dvb fe the em28xx tuner token devres for sharing tuner across analog and digital functions. Signed-off-by: Shuah Khan --- drivers/media/usb/em28xx/em28xx-dvb.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index f599b18..829e7c8 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -916,6 +916,10 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, dvb->adapter.priv = &dev->i2c_bus[dev->def_i2c_bus]; + dvb->fe[0]->tuner_tkn = dev->tuner_tkn; + if (dvb->fe[1]) + dvb->fe[1]->tuner_tkn = dev->tuner_tkn; + /* register frontend */ result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]); if (result < 0) { -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] media/em28xx: changes to create token for tuner access
Changes add a new tuner_tkn field to struct em28xx and create a token devres to allow sharing tuner function across analog and digital functions. Tuner token is created during probe in em28xx_usb_probe() and destroyed during disconnect in em28xx_release_resources(). Signed-off-by: Shuah Khan --- drivers/media/usb/em28xx/em28xx-cards.c | 41 +++ drivers/media/usb/em28xx/em28xx.h |4 +++ 2 files changed, 45 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 50aa5a5..01c1955 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -2428,6 +2428,37 @@ static struct em28xx_hash_table em28xx_i2c_hash[] = { }; /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */ +/* interfaces to create and destroy token resources */ +static int em28xx_create_token_resources(struct em28xx *dev) +{ + int rc = 0, len; + char buf[64]; + + /* create token devres for tuner */ + len = snprintf(buf, sizeof(buf), + "tuner:%s-%s-%d", + dev_name(&dev->udev->dev), + dev->udev->bus->bus_name, + dev->tuner_addr); + + dev->tuner_tkn = devm_kzalloc(&dev->udev->dev, len + 1, GFP_KERNEL); + if (!dev->tuner_tkn) + return -ENOMEM; + + strcpy(dev->tuner_tkn, buf); + rc = devm_token_create(&dev->udev->dev, dev->tuner_tkn); + if (rc) + return rc; + + em28xx_info("Tuner token created\n"); + return rc; +} + +static void em28xx_destroy_token_resources(struct em28xx *dev) +{ + devm_token_destroy(&dev->udev->dev, dev->tuner_tkn); +} + int em28xx_tuner_callback(void *ptr, int component, int command, int arg) { struct em28xx_i2c_bus *i2c_bus = ptr; @@ -2949,6 +2980,9 @@ static void em28xx_release_resources(struct em28xx *dev) em28xx_i2c_unregister(dev, 1); em28xx_i2c_unregister(dev, 0); + /* destroy token resources */ + em28xx_destroy_token_resources(dev); + usb_put_dev(dev->udev); /* Mark device as unused */ @@ -3431,6 +3465,13 @@ static int em28xx_usb_probe(struct usb_interface *interface, kref_init(&dev->ref); + /* create token resources before requesting for modules */ + if (em28xx_create_token_resources(dev)) { + em28xx_errdev("Error creating token resources!\n"); + retval = -ENOMEM; + goto err_free; + } + request_modules(dev); /* Should be the last thing to do, to avoid newer udev's to diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index 2051fc9..e82f868 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -547,6 +548,9 @@ struct em28xx { int devno; /* marks the number of this device */ enum em28xx_chip_id chip_id; + /* token resources */ + char *tuner_tkn; /* tuner token id */ + unsigned int is_em25xx:1; /* em25xx/em276x/7x/8x family bridge */ unsigned char disconnected:1; /* device has been diconnected */ unsigned int has_video:1; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/4] Add managed token devres interfaces and change media drivers to use it
Media drivers that control a single media TV stick are a diversified group. Analog and digital TV function drivers have to coordinate access to their shared functions. In some cases, snd-usb-audio is used to support audio function on media devices. A shared managed resource framework at drivers/base level will allow a media device to be controlled by drivers that don't fall under drivers/media and share functions with other media drivers. A token devres that can be looked up by a token for locking, try locking, unlocking will help avoid adding data structure dependencies between various drivers. This token is a unique string that can be constructed from a common data structure such as struct device, bus_name, and hardware address. This patch series adds devm_token_* interfaces to manage access to token resource and a tuner token to allow sharing tuner function across analog and digital functions. em28xx and dvb-core make use of this new tuner token to control tuner access. Analog changes will be added in a subsequent patch series. Patch series is tested with Kworld UB435-Q V3 USB TV stick and Kaffeine media player. Shuah Khan (4): drivers/base: add managed token devres interfaces media: dvb-fe changes to use token for shared access control media/em28xx: changes to create token for tuner access media: em28xx dvb changes to initialze dvb fe tuner token drivers/base/Makefile |2 +- drivers/base/token_devres.c | 146 +++ drivers/media/dvb-core/dvb_frontend.c | 15 drivers/media/dvb-core/dvb_frontend.h |1 + drivers/media/usb/em28xx/em28xx-cards.c | 41 + drivers/media/usb/em28xx/em28xx-dvb.c |4 + drivers/media/usb/em28xx/em28xx.h |4 + include/linux/token_devres.h| 19 8 files changed, 231 insertions(+), 1 deletion(-) create mode 100644 drivers/base/token_devres.c create mode 100644 include/linux/token_devres.h -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] drivers/base: add managed token devres interfaces
Media devices often have hardware resources that are shared across several functions. These devices appear as a group of independent devices. Each device implements a function which could be shared by one or more functions supported by the same device. For example, tuner is shared by analog and digital TV functions. Media drivers that control a single media TV stick are a diversified group. Analog and digital TV function drivers have to coordinate access to their shared functions. Some media devices provide multiple almost-independent functions. USB and PCI core aids in allowwing multiple drivers to handle these almost-independent functions. In this model, a em28xx device could have snd-usb-audio driving the audio function. As a result, snd-usb-audio driver has to coordinate with the em28xx_* analog and digital function drivers. A shared managed resource framework at drivers/base level will allow a media device to be controlled by drivers that don't fall under drivers/media and share functions with other media drivers. A token devres that can be looked up by a token for locking, try locking, unlocking will help avoid adding data structure dependencies between various drivers. This token is a unique string that can be constructed from a common data structure such as struct device, bus_name, and hardware address. The devm_token_* interfaces manage access to token resource. Interfaces: devm_token_create() devm_token_destroy() devm_token_lock() devm_token_unlock() Usage: Create token: Call devm_token_create() with a token id string. Lock token: Call devm_token_lock() to lock or try lock a token. Unlock token: Call devm_token_unlock(). Destroy token: Call devm_token_destroy() to delete the token. Signed-off-by: Shuah Khan --- drivers/base/Makefile|2 +- drivers/base/token_devres.c | 146 ++ include/linux/token_devres.h | 19 ++ 3 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 drivers/base/token_devres.c create mode 100644 include/linux/token_devres.h diff --git a/drivers/base/Makefile b/drivers/base/Makefile index 04b314e..924665b 100644 --- a/drivers/base/Makefile +++ b/drivers/base/Makefile @@ -4,7 +4,7 @@ obj-y := component.o core.o bus.o dd.o syscore.o \ driver.o class.o platform.o \ cpu.o firmware.o init.o map.o devres.o \ attribute_container.o transport_class.o \ - topology.o container.o + topology.o container.o token_devres.o obj-$(CONFIG_DEVTMPFS) += devtmpfs.o obj-$(CONFIG_DMA_CMA) += dma-contiguous.o obj-y += power/ diff --git a/drivers/base/token_devres.c b/drivers/base/token_devres.c new file mode 100644 index 000..4644642 --- /dev/null +++ b/drivers/base/token_devres.c @@ -0,0 +1,146 @@ +/* + * drivers/base/token_devres.c - managed token resource + * + * Copyright (c) 2014 Shuah Khan + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * This file is released under the GPLv2. + */ +/* + * Media devices often have hardware resources that are shared + * across several functions. For instance, TV tuner cards often + * have MUXes, converters, radios, tuners, etc. that are shared + * across various functions. However, v4l2, alsa, DVB, usbfs, and + * all other drivers have no knowledge of what resources are + * shared. For example, users can't access DVB and alsa at the same + * time, or the DVB and V4L analog API at the same time, since many + * only have one converter that can be in either analog or digital + * mode. Accessing and/or changing mode of a converter while it is + * in use by another function results in video stream error. + * + * A shared devres that can be locked and unlocked by various drivers + * that control media functions on a single media device is needed to + * address the above problems. + * + * A token devres that can be looked up by a token for locking, try + * locking, unlocking will help avoid adding data structure + * dependencies between various media drivers. This token is a unique + * string that can be constructed from a common data structure such as + * struct device, bus_name, and hardware address. + * + * The devm_token_* interfaces manage access to token resource. + * + * Interfaces: + * devm_token_create() + * devm_token_destroy() + * devm_token_lock() + * devm_token_unlock() + * Usage: + * Create token: + * Call devm_token_create() with a token id which is + * a unique string. + * Lock token: + * Call devm_token_lock() to lock or try lock a token. + * Unlock token: + * Call devm_token_unlock(). + * Destroy token: + * Call devm_token_destroy() to delete the token. + * +*/ +#include +#include + +struct token_devres { + struct mutexlock; + boolin_us
au0828 (950Q) kernel OOPS 3.10.30 imx6
Hello, I'm trying to use a Hauppage HVR-950Q ATSC tv stick with a Cubox-i running geexbox. It works great, until it doesn't. After its been up and running for a few hours (sometimes minutes), I start to get kernel OOPs, example pasted in below. The 950Q generally doesn't work afterwards. This is a 3.10.30 kernel, that I believe the Cubox is somewhat tied to for other driver reasons. I haven't seen any such problems if the HVR-950Q is unplugged. Any advice on tracking this down would be appreciated. Carl [ cut here ] WARNING: at mm/vmalloc.c:126 vmap_page_range_noflush+0×178/0x1c4() Modules linked in: au8522_dig tuner au8522_decoder au8522_common mxc_v4l2_capture au0828 ipu_bg_overlay_sdc snd_usb_audio ipu_still ipu_prp_enc snd_usbmidi_lib ipu_csi_enc tveeprom snd_rawmidi ipu_fg_overlay_sdc videobuf_vmalloc snd_hwdep brcmutil ir_lirc_codec lirc_dev ir_rc5_sz_decoder ir_sanyo_decoder ir_mce_kbd_decoder ir_sony_decoder ir_nec_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder uinput CPU: 0 PID: 700 Comm: xbmc.bin Not tainted 3.10.30 #1 [<8001444c>] (unwind_backtrace) from [<800114ac>] (show_stack+0×10/0×14) [<800114ac>] (show_stack) from [<80025fd0>] (warn_slowpath_common+0x4c/0x6c) [<80025fd0>] (warn_slowpath_common) from [<8002600c>] (warn_slowpath_null+0x1c/0×24) [<8002600c>] (warn_slowpath_null) from [<800af188>] (vmap_page_range_noflush+0×178/0x1c4) [<800af188>] (vmap_page_range_noflush) from [<800b0228>] (map_vm_area+0x2c/0x7c) [<800b0228>] (map_vm_area) from [<800b0dd0>] (__vmalloc_node_range+0xfc/0x1dc) [<800b0dd0>] (__vmalloc_node_range) from [<800b0eec>] (__vmalloc_node+0x3c/0×44) [<800b0eec>] (__vmalloc_node) from [<800b0f24>] (vmalloc+0×30/0×38) [<800b0f24>] (vmalloc) from [<80438778>] (gckOS_AllocateMemory+0×40/0×54) [<80438778>] (gckOS_AllocateMemory) from [<804387c0>] (gckOS_Allocate+0×34/0×44) [<804387c0>] (gckOS_Allocate) from [<8043d694>] (gckKERNEL_AllocateIntegerId+0xe4/0×160) [<8043d694>] (gckKERNEL_AllocateIntegerId) from [<8043d82c>] (gckKERNEL_AllocateNameFromPointer+0×18/0x2c) [<8043d82c>] (gckKERNEL_AllocateNameFromPointer) from [<8043e510>] (gckKERNEL_Dispatch+0xc84/0x12ac) [<8043e510>] (gckKERNEL_Dispatch) from [<8043753c>] (drv_ioctl+0×118/0×234) [<8043753c>] (drv_ioctl) from [<800cd33c>] (do_vfs_ioctl+0×80/0x5a0) [<800cd33c>] (do_vfs_ioctl) from [<800cd894>] (SyS_ioctl+0×38/0×60) [<800cd894>] (SyS_ioctl) from [<8000e080>] (ret_fast_syscall+0×0/0×30) —[ end trace 318ff254bf545f80 ]— vmalloc: allocation failure, allocated 479232 of 483328 bytes xbmc.bin: page allocation failure: order:0, mode:0xd2 CPU: 0 PID: 700 Comm: xbmc.bin Tainted: G W 3.10.30 #1 [<8001444c>] (unwind_backtrace) from [<800114ac>] (show_stack+0×10/0×14) [<800114ac>] (show_stack) from [<8008be94>] (warn_alloc_failed+0xd0/0×110) [<8008be94>] (warn_alloc_failed) from [<800b0e70>] (__vmalloc_node_range+0x19c/0x1dc) [<800b0e70>] (__vmalloc_node_range) from [<800b0eec>] (__vmalloc_node+0x3c/0×44) [<800b0eec>] (__vmalloc_node) from [<800b0f24>] (vmalloc+0×30/0×38) [<800b0f24>] (vmalloc) from [<80438778>] (gckOS_AllocateMemory+0×40/0×54) [<80438778>] (gckOS_AllocateMemory) from [<804387c0>] (gckOS_Allocate+0×34/0×44) [<804387c0>] (gckOS_Allocate) from [<8043d694>] (gckKERNEL_AllocateIntegerId+0xe4/0×160) [<8043d694>] (gckKERNEL_AllocateIntegerId) from [<8043d82c>] (gckKERNEL_AllocateNameFromPointer+0×18/0x2c) [<8043d82c>] (gckKERNEL_AllocateNameFromPointer) from [<8043e510>] (gckKERNEL_Dispatch+0xc84/0x12ac) [<8043e510>] (gckKERNEL_Dispatch) from [<8043753c>] (drv_ioctl+0×118/0×234) [<8043753c>] (drv_ioctl) from [<800cd33c>] (do_vfs_ioctl+0×80/0x5a0) [<800cd33c>] (do_vfs_ioctl) from [<800cd894>] (SyS_ioctl+0×38/0×60) [<800cd894>] (SyS_ioctl) from [<8000e080>] (ret_fast_syscall+0×0/0×30) Mem-info: DMA per-cpu: CPU 0: hi: 186, btch: 31 usd: 71 CPU 1: hi: 186, btch: 31 usd: 51 CPU 2: hi: 186, btch: 31 usd: 161 CPU 3: hi: 186, btch: 31 usd: 30 active_anon:32634 inactive_anon:458 isolated_anon:0 active_file:75360 inactive_file:275422 isolated_file:0 unevictable:33 dirty:2011 writeback:0 unstable:0 free:9091 slab_reclaimable:7864 slab_unreclaimable:6195 mapped:7616 shmem:635 pagetables:496 bounce:0 free_cma:7336 DMA free:36364kB min:4960kB low:6200kB high:7440kB active_anon:130536kB inactive_anon:1832kB active_file:301440kB inactive_file:1101688kB unevictable:132kB isolated(anon):0kB isolated(file):0kB present:1826816kB managed:1539272kB mlocked:132kB dirty:8044kB writeback:0kB mapped:30464kB shmem:2540kB slab_reclaimable:31456kB slab_unreclaimable:24780kB kernel_stack:1208kB pagetables:1984kB unstable:0kB bounce:0kB free_cma:29344kB writeback_tmp:0kB pages_scanned:3 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 1704*4kB (EMRC) 1160*8kB (UEMRC) 947*16kB (UMRC) 15*32kB (MR) 1*64kB (R) 1*128kB (R) 4*256kB (R) 5*512kB (R) 1*1024kB (R) 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 36528kB 351490 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete
Re: au0828 (950Q) kernel OOPS 3.10.30 imx6
On Tue, Apr 29, 2014 at 4:50 PM, Carl Michal wrote: > Hello, > > I'm trying to use a Hauppage HVR-950Q ATSC tv stick with a Cubox-i running > geexbox. > > It works great, until it doesn't. After its been up and running for a few > hours (sometimes minutes), I start to get kernel OOPs, example pasted in > below. The 950Q generally doesn't work afterwards. > > This is a 3.10.30 kernel, that I believe the Cubox is somewhat tied to for > other driver reasons. > > I haven't seen any such problems if the HVR-950Q is unplugged. > > Any advice on tracking this down would be appreciated. > > Carl > > > [ cut here ] > WARNING: at mm/vmalloc.c:126 vmap_page_range_noflush+0×178/0x1c4() > Modules linked in: au8522_dig tuner au8522_decoder au8522_common > mxc_v4l2_capture au0828 ipu_bg_overlay_sdc snd_usb_audio ipu_still > ipu_prp_enc snd_usbmidi_lib ipu_csi_enc tveeprom snd_rawmidi > ipu_fg_overlay_sdc videobuf_vmalloc snd_hwdep brcmutil ir_lirc_codec > lirc_dev ir_rc5_sz_decoder ir_sanyo_decoder ir_mce_kbd_decoder > ir_sony_decoder ir_nec_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder > uinput > CPU: 0 PID: 700 Comm: xbmc.bin Not tainted 3.10.30 #1 > [<8001444c>] (unwind_backtrace) from [<800114ac>] (show_stack+0×10/0×14) > [<800114ac>] (show_stack) from [<80025fd0>] > (warn_slowpath_common+0x4c/0x6c) > [<80025fd0>] (warn_slowpath_common) from [<8002600c>] > (warn_slowpath_null+0x1c/0×24) > [<8002600c>] (warn_slowpath_null) from [<800af188>] > (vmap_page_range_noflush+0×178/0x1c4) > [<800af188>] (vmap_page_range_noflush) from [<800b0228>] > (map_vm_area+0x2c/0x7c) > [<800b0228>] (map_vm_area) from [<800b0dd0>] > (__vmalloc_node_range+0xfc/0x1dc) > [<800b0dd0>] (__vmalloc_node_range) from [<800b0eec>] > (__vmalloc_node+0x3c/0×44) > [<800b0eec>] (__vmalloc_node) from [<800b0f24>] (vmalloc+0×30/0×38) > [<800b0f24>] (vmalloc) from [<80438778>] (gckOS_AllocateMemory+0×40/0×54) > [<80438778>] (gckOS_AllocateMemory) from [<804387c0>] This comes from the Vivante GPU driver, which is not in mainline. Please try a 3.14.2 or 3.15-rc3 kernel instead. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: au0828 (950Q) kernel OOPS 3.10.30 imx6
On Tue, 29 Apr 2014, Fabio Estevam wrote: On Tue, Apr 29, 2014 at 4:50 PM, Carl Michal wrote: Hello, I'm trying to use a Hauppage HVR-950Q ATSC tv stick with a Cubox-i running geexbox. It works great, until it doesn't. After its been up and running for a few hours (sometimes minutes), I start to get kernel OOPs, example pasted in below. The 950Q generally doesn't work afterwards. This is a 3.10.30 kernel, that I believe the Cubox is somewhat tied to for other driver reasons. I haven't seen any such problems if the HVR-950Q is unplugged. Any advice on tracking this down would be appreciated. Carl This comes from the Vivante GPU driver, which is not in mainline. Please try a 3.14.2 or 3.15-rc3 kernel instead. -- Some possibly stupid questions then: is there support for the gpu 3.14.2? I haven't been able to find sources that obviously have it? Thanks, Carl -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fwd: Bug#746404: dtv-scan-tables: /usr/share/dvb/dvb-t/fr-all file : invalid enum and no DVB-T services found
Hi Oliver, Please find Debian bug report from fredboboss regarding dtv-scan-tables below. Thanks, Jon On Tue, 29 Apr 2014 19:50:57 +0200, fredboboss wrote: > Package: dtv-scan-tables > Version: 0+git20140326.cfc2975-1 > Severity: normal > > Dear Maintainer, > > Dear Debian Maintainer, > > when performing a DVB-T frequency scan with the /usr/bin/scan utility > (dvb-apps package) and the /usr/share/dvb/dvb-t/fr-All frequency file > (dtv-scan-tables packages) the following 2 problems occur : > > 1) file parsing error : > ERROR: invalid enum value '8MHZ' > ERROR: invalid enum value '8K' > > 2) in the end no DVB-T services are found with a Hauppauge NOVA-TD-500 DVB-T > card. > > Those problems seem to come from the /usr/share/dvb/dvb-t/fr-All file. > > The following changes are proposed in this file : > > For 1) : > - 8MHZ changed by 8MHz > - 8K changed by 8k > > For 2) : > - change FEC_HI parameter by AUTO > > Thus the 1st frequency line of the file would be changed like that : > -T 47400 8MHZ 2/3 NONE QAM64 8K 1/32 NONE #Channel UHF 21 > +T 47400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 21 > > (Please refer to the end of the mail for the complete modified file). > > Thanks to those modifications I successfully performed a DVB-T scan with the > NOVA TD-500 card. > > In case more information is needed don't hesitate to contact me. > > Best regards, > Fred > > -- System Information: > Debian Release: jessie/sid > APT prefers testing-updates > APT policy: (500, 'testing-updates'), (500, 'testing') > Architecture: amd64 (x86_64) > > Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores) > Locale: LANG=C, LC_CTYPE=en_US.utf8 (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > > -- no debconf information > > Modified file : > # France ALL (All channel 21 to 60) > # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy > T 47400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 21 > T 48200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 22 > T 49000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 23 > T 49800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 24 > T 50600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 25 > T 51400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 26 > T 52200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 27 > T 53000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 28 > T 53800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 29 > T 54600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 30 > T 55400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 31 > T 56200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 32 > T 57000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 33 > T 57800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 34 > T 58600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 35 > T 59400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 36 > T 60200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 37 > T 61000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 38 > T 61800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 39 > T 62600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 40 > T 63400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 41 > T 64200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 42 > T 65000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 43 > T 65800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 44 > T 66600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 45 > T 67400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 46 > T 68200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 47 > T 69000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 48 > T 69800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 49 > T 70600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 50 > T 71400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 51 > T 72200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 52 > T 73000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 53 > T 73800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 54 > T 74600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 55 > T 75400 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 56 > T 76200 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 57 > T 77000 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 58 > T 77800 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 59 > T 78600 8MHz AUTO NONE QAM64 8k 1/32 NONE #Channel UHF 60 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Kernel 3.15-rc2 : Peak DVB-T USB tuner device ids for rtl28xxu driver
Thanks Mauro, I'll know for next time. It's my first patch submission so wasn't aware of the formatting rules. Brian On 29 April 2014 15:16, Mauro Carvalho Chehab wrote: > Em Mon, 28 Apr 2014 22:40:00 +0100 > Brian Healy escreveu: > >> From: Brian Healy >> To: Antti Palosaari , Mauro Carvalho Chehab >> >> Cc: Linus Torvalds , Linux Kernel Mailing >> List , Linux Media Mailing List >> >> Subject: Re: [PATCH] Kernel 3.15-rc2 : Peak DVB-T USB tuner device ids for >> rtl28xxu driver >> Date: Mon, 28 Apr 2014 22:40:00 +0100 >> Sender: linux-media-ow...@vger.kernel.org >> User-Agent: Mutt/1.5.21 (2010-09-15) >> >> On Sun, Apr 27, 2014 at 03:19:12PM -0700, Linus Torvalds wrote: >> >> Hi Linus, >> >> apologies, i've changed email clients in order to preserve the >> formatting this time around. The patch is now included inline as an >> attachment. I ran the script but noticed you've already cc'd the >> appropriate people. >> >> Brian. >> >> >> Resubmitting modified patch. It's purpose is to add the appropriate >> device/usb ids for the "Peak DVT-B usb dongle" to the rtl28xxu.c driver. >> >> Signed-off-by: Brian Healy gmail.com> >> >> >> > Brian, please use >> > >> > ./scripts/get_maintainer -f drivers/media/usb/dvb-usb-v2/rtl28xxu.c >> > >> > to get the proper people to send this to, so that it doesn't get lost >> > in the flood in lkml. >> > >> > The indentation of that new entry also seems to be suspect, in that it >> > doesn't match the ones around it. >> > >> > Quoting full email for context for people added. >> > >> > Linus >> > >> >> diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c >> b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c >> index 61d196e..b6e20cc 100644 >> --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c >> +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c >> @@ -1499,6 +1499,8 @@ static const struct usb_device_id rtl28xxu_id_table[] >> = { >> &rtl2832u_props, "Crypto ReDi PC 50 A", NULL) }, >> { DVB_USB_DEVICE(USB_VID_KYE, 0x707f, >> &rtl2832u_props, "Genius TVGo DVB-T03", NULL) }, >> +{ DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd395, >> +&rtl2832u_props, "Peak DVB-T USB", NULL) }, > > Patch is still a little odd, as you're using spaces for indenting, instead of > tabs, but I can fix it with my scripts. Next time, please use tabs. > > Also, specifically in the case of patches for linux-media, you don't need > to c/c me. Just send the patch to linux-media and to the driver maintainer > (Antti, in this case). > > My workflow is to pick the patches from patchwork: > https://patchwork.linuxtv.org/patch/23792/ > after receiving Antti's ack. > > Alternatively, Antti may opt to put it on his git tree, sending it to me > latter together of other patches he may have for the devices he maintains. > >> >> /* RTL2832P devices: */ >> { DVB_USB_DEVICE(USB_VID_HANFTEK, 0x0131, > > Thanks, > Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] sunxi: Add support for consumer infrared devices
Hi, Thanks for contributing this patch. It seems like you're missing a few mailing lists / maintainers though. You should use the get_maintainer.pl script, and Cc every maintainer and mailing lists in there. On Tue, Apr 29, 2014 at 02:51:31PM -0700, Александр Берсенев wrote: > This patch introduces Consumer IR(CIR) support for sunxi boards. > > This is based on Alexsey Shestacov's work based on the original driver > supplied by Allwinner. Your Signed-off-by should be here so that it stays in the commit log, and not discarded. Note that you can use git commit -s to make sure it's at the right place. > --- > > Changes since version 1: > - Fix timer memory leaks > - Fix race condition when driver unloads while interrupt handler is active > - Support Cubieboard 2(need testing) > > Changes since version 2: > - More reliable keydown events > - Documentation fixes > - Rename registers accurding to A20 user manual > - Remove some includes, order includes alphabetically > - Use BIT macro > - Typo fixes > > Signed-off-by: Alexander Bersenev > Signed-off-by: Alexsey Shestacov > > diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt > b/Documentation/devicetree/bindings/media/sunxi-ir.txt > new file mode 100644 > index 000..0d416f4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt > @@ -0,0 +1,21 @@ > +Device-Tree bindings for SUNXI IR controller found in sunXi SoC family > + > +Required properties: > + - compatible: Should be "allwinner,sunxi-ir". We prefer to use "allwinner,--", with the soc and family being the one where it was first introduced. If this controller is the same in A10 and A20, it should be "allwinner,sun4i-a10-ir", if it is a new controller in the A20, "allwinner,sun7i-a20-ir". > + - clocks: First clock should contain SoC gate for IR clock. > + Second should contain IR feed clock itself. Whenever there's several clocks, using clock-names is to be preferred. That way, you don't have to request any order, which is a lot less error prone. > + - interrupts: Should contain IR IRQ number. > + - reg: Should contain IO map address for IR. > + > +Optional properties: > + - linux,rc-map-name: Remote control map name. > + > +Example: > + > + ir0: ir@01c21800 { > +compatible = "allwinner,sunxi-ir"; > +clocks = <&apb0_gates 6>, <&ir0_clk>; > +interrupts = <0 5 1>; > +reg = <0x01C21800 0x40>; > +linux,rc-map-name = "rc-rc6-mce"; > + }; > diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > index feeff64..01b519c 100644 > --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > @@ -164,6 +164,13 @@ > reg = <1>; > }; > }; > + > + ir0: ir@01c21800 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ir0_pins_a>; > + gpios = <&pio 1 4 0>; You don't seem to be using that gpios property anywhere. Plus, your indentation seems completely wrong. Please run checkpatch.pl on your patches before running it, and make sure there's no errors or warning. > + status = "okay"; > + }; > }; > > leds { > diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > index e288562..683090f 100644 > --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > @@ -232,6 +232,13 @@ > reg = <1>; > }; > }; > + > + ir0: ir@01c21800 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ir0_pins_a>; > + gpios = <&pio 1 4 0>; Same here. > + status = "okay"; > + }; > }; > > leds { > diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi > b/arch/arm/boot/dts/sun7i-a20.dtsi > index 0ae2b77..4597731 100644 > --- a/arch/arm/boot/dts/sun7i-a20.dtsi > +++ b/arch/arm/boot/dts/sun7i-a20.dtsi > @@ -724,6 +724,19 @@ > allwinner,drive = <2>; > allwinner,pull = <0>; > }; > + > + ir0_pins_a: ir0@0 { > +allwinner,pins = "PB3","PB4"; > +allwinner,function = "ir0"; > +allwinner,drive = <0>; > +allwinner,pull = <0>; > + }; > + ir1_pins_a: ir1@0 { > +allwinner,pins = "PB22","PB23"; > +allwinner,function = "ir1"; > +allwinner,drive = <0>; > +allwinner,pull = <0>; > + }; > }; > > timer@01c20c00 { > @@ -937,5 +950,21 @@ > #interrupt-cells = <3>; > interrupts = <1 9 0xf04>; > }; > + > + ir0: ir@01c21800 { > + compatible = "allwinner,sunxi-ir"; > + clocks = <&apb0_gates 6>, <&ir0_clk>; > + interrupts = <0 5 4>; > + reg = <0x01C21800 0x40>; Please use lower-case for the address here. > + status = "disabled"; > + }; > + > + ir1: ir@01c21c00 { > + compatible = "allwinner,sunxi-ir"; > + clocks = <&apb0_gates 7>, <&ir1_clk>; > + interrupts = <0 6 4>; > + reg = <0x01C21c00 0x40>; ... or at least be consistent. > + status = "disabled"; > + }; > }; > }; > diff --git a/drivers/media/rc/Kconfig b/drivers/medi
DEAR FRIEND!
From: Mr. Mark Thompson Bank of Africa Burkina Faso. Dear Friend, I am the manager account/audit department (Annexe) Bank of African (BOA) in Burkina faso. I would like you to indicate your interest to receive this transfer of US$10.5 Million; as the beneficiary (next of kin) to our late client whom account is presently dormant and awaiting any claimer details shall be send to you with drafted application letter to apply. Please reply to this email address:(markthomp...@voila.fr) 1. Full name:. 2. Current Address:. 3. Telephone N°:... 4. Occupation:. 5. Copy of your identity... 6. Age: 7. Country: Yours truly Mr. Mark Thompson Tel: 00226 75 49 66 04 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] sunxi: Add support for consumer infrared devices
Em Tue, 29 Apr 2014 18:14:54 -0700 Maxime Ripard escreveu: > Hi, > > Thanks for contributing this patch. > > It seems like you're missing a few mailing lists / maintainers > though. You should use the get_maintainer.pl script, and Cc every > maintainer and mailing lists in there. > > On Tue, Apr 29, 2014 at 02:51:31PM -0700, Александр Берсенев wrote: > > This patch introduces Consumer IR(CIR) support for sunxi boards. > > > > This is based on Alexsey Shestacov's work based on the original driver > > supplied by Allwinner. > > Your Signed-off-by should be here so that it stays in the commit log, > and not discarded. > > Note that you can use git commit -s to make sure it's at the right > place. > > > --- > > > > Changes since version 1: > > - Fix timer memory leaks > > - Fix race condition when driver unloads while interrupt handler is active > > - Support Cubieboard 2(need testing) > > > > Changes since version 2: > > - More reliable keydown events > > - Documentation fixes > > - Rename registers accurding to A20 user manual > > - Remove some includes, order includes alphabetically > > - Use BIT macro > > - Typo fixes > > > > Signed-off-by: Alexander Bersenev > > Signed-off-by: Alexsey Shestacov > > > > diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt > > b/Documentation/devicetree/bindings/media/sunxi-ir.txt > > new file mode 100644 > > index 000..0d416f4 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt > > @@ -0,0 +1,21 @@ > > +Device-Tree bindings for SUNXI IR controller found in sunXi SoC family > > + > > +Required properties: > > + - compatible: Should be "allwinner,sunxi-ir". > > We prefer to use "allwinner,--", with the soc and > family being the one where it was first introduced. If this controller > is the same in A10 and A20, it should be "allwinner,sun4i-a10-ir", if > it is a new controller in the A20, "allwinner,sun7i-a20-ir". > > > + - clocks: First clock should contain SoC gate for IR clock. > > + Second should contain IR feed clock itself. > > Whenever there's several clocks, using clock-names is to be > preferred. That way, you don't have to request any order, which is a > lot less error prone. > > > + - interrupts: Should contain IR IRQ number. > > + - reg: Should contain IO map address for IR. > > + > > +Optional properties: > > + - linux,rc-map-name: Remote control map name. > > + > > +Example: > > + > > + ir0: ir@01c21800 { > > +compatible = "allwinner,sunxi-ir"; > > +clocks = <&apb0_gates 6>, <&ir0_clk>; > > +interrupts = <0 5 1>; > > +reg = <0x01C21800 0x40>; > > +linux,rc-map-name = "rc-rc6-mce"; > > + }; > > diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > > b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > > index feeff64..01b519c 100644 > > --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > > +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts > > @@ -164,6 +164,13 @@ > > reg = <1>; > > }; > > }; > > + > > + ir0: ir@01c21800 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&ir0_pins_a>; > > + gpios = <&pio 1 4 0>; > > You don't seem to be using that gpios property anywhere. > > Plus, your indentation seems completely wrong. Please run > checkpatch.pl on your patches before running it, and make sure there's > no errors or warning. > > > + status = "okay"; > > + }; > > }; > > > > leds { > > diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > > b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > > index e288562..683090f 100644 > > --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > > +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > > @@ -232,6 +232,13 @@ > > reg = <1>; > > }; > > }; > > + > > + ir0: ir@01c21800 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&ir0_pins_a>; > > + gpios = <&pio 1 4 0>; > > Same here. > > > + status = "okay"; > > + }; > > }; > > > > leds { > > diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi > > b/arch/arm/boot/dts/sun7i-a20.dtsi > > index 0ae2b77..4597731 100644 > > --- a/arch/arm/boot/dts/sun7i-a20.dtsi > > +++ b/arch/arm/boot/dts/sun7i-a20.dtsi > > @@ -724,6 +724,19 @@ > > allwinner,drive = <2>; > > allwinner,pull = <0>; > > }; > > + > > + ir0_pins_a: ir0@0 { > > +allwinner,pins = "PB3","PB4"; > > +allwinner,function = "ir0"; > > +allwinner,drive = <0>; > > +allwinner,pull = <0>; > > + }; > > + ir1_pins_a: ir1@0 { > > +allwinner,pins = "PB22","PB23"; > > +allwinner,function = "ir1"; > > +allwinner,drive = <0>; > > +allwinner,pull = <0>; > > + }; > > }; > > > > timer@01c20c00 { > > @@ -937,5 +950,21 @@ > > #interrupt-cells = <3>; > > interrupts = <1 9 0xf04>; > > }; > > + > > + ir0: ir@01c21800 { > > + compatible = "allwinner,sunxi-ir"; > > + clocks = <&apb0_gates 6>, <&ir0_clk>; > > + interrupts = <0 5 4>; > > + reg = <0x01C21800 0x40>; >
[PATCH] [media] v4l2-device: fix potential NULL pointer dereference for subdev unregister path
The pointer 'sd->v4l2_dev' is likely to be NULL and dereferenced in the subdev unregister path. The issue should happen if CONFIG_MEDIA_CONTROLLER is defined. This patch fixes the issue by setting the pointer to be NULL after it will not be derefereneced any more in the path. Cc: Mauro Carvalho Chehab Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Sakari Ailus Cc: Sylwester Nawrocki Cc: Hans Verkuil Cc: linux-media@vger.kernel.org Signed-off-by: Liu Ying --- drivers/media/v4l2-core/v4l2-device.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c index 02d1b63..d98d96f 100644 --- a/drivers/media/v4l2-core/v4l2-device.c +++ b/drivers/media/v4l2-core/v4l2-device.c @@ -271,7 +271,6 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd) if (sd->internal_ops && sd->internal_ops->unregistered) sd->internal_ops->unregistered(sd); - sd->v4l2_dev = NULL; #if defined(CONFIG_MEDIA_CONTROLLER) if (v4l2_dev->mdev) { @@ -279,6 +278,7 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd) media_device_unregister_entity(&sd->entity); } #endif + v4l2_dev = NULL; video_unregister_device(sd->devnode); module_put(sd->owner); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] [media] s5p-mfc: Core support to add v8 decoder
Hi Sachin, Thank you for the review. On 04/29/14 22:45, Sachin Kamat wrote: Hi Arun, On 23 April 2014 18:27, Arun Kumar K wrote: From: Kiran AVND This patch adds variant data and core support for V8 decoder. This patch also adds the register definition file for new firmware version v8 for MFC. Signed-off-by: Kiran AVND Signed-off-by: Pawel Osciak Signed-off-by: Arun Kumar K --- <...> + +/* Returned value register for specific setting */ +#define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V8 0xf674 +#define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V8 0xf678 +#define S5P_FIMV_D_MVC_VIEW_ID_V8 0xf6d8 + +/* SEI related information */ +#define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V8 0xf6dc + +/* MFCv8 Context buffer sizes */ +#define MFC_CTX_BUF_SIZE_V8(30 * SZ_1K)/* 30KB */ Please include header file for size macros. The file linux/sizes.h is included in regs-mfc-v6.h which inturn gets included in this file. Isnt that fine? <...> }; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 48a14b5..f0e63f5 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -23,8 +23,7 @@ #include #include #include "regs-mfc.h" -#include "regs-mfc-v6.h" -#include "regs-mfc-v7.h" +#include "regs-mfc-v8.h" /* Definitions related to MFC memory */ @@ -705,5 +704,6 @@ void set_work_bit_irqsave(struct s5p_mfc_ctx *ctx); #define IS_TWOPORT(dev)(dev->variant->port_num == 2 ? 1 : 0) #define IS_MFCV6_PLUS(dev) (dev->variant->version >= 0x60 ? 1 : 0) #define IS_MFCV7(dev) (dev->variant->version >= 0x70 ? 1 : 0) Is MFC v8 superset of MFC v7? Yes it is a superset. So the last patch in this series renames IS_MFCV7 to IS_MFCV7_PLUS. Regards Arun +#define IS_MFCV8(dev) (dev->variant->version >= 0x80 ? 1 : 0) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] [media] s5p-mfc: Core support to add v8 decoder
Hi Arun, On 30 April 2014 11:15, Arun Kumar K wrote: > Hi Sachin, > > Thank you for the review. > > > On 04/29/14 22:45, Sachin Kamat wrote: >> >> Hi Arun, >> >> On 23 April 2014 18:27, Arun Kumar K wrote: >>> >>> From: Kiran AVND >>> >>> This patch adds variant data and core support for >>> V8 decoder. This patch also adds the register definition >>> file for new firmware version v8 for MFC. >>> >>> Signed-off-by: Kiran AVND >>> Signed-off-by: Pawel Osciak >>> Signed-off-by: Arun Kumar K >>> --- >> >> <...> >>> >>> + >>> +/* Returned value register for specific setting */ >>> +#define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V8 0xf674 >>> +#define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V8 0xf678 >>> +#define S5P_FIMV_D_MVC_VIEW_ID_V8 0xf6d8 >>> + >>> +/* SEI related information */ >>> +#define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V8 0xf6dc >>> + >>> +/* MFCv8 Context buffer sizes */ >>> +#define MFC_CTX_BUF_SIZE_V8(30 * SZ_1K)/* 30KB */ >> >> >> Please include header file for size macros. >> > > The file linux/sizes.h is included in regs-mfc-v6.h which > inturn gets included in this file. Isnt that fine? Direct inclusions are encouraged. Please add it in this file. > > >> <...> >>> >>> }; >>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h >>> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h >>> index 48a14b5..f0e63f5 100644 >>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h >>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h >>> @@ -23,8 +23,7 @@ >>> #include >>> #include >>> #include "regs-mfc.h" >>> -#include "regs-mfc-v6.h" >>> -#include "regs-mfc-v7.h" >>> +#include "regs-mfc-v8.h" >>> >>> /* Definitions related to MFC memory */ >>> >>> @@ -705,5 +704,6 @@ void set_work_bit_irqsave(struct s5p_mfc_ctx *ctx); >>> #define IS_TWOPORT(dev)(dev->variant->port_num == 2 ? 1 >>> : 0) >>> #define IS_MFCV6_PLUS(dev) (dev->variant->version >= 0x60 ? 1 : 0) >>> #define IS_MFCV7(dev) (dev->variant->version >= 0x70 ? 1 : 0) >> >> >> Is MFC v8 superset of MFC v7? >> > > Yes it is a superset. > So the last patch in this series renames IS_MFCV7 to IS_MFCV7_PLUS. Shouldn't that be done first in that case? -- With warm regards, Sachin -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] [media] s5p-mfc: Core support to add v8 decoder
Hi Sachin, On Wed, Apr 30, 2014 at 11:19 AM, Sachin Kamat wrote: > Hi Arun, > > On 30 April 2014 11:15, Arun Kumar K wrote: >> Hi Sachin, >> >> Thank you for the review. >> >> >> On 04/29/14 22:45, Sachin Kamat wrote: >>> >>> Hi Arun, >>> >>> On 23 April 2014 18:27, Arun Kumar K wrote: From: Kiran AVND This patch adds variant data and core support for V8 decoder. This patch also adds the register definition file for new firmware version v8 for MFC. Signed-off-by: Kiran AVND Signed-off-by: Pawel Osciak Signed-off-by: Arun Kumar K --- >>> >>> <...> + +/* Returned value register for specific setting */ +#define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V8 0xf674 +#define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V8 0xf678 +#define S5P_FIMV_D_MVC_VIEW_ID_V8 0xf6d8 + +/* SEI related information */ +#define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V8 0xf6dc + +/* MFCv8 Context buffer sizes */ +#define MFC_CTX_BUF_SIZE_V8(30 * SZ_1K)/* 30KB */ >>> >>> >>> Please include header file for size macros. >>> >> >> The file linux/sizes.h is included in regs-mfc-v6.h which >> inturn gets included in this file. Isnt that fine? > > Direct inclusions are encouraged. Please add it in this file. > Ok will add it. >> >> >>> <...> }; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 48a14b5..f0e63f5 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -23,8 +23,7 @@ #include #include #include "regs-mfc.h" -#include "regs-mfc-v6.h" -#include "regs-mfc-v7.h" +#include "regs-mfc-v8.h" /* Definitions related to MFC memory */ @@ -705,5 +704,6 @@ void set_work_bit_irqsave(struct s5p_mfc_ctx *ctx); #define IS_TWOPORT(dev)(dev->variant->port_num == 2 ? 1 : 0) #define IS_MFCV6_PLUS(dev) (dev->variant->version >= 0x60 ? 1 : 0) #define IS_MFCV7(dev) (dev->variant->version >= 0x70 ? 1 : 0) >>> >>> >>> Is MFC v8 superset of MFC v7? >>> >> >> Yes it is a superset. >> So the last patch in this series renames IS_MFCV7 to IS_MFCV7_PLUS. > > Shouldn't that be done first in that case? > Adding variants to access MFC registers patch actually removes lot of such IS_MFCV7 checks from opr_v6.c file. Thats why I put that patch as the last in the series to have minimal changes as possible. Regards Arun -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2 1/3] phy: Add exynos-simple-phy driver
Hi Tomasz, I have tested your patches for exynos5250 and 5420. Works fine. Are you planning to post v3? If you want I can share hand with you for v3. Regards, Rahul Sharma On 9 April 2014 17:17, Andreas Oberritter wrote: > Hello Andrzej, > > On 09.04.2014 10:37, Andrzej Hajda wrote: >>> +static int exynos_phy_probe(struct platform_device *pdev) >>> +{ >>> +const struct of_device_id *of_id = of_match_device( >>> +of_match_ptr(exynos_phy_of_match), &pdev->dev); >>> +const u32 *offsets = of_id->data; >>> +int count; >>> +struct device *dev = &pdev->dev; >>> +struct phy **phys; >>> +struct resource *res; >>> +void __iomem *regs; >>> +int i; >>> +struct phy_provider *phy_provider; >>> + >>> +/* count number of phys to create */ >>> +for (count = 0; offsets[count] != ~0; ++count) >>> +; >> >> count = ARRAY_SIZE(offsets) - 1; > > u32 *offsets is not an array. > > Regards, > Andreas > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" > in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html