Commit Graph

9987 Commits

Author SHA1 Message Date
Tao Huang
3430c68a33 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (660 commits)
  ANDROID: keychord: Check for write data size
  ANDROID: sdcardfs: Set num in extension_details during make_item
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  f2fs: updates on v4.16-rc1
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  ...

Conflicts:
	drivers/irqchip/Kconfig
	drivers/media/i2c/tc35874x.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/usb/gadget/function/f_fs.c
	fs/f2fs/node.c

Change-Id: Icecd73a515821b536fa3d81ea91b63d9b3699916
2018-03-09 19:10:14 +08:00
Amit Pundir
24740dab5c Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
    fs/f2fs/extent_cache.c
        Pick changes from AOSP Change-Id: Icd8a85ac0c19a8aa25cd2591a12b4e9b85bdf1c5
        ("f2fs: catch up to v4.14-rc1")

    fs/f2fs/namei.c
        Pick changes from AOSP F2FS backport commit 7d5c08fd91
        ("f2fs: backport from (4c1fad64 - Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs)")
2018-03-05 20:20:17 +05:30
Arnd Bergmann
ac21d006fc fbdev: sm712fb: avoid unused function warnings
commit 24ed78dc2e upstream.

The sm712fb framebuffer driver encloses the power-management
functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume
functions are only really used when CONFIG_PM_SLEEP is also
set, as a frequent gcc warning shows:

fbdev/sm712fb.c:1549:12: warning: 'smtcfb_pci_suspend' defined but not used
fbdev/sm712fb.c:1572:12: warning: 'smtcfb_pci_resume' defined but not used

The driver also avoids using the SIMPLE_DEV_PM_OPS macro when
CONFIG_PM is unset, which is redundant.

This changes the driver to remove the #ifdef and instead mark
the functions as __maybe_unused, which is a nicer anyway, as it
provides build testing for all the code in all configurations
and is harder to get wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:47 +01:00
Arnd Bergmann
12ec0529db fbdev: s6e8ax0: avoid unused function warnings
commit b54729b6ce upstream.

The s6e8ax0 suspend/resume functions are hidden inside of an #ifdef
when CONFIG_PM is set to avoid unused function warnings, but they
call some other functions that nothing else calls, and we get warnings
about those:

drivers/video/fbdev/exynos/s6e8ax0.c:449:13: error: 's6e8ax0_sleep_in' defined but not used [-Werror=unused-function]
drivers/video/fbdev/exynos/s6e8ax0.c:485:13: error: 's6e8ax0_display_off' defined but not used [-Werror=unused-function]

This marks the PM functions as __maybe_unused so the compiler can
silently drop them when they are not referenced.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:46 +01:00
Arnd Bergmann
07701436d0 fbdev: auo_k190x: avoid unused function warnings
commit a8a31afad5 upstream.

The auo_k190x framebuffer driver encloses the power-management
functions in #ifdef CONFIG_PM, but the auok190x_suspend/resume
functions are only really used when CONFIG_PM_SLEEP is also
set, as a frequent gcc warning shows:

drivers/video/fbdev/auo_k190x.c:859:12: warning: 'auok190x_suspend' defined but not used
drivers/video/fbdev/auo_k190x.c:899:12: warning: 'auok190x_resume' defined but not used

This changes the driver to remove the #ifdef and instead mark
the functions as __maybe_unused, which is a nicer anyway, as it
provides build testing for all the code in all configurations
and is harder to get wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:46 +01:00
Daniel Wagner
f83c36bd7b video: Use bool instead int pointer for get_opt_bool() argument
commit 206fc20598 upstream.

As the function name already indicates that get_opt_bool() parses
for a bool. It is not a surprise that compiler is complaining
about it when -Werror=incompatible-pointer-types is used:

drivers/video/fbdev/intelfb/intelfbdrv.c: In function ‘intelfb_setup’:
drivers/video/fbdev/intelfb/intelfbdrv.c:353:39: error: passing argument 3 of ‘get_opt_bool’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   if (get_opt_bool(this_opt, "accel", &accel))

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:45 +01:00
Arnd Bergmann
3343627d2b fbdev: sis: enforce selection of at least one backend
commit 5b833fea43 upstream.

The sis framebuffer driver complains with a compile-time warning
if neither the FB_SIS_300 nor FB_SIS_315 symbols are selected:

drivers/video/fbdev/sis/sis_main.c:61:2: warning: #warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is se

This is reasonable because it doesn't work in that case, but it's
also annoying for randconfig builds and is one of the most common
warnings I'm seeing on ARM now.

This changes the Kconfig logic to prevent the silly configuration,
by always selecting the FB_SIS_300 variant if the other one is
not set.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:45 +01:00
Sudip Mukherjee
caa0802300 video: fbdev: sis: remove unused variable
commit 32ad619515 upstream.

The variables modeflag and resinfo were only assigned some value but
were never used.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:45 +01:00
Arnd Bergmann
c1273b467e video: fbdev: via: remove possibly unused variables
commit 484c7bbf26 upstream.

When CONFIG_PROC_FS is disabled, we get warnings about unused variables
as remove_proc_entry() evaluates to an empty macro.

drivers/video/fbdev/via/viafbdev.c: In function 'viafb_remove_proc':
drivers/video/fbdev/via/viafbdev.c:1635:4: error: unused variable 'iga2_entry' [-Werror=unused-variable]
drivers/video/fbdev/via/viafbdev.c:1634:4: error: unused variable 'iga1_entry' [-Werror=unused-variable]

These are easy to avoid by using the pointer from the structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:42 +01:00
Arnd Bergmann
1289a79337 video: fbdev/mmp: add MODULE_LICENSE
commit c1530ac5a3 upstream.

Kbuild complains about the lack of a license tag in this driver:

WARNING: modpost: missing MODULE_LICENSE() in drivers/video/fbdev/mmp/mmp_disp.o

This adds the license, author and description tags.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:37 +01:00
Jung Zhao
3d8eff0a21 video: rockchip: vpu: fix wrong freq assigned
since only rk3288 can run on 600MHz, and sometimes other socs
will step into the 600MHz branch when its 3th register value can
meet the condition, it will cause rkvdec crash.

Change-Id: I3668aa22a3d82af6af2c87ca970028685b8b1960
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-02-24 18:08:41 +08:00
Jung Zhao
87d7e43c42 video: rockchip: vpu: fix shutdown crash bug
now shutdown function just wait for vpu finishing his work,
and do nothing else.

Change-Id: I54f227768314edd85154705d07054bd493e350aa
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-02-24 10:03:46 +08:00
Nicolas Pitre
7f64e1a806 console/dummy: leave .con_font_get set to NULL
commit 724ba8b30b upstream.

When this method is set, the caller expects struct console_font fields
to be properly initialized when it returns. Leave it unset otherwise
nonsensical (leaked kernel stack) values are returned to user space.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22 15:45:00 +01:00
Johan Hovold
8cbb6ca49a video: fbdev: atmel_lcdfb: fix display-timings lookup
commit 9cb18db070 upstream.

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent display node was also prematurely
freed.

Note that the display and timings node references are never put after a
successful dt-initialisation so the nodes would leak on later probe
deferrals and on driver unbind.

Fixes: b985172b32 ("video: atmel_lcdfb: add device tree suport")
Cc: stable <stable@vger.kernel.org>     # 3.13
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22 15:45:00 +01:00
Tao Huang
dcc52ea50d video/rockchip/rk_fb: fix compile warning
drivers/video/rockchip/rk_fb.c:4002:4: warning: this else
clause does not guard... [-Wmisleading-indentation]

Change-Id: I4c75dea72a2ebde8f1271334f91d5fd890274017
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-07 19:25:00 +08:00
Tao Huang
6e1a9a5ca4 video/rockchip/lcdc/rk3368_lcdc: fix compile warning
drivers/video/rockchip/lcdc/rk3368_lcdc.c:2198:2: warning: this if
clause does not guard... [-Wmisleading-indentation]

Change-Id: I0cbd3ba10b891b67782b1a105eaac3d473e52527
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-07 19:24:35 +08:00
Jung Zhao
f580090ea2 video: rockchip: vpu: fix crash bug when translate failed
when translate failed, driver will print the regs.
but kernel must use kernel memory, if we print user
memory, it will crash.

Change-Id: Icfe30e4b70485e2d20d0d75dca7d51d3b904e7cc
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-02-06 14:47:54 +08:00
Tao Huang
f9eefeeaa7 rk: add SPDX license identifier to files with no license
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-31 20:56:06 +08:00
Jung Zhao
298e91c13a video: rockchip: vpu: default freq is 300MHz
Change-Id: I857eebcc54a2a0c59c5a5c7e316379cf73ac71e3
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-30 09:07:55 +08:00
Jung Zhao
e31b48f289 video: rockchip: vpu: fix dead lock of reset_lock
we cannot do vpu_reset when translate address. that
is the only situation we need to protect. so remove
extra reset_lock place.

Change-Id: Ibb23909788e9a3c7ef1c455cdeacdf6c964a5868
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-30 09:07:53 +08:00
Tao Huang
640193f76b Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (733 commits)
  LSK-ANDROID: memcg: Remove wrong ->attach callback
  LSK-ANDROID: arm64: mm: Fix __create_pgd_mapping() call
  ANDROID: sdcardfs: Move default_normal to superblock
  blkdev: Refactoring block io latency histogram codes
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  FROMLIST: arm64: mm: Rename post_ttbr0_update_workaround
  sched: EAS: Initialize push_task as NULL to avoid direct reference on out_unlock path
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee: add ARM_SMCCC dependency
  BACKPORT: selinux: nlmsgtab: add SOCK_DESTROY to the netlink mapping tables
  ...

Conflicts:
	arch/arm64/kernel/vdso.c
	drivers/usb/host/xhci-plat.c
	include/drm/drmP.h
	include/linux/kasan.h
	kernel/time/timekeeping.c
	mm/kasan/kasan.c
	security/selinux/nlmsgtab.c

Also add this commit:
0bcdc0987c ("time: Fix ktime_get_raw() incorrect base accumulation")
2018-01-26 19:26:47 +08:00
Jung Zhao
1c67d0330a video: rockchip: vpu: remove extra lock
when power off, no need to lock/unlock reset_lock. and
if set reg failed, need to unlock reset_lock.

Change-Id: If0a50920504bb69f9fa13790e85af1830fda7946
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-25 10:14:14 +08:00
Jung Zhao
0d4515d3bb video: rockchip: vpu: add default power off when rk322x power off
Change-Id: I860a6624724468b1e61d56f9b638e2e300a81184
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-25 10:14:10 +08:00
Amit Pundir
395ae9f4e6 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Conflicts:
    kernel/fork.c
        Conflict due to Kaiser implementation in LTS 4.4.110.
    net/ipv4/raw.c
        Minor conflict due to LTS commit
        be27b620a8 ("net: ipv4: fix for a race condition in raw_sendmsg")
2018-01-22 11:50:22 +05:30
Jung Zhao
72e811bb5c video: rockchip: vpu: fix kfree bug
there is a global session which use devm_kzalloc when
vpu probe, and each open function will create a session
use kzalloc. now use kzalloc to malloc for both of them
to avoid kfree bug.

Change-Id: I4012463cea5b3becaf2640b407f1ba93c9766008
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-20 15:23:42 +08:00
Jung Zhao
92cd6903dc video: rockchip: vpu: stride err for jpeg encode
Change-Id: Ife4d21c8361275d8832e0c1e3439c945c236d625
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-19 18:06:00 +08:00
Jung Zhao
ab898a38ba video: rockchip: vpu: fix shutdown mutex_unlock bug
unlocking reset_lock is not necessary at vcodec_shutdown.

Change-Id: Id8331fead9db0968779ef19602f4a24fc9446a7d
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-19 08:23:33 +08:00
Jung Zhao
5abf157e56 video: rockchip: vpu: add VCODEC_RUNNING_MODE_HEVC for hevc
first version of rkvdec is called hevc, and it is dev_mode
is 1, add this value inside get_hw_info function

Change-Id: I0471d167029274848c00a806f0f6f0ea9f0308df
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-19 08:18:53 +08:00
Finley Xiao
886cb9ab59 video: rockchip: vpu: Add support to register devfreq notifier
Change-Id: I4eb90e61103784b55d7d3bdcfd31d1353174499c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-18 16:47:55 +08:00
Jung Zhao
9e51a32245 video: rockchip: vpu: avoid dead lock
1. when doing vpu_reset and now a ioctl to get reg come,
maybe cause dead lock.
2. remove unused code in try_set_reg function

Change-Id: Ied1f3b606767faa4ccdb9926679df765af258795
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-18 14:30:00 +08:00
Jung Zhao
99b35196db video: rockchip: vpu: add qos save/restore when vpu_reset
Change-Id: I138c4efd1ca244b7cbf067ae9ef11b326af02e45
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-15 16:42:23 +08:00
Jung Zhao
bdbe4855fb video: rockchip: vpu: do vpu_reset after err immediately
1. do vpu_reset immediately when err occur
2. fix power ops bug

Change-Id: I939101167d84d18f1b73b3b3da74a05093f35d20
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-15 16:42:18 +08:00
Liang Chen
225047ca4a video: rockchip: vpu: auto select opp-table by leakage
Change-Id: I3937d7bd896cca9aedb80bac2a8eb8737c79e7fb
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-01-09 09:28:53 +08:00
Xinhuang Li
e66561316f video: rockchip: vpu: clk_core is not necessary
if the combo is avsd and vdpu,clk_core is not necessary;
others case,the DTS will set the clk_core and here will
get the clk as well.

Change-Id: I5e33375e4655763791b9c4418bce7cbe0f5ac530
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2018-01-05 17:36:49 +08:00
Jung Zhao
4157aa8e4d video: rockchip: vpu: rk3328 use sip_smc_vpu_reset to reset
Change-Id: I0ad285da9a611e26b678d8ecfbfa8c6c69dace58
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-05 15:38:54 +08:00
Rocky Hao
5e0e5276e3 video: rockchip: vpu: add thermal control support
add vpu module as a cooling device in thermal control

Change-Id: Ib71d925b32dbf861f62abf38b84b92c9f5bf9e3e
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-01-05 11:03:16 +08:00
Jung Zhao
0a27ad80d8 video: rockchip: vpu: fix some bugs
1. fix scaling list write overflow
2. add reset lock when vpu_reset

Change-Id: Iead232b6469f4f8a37b464c50086934931f0747f
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-05 09:22:15 +08:00
Jung Zhao
87e3d09740 video: rockchip: vpu: fix page fault crash
Change-Id: I71c3629cec0ee7903770170de15acb73e67298d2
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-05 09:22:00 +08:00
Jung Zhao
485c608fd1 video: rockchip: vpu: add rk3328 reduce freq
Change-Id: I0bee9324bd439772e6eedc9045cd9fa6730379e2
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2018-01-04 16:49:23 +08:00
Finley Xiao
5bc582df48 video: rockchip: vpu: Add devfreq feature
Change-Id: Iceadbf2cc39933877732610d59e680b57ac499ad
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-01-02 11:35:06 +08:00
Jung Zhao
709d83e7f2 video: rockchip: vpu: fix set power idle failed
when vpu reset, sometimes will failed when set power domain
idle

Change-Id: I38185cce616adb41e698b0c95793934abbd51f62
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:47:31 +08:00
Jung Zhao
d52672c955 video: rockchip: vpu: add iova remap when page fault
fix bugs:
1. 3328 play H.264 and H.265 will crash

Change-Id: I6f7b85b957a3838c5e14e12e48bcf8668a28bd22
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:47:08 +08:00
Jung Zhao
e2c56b719b video: rockchip: vpu: transplant power ops from kernel 3.10
Change-Id: I7aa29819ab33d5ce676751fe74edec947d5cc895
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:45:52 +08:00
Jung Zhao
b359b5f287 video: rockchip: vpu: add alloc function
Change-Id: I61a3f556bf1aee5bac92b10eb4a9b7a2c6367178
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-12-27 15:45:29 +08:00
Derek Basehore
78ffab9744 backlight: pwm_bl: Fix overflow condition
[ Upstream commit 5d0c49aceb ]

This fixes an overflow condition that can happen with high max
brightness and period values in compute_duty_cycle. This fixes it by
using a 64 bit variable for computing the duty cycle.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-25 14:22:13 +01:00
Xinhuang Li
8486a3deec driver: video: rockchip: fix the memory leak of the encoder
1.when release buffer should call vpu_iommu_clear function.
2.before call vpu_iommu_clear that we should call
vpu_drm_unmap_iommu&vpu_drm_free if there is through
vpu_drm_alloc to allocate buffer.

Change-Id: I01e7fac88c6da40e8cb4ee2199dd38283323783b
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-12-22 17:33:36 +08:00
Alex Shi
317c5652a7 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2017-12-21 12:06:53 +08:00
Christophe JAILLET
ac0468efee video: fbdev: au1200fb: Return an error code if a memory allocation fails
[ Upstream commit 8cae353e6b ]

'ret' is known to be 0 at this point.
In case of memory allocation error in 'framebuffer_alloc()', return
-ENOMEM instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:04:57 +01:00
Christophe JAILLET
033d20b727 video: fbdev: au1200fb: Release some resources if a memory allocation fails
[ Upstream commit 451f130602 ]

We should go through the error handling code instead of returning -ENOMEM
directly.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:04:57 +01:00
Ladislav Michl
314ce05757 video: udlfb: Fix read EDID timeout
[ Upstream commit c987694755 ]

While usb_control_msg function expects timeout in miliseconds, a value
of HZ is used. Replace it with USB_CTRL_GET_TIMEOUT and also fix error
message which looks like:
udlfb: Read EDID byte 78 failed err ffffff92
as error is either negative errno or number of bytes transferred use %d
format specifier.

Returned EDID is in second byte, so return error when less than two bytes
are received.

Fixes: 18dffdf891 ("staging: udlfb: enhance EDID and mode handling support")
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:04:57 +01:00