Commit Graph

25524 Commits

Author SHA1 Message Date
Algea Cao
dd37ccac7f drm/bridge: synopsys: dw-hdmi: Update criteria to determine whether uboot logo is on
If hdmi plug in when kernel starting, hdmi may be without output.
Because the old criteria that to determine whether uboot logo is
on is hdmi phy pll locked and hdmi is connected. But in some
platform(such as rk3229), hdmi phy pll is locked even hdmi phy
is power down. In this case, the old criteria is unreliable.

So we add a new criteria that check Frame Composer register.If
the register value is not 0, we think that uboot logo is on,
hdmi has been setup.

Change-Id: Ifaa27030e5f5d551bec8f971694ff5d9c34a7c1d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-03-23 18:09:12 +08:00
Wyon Bi
2ad329307f drm/rockchip: lvds: clean up pinctrl handling on px30
Change-Id: I2388110526b7e6e6a9839dfee1cbcb866c93dd27
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-22 11:13:52 +08:00
Wyon Bi
9b9fea95bf drm/rockchip: rgb: Add support for PX30
Change-Id: I56f8edccdc1bca477c81c44a3bcaa7287c7dd7ba
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-22 11:13:52 +08:00
Sandy Huang
8db42d7949 drm/rockchip: vop: add support mcu register config
For px30 and rk3308

Change-Id: Ic19bfb871207c778842531a170eb92792139e862
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-21 20:44:55 +08:00
Algea Cao
6ad9ec862c drm/rockchip: tve: get vdac adjust value from efuse
Change-Id: Idf50443557cfc73fb47613027785bbf88e49f567
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-03-20 20:50:19 +08:00
Sandy Huang
38a1973ae2 drm/rockchip: 3229 vop: fix mistake fild when in interlace mode
set frame effect to fix mistake fild when in interlace mode

Change-Id: I74143cc28cbd9a7864a1df57979f3888137c141c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 20:46:55 +08:00
Sandy Huang
ac1f715f53 drm/rockchip: vop: fix lb mode config error
when video width is bigger than 3840 the linebuffer mode
should be LB_YUV_3840X5.

Change-Id: I27dce8a6fcb7f6f5b8d196671a515c68f188c101
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 20:46:37 +08:00
Wyon Bi
6ee21b2eae drm/rockchip: vop: Fix bcsh_out_mode register field definitions
Change-Id: I5436d748be938ee5795ce7b3fd49f582fad58bdf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-20 20:46:07 +08:00
Sandy Huang
91783f5900 drm/panel: simple: add support spi init screen
Change-Id: I58c77b5042d3a7456b553f369f7a44286472f582
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 14:18:02 +08:00
Sandy Huang
6200d44596 drm/panel: simple: rename dsi panel cmd name
panel init cmds is not only for dsi panel, some mcu screen and
spi screen also need init cmds, so we update this panel init cmd
name and reuse this part logic.

Change-Id: I9e633647fa3f3d92eb90b443a8a5da99a24a3b42
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-20 14:16:32 +08:00
Sandy Huang
2f4dee4910 drm/rockchip: fix kernel panic when drm driver probe failed
For some reason drm driver maybe probe failed, so the drm_dev is
null. this will lead to kernel panic when enter suspend function.

Change-Id: Ic529ba9103d27b0766189285bd6cf8e43b23b912
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-19 15:06:37 +08:00
Liang Chen
1641eb4fc2 PM / devfreq: adjust opp-table by board IR-Drop
Change-Id: I94280b3f4a122961c0201cf9f8fbf5dc34058581
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-16 17:49:29 +08:00
Zhen Chen
4a1507af5a MALI: rockchip: upgrade bifrost DDK to r10p0-01rel0
in addition,
resolve all the conflicts;
rename all the configs and macros that have a same name in midgard/;
fix a compiling error.

Change-Id: I5abc8c925049e087c59b66da57c82aac3092be71
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-13 13:55:01 +08:00
Zhen Chen
25c5dc5a92 MALI: midgard: rk: fix a memory leak in platform specific code
Change-Id: I31ecc394c8ac971ed915b18b08d5b5cba5d440e2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-13 10:40:59 +08:00
Zhen Chen
1ffc1d8044 MALI: bifrost: rk: fix a memory leak in platform specific code
Change-Id: I88a8614742b9663454349d09b84e63998f0aeb66
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-13 10:40:25 +08:00
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
Sandy Huang
637d06bb3e drm/rockchip: rgb: add support rk3308 rgb
add support for rgb panel or rgb covert to other interface panel.

Change-Id: I190ce6e08d38f794ecabb863e0def5e74890f75a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-09 17:48:58 +08:00
Sandy Huang
b0c948421f drm/rockchip: vop: add support rk3308
rk3308 vop support win0 and win1:
win0: yuv/rgb and scale;
win1: rgb

Change-Id: Ie95128187f92047794c47273923d231da0ab9e93
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-09 17:48:03 +08:00
Tao Huang
d787b3af1b drm/rockchip: fix compile error when !PM_SLEEP
Fixes: 75f953253b ("drm/rockchip: implement shutdown function")
Change-Id: Ibef7b87888caad827cd552cfa1818e50912dfb39
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:43:44 +08:00
Tao Huang
631b032c03 drm/rockchip: backlight: remove unused backlight_lock
Change-Id: I227f777a8855b8050fb198e9f8a63d9eea47d0a9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:43:32 +08:00
Liang Chen
3efb6d37bd PM / devfreq: record opp rate instead of real clock rate for thermal
Opp rate is used to calc power in thermal framework, so we record
this rate instead of real clock rate.
Devfreq is not ready in target() when use performance governor, so
we need record opp rate in probe().

Change-Id: Iec1918ad5d12124b9f112964f247339e0d50645f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-08 15:08:36 +08:00
Sandy Huang
d3cc85847c drm/rockchip: px30 vop: fix iommu pagefault when disable win2
In the bandwidth tension environment when close win2, vop will access
the freed memory lead to iommu pagefault. so we add this reset to workaround.

Change-Id: I22b0c0f145d042e3aaf98fb45ffff6304c93963c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
50b9027229 drm/rockchip: fix some problem on the process
Because when enable uboot logo display, vop_crtc_enable() will not be
called when power on, this will lead to some vop initial like
axi channel and some debug irq will not be enabled. so we move some
config to vop_initial() and call from vop_crtc_loader_protect().

Change-Id: I86f02e2e7d12b78cce17e278baaf6dff93137167
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
9c0c016732 drm/rockchip: vop: add feature for alpha add scale
some version vop unsupport pixel alpha add scale, this case
will lead to display error and post empty.

Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de49
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
285f058cfe Revert "drm/rockchip: px30 vop: delete win2"
This reverts commit 424a08f4cb.
Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de4b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
5851d77b10 Revert "drm/rockchip: px30 vop: set win2 zorder to 2"
This reverts commit 91b8d990c0.
Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de4a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Zhen Chen
789d098dd4 MALI: bifrost: rockchip: not to enable clk_gpu when probing
Otherwise, clk_gpu won't be disabled actually in the runtime.

Change-Id: I92787a5e23bfb92f5a79efda92c130832751cc3b
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-07 09:19:16 +08:00
Sandy Huang
f72adfb770 drm/rockchip: vop: fix out of memory when calc bandwidth
bug log:
[   21.432332] Internal error: Accessing user space memory outside uaccess.h routines: 96000005 [#1] PREEMPT SMP
[   21.433228] Modules linked in:
[   21.433530] CPU: 3 PID: 716 Comm: ndroid.settings Not tainted 4.4.83 #121
[   21.434130] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[   21.434768] task: ffffffc0cd63e800 task.stack: ffffffc0cd630000
[   21.435304] PC is at kmem_cache_alloc_trace+0xa8/0x204
[   21.435776] LR is at binder_transaction+0x58c/0x1c44
......
[   21.572340] [<ffffff80081ad584>] kmem_cache_alloc_trace+0xa8/0x204
[   21.572890] [<ffffff800893964c>] binder_transaction+0x58c/0x1c44
[   21.573424] [<ffffff800893cd08>] binder_thread_write+0xa44/0x136c
[   21.573968] [<ffffff800893d710>] binder_ioctl_write_read+0xe0/0x314
[   21.574523] [<ffffff800893db14>] binder_ioctl+0x1d0/0x668
[   21.575010] [<ffffff80081c77b8>] do_vfs_ioctl+0x5e4/0x720
[   21.575494] [<ffffff80081c7954>] SyS_ioctl+0x60/0x88
[   21.575936] [<ffffff8008083170>] el0_svc_naked+0x24/0x28

or:

[  549.171031] Internal error: Accessing user space memory outside uaccess.h routines: 96000005 [#1] PREEMPT SMP
[  549.171920] Modules linked in:
[  549.172213] CPU: 2 PID: 2575 Comm: surfaceflinger Not tainted 4.4.83 #121
[  549.172810] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[  549.173444] task: ffffffc0b851a700 task.stack: ffffffc0b2a40000
[  549.173973] PC is at kmem_cache_alloc_trace+0xa8/0x204
[  549.174437] LR is at drm_flip_work_allocate_task+0x2c/0x4c
[  549.174920] pc : [<ffffff80081ad584>] lr : [<ffffff800848ce04>] pstate: 60400145
......
[  549.285299] [<ffffff80081ad584>] kmem_cache_alloc_trace+0xa8/0x204
[  549.285845] [<ffffff800848ce04>] drm_flip_work_allocate_task+0x2c/0x4c
[  549.286422] [<ffffff800848d020>] drm_flip_work_queue+0x38/0xa4
[  549.286942] [<ffffff80084a7a30>] vop_crtc_atomic_flush+0x1f48/0x2274
[  549.287509] [<ffffff800846add4>] drm_atomic_helper_commit_planes+0x194/0x1bc
[  549.288136] [<ffffff80084a0584>] rockchip_atomic_commit_complete+0x58/0xa0
[  549.288750] [<ffffff80084a0750>] rockchip_drm_atomic_commit+0x184/0x1a4
[  549.289340] [<ffffff800848e678>] drm_atomic_commit+0x64/0x70
[  549.289848] [<ffffff800848f960>] drm_mode_atomic_ioctl+0x4fc/0x604
[  549.290393] [<ffffff8008473368>] drm_ioctl+0x278/0x3f8
[  549.290856] [<ffffff80081c77b8>] do_vfs_ioctl+0x5e4/0x720
[  549.291339] [<ffffff80081c7954>] SyS_ioctl+0x60/0x88
[  549.291778] [<ffffff8008083170>] el0_svc_naked+0x24/0x28

Change-Id: I101c7dfa881611f3ca9225542e767897efe8fc1d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-06 14:08:00 +08:00
Sandy Huang
b42661a086 drm/rockchip: framebuffer should never be freed
In recovery mode, fb will be freed and lead to following error:

[    2.571563] ffffffc03d5f9400: FB ID: 0 (0) fb:0xffffffc03d5f9400, fb->refcount:0
[    2.571694] ------------[ cut here ]------------
[    2.571717] WARNING: at include/linux/kref.h:46
[    2.571738] Modules linked in:
[    2.571763]
[    2.571792] CPU: 0 PID: 169 Comm: recovery Not tainted 4.4.114 #1042
[    2.571815] Hardware name: Rockchip rk3326 863 board (DT)
[    2.571843] task: ffffffc03b078d40 task.stack: ffffffc03b064000
[    2.571877] PC is at drm_framebuffer_reference+0x98/0xc8
[    2.571910] LR is at drm_framebuffer_reference+0x68/0xc8
......
[    2.589269] [<ffffff80084823a8>] drm_framebuffer_reference+0x98/0xc8
[    2.589306] [<ffffff80084831ac>] drm_mode_set_config_internal+0xd4/0x110
[    2.589339] [<ffffff8008488560>] drm_mode_setcrtc+0x448/0x4ec
[    2.589370] [<ffffff8008479830>] drm_ioctl+0x26c/0x3f4
[    2.589404] [<ffffff80081d3884>] do_vfs_ioctl+0x6f0/0x82c
[    2.589438] [<ffffff80081d3a20>] SyS_ioctl+0x60/0x88
[    2.589470] [<ffffff80080832f0>] el0_svc_naked+0x24/0x28

Change-Id: I0706c832b4705bf23147c306e34557a152fb069b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-06 09:25:17 +08:00
Alex Shi
a2b5256f1e Merge tag 'v4.4.120' into linux-linaro-lsk-v4.4
This is the 4.4.120 stable release
2018-03-05 12:05:38 +08:00
Xiongwei Song
0fe227000f drm/ttm: check the return value of kzalloc
[ Upstream commit 19d859a720 ]

In the function ttm_page_alloc_init, kzalloc call is made for variable
_manager, we need to check its return value, it may return NULL.

Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:44 +01:00
Karol Herbst
ef7f640966 drm/nouveau/pci: do a msi rearm on init
[ Upstream commit a121027d27 ]

On my GP107 when I load nouveau after unloading it, for some reason the
GPU stopped sending or the CPU stopped receiving interrupts if MSI was
enabled.

Doing a rearm once before getting any interrupts fixes this.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:19:41 +01:00
Alex Shi
825f312805 Merge tag 'v4.4.119' into linux-linaro-lsk-v4.4
This is the 4.4.119 stable release
2018-03-02 12:01:22 +08:00
Sandy Huang
91b8d990c0 drm/rockchip: px30 vop: set win2 zorder to 2
Change-Id: Id0d510ce4f247d14646d51bba4dfa94383ff8e29
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 18:27:17 +08:00
Sandy Huang
ddcb4f03b5 drm/rockchip: px30 vop: enable more debug interrupt
Change-Id: Ib9a6835cf4113b84fbd4ef249868a5ba11ec8073
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 18:19:36 +08:00
Zheng Yang
955745bc12 drm/bridge: synopsys: dw-hdmi: disable phy in dw_hdmi_bind
If hdmi is enabled in uboot and pluged out when booting kernel,
the hdmi phy is still enabled. It's better to disable it to
match the real status.

Change-Id: Ia1c5ede6499ee277d08c35a85c50e3257305f90f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-03-01 16:23:55 +08:00
Zheng Yang
b87d97a99c drm/bridge: synopsys: dw-hdmi: update rxsense status in repo_hpd_event
Under following processes, rxsense will be not match the real
signal status.
1. HDMI plug in, irq is triggered.

2. HDMI irq is mute in dw_hdmi_hardirq, bring up dw_hdmi_irq.

3. For HDMI connection is not stable, phy_stat read in
   dw_hdmi_irq may be zero, then hdmi->rxsense will be false.

4. Connection fallback to stable, but dw_hdmi_irq had not
   unmute the irq, irq is not triggered again, and hdmi->rxsense
   keep false.

5. repo_hpd_event inform HDMI is pluggned in, dw_hdmi_bridge_enable
   is called to enable HDMI. For rxsense is flase, bridge is not
   powered up.

When repo_hpd_event is called, we think HDMI connection is stable,
updating rxsense is reliable.

Change-Id: Ie1f52f65b15e9a603dad9200529202053528a390
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-03-01 16:22:43 +08:00
Sandy Huang
f1f22eb38b drm/rockchip: add version control for rockchip drm driver
Add basic version for rockchip DRM driver

Change-Id: I13f9b81a79e4f580aa0ba6cb5b418e2780ee4f5e
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 16:04:28 +08:00
Sandy Huang
23d7592936 drm/rockchip: rk3288 vop: identify vop lit and vop big
most of rk3288 vop lit is same with vop big, but some feature is
different, just like max output resolution.

vop big max output: 3840*2160
vop lit max ougput: 2560*1600

Change-Id: Ie926ed29c9d23159ccf3dd5c3e885e48a21731cb
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 16:04:28 +08:00
Sandy Huang
d37da3f924 drm/rockchip: vop: close all win when enable vop
Because vop is unstable when update output timing,
so we close all win make sure stable.

Change-Id: Ifd4e60a41c667426d40e0d57e5180034bab9d5e7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 14:22:04 +08:00
Sandy Huang
3edcf7147a drm/rockchip: update crtc->primary->fb to fb help fb
Before this update, drm_fb_helper_is_bound will return false
when hdmi plug.

Change-Id: I28c07b1c1c3405af2627bf423721c757f1e84258
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 14:22:04 +08:00
Sandy Huang
0f25f377ac drm/rockchip: vop: set is_iommu_enabled to false when enable iommu fail
for some unknown reason, iommu will enable fail, so we set is_iommu_enabled
to false insure the iommu will be enable at next frame.

Change-Id: Icd8779fff816f7498385aff9aa4712e6ad18f93c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-01 14:22:04 +08:00
Alex Deucher
2938d3b274 drm/amdgpu: Avoid leaking PM domain on driver unbind (v2)
commit 458d876eb8 upstream.

We only support vga_switcheroo and runtime pm on PX/HG systems
so forcing runpm to 1 doesn't do anything useful anyway.

Only call vga_switcheroo_init_domain_pm_ops() for PX/HG so
that the cleanup path is correct as well.  This mirrors what
radeon does as well.

v2: rework the patch originally sent by Lukas (Alex)

Acked-by: Lukas Wunner <lukas@wunner.de>
Reported-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de> (v1)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-28 10:17:23 +01:00
Kai-Heng Feng
5b7ed41497 drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA
commit 06998a756a upstream.

Similar to commit e10aec652f ("drm/edid: Add 6 bpc quirk for display
AEO model 0."), the EDID reports "DFP 1.x compliant TMDS" but it support
6bpc instead of 8 bpc.

Hence, use 6 bpc quirk for this panel.

Fixes: 196f954e25 ("drm/i915/dp: Revert "drm/i915/dp: fall back to 18 bpp when sink capability is unknown"")
BugLink: https://bugs.launchpad.net/bugs/1749420
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: <stable@vger.kernel.org> # v4.8+
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180218085359.7817-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-28 10:17:23 +01:00
Algea Cao
07bbb4fe5f drm/rockchip: vop: support rk322x drm cvbs
Change-Id: Ifdaad0cfafb4230d80ff5c27a039839a44fa94d1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-02-28 14:16:58 +08:00
Algea Cao
262653c976 drm/rockchip: Fix cvbs display err when power off
DPMS status default value should be set according to
whether uboot logo is enabled. If uboot logo is enabled,
DPMS status default value should be set to ON.

Change-Id: I492d76c29687e583771824fcbc5a57455242ec0e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-02-26 17:21:08 +08:00
Alex Shi
5a49e50670 Merge tag 'v4.4.118' into linux-linaro-lsk-v4.4
This is the 4.4.118 stable release
2018-02-26 12:02:27 +08:00
Sudip Mukherjee
f45cd9bda5 drm/gma500: remove helper function
commit db9b60400f upstream.

We were getting build warning about:
drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
	from incompatible pointer type

The callback to dpms was pointing to a helper function which had a
return type of void, whereas the callback should point to a function
which has a return type of int.
On closer look it turned out that we do not need the helper function
since if we call drm_helper_connector_dpms() directly, the first check
that drm_helper_connector_dpms() does is: if (mode == connector->dpms)

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
[arnd: rebased to 4.4]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:52 +01:00
Thierry Reding
3d2ff1139d drm/gma500: Sanity-check pipe index
commit 4f25070621 upstream.

If the DSI output isn't connected, then mdfld_dsi_encoder_get_pipe()
will return -1. The mdfld_dsi_dp_mode_set() function doesn't properly
check for this condition and causes the following compiler warnings:

	  CC      drivers/gpu/drm/gma500/mdfld_dsi_dpi.o
	drivers/gpu/drm/gma500/mdfld_dsi_dpi.c: In function ‘mdfld_dsi_dpi_mode_set’:
	drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:828:35: warning: array subscript is below array bounds [-Warray-bounds]
	  u32 pipeconf = dev_priv->pipeconf[pipe];
	                                   ^
	drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:829:33: warning: array subscript is below array bounds [-Warray-bounds]
	  u32 dspcntr = dev_priv->dspcntr[pipe];
	                                 ^

Fix this by checking for a valid pipe before indexing the pipeconf and
dspcntr arrays.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-2-git-send-email-boris.brezillon@free-electrons.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:49 +01:00
Arnd Bergmann
c19bb06726 drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
commit b74c0a9969 upstream.

gcc-4.9 notices that the validate_init() function returns unintialized
data when called with a zero 'nr_buffers' argument, when called with the
-Wmaybe-uninitialized flag:

drivers/gpu/drm/nouveau/nouveau_gem.c: In function ‘validate_init.isra.6’:
drivers/gpu/drm/nouveau/nouveau_gem.c:457:5: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

However, the only caller of this function always passes a nonzero
argument, and gcc-6 is clever enough to take this into account and
not warn about it any more.

Adding an explicit initialization to -EINVAL here is correct even if
the caller changed, and it avoids the warning on gcc-4.9 as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-By: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:48 +01:00