Commit Graph

60 Commits

Author SHA1 Message Date
Guochun Huang b014c5e23f video/drm: display: rk356x series drive mipi pixdata on posedge
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I4494ca32618be93aa53907800ce08780f966e137
2021-02-21 15:17:44 +08:00
Guochun Huang 20618a45d9 video/drm: display: fix display route for compatibility
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I70e237967d2074d5a341d86f69c2791b5ba183ff
2021-02-21 14:22:13 +08:00
Sandy Huang cdb300bd81 video/drm: display: add compatible rk356x dtsi config
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9ef1d7ad2bfaa84b90482208421e8b7a76d051ff
2020-12-23 15:48:38 +08:00
Wyon Bi ee93770137 video/drm: Add mode_set callback for bridge
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Id08455aacc850074b1bdb67776a4182598ccdb4f
2020-08-13 09:30:51 +08:00
Jianqun Xu 2a74799b42 video: drm: Add bpc to connector_state structure
Change-Id: Ib181191ceeae8a37f32d0ed31d4cd45efdefcd75
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-08-06 17:02:23 +08:00
Wyon Bi 5cfabef40a video/drm: display: Downgrade "available display" messages to debug
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ie12ae2a2f412706eb1dc566cf3ce2226de58bfac
2020-07-30 14:59:32 +08:00
Wyon Bi ac6274b35d drm/rockchip: loader kernel bmp for rk fb driver
Always try to load kernel logo bmp.

Fixes: 5eb61944c8 ("drm/rockchip: loader kernel bmp for rk fb driver")
Change-Id: I2b85562ed04f2c6c9cc92aa994a76211d55a3fe1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-30 14:59:24 +08:00
Wyon Bi 34d0c224c5 video/drm: support get panel timing from EDID
Change-Id: I301cc9927504d90452978abe788f1c97261ff319
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-16 19:38:08 +08:00
Sandy Huang f0e8414b2a drm/rockchip: fix rgb888 format color incorrect
vop full need to do rb swap when deal with rgb888/bgr888;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I60fac72b21720fcf4f406c56fe7d9dc21ebf7635
2020-06-17 16:49:21 +08:00
Andy Yan 081dec1b2b drm/rockchip: Fix compile error when I2C_EDID disabled
Change-Id: Ibb549312d9ee2468765e61ccf5c77742bd9f5d5d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:38:15 +08:00
Sandy Huang cf53642aa6 drm/rockchip: filter the edid modes accordinig to vop max output resolution
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id338a2b3bc659799c4fb391d36fa814c44e0274d
2020-05-13 09:04:23 +08:00
Sandy Huang 2d7c136f03 drm/rockchip: add support one crtc multi connector pattern
some rockchip Soc platform just like rk3368, only have one crtc and
multi connector, we must consider the following pattern:
1. only connect lcd panel
  -> show logo at lcd panel
2. connect lcd panel and hdmi, and the resolution is different
  -> show uboot logo at mipi panel
     -> show kernel logo at mipi panel
       -> show android logo at hdmi panel
3. connect lcd panel and hdmi, and the solution is same.
  -> show logo at lcd panel and hdmi panel at the same time,the path is:
     crtc -> hdmi->hdmi panel
         |-> mipi/edp/... -> lcd panel

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7fb8452ddd128ba70ba18f288500e71c1f03ca8b
2020-03-18 16:27:28 +08:00
Sandy Huang 4927c43eb7 drm/rockchip: delete unused and repeated call
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I281e4fe6834273a10b7c289128173aff32ec4125
2020-03-18 16:25:32 +08:00
Joseph Chen 23b55d3d0f drm/rockchip: fix compile error
Error when CONFIG_ROCKCHIP_RESOURCE_IMAGE is disabled

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3e6dd7c5528409c37ad8fbdcf1cc7f5178253bb2
2020-02-28 11:14:28 +08:00
Sandy Huang 289af5f4ba drm/rockchip: add dual channel swap config
some pcb layout dual mipi/lvds channel maybe mistake. we can set
rockchip,dual-channel-swap = <1> to swap the dual channel at dts
file.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7398b83bff0fd0dedd77834ee2a8ff14f2ae11ea
2019-12-20 12:31:43 +08:00
Algea Cao 9c9eff4383 video/drm: Support rk1000
Support rk1000 cvbs.

Change-Id: I9b8f2b7ebd829f6e9d1c83deb0a81e7f88808bac
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-17 10:37:51 +08:00
Algea Cao 75eb6fceb5 video/drm: Add bridge get_timing interface
Some bridge can't get tv edid such as rk1000 cvbs, but
at present bridge can't provide timing without edid. So
we add get_timing interface to provide timing.

Change-Id: Id74802a3bff8140e3677f6633788aacd021afc91
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-17 10:37:51 +08:00
Sandy Huang 94d85f7bdd drm/rockchip: add picture aspect ratio define
Change-Id: Ie1d8313afe5f24596a989f7c8f290c734815f036
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-29 18:10:28 +08:00
Kever Yang 4ba1647c4c rockchip: display: do not print normal info
Convert these two print info into debug info:
start get public phy
inno hdmi phy init success, save it

Change-Id: I1c5ad3d313b9ef1820e3445c0de3feda68857664
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-12 15:26:29 +08:00
Sandy Huang a2d2b88ee1 video/drm: rockchip_display: add return value for automatic test
Change-Id: I6cd4f7d4bd738c7f4cf59af3a2daf46365e7c1e9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-06 10:23:50 +08:00
Shixiang Zheng ffa55e1823 video/drm: add panel node parameters for screen rotate
Change-Id: I83112f8a05bd301327d7d1ca21eda97594d95823
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-06-11 09:30:25 +08:00
Shixiang Zheng 7e72214d51 video/drm: logo: the negative height will cause vop register err
the bmp file has been processed when reserved equals BMP_PROCESSED_FLAG

Change-Id: I793582cdd4ee5ee2a774c7a0dee8d36c81ed4f4c
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-09 14:44:20 +08:00
Wyon Bi 005d29a79d video/drm: rockchip_display: support get display mode from edid if client is not present
Change-Id: Ib8956972b7bbb6aaaac2e3c8a93e0d38d98abf6a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-05 15:24:33 +08:00
Wyon Bi 49ae8667cc video/drm: display: atomic display enable handling
Change-Id: If71e8590fb4e1b1e743d4b085e42b7530f518084
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 11:40:17 +08:00
Wyon Bi 7cacd0a851 video/drm: panel/phy code style clean up and fixes
Silence debug messages if the panel/phy does not exist.

Change-Id: Ifa027017e9aa9af54992e26f2bbde7048b22bb04
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-12-26 18:45:39 +08:00
Wyon Bi 1a8d717c29 video/drm: Add rockchip bridge framework
The current implementation assumes that the only possible peripheral
device is a panel. Using an output bridge device should also be possible.

Such sequence is required by Rockchip RK618 bridge, which is a RGB
peripheral bridge device.

Change-Id: I3e4e5e9e23c8ed7c74ed1276946b7b54f4cd5ee8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-12-26 18:45:37 +08:00
Masahiro Yamada 0e00a84cde UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Sandy Huang 861ce1a007 Revert "Add: Allow logo in 16bit or 32bit color BMP"
This reverts commit 39965620e8.

Change-Id: Ic2996614b9cddc1835b079c2e7ac784daa99ad3f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-11-30 11:27:06 +08:00
Sandy Huang 55e2f86dd4 Revert "video/drm: logo: fix show 8bit bmp logo failed"
This reverts commit 78d830ca5b.

Change-Id: Ic2996614b9cddc1835b079c2e7ac784daa99ad3a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-11-30 11:26:19 +08:00
Kever Yang a196d7fc6a rockchip: display: handle error when there is no 'mcu-timing'
The 'mcu-timing' may not in dts, and the following access will
cause assert of invalid of_node.

Change-Id: I98cfed0de471b8985642e7ffc14ab2e97ef6f575
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-11-19 11:53:00 +08:00
Gaoyang Ye 78d830ca5b video/drm: logo: fix show 8bit bmp logo failed
Remark: 3996562  (Add: Allow logo in 16bit or 32bit color BMP)

Change-Id: Ie5b1ed4af1c09ad0af3101b882278ecf3b8c6b35
Signed-off-by: Gaoyang Ye <gaoyang.ye@rock-chips.com>
2018-10-30 09:05:43 +08:00
Sandy Huang 1e4c51caed drm/rockchip: update drm uboot driver version to v1.0.1
Change-Id: I186b6ee6887047baff111538b5b2fe78b9285fc8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-11 09:21:28 +08:00
Ye Gaoyang 39965620e8 Add: Allow logo in 16bit or 32bit color BMP
Change-Id: Ife719d3d567df4c98d40ddfe67c6952fa2929fec
Signed-off-by: Ye Gaoyang <gaoyang.ye@rock-chips.com>
2018-10-08 14:49:01 +08:00
Wyon Bi 15081c5058 video/drm: Refactor phy code
Change-Id: Id56d83b954eacf47228278562fb5d94409020517
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-08 14:46:49 +08:00
Wyon Bi f8281ef08a video/drm: display: add rockchip_of_find_connector function
Fixes: 747dfc263c (video/drm: display: add rockchip_of_find_connector function)
Change-Id: Idec9b8a0924fd7863ff39f59bdf2d596332b8e75
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-09-05 10:44:18 +08:00
Sandy Huang 54fc9addaa drm/rockchip: add a safety mothed to restore logo file
we found the name value from the following function will
be null at rockchip_display_fixup(), so we instore this
value at display_state local parameter.
    ofnode_read_string_index(node, "logo,kernel", 0, &name))

Change-Id: I18c6b2a699cf8063d4b9e43b7627c388746dcff0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-08-23 10:27:41 +08:00
Wyon Bi 747dfc263c video/drm: display: add rockchip_of_find_connector function
The connector node may not be a child of root node, make it more generic.

Change-Id: I1a8a2176710579417f53953e6c1a813bf715f7a1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-23 10:26:10 +08:00
Algea Cao 2a48727aba drm: Transplant tve code from rkdevelop
Support tve in rk322x and rk322xh.

Tested in rk3328, rk3229, rk3128h.

Change-Id: I96a5034bced08e89bc9767ce7479ad4cf00ee4a5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-08-15 10:10:19 +08:00
Algea Cao 8e2bab3fc5 drm: Transplant dw-hdmi code from rkdevelop
1.Updating edid parse method.
2.New hdmi i2c control method.
3.Adding mode filter.
4.Adding color select method.
5.Support hdmi 2.0.
6.Adding baseparameter reading.
7.Support HDCP 1.4.

Tested in rk3399/rk3229/rk3128h/rk3328.

Change-Id: I2b3b1fb0079e97ba4b737781356e920548d6ad75
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-08-15 10:10:19 +08:00
Sandy Huang bcf9093629 drm/rocckhip: fix panic when enable hdmi at uboot
hdmi without panel, so we must confirm panel->func
and panel_data->panel isn't NULL.

Change-Id: I87abec5d04e26bdab4cb643f7ed5757f3e31c918
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-13 10:52:15 +08:00
Sandy Huang 67b9012c29 drm/rockchip: add support mcu screen
the mcu screen need send init command through crtc, so we add
the function display_send_mcu_cmd() from panel to crtc.

Change-Id: Ide4a6043dff0a7b0040bf62b1aa1814f3c365235
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-10 18:02:11 +08:00
Sandy Huang 5eb61944c8 drm/rockchip: loader kernel bmp for rk fb driver
Kernel rkfb driver need a separate function to load the kernel bmp,
which is different with kernel using drm driver.

Change-Id: I01662bf88e47e685f2a4ee1c4306f1f7e69bed3b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-05-29 11:26:56 +08:00
Kever Yang 694afdc865 rockchip: display: support reserve memory for rkfb
Some rockchip SDK like rk3399 Android 6.0 is still using rkfb in
kernel as display framework, in this case we need to:
- use a separate dtb in U-Boot which is drm display node;
- disable CONFIG_USING_KERNEL_DTB in U-Boot
- pass the reserve memory for kernel rkfb in U-Boot

Change-Id: I80df05d3cf15dce203c4397544b65f80fde1d22a
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-05-29 10:04:10 +08:00
Sandy Huang 3a06149e72 drm/rockchip: vop: add support dclk polarity invert config
some platform like rk3288,rk3368 and px30, the rgb/lvds dclk
polarity need to config grf config, other platform can config
vop register to set dclk invert.

Change-Id: Ica3b7b388d7650628c08007b327753caeeba3b0e
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-24 08:49:44 +08:00
Wyon Bi c493d00e7c video/drm: Merge panel driver into one driver
This merges the rockchip panel driver into the common driver.
This will make it easier to share code between the drivers and
eventually merge them into one driver.

Change-Id: I4c59e5f4f39ffc43b4d0339de8dfa23aec28220b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-21 16:46:17 +08:00
Sandy Huang 52015e9715 drm/rockchip: drm driver version only need print once
Change-Id: I34999b0cf660437e6c2794137a4f35e89025a965
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-12 11:27:50 +08:00
Sandy Huang e559407d6e drm/rockchip: add version control for uboot drm driver
Add basic version for rockchip UBOOT DRM driver

Change-Id: Ia1b3862bce75f68e1bf9919cad285ba141492b01
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-02 15:50:51 +08:00
Sandy Huang f11b858f2e drm/rockchip: add more checkout mode
check detail timing for the some resolution but different fps

Change-Id: I103060aff3a64e9e285b5a5f87e71528cd053728
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
(Cherry pick from commit 335b9e52fbf97edb43c75bb1bc21dd10db5616bc)
2018-02-27 10:12:54 +08:00
Sandy Huang 8a2a3a29b6 drm/rockchip: vop: add support overscan
add vop post scale for some TV overscan

Change-Id: I1f310d9d65a8a0ea2a0d3100954ef4ff0a587f4d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
(Cherry pick from commit 68d08545b912610f63a3cdb0e1e13ca44b1abc1f)
2018-02-27 10:12:54 +08:00
Sandy Huang ccd843b928 drm/rockchip: add support interlace mode output
add interlace timing config for hdmi/cvbs interlace output mode

Change-Id: Ic0bb06667a5c56d81f5229b7ef87baef9e0e5f32
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
(Cherry pick from commit 3452c2ff12f80f249bc54d28bc3c52d089f76a8a)
2018-02-27 10:12:54 +08:00