1. 02 10月, 2019 25 次提交
  2. 01 10月, 2019 15 次提交
    • B
      media: am437x-vpfe: Fix missing first line · 47c7bcfd
      Benoit Parrot 提交于
      Previous generation of this driver were hard coded to handle
      encoder/decoder where the first line never contains any data and
      was therefore always skipped, however when dealing with actual
      camera sensors the first line is always present.
      Signed-off-by: NBenoit Parrot <bparrot@ti.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Acked-by: NLad Prabhakar <prabhakar.csengg@gmail.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      47c7bcfd
    • D
      media: am437x-vpfe: Fix suspend path to always handle pinctrl config · b0e41bf2
      Dave Gerlach 提交于
      Currently if vpfe is not active then it returns immediately in the
      suspend and resume handlers. Change this so that it always performs the
      pinctrl config so that we can still get proper sleep state configuration
      on the pins even if we do not need to worry about fully saving and
      restoring context.
      Signed-off-by: NDave Gerlach <d-gerlach@ti.com>
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      Signed-off-by: NBenoit Parrot <bparrot@ti.com>
      Acked-by: NLad Prabhakar <prabhakar.csengg@gmail.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      b0e41bf2
    • S
      media: MAINTAINERS: Add reviewer to vimc driver · 2c4414ce
      Shuah Khan 提交于
      After practically re-writing the driver to collpase it into a monolith,
      I am adding myself as a reviewer for vimc driver.
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Acked-by: NHelen Koike <helen.koike@collabora.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      2c4414ce
    • S
      media: doc: media: vimc: Update module parameter usage information · 78364ccf
      Shuah Khan 提交于
      vimc driver is now a monolithic driver. Update the module parameter
      usage information to reflect that.
      
      [m.chehab+samsung@kernel.org: fix two warnings due to wrontly added spaces]
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Acked-by: NHelen Koike <helen.koike@collabora.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      78364ccf
    • S
      media: vimc: move duplicated IS_SRC and IS_SINK to common header · 3a9e69f1
      Shuah Khan 提交于
      Move duplicated IS_SRC and IS_SINK dfines to common header. Rename
      them to VIMC_IS_SRC and VIM_IS_SINK.
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Acked-by: NHelen Koike <helen.koike@collabora.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      3a9e69f1
    • S
      media: vimc: Fix gpf in rmmod path when stream is active · d7fb5c36
      Shuah Khan 提交于
      If vimc module is removed while streaming is in progress, sensor subdev
      unregister runs into general protection fault when it tries to unregister
      media entities. This is a common subdev problem related to releasing
      pads from v4l2_device_unregister_subdev() before calling unregister.
      Unregister references pads during unregistering subdev.
      
      The sd release handler is the right place for releasing all sd resources
      including pads. The release handlers currently release all resources
      except the pads.
      
      Fix v4l2_device_unregister_subdev() not release pads and release pads
      from the sd_int_op release handlers.
      
      kernel: [ 4136.715839] general protection fault: 0000 [#1] SMP PTI
      kernel: [ 4136.715847] CPU: 2 PID: 1972 Comm: bash Not tainted 5.3.0-rc2+ #4
      kernel: [ 4136.715850] Hardware name: Dell Inc. OptiPlex 790/0HY9JP, BIOS A18 09/24/2013
      kernel: [ 4136.715858] RIP: 0010:media_gobj_destroy.part.16+0x1f/0x60
      kernel: [ 4136.715863] Code: ff 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 fe 48 89 e5 53 48 89 fb 48 c7 c7 00 7f cf b0 e8 24 fa ff ff 48 8b 03 <48> 83 80 a0 00 00 00 01 48 8b 43 18 48 8b 53 10 48 89 42 08 48 89
      kernel: [ 4136.715866] RSP: 0018:ffff9b2248fe3cb0 EFLAGS: 00010246
      kernel: [ 4136.715870] RAX: bcf2bfbfa0d63c2f RBX: ffff88c3eb37e9c0 RCX: 00000000802a0018
      kernel: [ 4136.715873] RDX: ffff88c3e4f6a078 RSI: ffff88c3eb37e9c0 RDI: ffffffffb0cf7f00
      kernel: [ 4136.715876] RBP: ffff9b2248fe3cb8 R08: 0000000001000002 R09: ffffffffb0492b00
      kernel: [ 4136.715879] R10: ffff9b2248fe3c28 R11: 0000000000000001 R12: 0000000000000038
      kernel: [ 4136.715881] R13: ffffffffc09a1628 R14: ffff88c3e4f6a028 R15: fffffffffffffff2
      kernel: [ 4136.715885] FS:  00007f8389647740(0000) GS:ffff88c465500000(0000) knlGS:0000000000000000
      kernel: [ 4136.715888] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      kernel: [ 4136.715891] CR2: 000055d008f80fd8 CR3: 00000001996ec005 CR4: 00000000000606e0
      kernel: [ 4136.715894] Call Trace:
      kernel: [ 4136.715903]  media_gobj_destroy+0x14/0x20
      kernel: [ 4136.715908]  __media_device_unregister_entity+0xb3/0xe0
      kernel: [ 4136.715915]  media_device_unregister_entity+0x30/0x40
      kernel: [ 4136.715920]  v4l2_device_unregister_subdev+0xa8/0xe0
      kernel: [ 4136.715928]  vimc_ent_sd_unregister+0x1e/0x30 [vimc]
      kernel: [ 4136.715933]  vimc_sen_rm+0x16/0x20 [vimc]
      kernel: [ 4136.715938]  vimc_remove+0x3e/0xa0 [vimc]
      kernel: [ 4136.715945]  platform_drv_remove+0x25/0x50
      kernel: [ 4136.715951]  device_release_driver_internal+0xe0/0x1b0
      kernel: [ 4136.715956]  device_driver_detach+0x14/0x20
      kernel: [ 4136.715960]  unbind_store+0xd1/0x130
      kernel: [ 4136.715965]  drv_attr_store+0x27/0x40
      kernel: [ 4136.715971]  sysfs_kf_write+0x48/0x60
      kernel: [ 4136.715976]  kernfs_fop_write+0x128/0x1b0
      kernel: [ 4136.715982]  __vfs_write+0x1b/0x40
      kernel: [ 4136.715987]  vfs_write+0xc3/0x1d0
      kernel: [ 4136.715993]  ksys_write+0xaa/0xe0
      kernel: [ 4136.715999]  __x64_sys_write+0x1a/0x20
      kernel: [ 4136.716005]  do_syscall_64+0x5a/0x130
      kernel: [ 4136.716010]  entry_SYSCALL_64_after_hwframe+0x4
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Acked-by: NHelen Koike <helen.koike@collabora.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      d7fb5c36
    • S
      media: vimc: Collapse component structure into a single monolithic driver · f13d5f36
      Shuah Khan 提交于
      vimc uses Component API to split the driver into functional components.
      The real hardware resembles a monolith structure than component and
      component structure added a level of complexity making it hard to
      maintain without adding any real benefit.
      
      The sensor is one vimc component that would makes sense to be a separate
      module to closely align with the real hardware. It would be easier to
      collapse vimc into single monolithic driver first and then split the
      sensor off as a separate module.
      
      Collapse it into a single monolithic driver removing the Component API.
      This patch removes the component API and makes minimal changes to the
      code base preserving the functional division of the code structure.
      Preserving the functional structure allows us to split the sensor off
      as a separate module in the future.
      
      Major design elements in this change are:
      - Use existing struct vimc_ent_config and struct vimc_pipeline_config
        to drive the initialization of the functional components.
      - Make vimc_device and vimc_ent_config global by moving them to
        vimc-common.h
      - Add two new hooks add and rm to initialize and register, unregister
        and free subdevs.
      - All component API is now gone and bind and unbind hooks are modified
        to do "add" and "rm" with minimal changes to just add and rm subdevs.
      - vimc-core's bind and unbind are now register and unregister.
      - Add a new field to vimc_device structure for saving the pointers to
        struct vimc_ent_device(s) subdevs create in their "add" hooks. These
        get used to create links and removing the subdevs. vimc-core allocates
        this array which sized to number of entries in the topology defined in
        the vimc_pipeline_config structure.
      - vimc-core invokes "add" hooks from its vimc_register_devices().
        The "add" hooks remain the same and register subdevs. They don't
        create platform devices of their own and use vimc's pdev.dev as
        their reference device. Each "add" hook returns pointer to its struct
        vimc_ent_device. This is saved in the vimc_device ent_devs array.
      - vimc-core invokes "rm" hooks from its unregister to unregister subdevs
        and cleanup.
      - vimc-core invokes "add" and "rm" hooks with pointer to struct vimc_device
        and the corresponding vimc_ent_device saved in the ent_devs.
      
      The following configure and stream test works on all devices.
      
      media-ctl -d platform:vimc -V '"Sensor A":0[fmt:SBGGR8_1X8/640x480]'
      media-ctl -d platform:vimc -V '"Debayer A":0[fmt:SBGGR8_1X8/640x480]'
      media-ctl -d platform:vimc -V '"Sensor B":0[fmt:SBGGR8_1X8/640x480]'
      media-ctl -d platform:vimc -V '"Debayer B":0[fmt:SBGGR8_1X8/640x480]'
      
      v4l2-ctl -z platform:vimc -d "RGB/YUV Capture" -v width=1920,height=1440
      v4l2-ctl -z platform:vimc -d "Raw Capture 0" -v pixelformat=BA81
      v4l2-ctl -z platform:vimc -d "Raw Capture 1" -v pixelformat=BA81
      
      v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video1
      v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video2
      v4l2-ctl --stream-mmap --stream-count=100 -d /dev/video3
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Acked-by: NHelen Koike <helen.koike@collabora.com>
      Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      f13d5f36
    • Z
      media: mc-device.c: fix memleak in media_device_register_entity · 713f871b
      zhengbin 提交于
      In media_device_register_entity, if media_graph_walk_init fails,
      need to free the previously memory.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      713f871b
    • C
      media: i2c: mt9m001: make array init_regs static, makes object smaller · 36909b55
      Colin Ian King 提交于
      Don't populate the array init_regs on the stack but instead make it
      static. Makes the object code smaller by 57 bytes.
      
      Before:
         text	   data	    bss	    dec	    hex	filename
        15935	   3600	    128	  19663	   4ccf	drivers/media/i2c/mt9m001.o
      
      After:
         text	   data	    bss	    dec	    hex	filename
        15782	   3696	    128	  19606	   4c96	drivers/media/i2c/mt9m001.o
      
      (gcc version 9.2.1, amd64)
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      36909b55
    • L
      Linux 5.4-rc1 · 54ecb8f7
      Linus Torvalds 提交于
      54ecb8f7
    • L
      Merge tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bb48a591
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "A bunch of fixes that accumulated in recent weeks, mostly material for
        stable.
      
        Summary:
      
         - fix for regression from 5.3 that prevents to use balance convert
           with single profile
      
         - qgroup fixes: rescan race, accounting leak with multiple writers,
           potential leak after io failure recovery
      
         - fix for use after free in relocation (reported by KASAN)
      
         - other error handling fixups"
      
      * tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: qgroup: Fix reserved data space leak if we have multiple reserve calls
        btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
        btrfs: Fix a regression which we can't convert to SINGLE profile
        btrfs: relocation: fix use-after-free on dead relocation roots
        Btrfs: fix race setting up and completing qgroup rescan workers
        Btrfs: fix missing error return if writeback for extent buffer never started
        btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer
        Btrfs: fix selftests failure due to uninitialized i_mode in test inodes
      bb48a591
    • L
      Merge tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux · 80b29b6b
      Linus Torvalds 提交于
      Pull csky updates from Guo Ren:
       "This round of csky subsystem just some fixups:
      
         - Fix mb() synchronization problem
      
         - Fix dma_alloc_coherent with PAGE_SO attribute
      
         - Fix cache_op failed when cross memory ZONEs
      
         - Optimize arch_sync_dma_for_cpu/device with dma_inv_range
      
         - Fix ioremap function losing
      
         - Fix arch_get_unmapped_area() implementation
      
         - Fix defer cache flush for 610
      
         - Support kernel non-aligned access
      
         - Fix 610 vipt cache flush mechanism
      
         - Fix add zero_fp fixup perf backtrace panic
      
         - Move static keyword to the front of declaration
      
         - Fix csky_pmu.max_period assignment
      
         - Use generic free_initrd_mem()
      
         - entry: Remove unneeded need_resched() loop"
      
      * tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux:
        csky: Move static keyword to the front of declaration
        csky: entry: Remove unneeded need_resched() loop
        csky: Fixup csky_pmu.max_period assignment
        csky: Fixup add zero_fp fixup perf backtrace panic
        csky: Use generic free_initrd_mem()
        csky: Fixup 610 vipt cache flush mechanism
        csky: Support kernel non-aligned access
        csky: Fixup defer cache flush for 610
        csky: Fixup arch_get_unmapped_area() implementation
        csky: Fixup ioremap function losing
        csky: Optimize arch_sync_dma_for_cpu/device with dma_inv_range
        csky/dma: Fixup cache_op failed when cross memory ZONEs
        csky: Fixup dma_alloc_coherent with PAGE_SO attribute
        csky: Fixup mb() synchronization problem
      80b29b6b
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · cef0aa0c
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A few fixes that have trickled in through the merge window:
      
         - Video fixes for OMAP due to panel-dpi driver removal
      
         - Clock fixes for OMAP that broke no-idle quirks + nfsroot on DRA7
      
         - Fixing arch version on ASpeed ast2500
      
         - Two fixes for reset handling on ARM SCMI"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: aspeed: ast2500 is ARMv6K
        reset: reset-scmi: add missing handle initialisation
        firmware: arm_scmi: reset: fix reset_state assignment in scmi_domain_reset
        bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
        ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
        ARM: dts: am3517-evm: Fix missing video
        ARM: dts: logicpd-torpedo-baseboard: Fix missing video
        ARM: omap2plus_defconfig: Fix missing video
        bus: ti-sysc: Fix handling of invalid clocks
        bus: ti-sysc: Fix clock handling for no-idle quirks
      cef0aa0c
    • L
      Merge tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · cf4f493b
      Linus Torvalds 提交于
      Pull tracing fixes from Steven Rostedt:
       "A few more tracing fixes:
      
         - Fix a buffer overflow by checking nr_args correctly in probes
      
         - Fix a warning that is reported by clang
      
         - Fix a possible memory leak in error path of filter processing
      
         - Fix the selftest that checks for failures, but wasn't failing
      
         - Minor clean up on call site output of a memory trace event"
      
      * tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        selftests/ftrace: Fix same probe error test
        mm, tracing: Print symbol name for call_site in trace events
        tracing: Have error path in predicate_parse() free its allocated memory
        tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro
        tracing/probe: Fix to check the difference of nr_args before adding probe
      cf4f493b
    • L
      Merge tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · c710364f
      Linus Torvalds 提交于
      Pull more MMC updates from Ulf Hansson:
       "A couple more updates/fixes for MMC:
      
         - sdhci-pci: Add Genesys Logic GL975x support
      
         - sdhci-tegra: Recover loss in throughput for DMA
      
         - sdhci-of-esdhc: Fix DMA bug"
      
      * tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: host: sdhci-pci: Add Genesys Logic GL975x support
        mmc: tegra: Implement ->set_dma_mask()
        mmc: sdhci: Let drivers define their DMA mask
        mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence
        mmc: sdhci: improve ADMA error reporting
      c710364f