14 Apr, 2016
29 commits
-
All users of is_media_entity_v4l2_io() (the exynos4-is, omap3isp,
davince_vpfe and omap4iss drivers and the v4l2-mc power management code)
use the function to check whether entities are video_device instances,
either to ensure they can cast the entity to a struct video_device, or
to count the number of video nodes users.The purpose of the function is thus to identify whether the media entity
instance is an instance of the video_device object, not to check whether
it can perform I/O. Rename it accordingly, we will introduce a more
specific is_media_entity_v4l2_io() check when needed.Signed-off-by: Laurent Pinchart
Acked-by: Hans Verkuil
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
Code that processes media entities can require knowledge of the
structure type that embeds a particular media entity instance in order
to cast the entity to the proper object type. This needs is shown by the
presence of the is_media_entity_v4l2_io and is_media_entity_v4l2_subdev
functions.The implementation of those two functions relies on the entity function
field, which is both a wrong and an inefficient design, without even
mentioning the maintenance issue involved in updating the functions
every time a new entity function is added. Fix this by adding add an
obj_type field to the media entity structure to carry the information.Signed-off-by: Laurent Pinchart
Acked-by: Hans Verkuil
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
Simply document new compatibility string.
As a previous patch adds a generic R-Car Gen2 compatibility string
there appears to be no need for a driver updates.By documenting this compat string it may be used in DTSs shipped, for
example as part of ROMs. It must be used in conjunction with the Gen2
fallback compat string. At this time there are no known differences between
the r8a7792 IP block and that implemented by the driver for the Gen2
fallback compat string. Thus there is no need to update the driver as the
use of the Gen2 fallback compat string will activate the correct code in
the current driver while leaving the option for r8a7792-specific driver
code to be activated in an updated driver should the need arise.Signed-off-by: Simon Horman
Acked-by: Geert Uytterhoeven
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Add fallback compatibility string for R-Car Gen 1 and 2.
In the case of Renesas R-Car hardware we know that there are generations of
SoCs, e.g. Gen 2 and 3. But beyond that it's unclear what the relationship
between IP blocks might be. For example, I believe that r8a7790 is older
than r8a7791 but that doesn't imply that the latter is a descendant of the
former or vice versa.We can, however, by examining the documentation and behaviour of the
hardware at run-time observe that the current driver implementation appears
to be compatible with the IP blocks on SoCs within a given generation.For the above reasons and convenience when enabling new SoCs a
per-generation fallback compatibility string scheme being adopted for
drivers for Renesas SoCs.Signed-off-by: Yoshihiro Kaneko
Signed-off-by: Simon Horman
Acked-by: Geert Uytterhoeven
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
A dependency on ARCH_SHMOBILE seems to be the best option for
sh_mobile_ceu_camera:* For Super H based SoCs: sh_mobile_ceu is used on SH_AP325RXA, SH_ECOVEC,
SH_KFR2R09, SH_MIGOR, and SH_7724_SOLUTION_ENGINE which depend on
CPU_SUBTYPE_SH7722, CPU_SUBTYPE_SH7723, or CPU_SUBTYPE_SH7724 which all
select ARCH_SHMOBILE.* For ARM Based SoCs: Since the removal of legacy (non-multiplatform)
support this driver has not been used by any Renesas ARM based SoCs.
The Renesas ARM based SoCs currently select ARCH_SHMOBILE, however,
it is planned that this will no longer be the case.This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.Thanks to Geert Uytterhoeven for analysis and portions of the
change log text.Cc: Geert Uytterhoeven
Signed-off-by: Simon Horman
Acked-by: Geert Uytterhoeven
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.
This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.Signed-off-by: Simon Horman
Acked-by: Geert Uytterhoeven
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
An V4L2_CID_PRIVATE_SHARPNESS macro is defined in the au0828 driver, but
never used. Remove it.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Smatch complains that there are some paths where "status" isn't
initialized. The code does assume that m5mols_read_u8() can fail so it
seems as if Smatch is correct.Let's initialize it to REG_ISO_AUTO which is zero.
Signed-off-by: Dan Carpenter
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The "handled" variable could be uninitialized if the
interrupt_service_routine() call back hasn't been implimented or if it
has been implemented but doesn't initialize "handled" to zero at the
start. For example, adv76xx_isr() only sets "handled" to true.Fixes: 44b153ca639f ('[media] m5mols: Add ISO sensitivity controls')
Signed-off-by: Dan Carpenter
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
If we are doing V4L2_FIELD_NONE then "ret" is used uninitialized.
Fixes: 417d2e507edc ('[media] media: platform: add VPFE capture driver support for AM437X')
Signed-off-by: Dan Carpenter
Acked-by: Lad, Prabhakar
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
gcc-6 points out an obviously silly comparison in vpfe_get_app_input_index():
drivers/media/platform/am437x/am437x-vpfe.c: In function 'vpfe_get_app_input_index':
drivers/media/platform/am437x/am437x-vpfe.c:1709:27: warning: self-comparison always evaluats to true [-Wtautological-compare]
client->adapter->nr == client->adapter->nr) {
^~This was introduced in a slighly incorrect conversion, and it's
clear that the comparison was meant to compare the iterator
to the current subdev instead, as we do in the line above.Fixes: d37232390fd4 ("[media] media: am437x-vpfe: match the OF node/i2c addr instead of name")
Signed-off-by: Arnd Bergmann
Acked-by: Lad, Prabhakar
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The cobalt driver fails to link when it is built-in and MTD is disabled or a
loadable module:drivers/media/built-in.o: In function `cobalt_flash_probe':
:(.text+0xb8b46): undefined reference to `mtd_device_parse_register'
:(.text+0xb8b88): undefined reference to `do_map_probe'
drivers/media/built-in.o: In function `cobalt_flash_remove':
:(.text+0xb8bb4): undefined reference to `mtd_device_unregister'
:(.text+0xb8bbe): undefined reference to `map_destroy'This adds a Kconfig dependency to ensure we can call the API.
Signed-off-by: Arnd Bergmann
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
In v4l2-compliance utility, test VIDIOC_CREATE_BUFS will check whether reserved
filed of v4l2_create_buffers filled with zero
Reserved field is filled with zero in v4l_create_bufs.
This patch copy reserved field of v4l2_create_buffer from kernel space to user
spaceSigned-off-by: Tiffany Lin
Signed-off-by: Hans Verkuil
Cc: # for v3.19 and up
Signed-off-by: Mauro Carvalho Chehab -
On the particular case when the product id is 0x2101 we have requested
for a firmware but after processing it we missed releasing it.Signed-off-by: Sudip Mukherjee
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Instead of returning -1, return valid error codes.
Signed-off-by: Mauro Carvalho Chehab
-
When we returned on error we missed freeing p_current_fw and p_buffer.
Signed-off-by: Sudip Mukherjee
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Instead of a big if at the beginning, just check if g_selection == NULL
and call the cropcap op immediately and return the result.No functional changes in this patch.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This simplifies the querycap function.
Signed-off-by: Hans Verkuil
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
With the new core support for the caps the driver no longer needs
to set device_caps and capabilities in the querycap call.Signed-off-by: Hans Verkuil
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
Instead of letting drivers fill in device_caps at querycap time,
let them fill it in when the video device is registered.This has the advantage that in the future the v4l2 core can access
the video device's capabilities and take decisions based on that.Signed-off-by: Hans Verkuil
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
As reported by smatch:
drivers/media/platform/exynos-gsc/gsc-core.c:1073 gsc_probe() warn: impossible condition '(gsc->id < 0) => (0-65535 < 0)'
drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe':
drivers/media/platform/exynos-gsc/gsc-core.c:1073:51: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (gsc->id >= drv_data->num_entities || gsc->id < 0) {
^gsc->id is an u16, so it can never be a negative number. So,
remove the always false condition.Fixes: c1ac057173ba "[media] exynos-gsc: remove non-device-tree init code"
Cc: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
The mxr_layer_ops structures are never modified, so declare
them as const.Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
Exynos and Samsung S5P platforms has been fully converted to device
tree, so old platform device based init data can be now removed.Signed-off-by: Marek Szyprowski
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
Exynos and Samsung S5P platforms has been fully converted to device
tree, so old platform device based init data can be now removed.Signed-off-by: Marek Szyprowski
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
Exynos and Samsung S5P platforms has been fully converted to device
tree, so old platform device based init data can be now removed.Signed-off-by: Marek Szyprowski
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
Exynos platform has been fully converted to device tree,
so old platform device based init data can be now removed.Signed-off-by: Marek Szyprowski
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
Eliminate iommu fault during encoding by adjusting image size
used for buffer size computation and ensuring that the buffer
is not overrun.Signed-off-by: Andrzej Pietrasiewicz
Signed-off-by: Marek Szyprowski
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
The MIPI CSIS DT parse function return an -ENXIO errno if the port #
is outside of the supported values. But it doesn't call of_node_put()
to decrement the node's reference counter, that's incremented inside
the of_graph_get_next_endpoint() function that was called before.Instead of just returning, go to the error path that already does it.
Signed-off-by: Javier Martinez Canillas
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
In fimc_md_parse_port_node() remote port parent node is acquired with
of_graph_get_remote_port_parent() but it is not put on error path.Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab
06 Apr, 2016
4 commits
-
If au0828 gets removed, we need to remove the notifiers.
Signed-off-by: Mauro Carvalho Chehab
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Mauro Carvalho Chehab -
We should protect the device unregister patch too, at the error
condition.Signed-off-by: Max Kellermann
Signed-off-by: Mauro Carvalho Chehab -
The uAPI defines it with 64 bits. Let's change the Kernel
implementation too.Signed-off-by: Mauro Carvalho Chehab
-
The comment is for the wrong function. Fix it.
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Mauro Carvalho Chehab
05 Apr, 2016
7 commits
-
Pull media fixes from Mauro Carvalho Chehab:
"Some bug fixes on au0828 and snd-usb-audio:- the au0828+snd-usb-audio MC patch broke several things and produced
some race conditions. Better to revert the patches, and re-work on
them for a next version- fix a regression at tuner disable links logic
- properly handle dev_state as a bitmask"
* tag 'media/v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] Revert "[media] media: au0828 change to use Managed Media Controller API"
[media] Revert "[media] sound/usb: Use Media Controller API to share media resources"
[media] au0828: Fix dev_state handling
[media] au0828: fix au0828_v4l2_close() dev_state race condition
[media] media: au0828 fix to clear enable/disable/change source handlers
[media] v4l2-mc: cleanup a warning
[media] au0828: disable tuner links and cache tuner/decoder -
…/git/shuah/linux-kselftest
Pull kselftest fixes from Shuah Khan:
"This update for Kselftest contains seccomp fixes"* tag 'linux-kselftest-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftest/seccomp: Fix the seccomp(2) signature
selftest/seccomp: Fix the flag name SECCOMP_FILTER_FLAG_TSYNC -
Pull MIPS fixes from Ralf Baechle:
"This is the first round of MIPS fixes for 4.6:- Fix spelling mistakes all over arch/mips
- Provide __bswapsi2 so XZ kernel compression will build with older GCC
- ATH79 clock fixes.
- Fix clock-rated copy-paste erros in ATH79 DTS.
- Fix gisb-arb compatible string for 7435 BMIPS
- Enable NAND and UBIFS support in CI20.
- Fix BUG() assertion caused by inapropriate smp_processor_id() use.
- Fix exception handling issues for the sake of debuggers
- Fix the last remaining instance of irq_to_gpio in the db1xxx_ss PCMCIA code
- Fix MSA unaligned load failures
- Panic if kernel is configured for a not TLB-supported page size
- Bail out on unsupported relocs in modules.
- Partial fix for Qemu breakage after recent IPI rewrite
- Wire up the preadv2 and pwrite2 syscalls
- Fix the ar724x clock calculation"* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation
MIPS: BMIPS: Fix gisb-arb compatible string for 7435
MIPS: Bail on unsupported module relocs
MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name
MIPS: ath79: Fix the ar913x reference clock rate
MIPS: ath79: Fix the ar724x clock calculation
dt-bindings: clock: qca,ath79-pll: fix copy-paste typos
MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp'
FIRMWARE: Broadcom: Fix grammar of warning messages in bcm47xx_sprom.c.
MIPS: ci20: Enable NAND and UBIFS support in defconfig.
MIPS: Fix misspellings in comments.
MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE
MIPS: zboot: Remove copied source files on clean
MIPS: zboot: Fix the build with XZ compression on older GCC versions
MIPS: Wire up preadv2 and pwrite2 syscalls.
MIPS: cpu_name_string: Use raw_smp_processor_id().
pcmcia: db1xxx_ss: fix last irq_to_gpio user
MIPS: Fix MSA ld unaligned failure cases
MIPS: Fix broken malta qemu -
Pull xen fixes from David Vrabel:
"Regression and bug fixes for 4.6-rc2:- safely migrate event channels between CPUs
- fix CPU hotplug
- maintainer changes"* tag 'for-linus-4.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
MAINTAINERS: xen: Konrad to step down and Juergen to pick up
xen/events: Mask a moving irq
Xen on ARM and ARM64: update MAINTAINERS info
xen/x86: Call cpu_startup_entry(CPUHP_AP_ONLINE_IDLE) from xen_play_dead()
xen/apic: Provide Xen-specific version of cpu_present_to_apicid APIC op -
Pull quota fixes from Jan Kara:
"Fixes for oopses when the new quotactl gets used with quotas disabled"* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
ocfs2: Fix Q_GETNEXTQUOTA for filesystem without quotas
quota: Handle Q_GETNEXTQUOTA when quota is disabled -
Pull f2fs fixes from Jaegeuk Kim.
* tag 'f2fs-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
f2fs: retrieve IO write stat from the right place
f2fs crypto: fix corrupted symlink in encrypted case
f2fs: cover large section in sanity check of super -
In commit e45708976aea ("drm/dp-helper: Move the legacy helpers to
gma500") the legacy i2c helpers were moved to the only remaining user of
them, the gma500 driver. Together with that move, i2c_dp_aux_add_bus()
was marked deprecated and started warning about its remaining use.It's now been a year and a half of annoying warning, and apparently
nobody cares enough about gma500 to try to move it along to the more
modern models.Get rid of the warning - if even the gma500 people don't care enough,
then they should certainly not spam other innocent developers with a
warning that might hide other, much more real issues.Cc: Daniel Vetter
Cc: Alan Cox
Signed-off-by: Linus Torvalds