Skip to content

Commit

Permalink
DRM: Add KMS driver for the Ingenic JZ47xx SoCs
Browse files Browse the repository at this point in the history
Add a KMS driver for the Ingenic JZ47xx family of SoCs.
This driver is meant to replace the aging jz4740-fb driver.

This driver does not make use of the simple pipe helper, for the reason
that it will soon be updated to support more advanced features like
multiple planes, IPU integration for colorspace conversion and up/down
scaling, support for DSI displays, and TV-out and HDMI outputs.

Notes:
    v2: - Remove custom handling of panel. The panel is now discovered using
          the standard API.
        - Lots of small tweaks suggested by upstream

    v3: - Use devm_drm_dev_init()
        - Update compatible strings to -lcd instead of -drm
        - Add destroy() callbacks to plane and crtc
        - The ingenic,lcd-mode is now read from the bridge's DT node

    v4: Remove ingenic,lcd-mode property completely. The various modes are now
        deduced from the connector type, the pixel format or the bus flags.

    v5: - Fix framebuffer size incorrectly calculated for 24bpp framebuffers
        - Use 32bpp framebuffer instead of 16bpp, as it'll work with both
          16-bit and 24-bit panel
        - Get rid of drm_format_plane_cpp() which has been dropped upstream
        - Avoid using drm_format_info->depth, which is deprecated.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603152331.23160-2-paul@crapouillou.net
  • Loading branch information
pcercuei authored and sravnborg committed Jun 19, 2019
1 parent 34884db commit 90b86fc
Show file tree
Hide file tree
Showing 5 changed files with 838 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ source "drivers/gpu/drm/sti/Kconfig"

source "drivers/gpu/drm/imx/Kconfig"

source "drivers/gpu/drm/ingenic/Kconfig"

source "drivers/gpu/drm/v3d/Kconfig"

source "drivers/gpu/drm/vc4/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ obj-$(CONFIG_DRM_TEGRA) += tegra/
obj-$(CONFIG_DRM_STM) += stm/
obj-$(CONFIG_DRM_STI) += sti/
obj-$(CONFIG_DRM_IMX) += imx/
obj-$(CONFIG_DRM_INGENIC) += ingenic/
obj-$(CONFIG_DRM_MEDIATEK) += mediatek/
obj-$(CONFIG_DRM_MESON) += meson/
obj-y += i2c/
Expand Down
16 changes: 16 additions & 0 deletions drivers/gpu/drm/ingenic/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
config DRM_INGENIC
tristate "DRM Support for Ingenic SoCs"
depends on MIPS || COMPILE_TEST
depends on DRM
depends on CMA
depends on OF
select DRM_BRIDGE
select DRM_PANEL_BRIDGE
select DRM_KMS_HELPER
select DRM_KMS_CMA_HELPER
select DRM_GEM_CMA_HELPER
select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
help
Choose this option for DRM support for the Ingenic SoCs.

If M is selected the module will be called ingenic-drm.
1 change: 1 addition & 0 deletions drivers/gpu/drm/ingenic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_DRM_INGENIC) += ingenic-drm.o

0 comments on commit 90b86fc

Please sign in to comment.