1. 06 4月, 2017 10 次提交
  2. 30 11月, 2016 9 次提交
  3. 17 11月, 2016 7 次提交
    • M
      [media] s5p-mfc: Fix clock management in s5p_mfc_release() function · c0026c7b
      Marek Szyprowski 提交于
      Clock control indirectly requires access to MFC device, so call it only
      if we are sure that the device exists in s5p_mfc_release function.
      s5p_mfc_remove() calls s5p_mfc_final_pm(), which releases all PM related
      resources, including clocks, so any call to clocks related functions
      is not valid after s5p_mfc_final_pm().
      
      Fixes: d695c12c ("[media] media: s5p-mfc fix invalid memory access from
      s5p_mfc_release()")
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      c0026c7b
    • M
      [media] s5p-mfc: Use clock gating only on MFC v5 hardware · c5086f13
      Marek Szyprowski 提交于
      Newer MFC hardware have internal clock gating feature, so additional
      software-triggered clock gating sometimes causes misbehavior of the MFC
      firmware and results in freeze or crash. This patch changes the driver
      to use software-triggered clock gating only when working with v5 MFC
      hardware, where it has been proven to work properly.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      c5086f13
    • D
      [media] s5p-mfc: Skip incomplete frame · 5d1ec731
      Donghwa Lee 提交于
      Currently, when incomplete frame is received in the middle of
      decoding, driver treats it as an error, so src/dst queue and
      clock are cleaned. Although it is obviously error case, it is
      needed to maintain video decoding in case of necessity. This
      patch supports skip incomplete frame to next.
      Signed-off-by: NDonghwa Lee <dh09.lee@samsung.com>
      Signed-off-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      5d1ec731
    • I
      [media] s5p-mfc: Fix MFC context buffer size · dd62b8f1
      Ingi Kim 提交于
      When video file was decoded by H/W MFCv8. It occurred IOMMU page fault
      because of accessing abnormal memory of mfc ctx buf.
      
      So this patch supports buffer size of mfc context more.
      Relevant page fault error is below.
      
      [ 3524.617147] PAGE FAULT occurred at 0x10108000 by 11200000.sysmmu(Page table base: 0x6d86c000)
      [ 3524.624192]  Lv1 entry: 0x6c27d001
      [ 3524.627567]   Lv2 entry: 0x0
      [ 3524.630482] ------------[ cut here ]------------
      [ 3524.635020] kernel BUG at drivers/iommu/exynos-iommu.c:358!
      [ 3524.640567] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      [ 3524.646373] Modules linked in:
      [ 3524.649410] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-00001-g0ff9b87-dirty #18
      [ 3524.657117] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [ 3524.663184] task: c0e4aff0 ti: c0e3c000 task.ti: c0e3c000
      [ 3524.668566] PC is at exynos_sysmmu_irq+0x1b8/0x2c4
      [ 3524.673330] LR is at vprintk_emit+0x2b8/0x58c
      [ 3524.677657] pc : [<c037cc78>]    lr : [<c00704a4>]    psr: 600d0193
      [ 3524.677657] sp : c0e3dd90  ip : 00000000  fp : c0e3ddcc
      [ 3524.689092] r10: ee29a110  r9 : 00000000  r8 : ee29a128
      [ 3524.694292] r7 : ed812810  r6 : 10108000  r5 : ed86c000  r4 : 00000000
      [ 3524.700791] r3 : c0ec9bd8  r2 : 00000000  r1 : 00000000  r0 : ed82ff00
      [ 3524.707292] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [ 3524.714656] Control: 10c5387d  Table: 6b08c06a  DAC: 00000015
      [ 3524.720375] Process swapper/0 (pid: 0, stack limit = 0xc0e3c210)
      [ 3524.726354] Stack: (0xc0e3dd90 to 0xc0e3e000)
      [ 3524.730689] dd80:                                     c0e3dd9c c0069d68 ee58c338 6d86c000
      [ 3524.738836] dda0: ee58c338 ee298c40 ee2915a0 0000003b c0e64ef4 c0e3c000 00000000 00000000
      [ 3524.746981] ddc0: c0e3de14 c0e3ddd0 c0071ef4 c037cacc ffffffff a00d0193 c0e3ddf4 ee291540
      [ 3524.755126] dde0: c0ec793c c0ec7928 7fffffff ee291540 ee2915a0 ee298c40 c0e64ef4 ee004660
      [ 3524.763272] de00: ee010800 c0e3df00 c0e3de34 c0e3de18 c0072138 c0071e9c 00020000 ee291540
      [ 3524.771418] de20: ee2915a0 00000016 c0e3de4c c0e3de38 c0075130 c00720f8 0000003b ee028300
      [ 3524.779563] de40: c0e3de64 c0e3de50 c0071450 c0075068 00000100 00000012 c0e3de8c c0e3de68
      [ 3524.787708] de60: c030d240 c0071420 c030d19c 00000016 00000000 00000016 00000000 00000001
      [ 3524.795854] de80: c0e3dea4 c0e3de90 c0071450 c030d1a8 00000092 c0e37a1c c0e3ded4 c0e3dea8
      [ 3524.804000] dea0: c0071790 c0071420 c0e3df00 f000200c 00000016 c0e440a8 c0e3df00 f0002000
      [ 3524.812145] dec0: c095bc8c 00000001 c0e3defc c0e3ded8 c0008730 c0071710 c0010d88 c0010d8c
      [ 3524.820290] dee0: 600d0013 ffffffff c0e3df34 c0ec7eb4 c0e3df54 c0e3df00 c0014780 c00086fc
      [ 3524.828436] df00: 00000001 00000000 00000000 c0020780 c0e3c000 c0e43530 00000000 00000000
      [ 3524.836581] df20: c0ec7eb4 c095bc8c 00000001 c0e3df54 c0e3df58 c0e3df48 c0010d88 c0010d8c
      [ 3524.844727] df40: 600d0013 ffffffff c0e3df94 c0e3df58 c0062690 c0010d50 c0ec75f0 00000001
      [ 3524.852872] df60: c0e3df84 c0e4353c c0e39580 c0e43e84 c0e3c000 00000002 c0e3df58 c0e38b88
      [ 3524.861018] df80: c0952b9c ffffffff c0e3dfac c0e3df98 c094d1b8 c00622d4 c0e3c000 c0e43e10
      [ 3524.869163] dfa0: c0e3dff4 c0e3dfb0 c0d86d30 c094d130 ffffffff ffffffff c0d866f0 00000000
      [ 3524.877309] dfc0: 00000000 c0df06d8 00000000 c0ee3f14 c0e434c0 c0df06d4 c0e4c20c 4000406a
      [ 3524.885454] dfe0: 410fc073 00000000 00000000 c0e3dff8 40008074 c0d86970 00000000 00000000
      [ 3524.893610] [<c037cc78>] (exynos_sysmmu_irq) from [<c0071ef4>] (handle_irq_event_percpu+0x64/0x25c)
      [ 3524.902615] [<c0071ef4>] (handle_irq_event_percpu) from [<c0072138>] (handle_irq_event+0x4c/0x6c)
      [ 3524.911454] [<c0072138>] (handle_irq_event) from [<c0075130>] (handle_level_irq+0xd4/0x14c)
      [ 3524.919773] [<c0075130>] (handle_level_irq) from [<c0071450>] (generic_handle_irq+0x3c/0x4c)
      [ 3524.928180] [<c0071450>] (generic_handle_irq) from [<c030d240>] (combiner_handle_cascade_irq+0xa4/0x110)
      [ 3524.937624] [<c030d240>] (combiner_handle_cascade_irq) from [<c0071450>] (generic_handle_irq+0x3c/0x4c)
      [ 3524.946981] [<c0071450>] (generic_handle_irq) from [<c0071790>] (__handle_domain_irq+0x8c/0xfc)
      [ 3524.955646] [<c0071790>] (__handle_domain_irq) from [<c0008730>] (gic_handle_irq+0x40/0x78)
      [ 3524.963966] [<c0008730>] (gic_handle_irq) from [<c0014780>] (__irq_svc+0x40/0x74)
      [ 3524.971412] Exception stack(0xc0e3df00 to 0xc0e3df48)
      [ 3524.976441] df00: 00000001 00000000 00000000 c0020780 c0e3c000 c0e43530 00000000 00000000
      [ 3524.984586] df20: c0ec7eb4 c095bc8c 00000001 c0e3df54 c0e3df58 c0e3df48 c0010d88 c0010d8c
      [ 3524.992729] df40: 600d0013 ffffffff
      [ 3524.996205] [<c0014780>] (__irq_svc) from [<c0010d8c>] (arch_cpu_idle+0x48/0x4c)
      [ 3525.003567] [<c0010d8c>] (arch_cpu_idle) from [<c0062690>] (cpu_startup_entry+0x3c8/0x4a4)
      [ 3525.011805] [<c0062690>] (cpu_startup_entry) from [<c094d1b8>] (rest_init+0x94/0x98)
      [ 3525.019516] [<c094d1b8>] (rest_init) from [<c0d86d30>] (start_kernel+0x3cc/0x3d8)
      [ 3525.026963] Code: e34c30ec e5932004 e3520000 ca000018 (e7f001f2)
      [ 3525.033028] ---[ end trace 71ed544f653b4d46 ]---
      Signed-off-by: NIngi Kim <ingi2.kim@samsung.com>
      Signed-off-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      dd62b8f1
    • A
      [media] s5p-mfc: Correct scratch buffer size of H.263 decoder · f662f1b7
      Andrzej Hajda 提交于
      Driver complains about too small scratch buffer size. After adjusting
      it according to vendor code, decoding works.
      
      [mszyprow: moved the change to the header file]
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      f662f1b7
    • S
      [media] s5p-mfc: include buffer size in error message · 43e6347f
      Shuah Khan 提交于
      Include buffer size in s5p_mfc_alloc_priv_buf() the error message
      when it fails to allocate the buffer.
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      43e6347f
    • S
      [media] s5p-mfc: Collapse two error message into one · 0f7a55b4
      Shuah Khan 提交于
      s5p_mfc_alloc_priv_buf() prints two message to report invalid memory
      configuration error. Collapse them into a single message.
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      0f7a55b4
  4. 21 10月, 2016 2 次提交
    • M
      [media] s5p-mfc: fix failure path of s5p_mfc_alloc_memdev() · 3467c9a7
      Marek Szyprowski 提交于
      s5p_mfc_alloc_memdev() function lacks proper releasing
      of allocated device in case of reserved memory initialization
      failure. This results in NULL pointer dereference:
      
      [    2.828457] Unable to handle kernel NULL pointer dereference at virtual address 00000001
      [    2.835089] pgd = c0004000
      [    2.837752] [00000001] *pgd=00000000
      [    2.844696] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      [    2.848680] Modules linked in:
      [    2.851722] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc6-00002-gafa1b97 #878
      [    2.859357] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [    2.865433] task: ef080000 task.stack: ef06c000
      [    2.869952] PC is at strcmp+0x0/0x30
      [    2.873508] LR is at platform_match+0x84/0xac
      [    2.877847] pc : [<c032621c>]    lr : [<c03f65e8>]    psr: 20000013
      [    2.877847] sp : ef06dea0  ip : 00000000  fp : 00000000
      [    2.889303] r10: 00000000  r9 : c0b34848  r8 : c0b1e968
      [    2.894511] r7 : 00000000  r6 : 00000001  r5 : c086e7fc  r4 : eeb8e010
      [    2.901021] r3 : 0000006d  r2 : 00000000  r1 : c086e7fc  r0 : 00000001
      [    2.907533] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      [    2.914649] Control: 10c5387d  Table: 4000404a  DAC: 00000051
      [    2.920378] Process swapper/0 (pid: 1, stack limit = 0xef06c210)
      [    2.926367] Stack: (0xef06dea0 to 0xef06e000)
      [    2.930711] dea0: eeb8e010 c0c2d91c c03f4a6c c03f4a8c 00000000 c0c2d91c c03f4a6c c03f2fc8
      [    2.938870] dec0: ef003274 ef10c4c0 c0c2d91c ef10cc80 c0c21270 c03f3fa4 c09c1be8 c0c2d91c
      [    2.947028] dee0: 00000006 c0c2d91c 00000006 c0b3483c c0c47000 c03f5314 c0c2d908 c0b5fed8
      [    2.955188] df00: 00000006 c010178c 60000013 c0a4ef14 00000000 c06feaa0 ef080000 60000013
      [    2.963347] df20: 00000000 c0c095c8 efffca76 c0816b8c 000000d5 c0134098 c0b34848 c09d6cdc
      [    2.971506] df40: c0a4de70 00000000 00000006 00000006 c0c09568 efffca40 c0b5fed8 00000006
      [    2.979665] df60: c0b3483c c0c47000 000000d5 c0b34848 c0b005a4 c0b00d84 00000006 00000006
      [    2.987824] df80: 00000000 c0b005a4 00000000 c06fb4d8 00000000 00000000 00000000 00000000
      [    2.995983] dfa0: 00000000 c06fb4e0 00000000 c01079b8 00000000 00000000 00000000 00000000
      [    3.004142] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    3.012302] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff
      [    3.020469] [<c032621c>] (strcmp) from [<c03f65e8>] (platform_match+0x84/0xac)
      [    3.027672] [<c03f65e8>] (platform_match) from [<c03f4a8c>] (__driver_attach+0x20/0xb0)
      [    3.035654] [<c03f4a8c>] (__driver_attach) from [<c03f2fc8>] (bus_for_each_dev+0x54/0x88)
      [    3.043812] [<c03f2fc8>] (bus_for_each_dev) from [<c03f3fa4>] (bus_add_driver+0xe8/0x1f4)
      [    3.051971] [<c03f3fa4>] (bus_add_driver) from [<c03f5314>] (driver_register+0x78/0xf4)
      [    3.059958] [<c03f5314>] (driver_register) from [<c010178c>] (do_one_initcall+0x3c/0x16c)
      [    3.068123] [<c010178c>] (do_one_initcall) from [<c0b00d84>] (kernel_init_freeable+0x120/0x1ec)
      [    3.076802] [<c0b00d84>] (kernel_init_freeable) from [<c06fb4e0>] (kernel_init+0x8/0x118)
      [    3.084958] [<c06fb4e0>] (kernel_init) from [<c01079b8>] (ret_from_fork+0x14/0x3c)
      [    3.092506] Code: 1afffffb e12fff1e e1a03000 eafffff7 (e4d03001)
      [    3.098618] ---[ end trace 511bf9d750810709 ]---
      [    3.103207] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      
      This patch fixes this issue.
      
      Fixes: c79667dd ("media: s5p-mfc: replace custom
      	reserved memory handling code with generic one")
      
      CC: stable@vger.kernel.org  # v4.7+
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      3467c9a7
    • M
      [media] s5p-mfc: don't break long lines · c12a5cc6
      Mauro Carvalho Chehab 提交于
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      c12a5cc6
  5. 25 8月, 2016 7 次提交
  6. 09 7月, 2016 5 次提交