mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 02:22:28 -04:00
Prior to commit dc6fcaaba5 ("drm/omap: Allow build with
COMPILE_TEST=y"), it was only possible to build the omapdrm driver with
a 4KB page size. After that change, when the PAGE_SIZE is 64KB or
larger, clang points out that the driver has some assumptions around the
page size implicitly by passing PAGE_SIZE to a parameter with a type of
u16:
drivers/gpu/drm/omapdrm/omap_gem.c:758:7: error: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Werror,-Wconstant-conversion]
757 | block = tiler_reserve_2d(fmt, omap_obj->width, omap_obj->height,
| ~~~~~~~~~~~~~~~~
758 | PAGE_SIZE);
| ^~~~~~~~~
arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE'
25 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
drivers/gpu/drm/omapdrm/omap_gem.c:1504:44: error: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Werror,-Wconstant-conversion]
1504 | block = tiler_reserve_2d(fmts[i], w, h, PAGE_SIZE);
| ~~~~~~~~~~~~~~~~ ^~~~~~~~~
arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE'
25 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
2 errors generated.
As there is a lot of use of a u16 type throughout this driver and it
will only ever be run on hardware that has a 4KB page size, just
restrict compile testing to when the page size is less than 64KB (as no
other issues have been discussed and it keeps compile testing relatively
more available).
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240620-omapdrm-restrict-compile-test-to-sub-64kb-page-size-v1-1-5e56de71ffca@kernel.org
134 lines
3.5 KiB
Plaintext
134 lines
3.5 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config DRM_OMAP
|
|
tristate "OMAP DRM"
|
|
depends on DRM && OF
|
|
depends on ARCH_OMAP2PLUS || (COMPILE_TEST && PAGE_SIZE_LESS_THAN_64KB)
|
|
select DRM_KMS_HELPER
|
|
select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
|
|
select VIDEOMODE_HELPERS
|
|
select HDMI
|
|
default n
|
|
help
|
|
DRM display driver for OMAP2/3/4 based boards.
|
|
|
|
if DRM_OMAP
|
|
|
|
config OMAP2_DSS_DEBUG
|
|
bool "Debug support"
|
|
default n
|
|
help
|
|
This enables printing of debug messages. Alternatively, debug messages
|
|
can also be enabled by setting CONFIG_DYNAMIC_DEBUG and then setting
|
|
appropriate flags in <debugfs>/dynamic_debug/control.
|
|
|
|
config OMAP2_DSS_DEBUGFS
|
|
bool "Debugfs filesystem support"
|
|
depends on DEBUG_FS
|
|
default n
|
|
help
|
|
This enables debugfs for OMAPDSS at <debugfs>/omapdss. This enables
|
|
querying about clock configuration and register configuration of dss,
|
|
dispc, dsi, hdmi and rfbi.
|
|
|
|
config OMAP2_DSS_COLLECT_IRQ_STATS
|
|
bool "Collect DSS IRQ statistics"
|
|
depends on OMAP2_DSS_DEBUGFS
|
|
default n
|
|
help
|
|
Collect DSS IRQ statistics, printable via debugfs.
|
|
|
|
The statistics can be found from
|
|
<debugfs>/omapdss/dispc_irq for DISPC interrupts, and
|
|
<debugfs>/omapdss/dsi_irq for DSI interrupts.
|
|
|
|
config OMAP2_DSS_DPI
|
|
bool "DPI support"
|
|
default y
|
|
help
|
|
DPI Interface. This is the Parallel Display Interface.
|
|
|
|
config OMAP2_DSS_VENC
|
|
bool "VENC support"
|
|
default y
|
|
help
|
|
OMAP Video Encoder support for S-Video and composite TV-out.
|
|
|
|
config OMAP2_DSS_HDMI_COMMON
|
|
bool
|
|
|
|
config OMAP4_DSS_HDMI
|
|
bool "HDMI support for OMAP4"
|
|
default y
|
|
select OMAP2_DSS_HDMI_COMMON
|
|
help
|
|
HDMI support for OMAP4 based SoCs.
|
|
|
|
config OMAP4_DSS_HDMI_CEC
|
|
bool "Enable HDMI CEC support for OMAP4"
|
|
depends on OMAP4_DSS_HDMI
|
|
select CEC_CORE
|
|
default y
|
|
help
|
|
When selected the HDMI transmitter will support the CEC feature.
|
|
|
|
config OMAP5_DSS_HDMI
|
|
bool "HDMI support for OMAP5"
|
|
default n
|
|
select OMAP2_DSS_HDMI_COMMON
|
|
help
|
|
HDMI Interface for OMAP5 and similar cores. This adds the High
|
|
Definition Multimedia Interface. See http://www.hdmi.org/ for HDMI
|
|
specification.
|
|
|
|
config OMAP2_DSS_SDI
|
|
bool "SDI support"
|
|
default n
|
|
help
|
|
SDI (Serial Display Interface) support.
|
|
|
|
SDI is a high speed one-way display serial bus between the host
|
|
processor and a display.
|
|
|
|
config OMAP2_DSS_DSI
|
|
bool "DSI support"
|
|
default n
|
|
select DRM_MIPI_DSI
|
|
help
|
|
MIPI DSI (Display Serial Interface) support.
|
|
|
|
DSI is a high speed half-duplex serial interface between the host
|
|
processor and a peripheral, such as a display or a framebuffer chip.
|
|
|
|
See http://www.mipi.org/ for DSI specifications.
|
|
|
|
config OMAP2_DSS_MIN_FCK_PER_PCK
|
|
int "Minimum FCK/PCK ratio (for scaling)"
|
|
range 0 32
|
|
default 0
|
|
help
|
|
This can be used to adjust the minimum FCK/PCK ratio.
|
|
|
|
With this you can make sure that DISPC FCK is at least
|
|
n x PCK. Video plane scaling requires higher FCK than
|
|
normally.
|
|
|
|
If this is set to 0, there's no extra constraint on the
|
|
DISPC FCK. However, the FCK will at minimum be
|
|
2xPCK (if active matrix) or 3xPCK (if passive matrix).
|
|
|
|
Max FCK is 173MHz, so this doesn't work if your PCK
|
|
is very high.
|
|
|
|
config OMAP2_DSS_SLEEP_AFTER_VENC_RESET
|
|
bool "Sleep 20ms after VENC reset"
|
|
default y
|
|
help
|
|
There is a 20ms sleep after VENC reset which seemed to fix the
|
|
reset. The reason for the bug is unclear, and it's also unclear
|
|
on what platforms this happens.
|
|
|
|
This option enables the sleep, and is enabled by default. You can
|
|
disable the sleep if it doesn't cause problems on your platform.
|
|
|
|
endif
|