Commit Graph

25304 Commits

Author SHA1 Message Date
Zhen Chen
690d49fe40 MALI: utgard: to adapt legacy GPU dts node format for mali_device befor r5p0
Just for rk3066 that has 4 PPs.

Change-Id: Ie3dfa436ee2842f6bcb8bcc7d72ff8e6cd147734
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2017-12-04 17:58:27 +08:00
Zheng Yang
01af327c53 drm: rockchip: introduce rk3066 hdmi
Change-Id: Id354325d271d0c459c156b65cec10c68abeefdc4
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-01 18:26:40 +08:00
Zheng Yang
b240a5aae0 drm: bridge: dw-hdmi: add hdmi status debugfs node
Introduce status node in debugfs to show HDMI output status,
such as phy status, color and eotf.

Here is a sample log:

PHY enabled                     Mode: HDMI
Pixel Clk: 594000000Hz          TMDS Clk: 594000000Hz
Color Format: YUV422            Color Depth: 10 bit
Colorimetry: ITU.BT2020         EOTF: ST2084
x0: 0                           y0: 0
x1: 0                           y1: 0
x2: 0                           y2: 0
white x: 0                      white y: 0
max lum: 0                      min lum: 0
max cll: 0                      max fall: 0

Change-Id: I5d458b633dd3bd9aab67cc91f1695621937e58f5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-12-01 15:52:17 +08:00
Tao Huang
afd240d168 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (510 commits)
  Linux 4.4.103
  Revert "sctp: do not peel off an assoc from one netns to another one"
  xen: xenbus driver must not accept invalid transaction ids
  s390/kbuild: enable modversions for symbols exported from asm
  ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
  btrfs: return the actual error value from from btrfs_uuid_tree_iterate
  ASoC: rsnd: don't double free kctrl
  netfilter: nf_tables: fix oob access
  netfilter: nft_queue: use raw_smp_processor_id()
  spi: SPI_FSL_DSPI should depend on HAS_DMA
  staging: iio: cdc: fix improper return value
  iio: light: fix improper return value
  mac80211: Suppress NEW_PEER_CANDIDATE event if no room
  mac80211: Remove invalid flag operations in mesh TSF synchronization
  drm: Apply range restriction after color adjustment when allocation
  ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
  ath10k: set CTS protection VDEV param only if VDEV is up
  ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
  ath10k: ignore configuring the incorrect board_id
  ath10k: fix incorrect txpower set by P2P_DEVICE interface
  ...

Conflicts:
	drivers/media/v4l2-core/v4l2-ctrls.c
	kernel/sched/fair.c

Change-Id: I48152b2a0ab1f9f07e1da7823119b94f9b9e1751
2017-12-01 11:04:13 +08:00
Alex Shi
81ab793d6d Merge tag 'v4.4.103' into linux-linaro-lsk-v4.4
This is the 4.4.103 stable release
2017-12-01 01:02:00 +08:00
Chris Wilson
f0d8fb7447 drm: Apply range restriction after color adjustment when allocation
[ Upstream commit 3db93756b5 ]

mm->color_adjust() compares the hole with its neighbouring nodes. They
only abutt before we restrict the hole, so we have to apply color_adjust
before we apply the range restriction.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-36-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:27 +00:00
Daniel Vetter
c4cf731af8 drm/armada: Fix compile fail
[ Upstream commit 7357f89954 ]

I reported the include issue for tracepoints a while ago, but nothing
seems to have happened. Now it bit us, since the drm_mm_print
conversion was broken for armada. Fix it, so I can re-enable armada
in the drm-misc build configs.

v2: Rebase just the compile fix on top of Chris' build fix.

Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1483115932-19584-1-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:26 +00:00
Sandy Huang
deeb0dbf80 drm/rockchip: vop: add support rk3399 win lite csc function
Change-Id: I1819405efea275c3d50d29b139bb20f0c6722aea
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-30 14:06:08 +08:00
Jianqun Xu
4961c3cae0 drm/rockchip: gem: init dma_address of sg when cma alloc
Change-Id: Iffe011ee0a0ba5177a9b7f426ebd9dcbdcb5f5d5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-11-24 11:20:36 +08:00
Mark Yao
a051460ef3 drm/rockchip: logo: rename logo memory region
Change-Id: Ief80e55753134ed0f443830488d9204ac692f93c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:32:13 +08:00
Mark Yao
f741ee5cab drm/rockchip: support using reserved memory region for cma
Change-Id: I829162c21748052525b0583185db67015f24141d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:30:57 +08:00
Mark Yao
fda0f9d3f6 drm/rockchip: gem: correct dma handle on buffer free
If drm enable iommu support, rk_obj->dma_addr is iommu
mapping address, using dma_addr as dma_free_attrs's handle
is wrong, cause memory leak.

Change-Id: Iee239122602e61e9f54bdf7a90d47904d74f1c38
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:30:34 +08:00
Sandy Huang
cf9715ed8a drm/rockchip: vop: fix csc for rk3288
There is some hardware bug for VOP win CSC, so we ignore this function
and use the default CSC matrix.

Change-Id: I5a498bbba98563ccb5f37ebffa50b274e8422c73
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-23 18:31:16 +08:00
Alex Shi
c0426ccf53 Merge tag 'v4.4.100' into linux-linaro-lsk-v4.4
This is the 4.4.100 stable release
2017-11-22 12:01:52 +08:00
Zheng Yang
d1943fde81 drm: bridge: dw-hdmi: support Dynamic Range and Mastering Infoframe
The Dynamic Range and Mastering InfoFrame carries data such as
the EOTF and the Static Metadata associated with the dynamic
range of the video stream.

This function is introduced in the 2.11a version.

Change-Id: I279cc0665e34d75209774013882ccc8946ce6da5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-22 09:31:48 +08:00
Zheng Yang
b8e71e7b42 drm/rockchip: dw-hdmi: move depth checking into dw_hdmi_rockchip_select_output
For some display device, max_tmds_clock is 0, we think
max_tmds_clock is 340MHz. If tmdsclock > max_tmds_clock,
depth should fall back to 8bit. And If display mode support
YCBCR420, output format is YCBCR420.

Because max tmds clk of RK3368 is 340MHz, hdmi output policy
is same as mentioned above.

It is need to check tmds clock rate at the last. So we move
depth checking into dw_hdmi_rockchip_select_output.

Change-Id: I27e029fc0171b175ddbfa453ed12854ab6a7432b
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-22 09:31:25 +08:00
Zhen Chen
dac44b4210 MALI Utgard: RK: add nodes to get gpu_utilisation
Change-Id: I7ceebd882282fc08c8560fba5ec8978d18d5b819
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2017-11-21 17:19:07 +08:00
Zheng Yang
fe10dc7aae drm/rockchip: hdmi: add hdmi output colorimetry property
This patch add hdmi_output_colorimetry to support modify
hdmi output colorimetry. It could be following value:
	- None
	- IUT_2020
Default value is None, which means normal hdmi outout
colorimetry.

Change-Id: Ib4883fd0553d9d4193c7295812d2c1433724fe63
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-21 17:04:49 +08:00
Zheng Yang
d4d8a3a789 drm/rockchip: hdmi: support set eotf and colorimetry
HDMI will set vop eotf and color space according to display mode.

Change-Id: I469d03dd1f14a2bcd75ed5c8e3227cd1d34eb354
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-21 17:04:23 +08:00
Arvind Yadav
b1e8e6d4c0 gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
[ Upstream commit 4b0ea93f25 ]

Here, pci_iomap can fail, handle this case and return -ENOMEM.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21 09:21:21 +01:00
Arvind Yadav
7878dca7ca drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache
[ Upstream commit 1ae0d5af34 ]

Here, If devm_ioremap_nocache will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference. This error check
will avoid NULL pointer dereference.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21 09:21:19 +01:00
Zhen Chen
1919e3d736 MALI Utgard: RK: fix some potential problems about pm_runtime
Including:
	not to call pm_runtime_suspend() in mali_runtime_idle();
	make it more strict to power off the GPU.

Change-Id: I8c49dd13f57826f28606fd7a4e451707978b2906
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2017-11-20 14:23:36 +08:00
Sandy Huang
353f10ebe7 drm/rockchip: init color space and eotf for LVDS/DP/eDP/MIPI
Change-Id: Ic874e5a9aef5e1ce965a824502e5909d25e39529
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-17 18:11:29 +08:00
Sandy Huang
6d31d15507 drm/rockchip: vop: add more debug message
Change-Id: I7a6a3ae556c5c83c4f045c979bf2a0343df57675
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-17 18:11:19 +08:00
Sandy Huang
1d4084c945 drm/rockchip: vop: add support color space convert
the CSC path include:
	1. plane color space convert;
	2. post BCSH module color space convert.

Change-Id: Ibfa7bccdb7d57a09a8d0147db65658627326262a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-17 18:11:13 +08:00
Zheng Yang
06fa21989e drm/rockchip: dw-hdmi: fix color depth check in YCBCR420 mode
If sink does't support YCBCR420 deep color, we return default
8bit.

In YCBCR420 mode, tmdsclock is half of RGB444 mode.

Change-Id: Ie3a1f8ca4bbe4b3bae5d7c9ea823fc798721a73a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:45 +08:00
Zheng Yang
c9ed636f38 drm: bridge: dw-hdmi: fix phy cpce setting in YCBCR420 mode
To support YCBCR420 10bit, we need to enable mpll output divider.
It is also compatible with YCBCR420 8bit mode.

Change-Id: I6028cfb045efd05c2cb2b9920e32901ea5aa95dc
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:33 +08:00
Zheng Yang
55c75a9da2 drm: bridge: dw-hdmi: fix GCP default phase in deep color mode
According to HDMI 1.4b specification: If the transmitted video
format has timing such that the phase of the first pixel of
every Video Data Period corresponds to pixel packing phase 0
(e.g. 10P0, 12P0, 16P0), the Source may set the Default_Phase
bit in the GCP. The Sink may use this bit to optimize its filtering
or handling of the PP field.

This means that for 10-bit mode the Htotal must be dividable by 4;
for 12-bit mode, the Htotal must be divisible by 2.

Change-Id: I02e632d095141cbabcba06dc1321ae0dc69dc736
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:23 +08:00
Zheng Yang
0df3354f3a drm/rockchip: vop: introduce vop_update_csc
After supportting atomic update flush for connector, output color
may be changed in the atomic update flush. It is need to separate
vop color configuration into a new function vop_update_csc, and
update output color both in atomic flush and vop_crtc_enable.

Change-Id: Ie530aaba846ddac0c68f114e081a12968b783476
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:40:14 +08:00
Zheng Yang
d2e0476319 drm: bridge: dw-hdmi: Implement connector atomic_flush
Introduce dw_hdmi_connector_atomic_flush to implement connector
atomic_flush.

Only when enc_in_encoding/enc_out_encoding/enc_in_bus_format/
enc_out_bus_format changed, dw_hdmi_setup is called.

Introduce previous_pixelclock/previous_tmdsclock/mtmdsclock to
determine whether PHY needs initialization. If phy is power off,
or mpixelclock/mtmdsclock is different to previous value, phy is
neet to be reinitialized.

Change-Id: I1984fb188ba486de18f6d51b7a51320bbf2bc27d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-16 14:39:39 +08:00
Mark Yao
8eb3838532 drm: support atomic update flush for connector
Change-Id: I101111c489b769244f9ef5e1c1ba78d31b272ae8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-16 14:39:25 +08:00
Alex Shi
d983367513 Merge tag 'v4.4.98' into linux-linaro-lsk-v4.4
This is the 4.4.98 stable release
2017-11-16 12:03:04 +08:00
Sinclair Yeh
ba4828af60 drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue
commit cef75036c4 upstream.

This is an extension of Commit 7c20d213dd ("drm/vmwgfx: Work
around mode set failure in 2D VMs")

With Wayland desktop and atomic mode set, during the mode setting
process there is a moment when two framebuffer sized surfaces
are being pinned.  This was not an issue with Xorg.

Since this only happens during a mode change, there should be no
performance impact by increasing allowable mem_size.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 17:13:13 +01:00
Noralf Trønnes
2393241b7a drm: drm_minor_register(): Clean up debugfs on failure
[ Upstream commit a67834f8bf ]

Call drm_debugfs_cleanup() in case drm_debugfs_init() fails to
cover for failure in the drm_driver.debugfs_init callback.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-3-noralf@tronnes.org
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-15 17:13:09 +01:00
Sandy Huang
467dd9f466 drm/rockchip: vop: add HDR for rk3328
Change-Id: Id5f7e627c3a7ec00d5b7a413b0d1d4e8f64e53e0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-15 19:38:15 +08:00
Sandy Huang
2b2d5620b4 drm/rockchip: vop: add BCSH support for rk3328
Change-Id: I04652f46c1613d54745934c277d24958081d08d6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-15 19:37:45 +08:00
Mark Yao
d7b8d42d2f drm/rockchip: vop: enable axi outstanding function
On some scenes, win lite area may flush with short width.

As the Technical Reference Manual description, need enable
axi outstanding function if use IOMMU.

From testing, after setting axi outstanding max number to 30
solve windows flush problem.

Change-Id: Id4ea7b5f5dae334e88cf1fb106c0b7bc6af9b8d0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-10 17:01:07 +08:00
Alex Shi
7effd4c8ef Merge tag 'v4.4.97' into linux-linaro-lsk-v4.4
This is the 4.4.97 stable release
2017-11-09 12:01:32 +08:00
Rex Zhu
3b7d9a95cc drm/amdgpu: when dpm disabled, also need to stop/start vce.
[ Upstream commit 28ed5504ab ]

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08 10:06:29 +01:00
Dan Carpenter
ded34f9723 drm/msm: fix an integer overflow test
commit 65e9310889 upstream.

We recently added an integer overflow check but it needs an additional
tweak to work properly on 32 bit systems.

The problem is that we're doing the right hand side of the assignment as
type unsigned long so the max it will have an integer overflow instead
of being larger than SIZE_MAX.  That means the "sz > SIZE_MAX" condition
is never true even on 32 bit systems.  We need to first cast it to u64
and then do the math.

Fixes: 4a630fadbb ("drm/msm: Fix potential buffer overflow issue")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08 10:06:28 +01:00
Kasin Li
031b02bc16 drm/msm: Fix potential buffer overflow issue
commit 4a630fadbb upstream.

In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.

Signed-off-by: Kasin Li <donglil@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08 10:06:28 +01:00
Zheng Yang
36a3883514 drm: Add HDR panel metadata property
HDR_PANEL_METADATA is used to indicate HDR capacity of sink device.

Change-Id: I598a7bb5634f14b57f94135fd3be6b0ad2075116
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-08 16:45:50 +08:00
Zheng Yang
afafb7ecd0 drm: rockchip: hdmi: attach HDR_SOURCE_METADATA property
HDR_SOURCE_METADATA property is used to set source hdr metadata,
which will be sent to sink though HDMI DRM infoframe.

Change-Id: If3500cb505c16c2f0caf66b8e64b4d80b93b228f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-08 16:45:29 +08:00
Zheng Yang
21b0ea0285 drm: record hdr_source_metadata_property blob_id
The blob_id is used to get blob data of hdr_source_metadata_property.

Change-Id: I8383265e50261438cf8484bd731e42fc23c24c51
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-11-08 16:45:18 +08:00
Mark Yao
af9f68b189 drm/rockchip: vop: fix use-after-free bug on atomic_flush
old->tv_state pointer is not safe, its reference on connector state,
maybe free.

So save active_tv_state on vop is safe.

==================================================================
BUG: KASAN: use-after-free in vop_crtc_atomic_flush+0xd4/0x3c18 at addr ffffffc08cc6a3a0
Read of size 48 by task surfaceflinger/230
=============================================================================
BUG kmalloc-128 (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in binder_alloc_new_buf_locked+0x388/0x5f0 age=34 cpu=5 pid=660
INFO: Freed in binder_delete_free_buffer+0x204/0x21c age=34 cpu=2 pid=986
CPU: 1 PID: 230 Comm: surfaceflinger Tainted: G    B           4.4.93 #13
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<ffffff900808bfe4>] dump_backtrace+0x0/0x228
[<ffffff900808c220>] show_stack+0x14/0x1c
[<ffffff9008505e3c>] dump_stack+0xa4/0xcc
[<ffffff900823d608>] print_trailer+0x188/0x198
[<ffffff900823d77c>] object_err+0x3c/0x4c
[<ffffff9008243874>] kasan_report+0x320/0x4d4
[<ffffff9008242a64>] __asan_loadN+0x24/0x150
[<ffffff90086c7294>] vop_crtc_atomic_flush+0xd4/0x3c18
[<ffffff90086717e0>] drm_atomic_helper_commit_planes+0x2bc/0x308
[<ffffff90086beabc>] rockchip_atomic_commit_complete+0x6c/0xb4
[<ffffff90086bed48>] rockchip_drm_atomic_commit+0x244/0x264
[<ffffff90086a5974>] drm_atomic_commit+0x88/0x98
[<ffffff90086a7854>] drm_mode_atomic_ioctl+0x710/0x850
[<ffffff900867e398>] drm_ioctl+0x370/0x540
[<ffffff9008266574>] do_vfs_ioctl+0x86c/0x9d8
[<ffffff9008266740>] SyS_ioctl+0x60/0x88
[<ffffff9008083130>] el0_svc_naked+0x24/0x28

Change-Id: I619560f5c5d6beb0a7cfa3a6daf925ccfcfb7f8b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-08 16:43:04 +08:00
Mark Yao
ef07366749 drm/rockchip: vop: fix null pointer on bandwidth check
[   56.320811] Unable to handle kernel NULL pointer dereference at virtual address 0000007f
[   56.330006] pgd = d675c000
[   56.333019] [0000007f] *pgd=00000000
[   56.337209] Internal error: Oops: 5 [#1] SMP ARM
[   56.342354] Modules linked in:
[   56.345774] CPU: 0 PID: 825 Comm: mppvideodec0:sr Not tainted 4.4.93 #194
[   56.353302] Hardware name: Generic DT based system
[   56.353309] task: d6778700 task.stack: c7806000
[   56.353337] PC is at vop_crtc_bandwidth+0x278/0x3fc
[   56.353347] LR is at irq_work_queue+0x4c/0x84
[   56.353354] pc : [<c04e5378>]    lr : [<c01da988>]    psr: 60010013
[   56.353354] sp : c7807c90  ip : 00000002  fp : c7807cec
[   56.353358] r10: d65d5340  r9 : 00000000  r8 : d65d5540
[   56.353364] r7 : 000001dd  r6 : 000010fb  r5 : 00002672  r4 : 00000001
[   56.353368] r3 : c0c57aa8  r2 : 00000000  r1 : dfbc63c8  r0 : 00000025
[   56.353375] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   56.353380] Control: 10c5387d  Table: 7675c06a  DAC: 00000051
[   56.354555] [<c04e5378>] (vop_crtc_bandwidth) from [<c04e1250>] (rockchip_drm_atomic_commit+0xc0/0x180)
[   56.354571] [<c04e1250>] (rockchip_drm_atomic_commit) from [<c04d60d8>] (drm_atomic_commit+0x64/0x7c)
[   56.354587] [<c04d60d8>] (drm_atomic_commit) from [<c04b161c>] (drm_atomic_helper_update_plane+0xc8/0x10c)
[   56.354604] [<c04b161c>] (drm_atomic_helper_update_plane) from [<c04c8798>] (__setplane_internal+0x1b4/0x218)
[   56.354615] [<c04c8798>] (__setplane_internal) from [<c04c8c9c>] (drm_mode_setplane+0x158/0x190)
[   56.354629] [<c04c8c9c>] (drm_mode_setplane) from [<c04baa1c>] (drm_ioctl+0x26c/0x404)
[   56.354644] [<c04baa1c>] (drm_ioctl) from [<c023fdcc>] (do_vfs_ioctl+0x564/0x68c)
[   56.354658] [<c023fdcc>] (do_vfs_ioctl) from [<c023ff50>] (SyS_ioctl+0x5c/0x84)
[   56.354672] [<c023ff50>] (SyS_ioctl) from [<c0107300>] (ret_fast_syscall+0x0/0x3c)

Change-Id: I7dc999e0f438b18af77dc9885ebc71745b6ac94b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Reported-by: Caesar Wang <wxt@rock-chips.com>
2017-11-08 15:51:26 +08:00
Sandy Huang
7e2c9a1c37 FROMLIST: drm/rockchip: vop: Add more RGB output interface type
This patch add serial RGB output interface for rockchip vop, the
more info about serial RGB output interface described at the
following file:

Documentation/devicetree/bindings/display/panel/panel-rgb.txt

(am from https://patchwork.kernel.org/patch/10035987/)

Change-Id: I191d30879b42dab79ae40c5d85573057c86eeb53
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-08 14:21:13 +08:00
Sandy Huang
77998bc8a8 FROMLIST: drm/rockchip: Add support for Rockchip Soc RGB output interface
Some Rockchip CRTCs, like rv1108, can directly output parallel and
serial RGB data to panel or conversion chip, so we add this driver to
probe encoder and connector.

(am from https://patchwork.kernel.org/patch/10035995/)

Change-Id: Ieab9271205cace962b7e871becaf903b9abebd94
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-08 14:21:06 +08:00
Rob Herring
aeaec6aa88 UPSTREAM: drm: of: introduce drm_of_find_panel_or_bridge
Many drivers have a common pattern of searching the OF graph for either an
attached panel or bridge and then finding the DRM struct for the panel
or bridge. Also, most drivers need to handle deferred probing when the
DRM device is not yet instantiated. Create a common function,
drm_of_find_panel_or_bridge, to find the connected node and the
associated DRM panel or bridge device.

(cherry picked from commit 1f2db3034c)

Change-Id: Ibda889742bfb0ea53181ed2ef9b19a9d9df3303e
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
[seanpaul dropped extern from drm_of.h]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-08 10:29:53 +08:00
Mark Yao
de862e8bbc drm/rockchip: vop: add rk3066 vop support
Change-Id: Icdb826c3f7b9e5dc36fd27dfa6bc401c026057ec
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-08 10:29:09 +08:00