forked from starfive-tech/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/starfive: Add StarFive drm driver
1. Add starfive DRM Display driver framework 2. Support M31 Phy and tda998x Signed-off-by: jack.zhu <[email protected]> Signed-off-by: keith.zhao <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]>
- Loading branch information
Showing
19 changed files
with
3,469 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2021 StarFive Technology Co., Ltd. | ||
|
||
config DRM_STARFIVE | ||
tristate "DRM Support for StarFive SoCs" | ||
depends on DRM | ||
depends on SOC_STARFIVE || COMPILE_TEST | ||
select DRM_GEM_CMA_HELPER | ||
select DRM_KMS_HELPER | ||
select DRM_MIPI_DSI | ||
select DRM_PANEL | ||
help | ||
Choose this option if you have a StarFive SoCs. | ||
The module will be called starfive-drm | ||
This driver provides kernel mode setting and | ||
buffer management to userspace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# | ||
# Copyright (C) 2021 StarFive Technology Co., Ltd. | ||
# | ||
starfive-drm-y := starfive_drm_drv.o \ | ||
starfive_drm_gem.o \ | ||
starfive_drm_crtc.o \ | ||
starfive_drm_encoder.o \ | ||
starfive_drm_plane.o \ | ||
starfive_drm_lcdc.o \ | ||
starfive_drm_vpp.o | ||
|
||
obj-$(CONFIG_DRM_STARFIVE) += starfive-drm.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Display Subsystem:(default FBdev) | ||
|
||
Steps switch to DRM: | ||
1、Disable fbdev,close below config items: | ||
CONFIG_FB_STARFIVE=y | ||
CONFIG_FB_STARFIVE_HDMI_TDA998X=y | ||
CONFIG_FB_STARFIVE_VIDEO=y | ||
|
||
2、open DRM hdmi pipeline,enable items: | ||
CONFIG_DRM_I2C_NXP_TDA998X=y | ||
CONFIG_DRM_I2C_NXP_TDA9950=y | ||
CONFIG_DRM_STARFIVE=y | ||
CONFIG_FRAMEBUFFER_CONSOLE=y | ||
|
||
Precautions:when use DRM hdmi pipeline,please make sure CONFIG_DRM_STARFIVE_MIPI_DSI is disable , | ||
or will cause color abnormal. | ||
|
||
3、open DRM mipi pipeline | ||
|
||
enable items: | ||
CONFIG_PHY_M31_DPHY_RX0=y | ||
CONFIG_DRM_STARFIVE_MIPI_DSI=y | ||
|
||
|
||
change jh7100.dtsi display-encoder as below: | ||
|
||
display-encoder { | ||
compatible = "starfive,display-encoder"; | ||
encoder-type = <6>; //2-TMDS, 3-LVDS, 6-DSI, 8-DPI | ||
status = "okay"; | ||
|
||
ports { | ||
port@0 { | ||
endpoint { | ||
remote-endpoint = <&dsi_out_port>; | ||
}; | ||
}; | ||
|
||
port@1 { | ||
endpoint { | ||
remote-endpoint = <&crtc_0_out>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
install libdrm: | ||
make buildroot_initramfs-menuconfig | ||
choose: | ||
BR2_PACKAGE_LIBDRM=y | ||
BR2_PACKAGE_LIBDRM_RADEON=y | ||
BR2_PACKAGE_LIBDRM_AMDGPU=y | ||
BR2_PACKAGE_LIBDRM_NOUVEAU=y | ||
BR2_PACKAGE_LIBDRM_ETNAVIV=y | ||
BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y | ||
|
Oops, something went wrong.