]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
5 years agodrm: xlnx: crtc: Fix max width and height overflow xlnx_rebase_v4.14_2018.3
Vishal Sagar [Thu, 15 Nov 2018 07:15:18 +0000 (12:45 +0530)]
drm: xlnx: crtc: Fix max width and height overflow

The maximum resolution supported is shown as -1x-1 in Xorg.log when
trying to run Xorg. This is occurring due to width and height variables
overflowing as they are assigned UINT_MAX instead of INT_MAX.
This patch fixes this by correcting the data types of width and height
variables and correctly assigning INT_MAX as maximum width and height.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: dsi: Fix kernel panic when "halt" is run
Vishal Sagar [Thu, 15 Nov 2018 07:15:17 +0000 (12:45 +0530)]
drm: xlnx: dsi: Fix kernel panic when "halt" is run

When "halt" is run, the kernel panics and dumps a kernel call stack
which showing it originating in xlnx_dsi_unbind(). On closer
examination, it is found that the xlnx_dsi_host_detach() incorrectly
sets the "panel_mode" device node member pointer to NULL instead of
setting the drm_panel member pointer "panel" to NULL.

The patch corrects this incorrect assignment.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix the size of 2nd plane for 4:2:2 video formats
Suresh Gupta [Wed, 14 Nov 2018 11:33:25 +0000 (17:03 +0530)]
v4l: xilinx-multi-scaler: Fix the size of 2nd plane for 4:2:2 video formats

The size of the 2nd plane for NV12 is half the size
of 1st plane, this patch fix the size.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Change the spi-rx-bus-width property to x1
Venkatesh Yadav Abbarapu [Wed, 14 Nov 2018 11:50:18 +0000 (17:20 +0530)]
arm64: zynqmp: Change the spi-rx-bus-width property to x1

As per the zc1275 design x1 mode is enabled so changing the
spi-rx-bus-width property to x1.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Driver kernel-doc improvements
Derek Kiernan [Tue, 6 Nov 2018 16:38:16 +0000 (16:38 +0000)]
misc: xilinx-sdfec: Driver kernel-doc improvements

Improvements for grammar, consistence, readability and terminology
for SD-FEC kernel-doc comments.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Driver document improvements
Derek Kiernan [Tue, 6 Nov 2018 16:38:15 +0000 (16:38 +0000)]
misc: xilinx-sdfec: Driver document improvements

Improvements for grammar, consistence, readability and cross references
for SD-FEC documentation.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoclk: Fix compilation errors of silicon labs si5324 driver on zynq platform
Venkateshwar Rao Gannavarapu [Thu, 1 Nov 2018 08:23:00 +0000 (13:53 +0530)]
clk: Fix compilation errors of silicon labs si5324 driver on zynq platform

This patch fixes the following linker errors on zynq(32-bit cpu) platform
by replacing the div and mod operations with math lib api.

drivers/clk/si5324drv.o: In function `si5324_rate_approx':
si5324drv.c:(.text+0xa8): undefined reference to `__aeabi_uldivmod'
si5324drv.c:(.text+0xdc): undefined reference to `__aeabi_uldivmod'
si5324drv.c:(.text+0x13c): undefined reference to `__aeabi_uldivmod'

Signed-off-by: Venkateshwar Rao Gannavarapu <venkateshwar.rao.gannavarapu@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocrypto: zynqmp-aes: Adds an error code for zynqmp-aes driver
Kalyani Akula [Sat, 3 Nov 2018 07:32:28 +0000 (13:02 +0530)]
crypto: zynqmp-aes: Adds an error code for zynqmp-aes driver

This patch adds an error code for ZYNQMP_AES_PUF_NOT_PROGRAMMED.

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agofpga: Fix kernel doc warnings
Nava kishore Manne [Mon, 5 Nov 2018 05:50:06 +0000 (11:20 +0530)]
fpga: Fix kernel doc warnings

This patch fixes the kernel doc warnings in fpga-mgr.
No functional changes.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: Disable clock wizard usage in audio driver
Maruthi Srinivas Bayyavarapu [Fri, 2 Nov 2018 11:50:26 +0000 (17:20 +0530)]
ASoC: xlnx: Disable clock wizard usage in audio driver

Current solution which uses clocking wizard, couldn't generate
accurate clock due to inability of clock wizard driver to program
fractional value of clock divider value. This is resulting in audio
loss in a simulataneous capture and playback audio usecase.
This patch disables its usage.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Add overview for SD-FEC driver
Derek Kiernan [Thu, 1 Nov 2018 17:43:26 +0000 (17:43 +0000)]
misc: xilinx-sdfec: Add overview for SD-FEC driver

Adds an overview of the xilinx sdfec driver plus details on driver
usage.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Add kernel-doc style comments
Mauro DeLuca [Thu, 1 Nov 2018 17:43:25 +0000 (17:43 +0000)]
misc: xilinx-sdfec: Add kernel-doc style comments

This patch updates the existing comments for enums, structs, macros and
ioctls to the kernel-doc style. Descriptions are also provided for
parameters passed through these data types.

Signed-off-by: Mauro DeLuca <mauro.de-luca@xilinx.com>
Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomisc: xilinx-sdfec: Use SPDX license header
Michal Simek [Fri, 2 Nov 2018 08:30:42 +0000 (09:30 +0100)]
misc: xilinx-sdfec: Use SPDX license header

Use SPDX license header for sdfec driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: add support for multi-port Ethernet
Vasileios Bimpikas [Thu, 1 Nov 2018 16:41:46 +0000 (16:41 +0000)]
staging: xroeframer: add support for multi-port Ethernet

Support for up to 4 Ethernet ports. This wraps all the "store" & "show"
functions of sysfs entries in a function which calculates the current
Ethernet port (when applicable) and adds the correct offset to the
address' register, which is ADDRESS + (0x100 * port_num). It defaults
to 0 for the non-applicable cases so no other entries are affected.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: scd: Implement generic event notification
Satish Kumar Nagireddy [Tue, 23 Oct 2018 03:30:51 +0000 (20:30 -0700)]
xilinx: v4l: scd: Implement generic event notification

This patch implements generic SCD event notification function.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: scd: Validate interrupt number
Satish Kumar Nagireddy [Tue, 23 Oct 2018 03:30:50 +0000 (20:30 -0700)]
xilinx: v4l: scd: Validate interrupt number

This patch ensures that the interrupt number is valid.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: scd: Initial version of streaming based driver
Satish Kumar Nagireddy [Tue, 23 Oct 2018 03:30:49 +0000 (20:30 -0700)]
xilinx: v4l: scd: Initial version of streaming based driver

This patch adds support for streaming scene change detection driver.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodocumentation: dt: Add bindings documentation for Streaming SCD
Satish Kumar Nagireddy [Tue, 23 Oct 2018 03:30:48 +0000 (20:30 -0700)]
documentation: dt: Add bindings documentation for Streaming SCD

This patch adds device tree binding documentation for streaming based
Scene Change Detection driver.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: dsi: Disable bridge instance
Venkateshwar Rao Gannavarapu [Wed, 24 Oct 2018 05:42:20 +0000 (11:12 +0530)]
drm: xlnx: dsi: Disable bridge instance

This patch disables the bridge instance when
dsi controller is disabled.

Signed-off-by: Venkateshwar Rao Gannavarapu <venkateshwar.rao.gannavarapu@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: sdi: Disable bridge instance
Venkateshwar Rao Gannavarapu [Wed, 24 Oct 2018 05:42:19 +0000 (11:12 +0530)]
drm: xlnx: sdi: Disable bridge instance

This patch disables the bridge instance when sdi controller is disabled.

Signed-off-by: Venkateshwar Rao Gannavarapu <venkateshwar.rao.gannavarapu@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial: uartps: Check if the device is a console
Shubhrajyoti Datta [Sun, 28 Oct 2018 05:12:35 +0000 (10:42 +0530)]
serial: uartps: Check if the device is a console

While checking for console_suspend_enabled also check if the
device is a console.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: disable strict check of AES parameters
Maruthi Srinivas Bayyavarapu [Wed, 31 Oct 2018 17:43:29 +0000 (23:13 +0530)]
ASoC: xlnx: disable strict check of AES parameters

AES audio stream parameters is observed to be not always available
to compare against user provided parameters during capture. So, disable
comparing and just provide AES stream parameters as information to user.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: dma: Stop subdevs in reverse order of starting
Vishal Sagar [Tue, 23 Oct 2018 10:19:26 +0000 (15:49 +0530)]
xilinx: v4l: dma: Stop subdevs in reverse order of starting

Patch fixes the incorrect sequence of stopping subdevs in a media
pipeline. The order of stopping should be reverse the order of starting
a video pipe. The video pipe should be started from sink to source and
be disabled from source to sink.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Noncontiguous planes support
Suresh Gupta [Thu, 25 Oct 2018 06:28:40 +0000 (11:58 +0530)]
v4l: xilinx-multi-scaler: Noncontiguous planes support

By default, gstreamer preferred non-contiguous planes
and the multi-scaler also supports non-contiguous planes.

The patch replaces contiguous V4L2 fourcc to
noncontiguous fourcc.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agofpga: Fix bitstream typo error
Nava kishore Manne [Fri, 26 Oct 2018 07:14:13 +0000 (12:44 +0530)]
fpga: Fix bitstream typo error

This patch fix Bitstream typo error.
No functional changes.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: apf: add preliminary support for accelerator interrupts
Michael Gill [Fri, 19 Oct 2018 00:54:10 +0000 (17:54 -0700)]
staging: apf: add preliminary support for accelerator interrupts

This patch introduces support for dynamic allocation of
interrupts to c-callable IP.  This is not full support for the
SDSoC adapter IP interrupts, or general HLS interrupt support.

Signed-off-by: Michael Gill <michael.gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: Set missing/invalid channel count to default value in consumer format
Maruthi Srinivas Bayyavarapu [Tue, 16 Oct 2018 14:44:24 +0000 (20:14 +0530)]
ASoC: xlnx: Set missing/invalid channel count to default value in consumer format

Set channel count to default value 2 when the captured stream has
invalid or missing channel count.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Change function names
Suresh Gupta [Fri, 12 Oct 2018 09:51:45 +0000 (15:21 +0530)]
v4l: xilinx-multi-scaler: Change function names

Some of the functions starts with xv,
so replacing them with xm2msc to maintain the consistency.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Select taps as per scaling ratio
Suresh Gupta [Fri, 12 Oct 2018 09:51:44 +0000 (15:21 +0530)]
v4l: xilinx-multi-scaler: Select taps as per scaling ratio

The following are some recommendations for how many taps to use:
- Upscale 6 taps
- Down scale to 1.5 6 taps
- Down scale > 1.5 <= 2.5 8 taps
- Down scale > 2.5 <= 3.5 10 taps
- Down scale > 3.5 12 taps
This patch implements the same.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Adding coefficients for 8, 10, 12 taps
Suresh Gupta [Fri, 12 Oct 2018 09:51:43 +0000 (15:21 +0530)]
v4l: xilinx-multi-scaler: Adding coefficients for 8, 10, 12 taps

The Tap's coefficient tables are required for tap
selection at runtime.
The tables are based on Bare-metal code.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Read tap from the device-tree
Suresh Gupta [Fri, 12 Oct 2018 09:51:42 +0000 (15:21 +0530)]
v4l: xilinx-multi-scaler: Read tap from the device-tree

Previously the tap value is hardcoded to 6 in code.
This patch read the tap value from DT.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Move tap parameter to xm2msc_dev from channel context
Suresh Gupta [Fri, 12 Oct 2018 09:51:41 +0000 (15:21 +0530)]
v4l: xilinx-multi-scaler: Move tap parameter to xm2msc_dev from channel context

HW tap value is constant for all the channels and do not have
individual values in HW. So, this patch move tap parameter
from channel context to device context.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial: uartps: Add the device_init_wakeup
Shubhrajyoti Datta [Mon, 15 Oct 2018 12:18:22 +0000 (17:48 +0530)]
serial: uartps: Add the device_init_wakeup

Initialise the device wakeup.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: macb: Remove pm calls in mdio timeout function
Harini Katakam [Tue, 16 Oct 2018 09:30:37 +0000 (15:00 +0530)]
net: macb: Remove pm calls in mdio timeout function

There is no need to call pm auto suspend in timeout exit path as
there's no PM calls in mdio read/write functions anymore.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial: uartlite: Fix compilation issue on !OF platforms
Michal Simek [Wed, 17 Oct 2018 07:20:09 +0000 (09:20 +0200)]
serial: uartlite: Fix compilation issue on !OF platforms

There is missing ulite_of_match on !OF platforms.
Use of_match_ptr() to fix it.

Warning log:
drivers/tty/serial/uartlite.c: In function ‘ulite_get_id’:
drivers/tty/serial/uartlite.c:774:33: error: ‘ulite_of_match’ undeclared
(first use in this function)
   ret = of_alias_get_alias_list(ulite_of_match, "serial",
                                 ^
drivers/tty/serial/uartlite.c:774:33: note: each undeclared identifier
is reported only once for each function it appears in

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoof: configfs: Fix compilation warning
Nava kishore Manne [Tue, 16 Oct 2018 11:07:34 +0000 (16:37 +0530)]
of: configfs: Fix compilation warning

On 64-bit:
drivers/of/configfs.c: In function ‘cfs_overlay_item_dtbo_read’:
include/linux/kern_levels.h:5:18: warning: format ‘%u’ expects
argument of type ‘unsigned int’, but argument 4 has type
‘size_t {aka long unsigned int}’ [-Wformat=]

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agogpio: Fix the Dual Channel gpio driver removal issue
Nava kishore Manne [Tue, 16 Oct 2018 08:07:12 +0000 (13:37 +0530)]
gpio: Fix the Dual Channel gpio driver removal issue

When axi-gpio is configured as a dual-channel with the
existing implementation OF the driver, we are not freeing
the 2nd channel during un-registration of the driver.

Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <Shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agozynqmp: clkc: Fix memory leaks in zynqmp_register_clk_topology()
Martin Lund [Wed, 10 Oct 2018 07:27:48 +0000 (09:27 +0200)]
zynqmp: clkc: Fix memory leaks in zynqmp_register_clk_topology()

Any strings allocated via kasprintf() should be freed after use. In this
case, free all strings referenced by clk_out.

Signed-off-by: Martin Lund <malu@gomspace.com>
Reviewed-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodt-bindings: soc: xilinx: Document "xlnx,zynqmp-pm" compatible string
Rajan Vaja [Sun, 14 Oct 2018 17:39:32 +0000 (10:39 -0700)]
dt-bindings: soc: xilinx: Document "xlnx,zynqmp-pm" compatible string

Checkpatch reports warnining because "xlnx,zynqmp-pm"
DT compatible string is not documented in DT binding doc.
Fix this by defining deprecated "xlnx,zynqmp-pm" in
DT binding doc.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Change maximum supported height and width
Suresh Gupta [Fri, 12 Oct 2018 10:07:06 +0000 (15:37 +0530)]
v4l: xilinx-multi-scaler: Change maximum supported height and width

Multi-Scaler IP support width and height up to 8192 and 4320 respectively.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Remove volatile
Suresh Gupta [Fri, 12 Oct 2018 10:10:22 +0000 (15:40 +0530)]
v4l: xilinx-multi-scaler: Remove volatile

As per Documentation/process/volatile-considered-harmful.rst,
using accessor functions do not require volatile as accessors
are written to prevent unwanted optimization.

And we are using ioread32 and iowrite32, so volatile is not require.

This patch removes the volatile from code and remove
the below warning also

warning: passing argument 1 of 'ioread32' discards 'const volatile'
qualifier from pointer target type [-Wdiscarded-qualifiers]
     return ioread32(addr);
                     ^~~~

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: pl_disp: Enable early callback
Vishal Sagar [Sat, 13 Oct 2018 06:32:42 +0000 (12:02 +0530)]
drm: xlnx: pl_disp: Enable early callback

Patch adds support for enabling early callback. This enables the
user space applications like kmssink plugin that queue up only one
buffer at a time to not drop any frames due to timeout receiving
vblank event from the driver.
The side effect of enabling this behavior is that the buffer whose
callback function has been called may actually still be scanning
out.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodma: xilinx: Add early callback support to Framebuffer Driver
Vishal Sagar [Sat, 13 Oct 2018 06:32:41 +0000 (12:02 +0530)]
dma: xilinx: Add early callback support to Framebuffer Driver

This patch adds support for the callback per descriptor to be called
after the staging phase itself rather than waiting for the descriptor
to transition to the active stage and done list.
This behavior is enabled by an API which lets dma engine client decide
whether the callback needs to called as usual or earlier after staging
state.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodma: xilinx: Fix compilation errors when kernel config doesn't have Framebuffer
Vishal Sagar [Sat, 13 Oct 2018 06:32:40 +0000 (12:02 +0530)]
dma: xilinx: Fix compilation errors when kernel config doesn't have Framebuffer

Framebuffer is enabled in the default xilinx_zynqmp_defconfig.
This patch fixes compilation errors when Framebuffer is not configured
in the kernel.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: macb: Fix phy path in macb resume
Harini Katakam [Sat, 13 Oct 2018 11:21:38 +0000 (16:51 +0530)]
net: macb: Fix phy path in macb resume

A soft reset on the PHY is required after resume, especially with some
devices like TI that implement their own SW reset bits apart from
generic phy reset. This is cleanly accesible to the driver via the
phy_init_hw function. Hence call the same to fix ethernet link after
resume. Otherwise the link will be unstable and packets will not be
received.

Also remove netif_carrier_off/on call in suspend/resume path.
These are already taken care of by the link change function.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: macb: Do not call PM sync in mdio helpers
Harini Katakam [Sat, 13 Oct 2018 11:21:37 +0000 (16:51 +0530)]
net: macb: Do not call PM sync in mdio helpers

Do not bring up clocks in MDIO helpers when the net device is down.
When suspended, there is no need to perform PHY read/write operations
except if GEM is a wake device.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomtd: nand: Arasan: Fix initialization of controller structure
Martin Lund [Fri, 12 Oct 2018 09:16:42 +0000 (14:46 +0530)]
mtd: nand: Arasan: Fix initialization of controller structure

Make sure that the controller structure is initialized using the
nand_hw_control_init() function. This way the spinlock, waitqueue
elements etc. of the structure will be correctly initialized.

Without this fix the nand driver have been seen stalling, especially
when stress tested.

Signed-off-by: Martin Lund <malu@gomspace.com>
Reviewed-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: support multiple sampling rates for SDI
Maruthi Srinivas Bayyavarapu [Thu, 11 Oct 2018 10:24:26 +0000 (15:54 +0530)]
ASoC: xlnx: support multiple sampling rates for SDI

This adds support for SDI playback at various supported sampling rates.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoASoC: xlnx: support multiple sampling rates for HDMI
Maruthi Srinivas Bayyavarapu [Thu, 11 Oct 2018 10:24:25 +0000 (15:54 +0530)]
ASoC: xlnx: support multiple sampling rates for HDMI

This adds support for HDMI playback at various supported sampling rates.

Signed-off-by: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
Reviewed-by: Sandip Kothari <sandipk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Added data cells to access efuse
Durga Challa [Thu, 11 Oct 2018 10:52:55 +0000 (16:22 +0530)]
arm64: zynqmp: Added data cells to access efuse

This patch adds data cells under nvmem node to
read efuse memory

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonvmem: zynqmp: Added support to access efuse
Durga Challa [Thu, 11 Oct 2018 10:52:53 +0000 (16:22 +0530)]
nvmem: zynqmp: Added support to access efuse

This patch provides support to read/write efuse memory map of zynqmp. So
modified the driver accordingly, 0th offset is for Soc version and from
0xc onwards used for efuse access, total size of nvmem file is 0x100
bytes.

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodt-bindings: nvmem: Added efuse nodes
Durga Challa [Thu, 11 Oct 2018 10:52:54 +0000 (16:22 +0530)]
dt-bindings: nvmem: Added efuse nodes

Added data cells for efuse memory access
also added information of offsets and sizes to
write into the eFUSE memory

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agozynqmp: firmware: provides support to access efuse
Durga Challa [Thu, 11 Oct 2018 10:52:52 +0000 (16:22 +0530)]
zynqmp: firmware: provides support to access efuse

This patch adds support for accessing efuse memory
from Linux.

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: xilinx: csi2rxss: store format size
Sam Bobrowicz [Thu, 27 Sep 2018 06:28:08 +0000 (23:28 -0700)]
media: xilinx: csi2rxss: store format size

Currently set_format does not store the dimensions when setting a
non-RAW format. Although they are irrelevant to the operation of the
CSI RX IP, this can cause link_validate to fail and also unexpected
results when calling get_format. Fix this by storing the format size.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agogpio: gpio-xilinx: Fix unbalanced clock reference count
Appana Durga Kedareswara rao [Fri, 12 Oct 2018 04:21:07 +0000 (09:51 +0530)]
gpio: gpio-xilinx: Fix unbalanced clock reference count

while unloading the module, in case of graceful exit
driver is not handling the clocks properly.

This patch fixes this issue.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocrypto: zynqmp-aes: Fix for segfault seen with large sets of data
Kalyani Akula [Wed, 10 Oct 2018 09:20:39 +0000 (14:50 +0530)]
crypto: zynqmp-aes: Fix for segfault seen with large sets of data

This patch resolves the issue seen when encrypt/decrypt of large sets of
data.

Issue is seen due to improper handing of blkcipher_walk. When large
amount of data is sent for encrypt/decrypt, af_alg framework copies it
to the TSGL (TX SGL) kernel. When driver does a walk on the scatterlist,
walk returns nbytes to be processed. nbytes can be complete data sent
from user space or few bytes. So, when data is received in multiple
walks, we are accumulating the data and sending complete data at once.

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Reviewed-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Added device tree node for zynqmp-aes driver
Kalyani Akula [Wed, 10 Oct 2018 09:20:38 +0000 (14:50 +0530)]
arm64: zynqmp: Added device tree node for zynqmp-aes driver

This patch adds device node for zynqmp-aes driver

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: Add additional media bus formats
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:30 +0000 (09:23 -0700)]
media: ov5640: Add additional media bus formats

Add support for 1X16 yuv media bus formats (v4l2_mbus_framefmt).
These formats are equivalent to the 2X8 formats that are already
supported, both of which accurately describe the data present on
the CSI2 interface. This change will increase compatibility with
CSI2 RX drivers that only advertise support for the 1X16 formats.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: add support for 60Hz
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:29 +0000 (09:23 -0700)]
media: ov5640: add support for 60Hz

Add support for 60Hz modes. Modified try_frame_interval
so that future frame rates can be added easier.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: Don't access ctrl regs when off
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:28 +0000 (09:23 -0700)]
media: ov5640: Don't access ctrl regs when off

Add a check to g_volatile_ctrl to prevent trying to read
registers when the sensor is not powered.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: fix get_light_freq on auto
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:27 +0000 (09:23 -0700)]
media: ov5640: fix get_light_freq on auto

Light frequency was not properly returned when in auto
mode and the detected frequency was 60Hz. Fix this.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: fix resolution update
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:26 +0000 (09:23 -0700)]
media: ov5640: fix resolution update

set_fmt was not properly triggering a mode change when
a new mode was set that happened to have the same format
as the previous mode (for example, when only changing the
frame dimensions). Fix this.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: set DPHY timing registers
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:25 +0000 (09:23 -0700)]
media: ov5640: set DPHY timing registers

Register 0x4837 is used to calculate the DPHY timing
parameters such as HS_SETTLE. It needs to be set to the
current pclk period. It is possible for some CSI receivers
to tune this on the RX side, but some do not.

Currently this value is not set, so fix this by setting it
whenever setting the rest of the PLL settings.

Also, a change to the init register blob that helps ensure
the following DPHY spec requirement is met:

MIN HS_ZERO + MIN HS_PREPARE > 145 + t_UI * 10

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agomedia: ov5640: calculate PLL settings for modes
Sam Bobrowicz [Thu, 11 Oct 2018 16:23:24 +0000 (09:23 -0700)]
media: ov5640: calculate PLL settings for modes

Remove the PLL settings from the register blobs and
calculate them based on required clocks. This allows
more mode and input clock (xclk) configurations.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: m2m: Set default mode for framebuffer IP
Devarsh Thakkar [Tue, 9 Oct 2018 23:30:23 +0000 (16:30 -0700)]
xilinx: v4l: m2m: Set default mode for framebuffer IP

- Set the framebuffer IP to default mode instead of auto-restart
  mode for mem2mem usecases due to reason explained below:

- By framebuffer IP is programmed by driver to use a special mode
  called auto_restart mode or free-running mode in which core processes
  data periodically irrespective of input rate.

- So in this scenario, if input is stalled for sometime,
  then framebuffer IP will still process with previous data
  and transmit/receive the DMA descriptors.

- This behaviour of auto_restart or free-running mode is fine for
  streaming usecases where display device needs to be provided
  with data at a consistent rate but is not acceptable for mem2mem usecases
  where output needs to have exact 1-to-1 relationship with input
  without any duplication of frames.

- Furthermore this gives a performance benefit for mem2mem usecases
  as the default mode doesn't require to stage a descriptor and
  instead the active descriptor can be marked as complete after
  interrupt is received to process next descriptor.

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodma: xilinx: Add API to set framebuffer IP mode
Devarsh Thakkar [Tue, 9 Oct 2018 23:30:22 +0000 (16:30 -0700)]
dma: xilinx: Add API to set framebuffer IP mode

This adds API so that client driver can set operation mode
for framebuffer IP core to either auto_restart or default mode
of operation :

- Auto_restart or free-running mode is more suitable for streaming
  usecases which have a strict requirement to maintain uniform
  throughput to display devices. In this mode framebuffer IP
  core is restarted automatically after completing first transaction
  even if input is delayed or blocked, where core will use same descriptor
  again thereby maintaining consistent throughput by duplicating frames.

- Default mode of operation is suitable for non-streaming usecases
  like mem2mem usecases where there has to be a 1-to-1 relationship
  for frame sequence and frame numbers with respect to input and
  so if input is delayed core should wait until it gets new descriptor.

- Unless explicitly set by client driver framebuffer IP core should
  use auto_restart mode as previously, so set mode as auto_restart during
  channel probe.

- Add enum in framebuffer channel structure to select operation mode.

- Use operation mode enum to decide mode during framebuffer start and halt.

- Add a function "frmbuf_find_chan" to find corresponding framebuffer
  channel structure from dma channel structure.

- Export an API "xilinx_xdma_set_mode" to set operation mode of framebuffer
  IP core to either auto-restart or default.

- Unlike Auto-restart mode which follows a 3-stage model
  where it marks the descriptor as staging on submit,
  as active when next interrupt is received, and eventually
  as complete after next interrupt is received, there is no
  such requirement in default mode, so for default mode
  we directly mark the current descriptor submitted to IP
  as active and then mark it as complete when next
  interrupt is received.

- Fix some typos in xilinx_xdma_drm_config and xilinx_xdma_v4l2_config
  description.

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodma: xilinx: Mark previous active decriptor as complete in irq handler
Devarsh Thakkar [Tue, 9 Oct 2018 23:30:21 +0000 (16:30 -0700)]
dma: xilinx: Mark previous active decriptor as complete in irq handler

Moving the block to mark previous active descriptor as complete
to irq handler as it's more appropriate to do it in interrupt
context which confirms that previous transaction was completed.

There is no semantic change in the flow,
previously descriptor was marked as completed in
xilinx_frmbuf_start_transfer() assuming it's is called by
the done interrupt handler which didn't seem required,
so we now mark it as completed in the interrupt handler itelf.

Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: Select VIDEOMODE_HELPERS when DRM_XLNX_PL_DISP is selected
Vishal Sagar [Thu, 11 Oct 2018 06:04:31 +0000 (11:34 +0530)]
drm: xlnx: Select VIDEOMODE_HELPERS when DRM_XLNX_PL_DISP is selected

Select the VIDEOMODE_HELPERS when DRM_XLNX_PL_DISP is selected in
menuconfig. This fixes the compilation error of undefined reference to
drm_display_mode_to_videomode in the Xilinx PL Display driver.

This is also added to DRM_XLNX_MIXER as the same API is being used
there.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: dma: Invoke s_power function of subdevice
Sam Bobrowicz [Thu, 11 Oct 2018 00:21:55 +0000 (17:21 -0700)]
xilinx: v4l: dma: Invoke s_power function of subdevice

This patch enables driver to invoke s_power, which is part of subdev
core APIs. This can put subdevice in power saving mode or normal
operation mode.

Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: vipp: Avoid decrementing refcount of a node twice
Satish Kumar Nagireddy [Wed, 10 Oct 2018 18:43:17 +0000 (11:43 -0700)]
xilinx: v4l: vipp: Avoid decrementing refcount of a node twice

In the current implementation, driver is calling of_graph_get_next_endpoint()
and of_node_put() functions to get next endpoint and decrement refcount of a
node. As the former function is already decrementing refcount, there is no need
of calling the later function which decrements the refcount again.

This patch avoids calling of_node_put() function in driver, as the same has been
taken care in of_graph_get_next_endpoint() implementation.

Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add reset-on-timeout for all boards and modify default timeout value
Mounika Grace Akula [Tue, 9 Oct 2018 15:22:50 +0000 (20:52 +0530)]
arm64: zynqmp: Add reset-on-timeout for all boards and modify default timeout value

This patch adds reset-on-timeout to FPD WDT which will trigger an
interrupt to PMU when watchdog expiry happens and PMU takes the
necessary action. If this property is not enabled, reason will not be
known when watchdog expiry happens.
This patch also modifies the default timeout to 60 seconds. Reason is
that if u-boot enables WDT, it will set the timeout to 10 seconds and
this is not enough to boot till Linux and start the WDT application in
Linux. 60 seconds is the maximum safest value to boot till Linux and
start the WDT application.

Users need to change this timeout value to fit their needs.

Signed-off-by: Mounika Grace Akula <mounika.grace.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: xroeframer: radio_ctrl_base address change
Vasileios Bimpikas [Tue, 9 Oct 2018 13:25:08 +0000 (14:25 +0100)]
staging: xroeframer: radio_ctrl_base address change

To reflect a recent change in the hardware design, RADIO_CTRL_BASE has
been changed from 0xA0030000 to 0xA0060000 in xroe_framer.h.
This is to be skipped altogether along with any remaining hard-coded
values when the secondary devices are properly implemented
in the device tree.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agostaging: apf: Correct kernel-doc structure for xlnk.c
Michael Gill [Tue, 9 Oct 2018 19:42:04 +0000 (12:42 -0700)]
staging: apf: Correct kernel-doc structure for xlnk.c

This patch eliminates warnings associated with kernel-doc
formatting in the apf driver.  It does this by removing the
partial comment was being detected as being an attempt at a
kernel-doc comment.  This patch is only meant to resolve
warnings.  Follow up patches will be to comment the driver.

Signed-off-by: Michael Gill <michael.gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Add reserve area between channel 4 and 5
Suresh Gupta [Fri, 5 Oct 2018 14:18:08 +0000 (19:48 +0530)]
v4l: xilinx-multi-scaler: Add reserve area between channel 4 and 5

There is reserve area between XM2MSC_DSTIMGBUF0 and XM2MSC_DSTIMGBUF1
of channel 4 due to which the offset for XM2MSC_DSTIMGBUF1 channel 4
is 0x01000 instead of 0x0A00.

Also, this shift the base offset of channels 5 and onward.
So, the effective base offsets for channels are:
Channel 0: 0x100,
Channel 1: 0x300,
Channel 2: 0x500,
Channel 3: 0x700,
Channel 4: 0x900,
Channel 5: 0x1100, <-- Should be 0xb00
Channel 6: 0x1300,
Channel 7: 0x1500;

This patch fixes this problem by increment the offset of channel 5, 6,
and 7 by reserved value. And increments the XM2MSC_DSTIMGBUF1
of channel 4 by reserved value.

This is temporary fix and can be taken care in next version of IP.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix pointers in set chk chan_stream
Suresh Gupta [Fri, 5 Oct 2018 14:13:07 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Fix pointers in set chk chan_stream

Driver is setting cap pointer for output, which is incorrect
This patch corrects the functionality by taking proper
pointer.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Check any channel is still running in streamoff
Suresh Gupta [Fri, 5 Oct 2018 14:13:06 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Check any channel is still running in streamoff

If an application queued buffer while the device is busy in processing
of previous buffer, the application will not call device_run () again.
And at this point if some application running higher channel stops stream,
the device_run () return as there is no buffere for stopping channel.
In this situation the first channel does not get chance to call
device_run() again and will wait for infinite time.

This patch checks if there is/are any continues channels are still running
and if running, start the process again.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Add number of frames processed per channel
Suresh Gupta [Fri, 5 Oct 2018 14:13:05 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Add number of frames processed per channel

Patch helps in debugging to indicate the number of frames
processed by the channel.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Wait for all running channels to get buffer
Suresh Gupta [Fri, 5 Oct 2018 14:13:04 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Wait for all running channels to get buffer

So, this patch waits until all continuous running channels have buffer.
Driver do not support processing if any in between intermediate
channel stops streaming.

Limitation: If any intermediate channel stops the streaming,
the streaming continues for only channels which fall under a
low number of stop channel. In this case if channel 0,1,2,3,4
are running and channel 3 stops, then the streaming for channels
0,1,2 will continue and driver stop processing 4th channel without
any error indications. So, application running channel 4 may wait
indefinitely if it does not implement timeout.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Do not allow new task when device is busy
Suresh Gupta [Fri, 5 Oct 2018 14:13:03 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Do not allow new task when device is busy

Driver supports multiple channel so device_run( ) can be
called for multiple time.
This patch would not allow reprograming and running
of device again when driver is waiting for IP to
complete processing.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Allow stream on for the immediate next channel
Suresh Gupta [Fri, 5 Oct 2018 14:13:02 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Allow stream on for the immediate next channel

This patch enables the use case to add one more stream when driver already
processing streams of some channels.
Start of new channel requires reset and reprogram of HW IP.

Here the condition is that only next immediate channel
will able to start and stop the stream.

Example: Channels 0,1,2,3 are streaming, then the user can stream on
immediate next channel 4.

Limitation: if user adds stream for channel 6 when channels 0,1,2,3
are running, then driver does not start 6th channel and do not return
any error. And if any intermediate channel stops the streaming,
the streaming continues for only channels which fall under a low number
of stop channel. In this case if channel 0,1,2,3,4 are running and
channel 3 stops, then the streaming for channels 0,1,2 will continue
and driver stop processing 4th channel without any error indications.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Restructuring of functions
Suresh Gupta [Fri, 5 Oct 2018 14:13:01 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Restructuring of functions

This patch is just the preparation for following
changes so that changes can be easily visible.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Allow device run for single channel
Suresh Gupta [Fri, 5 Oct 2018 14:13:00 +0000 (19:43 +0530)]
v4l: xilinx-multi-scaler: Allow device run for single channel

Start the processing of channels whose stream_on called.
This removes the dependency that scaling starts
only after all channel calls the stream_on.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix stop streaming
Suresh Gupta [Fri, 5 Oct 2018 14:12:59 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Fix stop streaming

Driver is setting bit on stop streaming which is incorrect
This patch corrects the functionality by clearing the bit
on stop streaming.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Allow abort for individual channels
Suresh Gupta [Fri, 5 Oct 2018 14:12:58 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Allow abort for individual channels

Driver do not support individual stremoff/abort of any channel and
consider abort will come together for all channels.

This patch allows individual channel abort,
by freeing all pending buffers. This will help to
remove/abort the last running channel while all
other channels continue running stream.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: ENUM_FMT map index with enabled format
Suresh Gupta [Fri, 5 Oct 2018 14:12:57 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: ENUM_FMT map index with enabled format

Returns formats which are enabled in DT.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Fix buffer type in enum_fmt_vid_out
Suresh Gupta [Fri, 5 Oct 2018 14:12:56 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Fix buffer type in enum_fmt_vid_out

Driver is checking with wrong buffer type in enum_fmt_vid_out()
implementation.
This patch corrects the buffer type to be checked against.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Corrects the format struct in TRY_FMT
Suresh Gupta [Fri, 5 Oct 2018 14:12:55 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Corrects the format struct in TRY_FMT

V4L2 specification suggests the driver corrects the
format struct if any of the dimensions is unsupported.

The patch limits the minimum height and width to 64 and
maximum height and width to the value set in DT.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Return the proper parameters in S_FMT
Suresh Gupta [Fri, 5 Oct 2018 14:12:54 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Return the proper parameters in S_FMT

The VIDIOC_S_FMT ioctl returns the current format parameters as
VIDIOC_G_FMT does.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Remove unused variables min_col and min_row
Suresh Gupta [Fri, 5 Oct 2018 14:12:53 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Remove unused variables min_col and min_row

MIN_WIDTH and MIN_HEIGHT is hardcoded to 64 in IP,
so removing min_col and min_row variables with macros.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Add support for VIDIOC_CREATE_BUFS for Dmabuf io_mode
Suresh Gupta [Fri, 5 Oct 2018 14:12:52 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Add support for VIDIOC_CREATE_BUFS for Dmabuf io_mode

Gstremer V4L2transform Plugin calls VIDIOC_CREATE_BUFS ioctl
for Dmabuf io_mode followed by VIDIOC_EXPBUF which is used
to export previously created buffer as a DMABUF file.

But VIDIOC_EXPBUF is available only for V4L2_MEMORY_MMAP buffers.
So, enabling VB2_MMAP flags while creating the m2m_buffer queues.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l: xilinx-multi-scaler: Remove unsupported formats
Suresh Gupta [Fri, 5 Oct 2018 14:12:51 +0000 (19:42 +0530)]
v4l: xilinx-multi-scaler: Remove unsupported formats

The Multi-Scaler IP do not support Alpha formats and
planes which are non-contiguous in memory, so removing
those formats.

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoxilinx: v4l: dma: In case of error xvip_pipeline_start_stop should return gracefully
Saurabh Sengar [Mon, 8 Oct 2018 04:42:47 +0000 (10:12 +0530)]
xilinx: v4l: dma: In case of error xvip_pipeline_start_stop should return gracefully

In case of any error inside the xvip_pipeline_start_stop function, it
should release the lock taken and do media graph cleanup.

Signed-off-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agodrm: xlnx: zynqmp_disp: Fixing potential segmentation fault
Saurabh Sengar [Sat, 6 Oct 2018 04:37:54 +0000 (10:07 +0530)]
drm: xlnx: zynqmp_disp: Fixing potential segmentation fault

If info is NULL, its member shouldn't be accessed.

Signed-off-by: Saurabh Sengar <saurabh.singh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agov4l2-core: Update entries for BGRX32 format
Suresh Gupta [Fri, 5 Oct 2018 14:20:42 +0000 (19:50 +0530)]
v4l2-core: Update entries for BGRX32 format

This patch adds missing entry BGRX32 format

Signed-off-by: Suresh Gupta <suresh.gupta@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocan: xilinx: Fix the documentation
Shubhrajyoti Datta [Sat, 6 Oct 2018 12:06:54 +0000 (17:36 +0530)]
can: xilinx: Fix the documentation

Fix a typo in the can description of the can 1.0 controllers

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Remove the SERIAL_UARTLITE_NR_UARTS macro
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:43 +0000 (20:07 +0530)]
arm64: zynqmp: Remove the SERIAL_UARTLITE_NR_UARTS macro

Remove the SERIAL_UARTLITE_NR_UARTS macro as it is unused.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Remove SERIAL_UARTLITE_NR_UARTS
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:42 +0000 (20:07 +0530)]
serial-uartlite: Remove SERIAL_UARTLITE_NR_UARTS

Remove SERIAL_UARTLITE_NR_UARTS from Kconfig as it is unused.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Remove ULITE_NR_PORTS macro
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:39 +0000 (20:07 +0530)]
serial-uartlite: Remove ULITE_NR_PORTS macro

This patch is removing ULITE_NR_PORTS macro which limits number of
ports which can be used. Every instance is registering own struct
uart_driver with minor number which corresponds to alias ID (or 0 now).
and with 1 uart port. The same alias ID is saved to
tty_driver->name_base which is key field for creating ttyULX name.

Because name_base and minor number are setup already there is no need to
setup any port->line number because 0 is the right value.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Use allocated structure instead of static ones
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:40 +0000 (20:07 +0530)]
serial-uartlite: Use allocated structure instead of static ones

Remove the use of the static uartlite structure.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoserial-uartlite: Change logic how console_port is setup
Shubhrajyoti Datta [Thu, 4 Oct 2018 14:37:38 +0000 (20:07 +0530)]
serial-uartlite: Change logic how console_port is setup

Change logic how console_port is setup by using CON_ENABLED flag
instead of index. There will be unique uart_console
structure that's why code can't use id for console_port
assignment.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>