Commit Graph

613216 Commits

Author SHA1 Message Date
Tao Huang
a18dc3e071 arm64: rockchip_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Change-Id: Iceacfa9d79a1c1fe1b8ab97fe5257ad894d596b9
Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 20:04:01 +08:00
Tao Huang
d376ad8f23 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (1212 commits)
  ANDROID: sdcardfs: Change current->fs under lock
  ANDROID: sdcardfs: Don't use OVERRIDE_CRED macro
  ANDROID: restrict store of prefer_idle as boolean
  BACKPORT: arm/syscalls: Optimize address limit check
  UPSTREAM: syscalls: Use CHECK_DATA_CORRUPTION for addr_limit_user_check
  BACKPORT: arm64/syscalls: Check address limit on user-mode return
  BACKPORT: x86/syscalls: Check address limit on user-mode return
  BACKPORT: lkdtm: add bad USER_DS test
  UPSTREAM: bug: switch data corruption check to __must_check
  BACKPORT: lkdtm: Add tests for struct list corruption
  UPSTREAM: bug: Provide toggle for BUG on data corruption
  UPSTREAM: list: Split list_del() debug checking into separate function
  UPSTREAM: rculist: Consolidate DEBUG_LIST for list_add_rcu()
  BACKPORT: list: Split list_add() debug checking into separate function
  FROMLIST: ANDROID: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.
  BACKPORT: arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
  ANDROID: arm64: mm: fix 4.4.154 merge
  BACKPORT: zsmalloc: introduce zs_huge_class_size()
  BACKPORT: zram: drop max_zpage_size and use zs_huge_class_size()
  ANDROID: tracing: fix race condition reading saved tgids
  ...

Change-Id: I9f23db35eb926b6fa0d7af7dbbb55c9a37d536fc
2018-10-10 19:37:13 +08:00
Tao Huang
90a00e3789 ARM: rockchip_defconfig: update by savedefconfig
Change-Id: I06ad15523c629920cd3851c7e8f7ee4fc1391687
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 19:36:25 +08:00
Tao Huang
4800ce2b29 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I8e62cee144c07b4c5910fd3124aeece4640d0df9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 19:33:08 +08:00
Tao Huang
9b1d6cb325 staging: ion: rockchip: remove useless ION_IOC_GET_PHYS
Recent ION do not support ion_handle_get_by_id. So ION_IOC_GET_PHYS
is broken. Remove custom ioctl support entirely.

Change-Id: I591d4b8521a96d17cd2171c7b364e44d1b97cf24
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-10 18:50:25 +08:00
Hu Kejun
ea8f1b0e82 iommu/rockchip: add sclk
On some platform, it needs aclk/hclk/sclk for using iommu.

Change-Id: Iaf60124e225d418af8bbf1e0b4a31e907358fcfd
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-10-10 16:41:03 +08:00
Finley Xiao
ebfecc19e2 arm64: dts: rockchip: Enable tsadc for rk1808-evb-v10
Change-Id: I8379e218afdbbd702e5094d96991d85cba10dd55
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-10 16:39:29 +08:00
Elaine Zhang
b1680c7da9 arm64: dts: rockchip: rk1808: add pinctrl for clkin/out_32k
Change-Id: I31cb6a789e43933d759c1b667f97d20cd2c97eda
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-10 16:37:39 +08:00
Elaine Zhang
54e75c20ac clk: rockchip: rk1808: add clk ID for clk_rtc32k_frac
Change-Id: Iecde141adbee536285155c64267580bde2ce5b13
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-10 11:32:20 +08:00
Finley Xiao
701dfebbed arm64: dts: rockchip: rk1808: Add opp table for cpu
Change-Id: Ie9d683c59d61a83cb1e5e7df73e56bedffa56cfd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-10 10:46:50 +08:00
Tao Huang
0b9b266a6c arm64: rk1808_linux_defconfig: enable CPU_IDLE
Change-Id: I9a3b58bfa1d333575afb7b448de62fe922dfbe1f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-09 20:36:49 +08:00
Bian Jin chen
f1963f7c9a arm: rockchip_defconfig: enable CONFIG_F2FS_FS_ENCRYPTION.
Android Go device require this config for performance test,
enable it by default.

Test: ./performance_test/system/checkout_f2fs.sh

Change-Id: Id5a9b33da24eec768d60e158af72dd9af216f653
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2018-10-09 15:49:06 +08:00
Elaine Zhang
cf68108ad4 arm64: dts: rockchip: rk1808-evb: fix up the polarity for syr8xx vsel gpio
Set vsel gpio low to disable vdd_npu.
Set vsel gpio high to enable vdd_npu.
The vsel pin is pull up by hw default.

Change-Id: I86ef1f2d6d2a0dd26a128cba1e52a140e6844291
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 15:31:57 +08:00
Bian Jin chen
d0f8f60d0b arm64: rockchip_defconfig: enable CONFIG_F2FS_FS_ENCRYPTION.
Android Go device require this config for performance test,
enable it by default.

Test: ./performance_test/system/checkout_f2fs.sh

Change-Id: If6d07a82546759f672df8519d113a702c3bcfbe3
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2018-10-09 15:11:30 +08:00
Finley Xiao
2e53d62c04 thermal: rockchip: Use incremental code table for rk1808
Change-Id: I2d0f379fb08eaf4a4819bc36bcb61e5ca4a50d45
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-10-09 15:02:39 +08:00
Elaine Zhang
1c450a8082 clk: rockchip: rk1808: rename SCLK_GPIO to DBCLK_GPIO
Change-Id: I1ed6fe175fb2e640a7a61e1a2e799e94e76b435f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 14:59:04 +08:00
Tao Huang
c7f27e053c rk: gcc-wrapper.py: set LC_ALL=C when run gcc
Make sure messages are not affected by locale environment variables.

Change-Id: Id5606c1a8e1f7a8f09d4e14c4531daebaceef2bf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-09 14:43:04 +08:00
Elaine Zhang
43ab68e6c6 clk: rockchip: rk1808: add FRAC_MAX_PRATE limit for vop/uart/i2s/pdm
Change-Id: I444203484272e442fc0798a3daaaba0aee2dda31
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 11:52:47 +08:00
Wyon Bi
0ef8e328e9 drm/rockchip: dsi: support request ACK from peripheral
Allow enables the acknowledge request after each packet transmission.

Change-Id: Ie8b2e49da0f2cae8bf99b4b555d42fbb640f8e37
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-09 11:51:48 +08:00
Wyon Bi
3ef4c2204f drm/rockchip: dsi: Bypass TLP clock lane and data lanes counter threshold
Most of TLP is contributed by the counter programming:
	TLP = ((counter_threshold + 1) x TXBYTECLKHS) + constant_time
where:
	constant_time corresponds to internal D-PHY FSM state and
	Analog Front End (AFE) timing variation

Change-Id: Icee77dee0772afbcecc5e883572061162ed0fc4f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-09 11:51:48 +08:00
Ziyuan Xu
472f9736a6 arm64: dts: rockchip: rk1808: change the clock resource index
The pinctrl-rockchip driver get the clock resource by of_clk_get
within the index 0 which requires the index of pclk_gpio should
be fixed to 0.

Change-Id: I619f12cb53002996d96f142c8889852be75c61e7
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-09 10:21:59 +08:00
Wyon Bi
b4a27215c5 drm/panel: simple: Add support for dcs backlight
Change-Id: Id9380a16c1db606f30032259a3bbba0884731c97
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-09 09:55:08 +08:00
Herman Chen
b4caa420fd arm64: rk1808_linux_defconfig: build vcodec driver
Build vcodec driver by default.

Change-Id: I4a4a084f14bf3408644f75fdaa7ecbc7846efd8f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-09 09:51:42 +08:00
Herman Chen
c48a5e5a92 arm64: dts: rockchip: rk1808-evb-v10: enable vcodec
Enable vcodec device.

Change-Id: I5edb27766088951ba6bd713c3457fe191c5bb75f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-09 09:51:28 +08:00
Herman Chen
6494f3f0b4 arm64: dts: rockchip: rename vpu to vpu_service
/dev/vpu is the old device name. New driver always use vpu_service
as default vcodec driver name.

Change-Id: I19896d92336291d0035fa4ed7b466cb64fd96d78
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-09 09:35:22 +08:00
Ziyuan Xu
50cf0c088c arm64: dts: rockchip: rk1808-evb: support adc keys
Change-Id: I602270b2fe4a32fa2ee3930eb411aef68167f9b9
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-09 09:34:45 +08:00
Elaine Zhang
fb4fc53dc8 dt-bindings: clock: rk1808-cru: fix up the ID number repetition
HCLK_ISP and HCLK_CIF ID num are all 205.

Change-Id: Ia43cf6a8cd65e43673b4ebfe63bd92a3115740ab
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-09 09:27:51 +08:00
Cai YiWei
c8b8e8b1e0 media: rk-isp10: rk3399 software reset instead of hardware reset
Change-Id: I9893bf237bda078b6dc16c8d504bdcdc16861cc9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-10-09 09:16:34 +08:00
Tao Huang
fc7271aeff Revert "arm64: dts: rockchip: fix reg length for cru on RK1808 SoCs"
This reverts commit 827031a1ca.

PMU_CRU offset is 0x4000

Change-Id: Ia535a255030b530949bc205414dca86ffd7ff6b6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-08 20:21:42 +08:00
Tao Huang
fd65ecb2e4 Revert "clk: rockchip: rk1808: fix PMU_CRU offset"
This reverts commit 3e9d3367b9.

PMU_CRU offset is 0x4000

Change-Id: Ibce2c7fc6b7995c128dde4809446b1b428f893aa
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-08 20:19:57 +08:00
Simon Xue
8bfddc4b60 arm64: dts: rockchip: rk1808-evb: enable saradc
Change-Id: I481c7d710c360422a2f42b2e03afe859bfad2c95
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-08 19:43:02 +08:00
Simon Xue
860d4f92e5 dt-bindings: adc: add description for rk1808 saradc
Change-Id: I047410349c527495f5b414d98054e535fc168524
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-10-08 19:32:21 +08:00
Simon Xue
0635448421 arm64: dts: rockchip: rk1808: add saradc
Change-Id: Ib3b2062ecd7190f9b33db3c6d8ffc72e7038d7f8
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-10-08 19:32:15 +08:00
Ziyuan Xu
5f5bb7f350 arm64: dts: rockchip: rk1808-evb: fixup uart4_rts pinctrl error
Fixup the default pinctrl configuration for uart4-rts-gpio:
rockchip-pinctrl pinctrl: unable to find group for node uart4-rts-gpio

Change-Id: Ic25375aeba924ba0314ad5660b3ee4f18ea8c0cc
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-08 19:29:43 +08:00
Sandy Huang
93d4775b86 arm64: dts: rockchip: rk1808: Add #address/#size-cells to csi
DTS warning:
arch/arm64/boot/dts/rockchip/rk1808-evb-v10-csi-tx.dtb: Warning
(reg_format):	"reg" property in /csi@ffb20000/panel@0 has invalid
length (4 bytes) (#address-cells == 2, #size-cells == 1)
arch/arm64/boot/dts/rockchip/rk1808-evb-v10-csi-tx.dtb: Warning
(avoid_default_addr_size): Relying on default #address-cells value for
/csi@ffb20000/panel@0

Change-Id: I017f4242963b15b7d09fe24c8ed106081c287e21
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-08 19:28:10 +08:00
Wyon Bi
8d080a0b20 drm/rockchip: dsi: Allow transmission of commands in high-speed in video mode
DWC_mipi_dsi_host can be configured to send the low-power (LP)
commands during the HS video mode transmission. To enable this
feature, set the lp_cmd_en bit of the VID_MODE_CFG register to 1.
In this case, it is necessary to calculate the time available,
in bytes, to transmit a command in LP mode to Horizontal Front Porch (HFP),
Vertical Sync Active (VSA), Vertical Back Porch (VBP), and
Vertical Front Porch (VFP) regions.

Bits 8 to 13 of the VID_MODE_CFG register indicates if DWC_mipi_dsi_host
can go to LP when in idle. If the lp_cmd_en bit is set (1'b1) and
non-video packets are in queue, DWC_mipi_dsi_host ignores the LP
configuration and transmits LP commands, even if it is not allowed
to enter LP in a specific region. After the LP commands transmission,
DWC_mipi_dsi_host remains in LP until a sync event occurs.

If the lp_cmd_en bit of the VID_MODE_CFG register is 0, the commands
are sent in high-speed in Video Mode. In this case, the DWC_mipi_dsi_host
automatically determines the area where each command can be sent and no
programming or calculation is required.

Change-Id: Id47982c2c7605be17c4d295707fd5496f32f79fe
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-08 16:32:59 +08:00
vkorjani
2a45f7557a UPSTREAM: drm: Add support for pps and compression mode command packet
After enabling DSC we need to send compression mode command packet
and pps data packet, for which 2 new data types are added
07h  Compression Mode Data Type Write , short write, 2 parameters
0Ah  PPS Long Write (word count determines number of bytes)
This patch adds support to send these packets.

Cc: David Airlie <airlied@linux.ie>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org

Changes in v3:
- None

Signed-off-by: vkorjani <vikas.korjani@intel.com>
[seanpaul removed pps_write_buffer fn, added types to packet_format helpers]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

Change-Id: I5597a4ca8fdf128faa52d87e7513a5be1e7a87da
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit ea107a183b)
2018-10-08 16:32:59 +08:00
Philippe Cornu
d00e4b7dac UPSTREAM: drm/dsi: Fix improper use of mipi_dsi_device_transfer() return value
The function mipi_dsi_device_transfer() returns the number of transmitted
or received bytes on success or a negative error code on failure.

The functions mipi_dsi_shutdown_peripheral(), mipi_dsi_turn_on_peripheral() &
mipi_dsi_set_maximum_return_packet_size() use improperly this returned
value in case of success: 0 should be returned instead of the number of
transmitted bytes.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180112144847.18810-1-philippe.cornu@st.com

Change-Id: I7709da898423e6149d3d95088ad795a20b867a7b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 6ac6929028)
2018-10-08 16:32:58 +08:00
Vinay Simha BN
98d6838916 UPSTREAM: drm/dsi: Implement DCS set/get display brightness
Provide a small convenience wrapper that set/get the display brightness.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Archit Taneja <archit.taneja@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I501ffb4b31ab2c8950ed1c4b84fb241d4b6aaae0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 1a9d759331)
2018-10-08 16:32:58 +08:00
Thierry Reding
6f75206dd7 UPSTREAM: drm/dsi: Order DCS helpers by command code
Most of these helpers had been introduced in the correct order, but some
were simply appended, which wasn't detected when they were applied.

Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: Ic540fb4d541b32c21f9f2348aba3f4cae5c99fa6
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit bbdcf516a6)
2018-10-08 16:32:58 +08:00
Thierry Reding
53db5bc1ac UPSTREAM: drm/dsi: Make set_tear_scanline command consistent
Use a consistent name for the function that implements set_tear_scanline
and reword and reformat the kerneldoc slightly.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160613133327.7630-1-thierry.reding@gmail.com

Change-Id: I67354ce8ff2bccfd9cd51a573d3007952057230c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 6308c983d7)
2018-10-08 16:32:58 +08:00
Thierry Reding
62f4efb216 UPSTREAM: drm/dsi: Add uevent callback
Implement a uevent callback for devices on the MIPI DSI bus. This
callback will append MODALIAS information to the uevent and allow
modules to be loaded when devices are added to the bus.

Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I580c1fb721330a5088f8ddf233a635c607277729
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit babb24fec1)
2018-10-08 16:32:57 +08:00
Vinay Simha BN
bf8bc184f3 UPSTREAM: drm/dsi: Implement set tear scanline
Provide a small convenience wrapper that transmits
a set_tear_scanline command.

v2:
  * helper function suggested by Thierry
    for set_tear_scanline
  * Also includes small build fixes from Sumit Semwal.

v3: one scanline parameter suggested by jani

v4: passing the payload properly as suggested by jani

Cc: Archit Taneja <archit.taneja@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465285532-12676-1-git-send-email-simhavcs@gmail.com

Change-Id: Ic20f27190dd048ecd16b01a23ccd815156ee9512
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit e839508163)
2018-10-08 16:32:57 +08:00
Archit Taneja
84beccf97f UPSTREAM: drm/dsi: Get DSI host by DT device node
MIPI DSI devices are inherently aware of their host because they share a
parent-child hierarchy in the device tree.

Non-DSI drivers that create DSI device don't have this data. In order to
get this information, they require to a phandle to the DSI host in the
device tree.

Maintain a list of all the DSI hosts that are currently registered. This
list will be used to find the struct mipi_dsi_host corresponding to the
device tree node passed to of_find_mipi_dsi_host_by_node().

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I9d1a42c45707ec4b22e67e6b4aad058b3a5254df
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 97b6ae50e0)
2018-10-08 16:32:57 +08:00
Archit Taneja
8f107f3db3 UPSTREAM: drm/dsi: Add routine to unregister a DSI device
A driver calling mipi_dsi_device_register_full() might want to remove
the device once it's done. It might also require it in an error handling
path in case something went wrong.

Create mipi_dsi_device_unregister() for this purpose and use it within
mipi_dsi_remove_device_fn() as it does the same thing.

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I538bd028851bb27dbf7c93d459b8276d7271dae8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 509e42ce04)
2018-10-08 16:32:57 +08:00
Archit Taneja
c853fbcafc UPSTREAM: drm/dsi: Try to match non-DT DSI devices
Add a device name field in struct mipi_dsi_device. This name is not the
same as the device name (which is of the format "hostname.reg"). When
the device is created via DT, this name is set to the modalias string.
In the non-DT case, the driver creating the DSI device provides the
name by populating a field in struct mipi_dsi_device_info.

Matching for DT case would be as it was before. For the non-DT case, we
compare the device and driver names. Other buses (like I2C/SPI) perform
a non-DT match by comparing the device name and entries in the driver's
id_table. Such a mechanism isn't used for the DSI bus.

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I68d4e46fb82ccce4e578256c031d6ee329d5eb1b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit bf4363ce3a)
2018-10-08 16:32:56 +08:00
Archit Taneja
fe98b92275 UPSTREAM: drm/dsi: Use mipi_dsi_device_register_full() for DSI device creation
Use mipi_dsi_device_register_full() for device creation. This takes in
a struct mipi_dsi_device_info as a template to populate the DSI device
information.

The reason to introduce this is to have a way to create DSI devices not
available via DT. Drivers that want to create a DSI device can populate
a struct mipi_dsi_device_info and call this function. For DSI devices
available via DT, of_mipi_dsi_device_add() is used as before, but this
now calls mipi_dsi_device_register_full() internally.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I0fc26d2bbffd9368ceb50c1660ff74c4ab808b6b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit c63ae8a968)
2018-10-08 16:32:56 +08:00
Archit Taneja
28ffa53620 UPSTREAM: drm/dsi: Check for CONFIG_OF when defining of_mipi_dsi_device_add()
of_mipi_dsi_device_add() is used only when CONFIG_OF is enabled. It
currently works if OF support is disabled, but this will change when we
add more functionality to it.

Define the original function if CONFIG_OF is enabled and a dummy
function otherwise.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

Change-Id: I5815c8fe403b65989bfbaf33aba208d83634fa4a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit fc903ebd50)
2018-10-08 16:32:56 +08:00
Deepak M
f549a90fc4 UPSTREAM: drm: Add new DCS commands in the enum list
Adding new DCS commands which are specified in the
DCS 1.3 spec related to CABC.

v2: Sorted the Macro`s by value (Andrzej)

v3 by Jani: sort all of enum, refer to MIPI DCS 1.3

Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: <dri-devel@lists.freedesktop.org>
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Deepak M <m.deepak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1459346623-30752-1-git-send-email-jani.nikula@intel.com

Change-Id: I7efe6989d3c10b26d21137bfab7e933b00859a20
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 249c4f538b)
2018-10-08 16:32:55 +08:00
Meghana Madhyastha
ef16a0c44b UPSTREAM: video: backlight: Add helpers to enable and disable backlight
Add helper functions backlight_enable and backlight_disable to
enable/disable a backlight device. These helper functions can
then be used by different drm and tinydrm drivers to avoid
repetition of code and also to enforce a uniform and consistent
way to enable/disable a backlight device.

Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/39b5bf0a02008a8072d910bdf8231c431e9ef504.1516810725.git.meghana.madhyastha@gmail.com

Change-Id: I66bb87531ee94977376cde33070ab2650f6dfcf5
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 5b698be049)
2018-10-08 16:32:55 +08:00