History log of /rk3399_rockchip-uboot/drivers/video/drm/rockchip_display.c (Results 1 – 25 of 148)
Revision Date Author Comments
# 60e6e79d 04-Jun-2025 Sandy Huang <hjc@rock-chips.com>

drm/rockchip: vop2: add vop reset when vp is active state

For one VOP dual os environment, the secondary OS maybe reboot without display
disable or SOC global reset, the hardware may be active state

drm/rockchip: vop2: add vop reset when vp is active state

For one VOP dual os environment, the secondary OS maybe reboot without display
disable or SOC global reset, the hardware may be active state, so add this
reset to avoid unexpected issues, one VOP dual os dts config example:

linux dts:
&vop {
iommus = <&vop_mmu1>;
rockchip,share-mode-axi-id = <1>;
rockchip,share-mode-val = <(ROCKCHIP_VOP2_SHARE_MODE_PRIMARY)>;
rockchip,share-mode-vp-mask = <(1 << ROCKCHIP_VOP_VP2)>;
rockchip,share-mode-plane-mask = <(1 << ROCKCHIP_VOP2_ESMART2 | 1 << ROCKCHIP_VOP2_ESMART3)>;
};

android dts:
&vop {
iommus = <&vop_mmu>;
rockchip,share-mode-axi-id = <0>;
rockchip,share-mode-val = <(ROCKCHIP_VOP2_SHARE_MODE_SECONDARY)>;
rockchip,share-mode-vp-mask = <(1 << ROCKCHIP_VOP_VP0 | 1 << ROCKCHIP_VOP_VP1)>;
rockchip,share-mode-plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_CLUSTER1 |
1 << ROCKCHIP_VOP2_ESMART0 | 1 <<ROCKCHIP_VOP2_ESMART1)>;
};

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I276972204c53538932cd653ec131be7f067c7f82

show more ...


# c1bbfc5b 22-Nov-2024 Sandy Huang <hjc@rock-chips.com>

video/drm: display: add support drm-logo memory assigned from dts

For dual os, logo memory will be reserved as following list, we can
get the currect memory from memory-region phandle:

/* DRM l

video/drm: display: add support drm-logo memory assigned from dts

For dual os, logo memory will be reserved as following list, we can
get the currect memory from memory-region phandle:

/* DRM logo for OS0 */
drm_logo_os0: drm-logo-os0@90600000 {
reg = <0x00000000 0x90600000 0x00000000 0x02100000>;
compatible = "rockchip,drm-logo-os0";
};

/* DRM logo for OS1 */
drm_logo_os1: drm-logo-os1@92700000 {
reg = <0x00000000 0x92700000 0x00000000 0x02100000>;
compatible = "rockchip,drm-logo-os1";
};

OS0:
&display_subsystem {
memory-region = <&drm_logo_os0>, <&drm_cubic_lut>;
memory-region-names = "drm-logo", "drm-cubic-lut";
};

OS1:
&display_subsystem {
memory-region = <&drm_logo_os1>, <&drm_cubic_lut>;
memory-region-names = "drm-logo", "drm-cubic-lut";
};

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I66b40e22f02b298ff4487fdbbf3da6c3d6e5fab7

show more ...


# 45ec9215 13-Feb-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: vop2: Ensure rk3576 sharp/post-scaler/split are mutually exclusive

VOP sharp/post-scaler/split use the same line buffer.
They must be mutually exclusive, otherwise the picture
will displa

video/drm: vop2: Ensure rk3576 sharp/post-scaler/split are mutually exclusive

VOP sharp/post-scaler/split use the same line buffer.
They must be mutually exclusive, otherwise the picture
will display abnormally.

Change-Id: Ib71992b52496f44e28e93ce2c992fa1cfccd2b64
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# d00abaef 01-Mar-2024 Wenping Zhang <wenping.zhang@rock-chips.com>

video/drm: display: add support for video console mode

In video console mode, the logs will be showed in the panel/monitor.

To enable the video console mode, the following Kconfig options are
requi

video/drm: display: add support for video console mode

In video console mode, the logs will be showed in the panel/monitor.

To enable the video console mode, the following Kconfig options are
required:

/* enable the video console */
CONFIG_ROCKCHIP_VIDCONSOLE=y

The default horizontal resolution of video console is the minimum
&drm_display_mode.crtc_hdisplay of the VPs, and the vertical
resolution is the minimum &drm_display_mode.crtc_vdisplay. The bits
per pixel is set to 32 by default.

To set the resolution of video console to 1920x1080 with 16bpp
manually, the following Kconfig options should be set:

/* the resolution of the video console */
CONFIG_ROCKCHIP_VIDCONSOLE_WIDTH=1920
CONFIG_ROCKCHIP_VIDCONSOLE_HEIGHT=1080

/* the bits per pixel the of video console */
CONFIG_ROCKCHIP_VIDCONSOLE_BPP32 is not set
CONFIG_ROCKCHIP_VIDCONSOLE_BPP16=y
CONFIG_ROCKCHIP_VIDCONSOLE_BPP8 is not set

The default video console framebuffer size is 16M, and it can be
calculated by:
size = ROUNDUP(width x height x bpp / 8 / 1024 / 1024)
Take 1080p 32bpp as an example:
size = ROUNDUP(1920 x 1080 x 32 / 8 / 1024 / 1024) = 8M

And the following Kconfig option may be set:

/* the framebuffer size of video console */
CONFIG_ROCKCHIP_VIDCONSOLE_MEM_RESERVED_SIZE_MBYTES=8

To confirm the video console is initialized successfully, the logs
may be like:

......
Enable video console mode: resolution[1920x1080] bpp[16]
......

Change-Id: I667f896cfcdf1d6460f63db2f0cb7c29d3b11de2
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# aa3695c1 31-Mar-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: Fix the return value check for display_check()

If the display_check() sets &display_state.is_init to false and
returns an error, it is unnecessary to call the later functions
dis

video/drm: display: Fix the return value check for display_check()

If the display_check() sets &display_state.is_init to false and
returns an error, it is unnecessary to call the later functions
display_set_plane() and display_enable(), which check
&display_state.is_init at the beginning.

Additionally, the display_check() will not be called if
&display_state.is_init is false in display_logo(), so it is more
appropriate to return -EINVAL in this scenario for the future
expansion.

Fixes: ("820a5c17943 drm/rockchip: display: add display check")
Change-Id: Ib3552a9abf5e22c1f7963d15bca9a71a0502ee50
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 668e6278 19-Mar-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: vop2: support to use the win scale to configure overscan parameters

For some platforms, such as RK3576, use the win scale instead
of the post scale to configure overscan parameters, becau

video/drm: vop2: support to use the win scale to configure overscan parameters

For some platforms, such as RK3576, use the win scale instead
of the post scale to configure overscan parameters, because the
sharp/post scale/split functions are mutually exclusice.

Change-Id: Iffb7d9eadca2ae9eefb71f14a91382e236f90e40
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# b4fa21de 05-Mar-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: vop2: modify the check related to the cursor plane

In order to sync the cursor plane assignment with Kernel, the
modifications are as follows:
1.Change the type of &rockchip_vp.cursor_pla

video/drm: vop2: modify the check related to the cursor plane

In order to sync the cursor plane assignment with Kernel, the
modifications are as follows:
1.Change the type of &rockchip_vp.cursor_plane_id and
&vop2_vp_plane_mask.cursor_plane_id from int to u8.
2.Remove the unnecessary &vop2_data.plane_table.
3.Assign cursor plane according to the &vop2.possible_vp_mask and
&vop2_win_data.plane_type in the scenario where the cursor plane
specified in DTS is invalid.
4.Add cursor plane check in vop2_plane_mask_check().

Fixes: ee008497bf7 ("drm/rockchip: vop2: add adjust cursor plane")
Change-Id: I50e9a55d42f24131c50b351b2deb02bae1b003b2
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 6fea745c 12-Feb-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: vop2: modify the check related to the plane mask and primary plane

The check rule for plane mask that assigned in DTS is:

If plane_mask is assigned in DTS, then every plane need to be as

video/drm: vop2: modify the check related to the plane mask and primary plane

The check rule for plane mask that assigned in DTS is:

If plane_mask is assigned in DTS, then every plane need to be assigned
to one of all the VPs, and no single plane can be assigned to more than
one VP.

In order to check whether the plane mask and primary plane assigned in
DTS are valid, the modifications are as follows:
1.Move the process of automatically assigning the plane mask to a new
function vop2_plane_mask_assign(), which can also be called if the
plane mask and primary plane are invalid.
2.Add the &vop2_data.plane_mask_base for all platforms to help check
whether the plane mask assigned in DTS is valid.
3.Add the new function vop2_plane_mask_check() to check the plane mask
that assigned in DTS according to the above rule. If the return value
of vop2_plane_mask_check() is false, then automatically assign the
plane mask using the function vop2_plane_mask_assign().
4.Transfer valid plane mask that assigned in DTS to the
&vop2.possible_vp_mask. And the &vop2.possible_vp_mask is used in
vop2_win_can_attach_to_vp() to check whether the plane can attach to
the specific VP.
5.Remove &vop2_data.vp_default_primary_plane related codes, and Assign
default primary plane according to &vop2.possible_vp_mask and
&vop2_win_data.plane_type in the scenario where the plane mask is not
specified in DTS
6.Remove &vop2_data.vp_primary_plane_order, and add new function
vop2_vp_find_attachable_win() help select default primary plane when
the plane mask is assigned in DTS while the primary plane is not.
7.Skip rockchip_vop2_fixup_dts() for the VOP3 platforms in order not
to fixup the plane_mask related DTS properties when the plane mask
is not assigned in DTS.

Change-Id: I027d065b72768caa82b5bd979c5c3dba118ba567
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 4bc0811d 14-Feb-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: remove U8_MAX related check for &rockchip_vp.primary_plane_id

Keep the default value of 'rockchip,primary-plane' to -1 and convert
&rockchip_vp.primary_plane_id from u8 forced to

video/drm: display: remove U8_MAX related check for &rockchip_vp.primary_plane_id

Keep the default value of 'rockchip,primary-plane' to -1 and convert
&rockchip_vp.primary_plane_id from u8 forced to int8_t in printf(),
which help avoid the unexpected log:

......
get vp0 plane mask:0x5, primary id:0, cursor_plane:2, from dts
get vp1 plane mask:0xa, primary id:255, cursor_plane:-1, from dts
get vp2 plane mask:0x300, primary id:9, cursor_plane:8, from dts
......

It is better to be like:

......
get vp0 plane mask:0x5, primary id:0, cursor_plane:2, from dts
get vp1 plane mask:0xa, primary id:-1, cursor_plane:-1, from dts
get vp2 plane mask:0x300, primary id:9, cursor_plane:8, from dts
......

Fixes: 337d1c1350a ("video/drm: vop2: init vp_primary_plane_order based on the soc")
Change-Id: I6cdccb78d16c2c8eb1ac76104d181340c3f1bbb4
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 7543e826 08-Feb-2025 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: not to fixup dts if no initialized display route

In some specific scenarios, such as the BOOT_MODE_QUIESCENT mode, the
logo display should be skipped while the display driver has

video/drm: display: not to fixup dts if no initialized display route

In some specific scenarios, such as the BOOT_MODE_QUIESCENT mode, the
logo display should be skipped while the display driver has already been
probed, and it means the display fixup process should also be skipped.

Related commit: 8af253525b7 ("rockchip: boot mode: Support android cmd 'reboot quiescent'")
Change-Id: Ibf90737102892089821d98412f4c5c2749c9fbe1
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# efa01fe4 17-Dec-2024 Zhang Yubing <yubing.zhang@rock-chips.com>

video/drm: display: set vop dp_out_en bit laterly

The vop dp_out_en bit should be set after the dp link rate ready,
which can avoid the dp controller fifo overflow issue.

Signed-off-by: Zhang Yubin

video/drm: display: set vop dp_out_en bit laterly

The vop dp_out_en bit should be set after the dp link rate ready,
which can avoid the dp controller fifo overflow issue.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I1529af31c22defb728e65c157ad7c88c77968cc4

show more ...


# ecc3b257 28-Aug-2024 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: add logo bmp size check

Given considerations such as memory usage and the default
configuration of the parameter partition table, it is not
recommended to use excessively large B

video/drm: display: add logo bmp size check

Given considerations such as memory usage and the default
configuration of the parameter partition table, it is not
recommended to use excessively large BMP logo images.
Therefore, the MAX_IMAGE_BYTES limit is set to 8 MB. For
images exceeding this size, it is recommended to use BMP
images in BI_RLE4/BI_RLE8 formats.

The log may be like:

......
bmp[logo.bmp] data size[23MB] is over the limitation MAX_IMAGE_BYTES[8MB]
failed to display uboot logo
CLK: (uboot. arm: enter 1008000 KHz, init 1008000 KHz, kernel 0N/A)
bpll 816000 KHz
lpll 816000 KHz
......

Change-Id: If9b804b29f4a477b5b29050231944a39c0342a84
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 3dbe25b4 07-Aug-2024 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: remove the resolution check for partially decoded images

The limitation is from decode_bmp.c in libnsbmp-0.1.7.
Some RLE8 bmp images will be regarded as error becasuse
of the che

video/drm: display: remove the resolution check for partially decoded images

The limitation is from decode_bmp.c in libnsbmp-0.1.7.
Some RLE8 bmp images will be regarded as error becasuse
of the check, without which these images can be showed
successfully, so we remove the unexpected limitation.

The libnsbmp-0.1.7 can be got from:
https://git.netsurf-browser.org/libnsbmp.git

Change-Id: I4a418b3484db1904d8c47b6e8ee7410c2964145f
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 117c0524 16-Jul-2024 Guochun Huang <hero.huang@rock-chips.com>

video/drm: display: add rk628 support

Change-Id: Id4e23a7692c8291184bfae162f889dc0cf0b0def
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>


# 679e3783 22-Jul-2024 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: fix flag DISPLAY_FLAGS_DOUBLECLK to DRM_MODE_FLAG_DBLCLK

In order to get the right flags of struct drm_display_mode,
use drm mode flags instead of uboot video display flags.

Cha

video/drm: display: fix flag DISPLAY_FLAGS_DOUBLECLK to DRM_MODE_FLAG_DBLCLK

In order to get the right flags of struct drm_display_mode,
use drm mode flags instead of uboot video display flags.

Change-Id: Ib5f2a378925b553cc9ef703ef0269f2362c29ad6
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>

show more ...


# 1e77886e 21-Dec-2023 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: add split_mode and dual_channel_mode flags

split_mode: two connectors with the same or different
interface type drive one panel or monitor.
dual_channel_mode: two connectors with

video/drm: display: add split_mode and dual_channel_mode flags

split_mode: two connectors with the same or different
interface type drive one panel or monitor.
dual_channel_mode: two connectors with the same interface
type drive one panel or monitor.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ic935df3f098eb952bce82559599b6fbd93cde625

show more ...


# 2b992d78 21-Dec-2023 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: sync mode convert funcs with kernel in split mode

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I63178d79c01d42a27df855c778439543aedc4a59


# 640211a0 16-Apr-2024 Damon Ding <damon.ding@rock-chips.com>

video/drm: vop2: move hactive 4-pixel alignment check to .mode_fixup()

The check in .mode_fixup() can take effect on the scenes
displayed in the panel or monitor.

Fixes: cc781e0266d ("video/drm: di

video/drm: vop2: move hactive 4-pixel alignment check to .mode_fixup()

The check in .mode_fixup() can take effect on the scenes
displayed in the panel or monitor.

Fixes: cc781e0266d ("video/drm: display: fix hactive 4-pixel alignment if using panel")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I089d9522ce3bf349e89785964d00de8f5f9bd461

show more ...


# 0669ab1f 07-Apr-2024 Damon Ding <damon.ding@rock-chips.com>

video/drm: vop2: get gamma config from dts

sample:

/ {
dsp_lut0: dsp-lut0 {
gamma-lut = <...>;
};

dsp_lut1: dsp-lut1 {
gamma-lut = <...>;
};
};

&vp0 {
dsp-lut = <&dsp_lut0>;
};

&vp1 {

video/drm: vop2: get gamma config from dts

sample:

/ {
dsp_lut0: dsp-lut0 {
gamma-lut = <...>;
};

dsp_lut1: dsp-lut1 {
gamma-lut = <...>;
};
};

&vp0 {
dsp-lut = <&dsp_lut0>;
};

&vp1 {
dsp-lut = <&dsp_lut1>;
};

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9efbeb4640129307081e6df723194c5d3df0edb4

show more ...


# ab8d4385 21-Mar-2024 Zhang Yubing <yubing.zhang@rock-chips.com>

video/drm: display: check the string pointer before use

if there are no compatible property define, the dev_read_string
function will return a NULL pointer. And the strcmp will not
check whether the

video/drm: display: check the string pointer before use

if there are no compatible property define, the dev_read_string
function will return a NULL pointer. And the strcmp will not
check whether the poniter is NULL or not. So it's better to
check the string pointer before use to avoid NULL pointer issue
happen.

strcmp
compatible = dev_read_string(conn->dev, "compatible");
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I19a376a7c68a482a76afad51e9ffb400611de2b0

show more ...


# 0c9e0ba8 21-Mar-2024 Zhang Yubing <yubing.zhang@rock-chips.com>

Revert "video/drm: display: find device for DP-MST device node"

This reverts commit 0a69cd686a1b8d67ebe07a8f7be860d0fcee11bf.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Id

Revert "video/drm: display: find device for DP-MST device node"

This reverts commit 0a69cd686a1b8d67ebe07a8f7be860d0fcee11bf.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Id83494e5b59f447024ae4c1f1a787cc345861d11

show more ...


# b1b989db 04-Feb-2024 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: add check of return value for display_get_edid_mode()

1.If not to check the return value of display_get_edid_mode()
in bridge mode, the following check logic will be
entered:

video/drm: display: add check of return value for display_get_edid_mode()

1.If not to check the return value of display_get_edid_mode()
in bridge mode, the following check logic will be
entered:

if (ret && !state->force_output)
goto deinit;

And the case will be mistaken as force output and goto
deinit, which causes no display output.
2.Move the rockchip_bridge_mode_set() before the display
information logs, because the display mode may be
initialized in the function.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9f9604cf04a9e846a9fbec3d0e0e297c583bddbb

show more ...


# 967b0f99 07-Mar-2024 Yifeng Zhao <yifeng.zhao@rock-chips.com>

drivers: video: rockchip_display: reduce stack usage and data read

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Icfa1668fffbb01e6c3f33025f11b8d1e2b98c4f1


# 0a69cd68 23-Jan-2024 Zhang Yubing <yubing.zhang@rock-chips.com>

video/drm: display: find device for DP-MST device node

In rk3576, the dp device node is organized as fallow:

dp {
...
dp0: dp0 {
ports {
#address-cells = <1>;
#size-cells = <0>;

port@

video/drm: display: find device for DP-MST device node

In rk3576, the dp device node is organized as fallow:

dp {
...
dp0: dp0 {
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

dp0_in_vp0: endpoint@0 {
reg = <0>;
remote-endpoint = <&vp0_out_dp0>;
status = "disabled";
};
...
};
};
};
...
};

The ports node's parent node is not the device node. the parent node's
parent node is.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ib517a9906b72a057e63a8059b0465962f7b00af5

show more ...


# 0fda4887 07-Aug-2023 Damon Ding <damon.ding@rock-chips.com>

video/drm: display: add support for logo rotation

The supported rotation angles is 90, 180 and 270.

Dts configs like:

&route_hdmi0 {
status = "okay";
logo,rotate = <90>;
};

&route_hdmi1 {
stat

video/drm: display: add support for logo rotation

The supported rotation angles is 90, 180 and 270.

Dts configs like:

&route_hdmi0 {
status = "okay";
logo,rotate = <90>;
};

&route_hdmi1 {
status = "okay";
logo,rotate = <180>;
};

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I34bc0aa56a324ac79bc551de4dd5ee5558c096f7

show more ...


123456