Commit Graph

603673 Commits

Author SHA1 Message Date
Meng Dongyang
2eb5cbfc4b ARM: dts: rockchip: add support of host port for rk312x
This patch add support of EHCI and OHCI controller for rk312x.

Change-Id: I2bd7056240438f8a2af6baa9f0e7b24ce85343d3
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-09-19 11:25:58 +08:00
Zhou weixin
c89d573e25 arm64: rockchip_defconfig: enable mc3230 gsensor
Change-Id: I021013b8f674d8322013adb97f7e5d9cd2f288f8
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-09-19 10:43:28 +08:00
Zhou weixin
defe62616f sensor: mc32xx: update driver for support more sensors of mc32xx series
Change-Id: I9d8bff11f91364da3cdf573505c2d265550837da
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-09-19 10:43:12 +08:00
Zhou weixin
ea78a6e98a arm64: dts: rockchip: add mc3230 node for rk3368-xikp.dts
Change-Id: I1ef11f273269d1cf272c4cce494b40318c5050f8
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-09-19 10:42:59 +08:00
Wu Liang feng
187fcbc756 ANDROID: usb: gadget: fix NULL pointer dereference in mtp_read/write
The userspace may do an invalid mtp_open operation, e.g. the
usb function is configured to ADB only mode, but the userspace
may still call mtp_open operation because of error state machine
in the userspace. In this case, if the userspace try to set usb
function as ADB + MTP next time, it will call mtp_open again
and finally fail because that mtp_lock is busy, so the fp->
private_data is uninitiated. And this will cause cdev to be
NULL pointer in mtp_read and mtp_write.

Change-Id: Id82d0914ece850cfb2b3a8cacc2930cdccb5df46
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2017-09-18 20:23:52 +08:00
Mark Yao
12dfe26a3e video/rockchip: rga2: fix power domain reference count
Change-Id: I6f3746556e5015289a30b88820b20724210c39a6
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Reported-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-15 18:29:01 +08:00
Frank Wang
29e9ba5e2c ARM: rockchip_linux_defconfig: enable more usb related config
This patch amends usb related config for Rockchip ARM32 platforms.

Change-Id: Iea159e8ae96739b7c8f2e2745a74a8d5db2360da
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-09-15 14:13:04 +08:00
Frank Wang
fd3d29171d phy: fix Kconfig dependencies for PHY_ROCKCHIP_INNO_USB2
Rockchip Inno usb2-phy uses extcon_* methods and because of
that, it must select EXTCON as a dependency. This patch fixes it.

Change-Id: Ia2b712154e4fee567b843f38f50fbcc00c49bf1e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-09-15 14:12:53 +08:00
Meng Dongyang
240652b6d3 ARM: dts: rockchip: enable dwc2 controller for rk3128-evb
This patch enable dwc2 controller and u2phy for rk3128.

Change-Id: I34fa8eaaf722266a1ffec124ae7aa46b4e0798d5
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-09-15 14:09:19 +08:00
Meng Dongyang
c5bbe16d4f ARM: dts: rockchip: add support of dwc2 controller for rk3128
This patch add the node of dwc2 controller and u2phy for rk3128.

Change-Id: Iafc6b71d0dda9c9e46fa925a2d21e4bf59a1adee
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-09-15 11:49:04 +08:00
Meng Dongyang
30bc22da1b phy: rockchip-inno-usb2: add support for rk3128
The rk312x use different config data which incluce control
register address and value. The patch add config data of
rk312x and match table to support rk3128.

Change-Id: Idd9a5c885cf5e291517e56232e77066eb5d97138
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-09-15 11:04:46 +08:00
Meng Dongyang
fa7692e1ca usb: dwc2: increase delay time after reset for rk312x
According DWC-OTG databook, after the CSftRst bit is cleared,
the application must wait at least 3 PHY clocks before doing
any access to the PHY domain. And longer delay is required for
some rockchip soc based platforms. But current delay time is
not long enough for rk312x and it will result in repeately
trigger of ID change interrupt of dwc2 controller. This patch
increase delay time from 50 millisecond to 80 millisecond to
make sure that dwc2 controller and PHY is synchronized.

Change-Id: I4aa5cc3a4ceb8f3e3907c0563ed56ec4a3853a2d
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-09-15 09:41:56 +08:00
Ming Lei
675e170adc UPSTREAM: block: deal with stale req count of plug list
In both legacy and mq path, req count of plug list is computed
before allocating request, so the number can be stale when falling
back to slept allocation, also the new introduced wbt can sleep
too.

This patch deals with the case by checking if plug list becomes
empty, and fixes the KASAN report of 'BUG: KASAN: stack-out-of-bounds'
which is introduced by Shaohua's patches of dispatching big request.

Change-Id: I00cdd180e44574aeb7167266b3aa04a28cf4cdc6
Fixes: 600271d900002(blk-mq: immediately dispatch big size request)
Fixes: 50d24c34403c6(block: immediately dispatch big size request)
Cc: Shaohua Li <shli@fb.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry pick from 0a6219a95f)
2017-09-15 09:40:14 +08:00
Shaohua Li
331eee6d7e UPSTREAM: blk-mq: immediately dispatch big size request
This is corresponding part for blk-mq. Disk with multiple hardware
queues doesn't need this as we only hold 1 request at most.

Change-Id: I2bf7fe5749d66e0192c08d16c4bb8d057ad8833f
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry pick from 600271d900)
2017-09-15 09:39:41 +08:00
Shaohua Li
63e2f4ea2d UPSTREAM: block: immediately dispatch big size request
Currently block plug holds up to 16 non-mergeable requests. This makes
sense if the request size is small, eg, reduce lock contention. But if
request size is big enough, we don't need to worry about lock
contention. Holding such request makes no sense and it lows the disk
utilization.

In practice, this improves 10% throughput for my raid5 sequential write
workload.

The size (128k) is arbitrary right now, but it makes sure lock
contention is small. This probably could be more intelligent, eg, check
average request size holded. Since this is mainly for sequential IO,
probably not worthy.

V2: check the last request instead of the first request, so as long as
there is one big size request we flush the plug.

Change-Id: I034ee890eb799ea2c2ee2d38f80f880398f39f91
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry pick from 50d24c3440)
2017-09-15 09:39:36 +08:00
Tao Huang
809e38acf1 FIXUP: sched: fix build for non-SMP target
Fix merge error. kernel/sched/energy.c should not build on non-SMP.

Fixes: f9ae5d202b ("Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git")
Change-Id: I5dba90ec363c02e489a48d76bb97f9f9d62827cd
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-14 19:58:20 +08:00
Shunqing Chen
901c36e88c ARM: rockchip_defconfig: enable cw2015
Change-Id: Ie5fadda97ca6c22343a82e049f132287aaf6873e
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2017-09-14 15:20:16 +08:00
Sugar Zhang
de20d58ea2 arm64: dts: rockchip: enable rk1000 and hdmi sound for rk3368-r88
Change-Id: I8d66b85ca07eed15897dffda0def9166decaa519
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-09-14 11:52:24 +08:00
Sugar Zhang
5e2f47bce0 arm64: dts: rockchip: rk3368: split i2s mclk from i2s-8ch-bus
Change-Id: I7cd8e67bc21ed3b35afb8835a270bc8f9f955aab
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-09-14 11:52:23 +08:00
Sugar Zhang
bb72a9b9fd arm64: rockchip_defconfig: enable rk1000 codec
Change-Id: I88c9c54904be11625cc7021db519c1ad22a0ba64
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-09-14 11:52:22 +08:00
Sugar Zhang
a4950d69c1 ASoC: rk1000_codec: fix coding style
Change-Id: I90bde35e48da9cba0d750866099491a9047d8972
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-09-14 11:52:21 +08:00
Sugar Zhang
36f4ee8477 ASoC: rockchip: add support for rk1000 codec
Change-Id: I025415287f8436d5672b8f1f8d81d87c8273772a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-09-14 11:52:15 +08:00
Mark Yao
6c2b0f27fa ARM: dts: rockchip: rk322x: remove vop gamma_lut
RK322x vop not support gamma Lut

Change-Id: I1d6d892194add7477d4d7272eea377d0a22dbbfa
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-09-13 18:06:21 +08:00
Zheng Yang
dd52956a41 drm: bridge: dw-hdmi: enable ycbcr_420_allowed
Change-Id: I8920d8193ba0675b58ae156986b991ab9dc6f025
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-13 15:22:15 +08:00
Zheng Yang
32433f315a Revert "FROMLIST: drm: Parse HDMI 2.0 YCbCr 4:2:0 VDB and VCB"
This reverts commit 0088faa3f8.

Change-Id: I88009c4fc90fd57e5778ae6510cfe1789d4b12ae
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-13 15:22:15 +08:00
Zheng Yang
7a3045f9c9 drm/rockchip: hdmi: use drm_mode_is_420 instead of DRM_MODE_FLAG_420_MASK
If mode is compatible with YCbCr420 and mode->clock > 340MHz,
HDMI output YCbCr420 mode.

Change-Id: I6d9336cbe9c8766029acc97b1326d56e07acd1d5
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-13 15:22:15 +08:00
Zheng Yang
91644b7e32 drm/rockchip: hdmi: Implement get input/output bus format handling
Set HDMI controller input/output bus format according to vop bus format.

Change-Id: Ib669ee6b0ea586410c715518d0bc9c55f5a52a50
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-13 15:22:15 +08:00
Zheng Yang
8f49e6018e drm: bridge: dw-hdmi: support dynamically get input/out color info
To get input/output bus_format/enc_format dynamically, this patch
introduce following funstion in plat_data:
	- get_input_bus_format
	- get_output_bus_format
	- get_enc_in_encoding
	- get_enc_out_encoding

Change-Id: Ic703cba93fad8ceff773e1caca80759f95a9d547
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-13 15:22:15 +08:00
Shashank Sharma
c3751c08b6 UPSTREAM: drm: add helper functions for YCBCR420 handling
This patch adds helper functions for YCBCR 420 handling.
These functions do:
- check if a given video mode is YCBCR 420 only mode.
- check if a given video mode is YCBCR 420 also mode.

V2: Added YCBCR functions as helpers in DRM layer, instead of
    keeping it in I915 layer.
V3: Added handling for YCBCR-420 only modes too.
V4: EXPORT_SYMBOL(drm_find_hdmi_output_type)
V5: Addressed review comments from Danvet:
    - %s/drm_find_hdmi_output_type/drm_display_info_hdmi_output_type
    - %s/drm_can_support_ycbcr_output/drm_display_supports_ycbcr_output
    - %s/drm_can_support_this_ycbcr_output/
		drm_display_supports_this_ycbcr_output
    - pass drm_display_info instead of drm_connector for consistency
    - For drm_get_highest_quality_ycbcr_supported doc, move the variable
      description above, and then the function description.
V6: Add only YCBCR420 helpers (Ville)
V7: Addressed review comments from Ville
    - Remove cea_vic_valid() check.
    - Fix indentation.
    - Make input parameters to helpers, const.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-9-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix sparse indentation warn]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: Ic2177fc9a7c9a3005fcdc88aa9183b429209d2e0
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 2570fe2586)
2017-09-13 15:18:39 +08:00
Shashank Sharma
fef8a1fc98 UPSTREAM: drm/edid: parse ycbcr 420 deep color information
CEA-861-F spec adds ycbcr420 deep color support information
in hf-vsdb block. This patch extends the existing hf-vsdb parsing
function by adding parsing of ycbcr420 deep color support from the
EDID and adding it into display information stored.

V2: Rebase
V3: Rebase
V4: Moved definition of y420_dc_modes into this patch, where its used
    (Ville)
V5: Optimize function, if(conditions) not reqd (Ville)
V6: Rebase
V7: Rebase

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-8-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix sparse indentation warn]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: If18498dd48ac945e41883037bd83853a393e2efb
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit e6a9a2c3dc)
2017-09-13 15:18:39 +08:00
Shashank Sharma
69963a31db UPSTREAM: drm/edid: parse YCBCR420 videomodes from EDID
HDMI 2.0 spec adds support for YCBCR420 sub-sampled output.
CEA-861-F adds two new blocks in EDID's CEA extension blocks,
to provide information about sink's YCBCR420 output capabilities.

These blocks are:

- YCBCR420vdb(YCBCR 420 video data block):
This block contains VICs of video modes, which can be sopported only
in YCBCR420 output mode (Not in RGB/YCBCR444/422. Its like a normal
SVD block, valid for YCBCR420 modes only.

- YCBCR420cmdb(YCBCR 420 capability map data block):
This block gives information about video modes which can support
YCBCR420 output mode also (along with RGB,YCBCR444/422 etc) This
block contains a bitmap index of normal svd videomodes, which can
support YCBCR420 output too.
So if bit 0 from first vcb byte is set, first video mode in the svd
list can support YCBCR420 output too. Bit 1 means second video mode
from svd list can support YCBCR420 output too, and so on.

This patch adds two bitmaps in display's hdmi_info structure, one each
for VCB and VDB modes. If the source is HDMI 2.0 capable, this patch
adds:
- VDB modes (YCBCR 420 only modes) in connector's mode list, also makes
  an entry in the vdb_bitmap per vic.
- VCB modes (YCBCR 420 also modes) only entry in the vcb_bitmap.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>

V2: Addressed
    Review comments from Emil:
    - Use 1ULL<<i instead of 1<<i to make sure the output is 64bit.
    - Use the suggested method for updating dbmap.
    - Add documentation for YCBCR420_vcb_map to fix kbuild warning.

    Review comments from Ville:
    - Do not expose the YCBCR420 flags in uabi layer, keep it internal.
    - Save a map of YCBCR420 modes for future reference.
    - Check db length before trying to parse extended tag.
    - Add a warning if there are > 64 modes in capability map block.
    - Use y420cmdb in function names and macros while dealing with vcb
      to be aligned with spec.
    - Move the display information parsing block ahead of mode parsing
      blocks.

V3: Addressed design/review comments from Ville
    - Do not add flags in video modes, else we have to expose them to user
    - There should not be a UABI change, and kernel should detect the
      choice of the output based on type of mode, and the bitmaps.
    - Use standard bitops from kernel bitmap header, instead of calculating
      bit positions manually.

V4: Addressed review comments from Ville:
    - s/ycbcr_420_vdb/y420vdb
    - s/ycbcr_420_vcb/y420cmdb
    - Be less verbose on description of do_y420vdb_modes
    - Move newmode variable in the loop scope.
    - Use svd_to_vic() to get a VIC, instead of 0x7f
    - Remove bitmap description for CMDB modes & VDB modes
    - Dont add connector->ycbcr_420_allowed check for cmdb modes
    - Remove 'len' variable, in is_y420cmdb function, which is used
      only once
    - Add length check in is_y420vdb function
    - Remove unnecessary if (!db) check in function parse_y420cmdb_bitmap
    - Do not add print about YCBCR 420 modes
    - Fix indentation in few places
    - Move ycbcr420_dc_modes in next patch, where its used
    - Add a separate patch for movement of drm_add_display_info()

V5: Addressed review comments from Ville:
    - Add the patch which cleans up the current EXTENDED_TAG usage
    - Make y420_cmdb_map u64
    - Do not block ycbcr420 modes while parsing the EDID, rather
      add a separate helper function to prune ycbcr420-only modes from
      connector's probed modes.

V6: Rebase
V7: Move this patch after the 420_only validation patch (Ville)
V8: Addressed review comments from Ville
    - use cea_vic_valid check before adding cmdb/vdb modes
    - add check for i < 64 while adding cmdb modes
    - use 1ULL while checking bitmap

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1500028426-14883-1-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix checkpatch complaints and indentation]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: Id99fd280375445ff5ec93e19283fa7e3c2e715f7
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 832d4f2f41)
2017-09-13 15:18:39 +08:00
Shashank Sharma
12f0da6649 UPSTREAM: drm: add helper to validate YCBCR420 modes
YCBCR420 modes are supported only on HDMI 2.0 capable sources.
This patch adds:
- A drm helper to validate YCBCR420-only mode on a particular
  connector. This function will help pruning the YCBCR420-only
  modes from the connector's modelist.
- A bool variable (ycbcr_420_allowed) in the drm connector structure.
  While handling the EDID from HDMI 2.0 sinks, its important to know
  if the source is capable of handling YCBCR420 output, so that no
  YCBCR 420 modes will be listed for sources which can't handle it.
  A driver should set this variable if it wants to see YCBCR420 modes
  in the modedb.

V5: Introduced the patch in series.
V6: Squashed two patches (validate YCBCR420 and add YCBCR420
	   identifier)
V7: Addressed review comments from Vile:
    - Move this patch before we add 420 modes from EDID.
    - No need for drm_valid_cea_vic() check, function back to non-static.
    - Update MODE_STATUS with NO_420 condition.
    - Introduce y420_vdb_modes variable in this patch

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-6-git-send-email-shashank.sharma@intel.com
[vsyrjala: Drop the now bogus EXPORT_SYMBOL(drm_valid_cea_vic)]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: Ia5ef115a54ee522d4c44544ee3abe4247a54f9c0
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit d85231530b)
2017-09-13 15:18:39 +08:00
Shashank Sharma
9460b2bf90 UPSTREAM: drm/edid: cleanup patch for CEA extended-tag macro
CEA-861-F introduces extended tag codes for EDID extension blocks,
which indicates the actual type of the data block. The code for
using exteded tag is 0x7, whereas in the existing code, the
corresponding macro is named as "VIDEO_CAPABILITY_BLOCK"

This patch renames the macro and usages from "VIDEO_CAPABILITY_BLOCK"
to "USE_EXTENDED_TAG"

V2: Add extended tag code check for video capabilitiy block (ville)
V3: Ville:
	- Use suggested names for macros
	- Check the block length first, before checking the extended tag
V4: Fix commit message (David)
V5: Introduced this patch into HDMI-YCBCR-output series
V6: Rebase
V7: Rebase

Change-Id: I7564a9fd9b5a44be0a10394b14ff3d21d9b1e0d5
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-5-git-send-email-shashank.sharma@intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 87563fc030)
2017-09-13 15:18:39 +08:00
Shashank Sharma
7bc1cf6e81 UPSTREAM: drm/edid: parse sink information before CEA blocks
CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks.
This block contains a map of indexes of CEA modes, which can
support YCBCR 420 output also. To avoid multiple parsing of same
CEA block, let's parse the sink information and get this map, before
parsing CEA modes.

This patch moves the call to drm_add_display_info function, before the
mode parsing block.

V4: Introduced new patch in the series
V5: Move this patch before 4:2:0 parsing patch (ville)
    Added r-b from Ville
V6: Rebase
V7: Rebase

Change-Id: Icf1a68daa1d7b63ceb28fee152d8a605d613c13a
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-4-git-send-email-shashank.sharma@intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 0f0f870830)
2017-09-13 15:18:39 +08:00
Shashank Sharma
35b4954a74 UPSTREAM: drm/edid: complete CEA modedb(VIC 1-107)
CEA-861-F specs defines new video modes to be used with
HDMI 2.0 EDIDs. The VIC range has been extended from 1-64 to
1-107.

Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now
to be able to parse new CEA modes using the existing methods, we have
to complete the modedb (VIC=65 onwards).

This patch adds:
- Timings for existing CEA video modes (from VIC=65 till VIC=92)
- Newly added 4k modes (from VIC=93 to VIC=107).

The patch was originaly discussed and reviewed here:
https://patchwork.freedesktop.org/patch/135810/

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>

V2: Rebase
V3: Rebase
V4: Added native bit handling as per CEA-861-F spec (Ville)
V5: Fix timings for VIC 77:1920x1080 and 104:3840x2160p (Ville)
    Remove unnecessary paranthesis from function svd_to_vic (Ville)
    Added r-b (Neil)
V6: Rebase
V7: Fix indentation for modes from VIC 80

Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-3-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix up remaining formatting/indentation issues]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: I77cbad4d83814726da803f0da0004818d4029744
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 8ec6e07555)
2017-09-13 15:18:39 +08:00
Shashank Sharma
5690766636 UPSTREAM: drm: handle HDMI 2.0 VICs in AVI info-frames
HDMI 1.4b support the CEA video modes as per range of CEA-861-D (VIC 1-64).
For any other mode, the VIC filed in AVI infoframes should be 0.
HDMI 2.0 sinks, support video modes range as per CEA-861-F spec, which is
extended to (VIC 1-107).

This patch adds a bool input variable, which indicates if the connected
sink is a HDMI 2.0 sink or not. This will make sure that we don't pass a
HDMI 2.0 VIC to a HDMI 1.4 sink.

This patch touches all drm drivers, who are callers of this function
drm_hdmi_avi_infoframe_from_display_mode but to make sure there is
no change in current behavior, is_hdmi2 is kept as false.

In case of I915 driver, this patch:
- checks if the connected display is HDMI 2.0.
- HDMI infoframes carry one of this two type of information:
	- VIC for 4K modes for HDMI 1.4 sinks
	- S3D information for S3D modes
  As CEA-861-F has already defined VICs for 4K videomodes, this
  patch doesn't allow sending HDMI infoframes for HDMI 2.0 sinks,
  until the mode is 3D.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <jose.abreu@synopsys.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>

PS: This patch touches a few lines in few files, which were
already above 80 char, so checkpatch gives 80 char warning again.
- gpu/drm/omapdrm/omap_encoder.c
- gpu/drm/i915/intel_sdvo.c

V2: Rebase, Added r-b from Andrzej
V3: Addressed review comment from Ville:
	- Do not send VICs in both AVI-IF and HDMI-IF
	  send only one of it.
V4: Rebase
V5: Added r-b from Neil.
    Addressed review comments from Ville
    - Do not block HDMI vendor IF, instead check for VIC while
      handling AVI infoframes
V6: Rebase
V7: Rebase

Change-Id: I4a8e9ed2f292d3db6512e29e43661a21bb0b2a48
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-2-git-send-email-shashank.sharma@intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 0c1f528cb1)
2017-09-13 15:18:39 +08:00
Huang jianzhi
9ddbd9e7bb input: touchscreen: vtl_ts: fix compilation error
Change-Id: Ifdf10c3bb1a776389685388a0695fb1df90dcd70
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-13 09:34:58 +08:00
Zheng Yang
cafa8ebd5f drm: bridge: dw-hdmi: support workaround to clear the overflow condition on rockchip platform
Under some circumstances the Frame Composer arithmetic unit can miss
an FC register write due to being busy processing the previous one.

The issue can be worked around by issuing a TMDS software reset and
then write one of the FC registers several times. After tested, the
number of iterations of RK3399/RK3328(v2.11a), RK3368(v2.01a),
RK3288(v2.00a) is one.

Change-Id: Iba209e25d56aff84a8cc90b4d8dcb87369c9ae52
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-12 19:15:54 +08:00
Zheng Yang
5037a7f174 Revert "drm: bridge: dw-hdmi: Reorder HDMI Initialization Step"
This reverts commit 508e51e0b2.

Change-Id: I10a1a96f40b94eb2655184cf6f3a6b557afaa7ff
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-12 19:15:49 +08:00
Tang Yun ping
032b9b5b9e PM / devfreq: clk-ddr: fix bug of get lcdc type deadlock
When lcdc status changing and ddr frequency changing at the same time,
it may deadlock. Use list_for_each_entry to avoid this bug.

Change-Id: I461e705c19079ccb288e10bd4f616b0b4e5869b1
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-09-12 19:13:53 +08:00
Tang Yun ping
df885baaac PM / devfreq: rockchip-dmc: fix bug of get lcdc type deadlock
When lcdc status changing and ddr frequency changing at the same time,
it may deadlock. Use list_for_each_entry to avoid this bug.

Change-Id: I8074dc60b71650ea1afc300282f90ae8ff1ae97b
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-09-12 19:13:11 +08:00
zhoupeng
3565b1e7e8 media: rk-isp10: support bt656 signal interlace
odd and even field interlace generating a frame image.
fix cif_isp10_img_src_v4l2_subdev_enum_strm_fmts defrect info get error.
fix cif_isp10_rk3399 cif_clk_pll info doesn't match with dts config.

Change-Id: I44159c0dd4e676334221b5d5682e29d3280aa9fd
Signed-off-by: zhoupeng <benjo.zhou@rock-chips.com>
2017-09-12 19:09:55 +08:00
Huang jianzhi
49418c68f6 ARM: dts: rk3288: add the boot logo display for rk3288 act8846
Change-Id: I075db48841db504f15a15489b6b71ed20b17a015
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-12 19:09:35 +08:00
Alex Zhao
4f58925005 net: wireless: rockchip_wlan: Automatically set bcm wifi fw path
Change-Id: Iabea49eec3b9285ec1b98de6bee8b0d6d7b2dbe0
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-09-12 19:08:29 +08:00
Tao Huang
9ffa4f916a rtc: class: rockchip: print time spent in suspend
Log likes:
[   28.043238] Suspending console(s) (use no_console_suspend to debug)
INFO:    sleep mode config[0xfe]:
...
[   28.246039] PM: suspend of devices complete after 201.289 msecs
[   28.260911] PM: late suspend of devices complete after 3.238 msecs
[   28.262877] PM: noirq suspend of devices complete after 1.949 msecs
[   28.262885] Disabling non-boot CPUs ...
...
[   28.494444] Enabling non-boot CPUs ...
...
[   28.603791] PM: noirq resume of devices complete after 1.982 msecs
[   28.606132] PM: early resume of devices complete after 1.713 msecs
...
[   28.696963] Suspended for 2.265 seconds

Change-Id: If6887e62c5319f7fd39455db54190c84e5eb366b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-11 18:46:58 +08:00
Finley Xiao
21d227bdc2 MALI: utgard: support sharing regulator with other devices
If the regulator is shared between several devices then the lowest
request voltage that meets the system constraints will be used.

Change-Id: I68536a8e9cc5a78c21b55564a2ed540b9c184cb8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-11 18:37:27 +08:00
Finley Xiao
002c83bd47 MALI: utgard: Avoid GPU voltage domain keeping the initial voltage
If there is only one opp whose frequency is equal to the initial value
in opp table list, the GPU voltage domain will keep the initial voltage,
it may be too large.

Change-Id: I3dd97fe252a15b789f218f44b8fbc7d4143f7085
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-11 18:37:17 +08:00
Alex Zhao
d35fac33e5 net: wireless: rockchip_wlan: add rtl8723bu support
update rtl8723bu wifi driver to version v4.4.2_18635.20161006_BTCOEX20151228-664a

Change-Id: I7053c211228a48fd45f9084da86d97a74e82ac79
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-09-08 19:23:09 +08:00
Wyon Bi
7ba25eea80 drm/panel: simple: Add support for BOE MV238QUM-N20
This adds support for the BOE Corporation MV238QUM-N20 23.8"
eDP(HBR2, 5.4Gbps) UHD TFT LCD panel, which can be supported
by the simple panel driver.

Change-Id: I5ec47bf4864899ab437a8aea4fa0d58d338b709a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-09-08 15:29:44 +08:00
Wyon Bi
8b76818914 drm/panel: simple: Add support for LG LM238WR2-SPA1
This adds support for the LG Corporation LM238WR2-SPA1 23.8"
eDP(HBR2, 5.4Gbps) UHD TFT LCD panel, which can be supported
by the simple panel driver.

Change-Id: I586684ba893be54fbf664a8fa4dad0fe5eb999a0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-09-08 15:29:39 +08:00