Lothar Waßmann [Thu, 26 Feb 2015 10:36:11 +0000 (11:36 +0100)]
video: fix semantics of of_display_timings_exist()
The function currently uses of_parse_phandle() to evaluate a
'display-timings' property (pointing to a node that contains the
actual timings) rather than a node named 'display-timings' containing
the timings, which is how the DTB layout actually is.
Use of_get_child_by_name() to find a node by this name instead.
Lothar Waßmann [Thu, 26 Feb 2015 10:01:00 +0000 (11:01 +0100)]
mxc: vpu: explicitly set return value in each code path of vpu_ioctl()
Do not initialize the 'ret' variable, but explicitly set in in each
code path, so that an forgotten assignment in some code path would
lead to an 'uninitialized variable' warning at compile time.
Fabio Estevam [Tue, 5 Aug 2014 11:13:42 +0000 (08:13 -0300)]
Revert "net: phy: Set the driver when registering an MDIO bus device"
Commit a71e3c37960ce5f9 ("net: phy: Set the driver when registering an MDIO bus
device") caused the following regression on the fec driver:
root@imx6qsabresd:~# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.003 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
Unable to handle kernel NULL pointer dereference at virtual address 0000002c
pgd = bcd14000
[0000002c] *pgd=4d9e0831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 617 Comm: sh Not tainted 3.16.0 #17
task: bc0c4e00 ti: bceb6000 task.ti: bceb6000
PC is at fec_suspend+0x10/0x70
LR is at dpm_run_callback.isra.7+0x34/0x6c
pc : [<803f8a98>] lr : [<80361f44>] psr: 600f0013
sp : bceb7d70 ip : bceb7d88 fp : bceb7d84
r10: 8091523c r9 : 00000000 r8 : bd88f478
r7 : 803f8a88 r6 : 81165988 r5 : 00000000 r4 : 00000000
r3 : 00000000 r2 : 00000000 r1 : bd88f478 r0 : bd88f478
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 4cd1404a DAC: 00000015
Process sh (pid: 617, stack limit = 0xbceb6240)
Stack: (0xbceb7d70 to 0xbceb8000)
....
The problem with the original commit is explained by Russell King:
"It has the effect (as can be seen from the oops) of attaching the MDIO bus
device (itself is a bus-less device) to the platform driver, which means
that if the platform driver supports power management, it will be called
to power manage the MDIO bus device.
Moreover, drivers do not expect to be called for power management
operations for devices which they haven't probed, and certainly not for
devices which aren't part of the same bus that the driver is registered
against."
Lothar Waßmann [Thu, 12 Jun 2014 11:40:06 +0000 (13:40 +0200)]
of/mtd/nand: add generic binding and helper for NAND_BBT_NO_OOB_BBM
add a boolean property 'nand-no-oob-bbm' and helper function to be
able to set the NAND_BBT_NO_OOB_BBM flag in DT capable NAND drivers
and use it for i.MX and MXS nand drivers.
Lothar Waßmann [Thu, 12 Jun 2014 11:39:58 +0000 (13:39 +0200)]
mtd: gpmi: make blockmark swapping optional
With a flash-based BBT there is no reason to move the Factory Bad
Block Marker from the data area buffer (to where it is mapped by the
GPMI NAND controller) to the OOB buffer. Thus, make this feature
configurable via DT. This is required for the Ka-Ro electronics
platforms.
In the original code 'this->swap_block_mark' was synonymous with
'!GPMI_IS_MX23()', so use the latter at the relevant places.
Lothar Waßmann [Thu, 12 Jun 2014 11:37:52 +0000 (13:37 +0200)]
pwm: make the PWM_POLARITY flag in DTB optional
Change the pwm chip driver registration, so that a chip driver that
supports polarity inversion can still be used with DTBs that don't
provide the 'PWM_POLARITY' flag.
This is done to provide polarity inversion support for the pwm-imx
driver without having to modify all existing DTS files.
Lothar Waßmann [Thu, 12 Jun 2014 11:38:54 +0000 (13:38 +0200)]
pwm-backlight:
commit 257462dbf3ed pwm-backlight: switch to gpiod interface
introduced a regression leading to acquiring a bogus GPIO-0 when
configured from DT without an 'enable-gpios' property.
The driver will happily accept the 0 initialized 'enable_gpio' member
of the struct platform_pwm_backlight_data as valid gpio number, and
request this GPIO as enable pin. In case of multiple driver instances,
the second will fail to register with the error message:
pwm-backlight backlight1.23: failed to request GPIO#0: -16
Fix this by setting enable_gpio in the pdata struct to -EINVAL.
Richard Liu [Tue, 1 Apr 2014 01:58:49 +0000 (09:58 +0800)]
ENGR00306257 [#1027]fix system hang up issue caused by GPU
This issue happens when multiple thread is trying to idle GPU at the
same time, root cause is some wrong logic related with powerMutex which
cause cpu still access GPU AHB register after GPU is suspend(clock off),
that cause the bus lockup and make the whole system hang.
-Updated the outstanding request limit to 12.
-Refined the 2D chip feature check.
-Refine the 2D cache flush operation
(avoid FE and PE access memory through the same port).
-Enable cache flush for filterblt.
-Dynamic enabling SPLIT_RECT by checking chip feature(disable for us)
-Use brush stretch blt for clear operation.
Liu Ying [Mon, 17 Mar 2014 03:28:53 +0000 (11:28 +0800)]
ENGR00303663 mxc v4l2 capture: Don't return error if we cannot get mipi csi2
The mipi csi2 code is ugly present in the capture pipeline setup/disable
routions with '#ifdef CONFIG_MXC_MIPI_CSI2/#endif' protected. Whenever
it finds mipi_csi2_info is not gotten correctly, it will return error to
callers. This breaks the normally routines in which mipi csi2 is not used
and mipi csi2 driver is disabled in its devicetree node(but with the
Kconfig CONFIG_MXC_MIPI_CSI2 defined). A real example is the capture
feature on the MX6 Sabreauto platforms. We have only parallel CSI input
on it and the mipi csi2 driver is disabled in its devicetree node but with
the Kconfig CONFIG_MXC_MIPI_CSI2 defined. So, a reasonable choice at present
is not to return error if mipi_csi2_info cannot be gotten, though we could
eventually re-organize the capture code for a better total solution in the
future.
commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57 added a hard
coding for csi_parma.mclk setting to 27MHz. The comment added by
that commit is totally wrong by telling that csi_param.mclk
would be a kind of 'pixel clock' set in 'csi_data_dest' register.
This patch removes the unnecessary mclk setting for csi_param.mclk
variable, since it is only valid for CSI test mode.
Liu Ying [Fri, 8 Mar 2013 08:33:35 +0000 (16:33 +0800)]
ENGR00243315-2 IPUv3 CSI:Remove test mode clock setting
This patch removes test mode clock setting in function
ipu_csi_init_interface(), since the setting is only
necessary for function _ipu_csi_set_test_generator().
This unnecessary setting is added wrongly by commit f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57.
As the sabreauto CPU board schematics mentions, the MIPI connector
isn't mechanically compatible with Freescale MIPI display and camera
board, then we have only the parallel CSI video input that is supported
by the v4l2_cap_0 node. So, let's remove the orphan one - v4l2_cap_1.
Loren Huang [Thu, 27 Feb 2014 07:44:49 +0000 (15:44 +0800)]
ENGR00301095 gpu:gpu hang when dma memory is used up
When dma zone memory used up, gckOS_AllocateNonPagedMemory() will try to
free non paged memory cache and allocate again. Such operation will cause
twice memory mutex request and cause gpu driver hang.
The solution is free the memory mutex at first before trying to free non
paged memory cache.
Oliver Brown [Wed, 19 Feb 2014 23:32:48 +0000 (17:32 -0600)]
ENGR00290659 IPUv3: Fix a flashing vert. line when downsizing 1080i to 300x400.
When split mode deinterlacing is the ipu_calc_stripes_sizes() was failing due
to an unnecessary test. Added logic to use the maximal_stripe_width only if
the flag parameter has the bit 0 clear for not equal stripe sizes.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
Peter Chen [Fri, 24 Jan 2014 06:59:30 +0000 (14:59 +0800)]
ENGR00296519 USB: EHCI: wait more than 3ms until the device enters full-speed idle
If the high-speed device does not enter full-speed idle after
wakeup on disconnect logic has effected, there will be an
unexpected disconnect wakeup interrupt due to the bus is still SE0.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Sandor Yu [Wed, 22 Jan 2014 07:09:37 +0000 (15:09 +0800)]
ENGR00296050 mxsfb: fb failed to work after suspend in console mode
When device boot into console, frame buffer failed to work after
suspend/resume.
That is caused by LCDIF IP lost all registers configuration
in suspend mode, and console didn't reconfiguration fb after resume.
Same issue didn't found with Yocto UI.
Reinitialize frame buffer driver after resume to fix the issue.
Sandor Yu [Wed, 15 Jan 2014 08:50:04 +0000 (16:50 +0800)]
ENGR00295201 ipuv3: vdic: kernel dump when run deinterlace stress test
Kernel will dump when run deinterlace stress test.
It is caused by vditmpbuf being reallocated by another thread
when one thread accesses it.
Issue is fixed by putting these code in mutex.
Sandor Yu [Fri, 27 Dec 2013 09:10:03 +0000 (17:10 +0800)]
ENGR00293488 ipu: vdi: Support more memory type
__va function only can handle frame buffer from low memory.
Use page_address function to replace it, that can handle
frame buffer from both lower and high memory.
Use ioremap_nocache function to handle Frame buffer
from GPU reserve memory pool.
Correct vdi data save buffer size, save both luma and chroma part for
interleaved YUV format.
For non-interleaved and partial-interleaved YUV format,
save luma part data, chroma part is not covered in the patch.
Robin Gong [Tue, 21 Jan 2014 02:41:46 +0000 (10:41 +0800)]
ENGR00295892-1: leds: leds-gpio: keep charger led state while system suspended
gpio-leds driver common framework didn't take care of this case if use CONFIG_OF
, add property "retain-state-suspended" in dts and check it while gpio-leds
device created.
Loren Huang [Thu, 16 Jan 2014 08:23:37 +0000 (16:23 +0800)]
ENGR00295218-2 gpu: Allow allocate vg memory from small block reserved memory
-Most vg memory must requires reserved memory, when reserved memory is
used up by 3d appliction. vg hardware can't be constructed successfully,
which cause whole context creation failure(including 3d context).
-Allow allocating vg memory from small block reserved memory can help such
multi context cases.
Loren Huang [Thu, 9 Jan 2014 09:38:37 +0000 (17:38 +0800)]
ENGR00294354 gpu:Using vitural memory cause AXI bus error
There are two possible reasons to cause AXI bus error
1.Allocate Tile status buffer from virtual memory. It seems gc2000
and gc880 doesn't support tile status buffer from virtual memory.
2.Stream buffer using very beginning gpu mmu address. In this condition,
a faked non gpu mmu address maybe generated and fill into gpu which cause
AXI bus error.
Loren Huang [Thu, 9 Jan 2014 09:36:27 +0000 (17:36 +0800)]
ENGR00292154-3 gpu:Adjust logic for non_paged memory cache
non_page memory cache will only be freed when application exit.
It will have waste when contiguous memory used up.
Add logic to free it when contiguous memory is used up.
Loren Huang [Thu, 9 Jan 2014 09:35:07 +0000 (17:35 +0800)]
ENGR00292154-1 gpu:Fix kernel panic when ctrl+c an application
When application is using virtual memory, ctrl+c it will have
kernel panic caused by null pointer.
The reason is hardware struture already is freed when driver wants
to use it.
Loren Huang [Thu, 9 Jan 2014 09:41:50 +0000 (17:41 +0800)]
ENGR00286762 gpu: enable swap rectange and fix a bug
add eglSetSwapRectangleANDROID back and enable swap rectange,
fix a swap rectange bug which will swap whole screen instead
of the indicate swap region if region's left and top is (0,0).
Signed-off-by: Richard Liu <r66033@freescale.com> Acked-by: Shawn Guo
Xianzhong [Thu, 28 Nov 2013 14:37:16 +0000 (22:37 +0800)]
ENGR00289999 gpu: fixed gc880 invalid command state message
gpu kernel dump the error message when enable DEBUG mode:
gckCONTEXT_Update(1493): State 0x0518 is not mapped.
gckCONTEXT_Update(1493): State 0x0520 is not mapped.
gckCONTEXT_Update(1493): State 0x0518 is not mapped.
gckCONTEXT_Update(1493): State 0x0520 is not mapped.
align gpu kernel driver to fix the error message
Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Jason Liu
Loren Huang [Thu, 9 Jan 2014 09:03:08 +0000 (17:03 +0800)]
ENGR00284988 gpu:Sync gpu kernel driver code
Sync the code with commit 255ee1de in gpu-viv git.
Mainly covered tickets:
ENGR00288588 fixed system reboot when run webGL test
ENGR00284988 Camera recording kernel crash on WFD source
ENGR00283494 Modify Status to status to avoid build error
ENGR00278179-1 query video memory with seperate types
Fancy Fang [Wed, 8 Jan 2014 02:32:52 +0000 (10:32 +0800)]
ENGR00294114 PXP: correct the PS U/V buffer settings when format is YVU420P
The PXP itself doesn't support YVU420P default. But we can get the
U and V address according to the format when we try to set PS_UBUF
and PS_VBUF registers. So the YVU420P can be supported indirectly.