Skip to content

Commit

Permalink
drm: Add RP1 DPI driver
Browse files Browse the repository at this point in the history
Add support for the RP1 DPI hardware.

Signed-off-by: Nick Hollinghurst <[email protected]>

drm/rp1: depends on, instead of select, MFD_RP1

According to kconfig-language.txt [1], select should be used only for
"non-visible symbols ... and for symbols with no dependencies". Since
MFD_RP1 both is visible and has a dependency, "select" should not be
used and "depends on" should be used instead.

In particular, this fixes the build of this kernel tree on NixOS, where
its kernel config system will try to answer 'M' to as many config as
possible.

[1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html

Signed-off-by: Ratchanan Srirattanamet <[email protected]>

drm: rp1: VEC and DPI drivers: Fix bug #5901

Rework probe() to use devm_drm_dev_alloc(), embedding the DRM
device in the DPI or VEC device as now seems to be recommended.

Change order of resource allocation and driver initialization.
This prevents it trying to write to an unmapped register during
clean-up, which previously could crash.

Signed-off-by: Nick Hollinghurst <[email protected]>
  • Loading branch information
njhollinghurst authored and popcornmix committed Oct 10, 2024
1 parent 8a610d7 commit 2b03046
Show file tree
Hide file tree
Showing 6 changed files with 1,496 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/gpu/drm/rp1/rp1-dpi/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-only
config DRM_RP1_DPI
tristate "DRM Support for RP1 DPI"
depends on DRM && MFD_RP1
select DRM_GEM_DMA_HELPER
select DRM_KMS_HELPER
select DRM_VRAM_HELPER
select DRM_TTM
select DRM_TTM_HELPER
help
Choose this option to enable Video Out on RP1
5 changes: 5 additions & 0 deletions drivers/gpu/drm/rp1/rp1-dpi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only

drm-rp1-dpi-y := rp1_dpi.o rp1_dpi_hw.o rp1_dpi_cfg.o

obj-$(CONFIG_DRM_RP1_DPI) += drm-rp1-dpi.o
Loading

0 comments on commit 2b03046

Please sign in to comment.