summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/sti
Commit message (Collapse)AuthorAgeFilesLines
* [media] stih-cec/vivid/pulse8/rainshadow: use cec_transmit_attempt_doneHans Verkuil2017-06-201-5/+4Star
| | | | | | | | | Use the helper function cec_transmit_attempt_done instead of cec_transmit_done to simplify the code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cec: stih: fix typos in commentsBenjamin Gaignard2017-06-061-2/+3
| | | | | | | | Minor fixes in comments Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cec: stih: allow to use max CEC logical addressesBenjamin Gaignard2017-06-061-1/+1
| | | | | | | | | | | | Hardware could support up to 16 logical addresses which is more than needed by CEC specifications. Let use CEC_MAX_LOG_ADDRS instead of limited it on one. stih_cec_adap_log_addr() function was alredy written to support multiple addresses requests. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] c8sectpfe: use setup_timerGeliang Tang2017-04-101-3/+2Star
| | | | | | | | Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] stih-cec: add CEC notifier supportBenjamin Gaignard2017-04-102-0/+405
| | | | | | | | | | | By using the CEC notifier framework there is no longer any reason to manually set the physical address. This was the one blocking issue that prevented this driver from going out of staging, so do this move as well. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: mjpeg: fix static checker warningHugues Fruchet2017-04-051-1/+1
| | | | | | | | | | | | | Initialize 'data_offset' local variable to 0. drivers/media/platform/sti/delta/delta-mjpeg-dec.c:415 delta_mjpeg_decode() error: uninitialized symbol 'data_offset'. Fixes: 433ff5b4a29b: "[media] st-delta: add mjpeg support" Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bdisp: Clean up file handle in open() error pathShailendra Verma2017-03-031-1/+1
| | | | | | | | | | The File handle is not yet added in the vdev list.So no need to call v4l2_fh_del(&ctx->fh)if it fails to create control. Signed-off-by: Shailendra Verma <shailendra.v@samsung.com> Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: debug: trace stream/frame information & summaryHugues Fruchet2017-02-084-5/+117
| | | | | | | | | | | | | | Adds some trace points showing input compressed stream or output decoded frame information. Adds an unconditional trace point when streaming starts showing the compressed stream and the decoded frame information. Adds an unconditional trace point at instance closure summarizing into a single line the decoding process (stream information, decoded and output frames number, potential errors observed). Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: add mjpeg supportHugues Fruchet2017-02-087-0/+874
| | | | | | | | | | Adds support of DELTA MJPEG video decoder back-end, implemented by calling JPEG_DECODER_HW0 firmware using RPMSG IPC communication layer. Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: EOS (End Of Stream) supportHugues Fruchet2017-02-082-1/+168
| | | | | | | | | | | | | | | | | | | EOS (End Of Stream) support allows user to get all the potential decoded frames remaining in decoder pipeline after having reached the end of video bitstream. To do so, user calls VIDIOC_DECODER_CMD(V4L2_DEC_CMD_STOP) which will drain the decoder and get the drained frames that are then returned to user. User is informed of EOS completion in two ways: - dequeue of an empty frame flagged to V4L2_BUF_FLAG_LAST - reception of a V4L2_EVENT_EOS event. If, unfortunately, no buffer is available on CAPTURE queue to return the empty frame, EOS is delayed till user queue one CAPTURE buffer. Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: rpmsg ipc supportHugues Fruchet2017-02-085-1/+703
| | | | | | | | | | | | | | | | | | | | | | | | | IPC (Inter Process Communication) support for communication with DELTA coprocessor firmware using rpmsg kernel framework. Based on 4 services open/set_stream/decode/close and their associated rpmsg messages. The messages structures are duplicated on both host and firmware side and are packed (use only of 32 bits size fields in messages structures to ensure packing). Each service is synchronous; service returns only when firmware acknowledges the associated command message. Due to significant parameters size exchanged from host to copro, parameters are not inserted in rpmsg messages. Instead, parameters are stored in physical memory shared between host and coprocessor. Memory is non-cacheable, so no special operation is required to ensure memory coherency on host and on coprocessor side. Multi-instance support and re-entrance are ensured using host_hdl and copro_hdl in message header exchanged between both host and coprocessor. This avoids to manage tables on both sides to get back the running context of each instance. Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: add memory allocator helper functionsHugues Fruchet2017-02-084-1/+74
| | | | | | | | | | Helper functions used by decoder back-ends to allocate physically contiguous memory required by hardware video decoder. Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-delta: STiH4xx multi-format video decoder v4l2 driverHugues Fruchet2017-02-084-0/+2390
| | | | | | | | | This V4L2 driver enables DELTA multi-format video decoder of STMicroelectronics STiH4xx SoC series. Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: platform: sti: return -ENOMEM on errorsPan Bian2017-02-031-1/+1
| | | | | | | | | | | Function bdisp_debugfs_create() returns 0 even on errors. So its caller cannot detect the errors. It may be better to return "-ENOMEM" on the exception paths. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188801 Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: hva_dbg_summary() should be staticMauro Carvalho Chehab2017-01-311-1/+1
| | | | | | | | | | | | As reported by gcc: drivers/media/platform/sti/hva/hva-v4l2.c:227:6: warning: no previous prototype for 'hva_dbg_summary' [-Wmissing-prototypes] void hva_dbg_summary(struct hva_ctx *ctx) ^~~~~~~~~~~~~~~ This function is used only internally, so make it static. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: add debug file systemJean-Christophe Trotin2017-01-316-3/+583
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates 4 static debugfs entries to dump: - the device-related information ("st-hva/device") - the list of registered encoders ("st-hva/encoders") - the current values of the hva registers ("st-hva/regs") - the information about the last closed instance ("st-hva/last") It also creates dynamically a debugfs entry for each opened instance, ("st-hva/<instance identifier>") to dump: - the information about the frame (format, resolution) - the information about the stream (format, profile, level, resolution) - the control parameters (bitrate mode, framerate, GOP size...) - the potential (system, encoding...) errors - the performance information about the encoding (HW processing duration, average bitrate, average framerate...) Each time a running instance is closed, its context (including the debug information) is saved to feed, on demand, the last closed instance debugfs entry. Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: encoding summary at instance releaseJean-Christophe Trotin2017-01-315-11/+62
| | | | | | | | | | | | | | This patch adds a short summary about the encoding operation at each instance closing, for debug purpose (through dev_dbg()): - information about the frame (format, resolution) - information about the stream (format, profile, level, resolution) - number of encoded frames - potential (system, encoding...) errors Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] c8sectpfe: fix error return code in c8sectpfe_probe()Wei Yongjun2016-11-211-0/+2
| | | | | | | | | Fix to return error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] c8sectpfe: Remove clk_disable_unprepare hacksPeter Griffin2016-11-181-5/+1Star
| | | | | | | | | | | | | | | | Now that CLK_PROC_STFE is defined as a critical clock in DT, we can remove the commented clk_disable_unprepare from the c8sectpfe driver. This means we now have balanced clk*enable/disable calls in the driver, but on STiH407 family the clock in reality will never actually be disabled. This is due to a HW bug where once the IP has been configured and the SLIM core is running, disabling the clock causes a unrecoverable bus lockup. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: fix a copy-and-paste variable name errorColin Ian King2016-11-161-1/+1
| | | | | | | | | | | The second check for an error on hva->lmi_err_reg appears to be a copy-and-paste error, it should be hva->emi_err_reg instead. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: fix some error handling in hva_hw_probe()Dan Carpenter2016-11-161-3/+3
| | | | | | | | | | | | | | The devm_ioremap_resource() returns error pointers, never NULL. The platform_get_resource() returns NULL on error, never error pointers. The error code needs to be set, as well. The current code returns PTR_ERR(NULL) which is success. Fixes: 57b2c0628b60 ("[media] st-hva: multi-format video encoder V4L2 driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bdisp: fix error return code in bdisp_probe()Wei Yongjun2016-10-241-0/+1
| | | | | | | | | Fix to return error code -EINVAL from the platform_get_resource() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] c8sectpfe: don't break long linesMauro Carvalho Chehab2016-10-211-10/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] hva: fix sparse warningsHans Verkuil2016-09-191-2/+2
| | | | | | | | | | drivers/media/platform/sti/hva/hva-v4l2.c:43:22: warning: symbol 'hva_encoders' was not declared. Should it be static? drivers/media/platform/sti/hva/hva-v4l2.c:1401:24: warning: symbol 'hva_driver' was not declared. Should it be static? Make these static. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] platform: constify vb2_ops structuresJulia Lawall2016-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com> Reviewed-by: Jacek Anaszewski <j.anaszewski@samsung.com> Reviewed-by: Benoit Parrot <bparrot@ti.com> [hans.verkuil@cisco.com: dropped soc_camera/rcar_vin.c patch because that driver will be removed] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: add H.264 video encoding supportJean-Christophe Trotin2016-09-094-7/+1189
| | | | | | | | | | | | | | | | | | This patch adds the H.264 video encoding capability in the V4L2 HVA video encoder driver for STMicroelectronics SoC (hva-h264.c). The main supported features are: - profile: baseline, main, high, stereo high - level: up to 4.2 - bitrate mode: CBR, VBR - entropy mode: CABAC, CAVLC - video aspect: 1x1 only Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] st-hva: multi-format video encoder V4L2 driverJean-Christophe Trotin2016-09-097-0/+2273
| | | | | | | | | | | | | | | | | | | This patch adds V4L2 HVA (Hardware Video Accelerator) video encoder driver for STMicroelectronics SoC. It uses the V4L2 mem2mem framework. This patch only contains the core parts of the driver: - the V4L2 interface with the userland (hva-v4l2.c) - the hardware services (hva-hw.c) - the memory management utilities (hva-mem.c) This patch doesn't include the support of specific codec (e.g. H.264) video encoding: this support is part of subsequent patches. Signed-off-by: Yannick Fertre <yannick.fertre@st.com> Signed-off-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com> Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* dma-mapping: use unsigned long for dma_attrsKrzysztof Kozlowski2016-08-041-18/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dma-mapping core and the implementations do not change the DMA attributes passed by pointer. Thus the pointer can point to const data. However the attributes do not have to be a bitfield. Instead unsigned long will do fine: 1. This is just simpler. Both in terms of reading the code and setting attributes. Instead of initializing local attributes on the stack and passing pointer to it to dma_set_attr(), just set the bits. 2. It brings safeness and checking for const correctness because the attributes are passed by value. Semantic patches for this change (at least most of them): virtual patch virtual context @r@ identifier f, attrs; @@ f(..., - struct dma_attrs *attrs + unsigned long attrs , ...) { ... } @@ identifier r.f; @@ f(..., - NULL + 0 ) and // Options: --all-includes virtual patch virtual context @r@ identifier f, attrs; type t; @@ t f(..., struct dma_attrs *attrs); @@ identifier r.f; @@ f(..., - NULL + 0 ) Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> Acked-by: Mark Salter <msalter@redhat.com> [c6x] Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris] Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm] Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Acked-by: Joerg Roedel <jroedel@suse.de> [iommu] Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp] Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core] Acked-by: David Vrabel <david.vrabel@citrix.com> [xen] Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb] Acked-by: Joerg Roedel <jroedel@suse.de> [iommu] Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon] Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k] Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390] Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32] Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc] Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [media] c8sectpfe: fix memory leakSudip Mukherjee2016-07-131-0/+1
| | | | | | | | We have assigned memory while requesting the firmware but if the sanity check fails then we are not releasing the firmware. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] vb2: replace void *alloc_ctxs by struct device *alloc_devsHans Verkuil2016-07-081-1/+1
| | | | | | | | | | | | | | | | Make this a proper typed array. Drop the old allocate context code since that is no longer used. Note that the memops functions now get a struct device pointer instead of the struct device ** that was there initially (actually a void pointer to a struct containing only a struct device pointer). This code is now a lot cleaner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media/platform: convert drivers to use the new vb2_queue dev fieldHans Verkuil2016-07-082-16/+4Star
| | | | | | | | | | Stop using alloc_ctx and just fill in the device pointer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Benoit Parrot <bparrot@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* bdisp: move the V/H filter spec to bdisp-hw.cMauro Carvalho Chehab2016-06-242-304/+305
| | | | | | | | | | | | | | | | | | Those structs are used only at bdisp-hw, so they shouldn't be there in a header file that it is used elsewhere. This fixes the following Gcc 6.1 warnings: In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0: drivers/media/platform/sti/bdisp/bdisp-filter.h:207:65: warning: ‘bdisp_v_spec’ defined but not used [-Wunused-const-variable=] static const struct __maybe_unused bdisp_filter_v_spec bdisp_v_spec[] = { ^~~~~~~~~ In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0: drivers/media/platform/sti/bdisp/bdisp-filter.h:23:65: warning: ‘bdisp_h_spec’ defined but not used [-Wunused-const-variable=] static const struct __maybe_unused bdisp_filter_h_spec bdisp_h_spec[] = { ^~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] c8sectpfe: Rework firmware loading mechanismPeter Griffin2016-05-091-43/+22Star
| | | | | | | | | | | | | | | | c8sectpfe driver relied on CONFIG_FW_LOADER_USER_HELPER_FALLBACK option for loading its xp70 firmware. A previous commit removed this Kconfig option, as it is apparently harmful, but did not update the driver code which relied on it. This patch reworks the firmware loading into the start_feed callback. At this point we can be sure the rootfs is present, thereby removing the depedency on CONFIG_FW_LOADER_USER_HELPER_FALLBACK. Fixes: 79f5b6ae960d ('[media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACK') Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] c8sectpfe: Demote print to dev_dbgPeter Griffin2016-05-091-1/+1
| | | | | Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] c8sectpfe: Fix broken circular buffer wp managementPeter Griffin2016-05-091-1/+1
| | | | | | | | | During the review process, a regression was intoduced in the circular buffer write pointer management. This means that wp doesn't get managed properly once the buffer becomes full. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] constify stv6110x_devctl structureJulia Lawall2016-02-011-1/+1
| | | | | | | | | | | The stv6110x_devctl structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung2015-12-181-2/+2
| | | | | | | | | | | | | | Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer for common use, and change its type to u64 in order to handling y2038 problem. This patch also includes all device drivers' changes related to this restructuring. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] vb2: drop v4l2_format argument from queue_setupHans Verkuil2015-12-181-6/+4Star
| | | | | | | | | | | | | | | | | | | | | The queue_setup callback has a void pointer that is just for V4L2 and is the pointer to the v4l2_format struct that was passed to VIDIOC_CREATE_BUFS. The idea was that drivers would use the information from that struct to buffers suitable for the requested format. After the vb2 split series this pointer is now a void pointer, which is ugly, and the reality is that all existing drivers will effectively just look at the sizeimage field of v4l2_format. To make this more generic the queue_setup callback is changed: the void pointer is dropped, instead if the *num_planes argument is 0, then use the current format size, if it is non-zero, then it contains the number of requested planes and the sizes array contains the requested sizes. If either is unsupported, then return -EINVAL, otherwise use the requested size(s). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] c8sectpfe: Combine three checks into a single if blockMarkus Elfring2015-11-191-8/+9
| | | | | | | | | | | The variable "tsin" was checked three times in a loop iteration of the c8sectpfe_tuner_unregister_frontend() function. This implementation detail could be improved by the combination of the involved statements into a single if block so that this variable will be checked only once there. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] c8sectpfe: Delete unnecessary checks before two function callsMarkus Elfring2015-11-191-3/+2Star
| | | | | | | | | | | The functions i2c_put_adapter() and module_put() test whether their argument is NULL and then return immediately. Thus the tests around their calls are not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] c8sectpfe: Update binding to reset-gpiosPeter Griffin2015-11-181-1/+1
| | | | | | | | | | | reset-gpios is more clear than rst-gpio. This change has been done as one atomic commit but it does breaks compatability with older dtbs. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* Merge tag 'media/v4.4-1' of ↵Linus Torvalds2015-11-053-15/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "Media updates, including: - Lots of improvements at the kABI documentation - Split of Videobuf2 into a common part and a V4L2 specific one - Split of the VB2 tracing events into a separate header file - s5p-mfc got support for Exynos 5433 - v4l2 fixes for 64-bits alignment when running 32 bits userspace on ARM - Added support for SDR radio transmitter at core, vivid and hackrf drivers - Some y2038 fixups - Some improvements at V4L2 colorspace support - saa7164 converted to use the V4L2 core control framework - several new boards additions, cleanups and fixups PS: There are two patches for scripts/kernel-doc that are needed by the documentation patches on Media. Jon is OK on merging those via my tree" * tag 'media/v4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (146 commits) [media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACK [media] DocBook media: update copyright/version numbers [media] ivtv: Convert to get_user_pages_unlocked() [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL [media] DocBook media: Fix a typo in encoder cmd [media] DocBook: add SDR specific info to G_MODULATOR / S_MODULATOR [media] DocBook: add SDR specific info to G_TUNER / S_TUNER [media] hackrf: do not set human readable name for formats [media] hackrf: add support for transmitter [media] hackrf: switch to single function which configures everything [media] hackrf: add control for RF amplifier [media] DocBook: add modulator type field [media] v4l: add type field to v4l2_modulator struct [media] DocBook: document SDR transmitter [media] v4l2: add support for SDR transmitter [media] DocBook: document tuner RF gain control [media] v4l2: add RF gain control [media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDR [media] media/vivid-osd: fix info leak in ioctl [media] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2 ...
| * [media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACKTakashi Iwai2015-10-201-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | c8sectpfe driver selects CONFIG_FW_LOADER_USER_HELPER_FALLBACK by some reason, but this option is known to be harmful, leading to minutes of stalls at boot time. The option was intended for only compatibility for an old exotic system that mandates the udev interaction, and not a thing a driver selects by itself. Let's remove it. Fixes: 850a3f7d5911 ('[media] c8sectpfe: Add Kconfig and Makefile for the driver') Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * [media] media: videobuf2: Change queue_setup argumentJunghak Sung2015-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace struct v4l2_format * with void * to make queue_setup() for common use. And then, modify all device drivers related with this change. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fix missing const in fimc-lite.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] c8sectpfe: fix namespace on memcpy/memsetMauro Carvalho Chehab2015-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Solves those sparse warnings: drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1087:9: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1087:9: expected void *<noident> drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1087:9: got void [noderef] <asn:2>*<noident> drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1090:9: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1090:9: expected void *<noident> drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1090:9: got void [noderef] <asn:2>* Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] media: videobuf2: Restructure vb2_bufferJunghak Sung2015-10-011-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer. Add new member variables - bytesused, length, offset, userptr, fd, data_offset - to struct vb2_plane in order to cover all information of v4l2_plane. struct vb2_plane { <snip> unsigned int bytesused; unsigned int length; union { unsigned int offset; unsigned long userptr; int fd; } m; unsigned int data_offset; } Replace v4l2_buf with new member variables - index, type, memory - which are common fields for buffer management. struct vb2_buffer { <snip> unsigned int index; unsigned int type; unsigned int memory; unsigned int num_planes; struct vb2_plane planes[VIDEO_MAX_PLANES]; <snip> }; v4l2 specific fields - flags, field, timestamp, timecode, sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c struct vb2_v4l2_buffer { struct vb2_buffer vb2_buf; __u32 flags; __u32 field; struct timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; }; Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] c8sectpfe: fix return of garbageSudip Mukherjee2015-10-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The variable err was never initialized, that means we had been checking a garbage value in the for loop. Moreover if the segment is not outside the firmware file then also we have been returning the garbage. Initialize it to 0 so that on success we return the value and no need to check in the for loop also as it is initially 0 and whenever that value changes we have done a break from the loop. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] c8sectpfe: fix ininitialized error return on firmware load failureColin Ian King2015-10-221-2/+1Star
|/ | | | | | | | | | | | static analysis with cppcheck detected the following error: [drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:1210]: (error) Uninitialized variable: ret ret is never initialised, so garbage is being returned. Instead return the error return from the call of request_firmware_nowait Signed-off-by: Colin Ian King <colin.king@canonical.com>
* [media] c8sectpfe: Remove select on undefined LIBELF_32Peter Griffin2015-09-031-1/+0Star
| | | | | | | | | | | LIBELF_32 is not defined in Kconfig, and is left over legacy which is not required in the upstream driver, so remove it. Suggested-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] c8sectpfe: Use %pad to print 'dma_addr_t'Fabio Estevam2015-09-031-2/+2
| | | | | | | | | | | Use %pad to print 'dma_addr_t' in order to fix the following build warning: drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:588:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] Reported-by: Olof's autobuilder <build@lixom.net> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>