- tidss probes, but is deferred as sii902x is still missing.
- sii902x starts probing and enters sii902x_init().
- sii902x calls drm_bridge_add(). Now the sii902x bridge is ready from
DRM's perspective.
- sii902x calls sii902x_audio_codec_init() and
platform_device_register_data()
- The registration of the audio platform device causes probing of the
deferred devices.
- tidss probes, which eventually causes sii902x_bridge_get_edid() to be
called.
- sii902x_bridge_get_edid() tries to use the i2c to read the edid.
However, the sii902x driver has not set up the i2c part yet, leading
to the crash.
Fix this by moving the drm_bridge_add() to the end of the
sii902x_init(), which is also at the very end of sii902x_probe().
Marek Vasut [Thu, 18 Jan 2024 22:02:31 +0000 (23:02 +0100)]
drm/bridge: tc358767: Limit the Pixel PLL input range
According to new configuration spreadsheet from Toshiba for TC9595,
the Pixel PLL input clock have to be in range 6..40 MHz. The sheet
calculates those PLL input clock as reference clock divided by both
pre-dividers. Add the extra limit.
video/nomodeset: Select nomodeset= parameter with CONFIG_VIDEO
Enable support for nomodeset= parameter via CONFIG_VIDEO. Both,
DRM and fbdev, already select this option. Remove the existing
option CONFIG_VIDEO_NOMODESET. Simplifies the Kconfig rules.
The function __video_get_options() only exists for compatibility
with old fbdev drivers that cannot be refactored easily. Hide it
behind CONFIG_FB_CORE.
v2:
* support CONFIG_FB_CORE=m via IS_ENABLED() (kernel test robot)
Thomas Hellström [Fri, 19 Jan 2024 09:05:57 +0000 (10:05 +0100)]
drm/exec, drm/gpuvm: Prefer u32 over uint32_t
The relatively recently introduced drm/exec utility was using uint32_t
in its interface, which was then also carried over to drm/gpuvm.
Prefer u32 in new code and update drm/exec and drm/gpuvm accordingly.
Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@redhat.com> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Danilo Krummrich <dakr@redhat.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240119090557.6360-1-thomas.hellstrom@linux.intel.com
Dario Binacchi [Mon, 18 Dec 2023 08:43:37 +0000 (09:43 +0100)]
drm: bridge: samsung-dsim: enter display mode in the enable() callback
The synaptics-r63353 (panel-bridge) can only be configured in command mode.
So, samsung-dsim (bridge) must not be in display mode during the
prepare()/unprepare() of the panel-bridge. Setting the
"pre_enable_prev_first" flag to true allows the prepare() of the
panel-bridge to be called between the pre_enabled() and enabled() of the
bridge. So, the bridge can enter display mode only in the enabled().
The unprepare() of the panel-bridge is instead called between the disable()
and post_disable() of the bridge. So, the disable() must exit the display
mode (i .e. enter command mode) to allow the panel-bridge to receive DSI
commands.
Documentation/gpu: Reference articles on Linux graphics stack
Add two articles on LWN about the Linux graphics stack to DRM's
list of external references. The articles document the graphics
output as a whole, including the kernel side.
Ritesh Kumar [Tue, 16 Jan 2024 07:18:03 +0000 (12:48 +0530)]
drm/panel: novatek-nt36672e: Include <linux/of.h>
Include <linux/of.h> instead of <linux/of_device.h> to fix
below compilation errors:
drivers/gpu/drm/panel/panel-novatek-nt36672e.c:564:14: error: implicit declaration of function 'of_device_get_match_data'
ctx->desc = of_device_get_match_data(dev);
^
drivers/gpu/drm/panel/panel-novatek-nt36672e.c:622:34: error: array type has incomplete element type 'struct of_device_id'
static const struct of_device_id nt36672e_of_match[] = {
^
Alex Bee [Mon, 15 Jan 2024 09:24:35 +0000 (10:24 +0100)]
drm/rockchip: inno_hdmi: Explicitly include drm_atomic.h
Commit d3e040f450ec ("drm/rockchip: inno_hdmi: Get rid of mode_set")
started using drm_atomic_get_new_connector_state and
drm_atomic_get_new_crtc_state which are defined in drm_atomic.h
Building does currently only work if CONFIG_OF and CONFIG_DRM_PANEL_BRIDGE
are enabled since this will include drm_atomic.h via drm_bridge.h (see
drm_of.h).
Explicitly include drm_atomic.h in inno_hdmi.c to fix this.
Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202401100949.ZVRr0pIa-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202401081720.UtgAZgba-lkp@intel.com/ Fixes: d3e040f450ec ("drm/rockchip: inno_hdmi: Get rid of mode_set") Signed-off-by: Alex Bee <knaerzche@gmail.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240115092434.41695-2-knaerzche@gmail.com
Vignesh Raman [Fri, 22 Dec 2023 03:34:34 +0000 (09:04 +0530)]
drm/ci: uprev mesa version: fix kdl commit fetch
build-kdl.sh was doing a `clone --depth 1` of the default branch,
then checking out a commit that might not be the latest of that
branch, resulting in container build error.
https://gitlab.freedesktop.org/mesa/mesa/-/commit/5efa4d56 fixes
kdl commit fetch issue. Uprev mesa in drm-ci to fix this.
This commit updates the kernel tag and adds .never-post-merge-rules
due to the mesa uprev. It also fixes an issue where the virtio-gpu
pipeline was not getting created with the mesa uprev.
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Signed-off-by: Helen Koike <helen.koike@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231222033434.1537761-1-vignesh.raman@collabora.com
Randy Dunlap [Fri, 12 Jan 2024 05:17:31 +0000 (21:17 -0800)]
drm/doc: internals: remove section on PCI legacy support
The functions that were described in this section of
drm-internals.rst were removed in NOV-2023, along with all of the
kernel-doc comments in the source file. This now causes a
docs build warning, so remove that section of the documentation also.
drivers/gpu/drm/drm_pci.c:1: warning: no structured comments found
Fixes: 2504c7ec728b ("drm: Remove source code for non-KMS drivers") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: David Airlie <airlied@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20240112051731.15722-1-rdunlap@infradead.org
This happens because, although `prepare_fb` and `cleanup_fb` are
perfectly balanced, we cannot guarantee consistency in the check
plane->state->fb == state->fb. This means that sometimes we can increase
the refcount in `prepare_fb` and don't decrease it in `cleanup_fb`. The
opposite can also be true.
In fact, the struct drm_plane .state shouldn't be accessed directly
but instead, the `drm_atomic_get_new_plane_state()` helper function should
be used. So, we could stick to this check, but using
`drm_atomic_get_new_plane_state()`. But actually, this check is not really
needed. We can increase and decrease the refcount symmetrically without
problems.
This is going to make the code more simple and consistent.
Jani Nikula [Thu, 4 Jan 2024 20:16:30 +0000 (22:16 +0200)]
drm/nouveau: include drm/drm_edid.h only where needed
Including drm_edid.h from nouveau_connector.h causes the rebuild of 15
files when drm_edid.h is modified, while there are only a few files that
actually need to include drm_edid.h.
Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@redhat.com> Cc: nouveau@lists.freedesktop.org Signed-off-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240104201632.1100753-1-jani.nikula@intel.com
xiazhengqiao [Thu, 21 Dec 2023 09:30:57 +0000 (17:30 +0800)]
drm/bridge: Fixed a DP link training bug
To have better compatibility for DP sink, there is a retry mechanism
for the link training process to switch between different training process.
The original driver code doesn't reset the retry counter when training
state is pass. If the system triggers link training over 3 times,
there will be a chance to causes the driver to use the wrong training
method and return a training fail result.
To Fix this, we reset the retry counter when training state is pass
each time.
Dario Binacchi [Mon, 8 Jan 2024 20:15:53 +0000 (21:15 +0100)]
drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK
The initialization commands are taken from the STMicroelectronics driver
found at [1].
To ensure backward compatibility, flags have been added to enable gamma
correction setting and display control. In other cases, registers have
been set to their default values according to the specifications found
in the datasheet.
Dario Binacchi [Mon, 8 Jan 2024 20:15:52 +0000 (21:15 +0100)]
drm/panel: nt35510: move hardwired parameters to configuration
This patch, preparatory for future developments, move the hardwired
parameters to configuration data to allow the addition of new
NT35510-based panels.
Hsin-Yi Wang [Wed, 20 Dec 2023 22:13:11 +0000 (14:13 -0800)]
drm/panel-edp: use put_sync in unprepare
Some edp panel requires T10 (Delay from end of valid video data transmitted
by the Source device to power-off) less than 500ms. Using autosuspend with
delay set as 1000 violates this requirement.
Use put_sync_suspend in unprepare to meet the spec. For other cases (such
as getting EDID), it still uses autosuspend.
Suggested-by: Douglas Anderson <dianders@chromium.org> Fixes: 3235b0f20a0a ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231220221418.2610185-1-hsinyi@chromium.org
Vegard Nossum [Mon, 25 Dec 2023 06:51:45 +0000 (07:51 +0100)]
drm/nouveau: uapi: fix kerneldoc warnings
As of commit b77fdd6a48e6 ("scripts/kernel-doc: restore warning for
Excess struct/union"), we see the following warnings when running 'make
htmldocs':
./include/uapi/drm/nouveau_drm.h:292: warning: Excess struct member 'DRM_NOUVEAU_VM_BIND_OP_MAP' description in 'drm_nouveau_vm_bind_op'
./include/uapi/drm/nouveau_drm.h:292: warning: Excess struct member 'DRM_NOUVEAU_VM_BIND_OP_UNMAP' description in 'drm_nouveau_vm_bind_op'
./include/uapi/drm/nouveau_drm.h:292: warning: Excess struct member 'DRM_NOUVEAU_VM_BIND_SPARSE' description in 'drm_nouveau_vm_bind_op'
./include/uapi/drm/nouveau_drm.h:336: warning: Excess struct member 'DRM_NOUVEAU_VM_BIND_RUN_ASYNC' description in 'drm_nouveau_vm_bind'
The problem is that these values are #define constants, but had kerneldoc
comments attached to them as if they were actual struct members.
There are a number of ways we could fix this, but I chose to draw
inspiration from include/uapi/drm/i915_drm.h, which pulls them into the
corresponding kerneldoc comment for the struct member that they are
intended to be used with.
To keep the diff readable, there are a number of things I _didn't_ do in
this patch, but which we should also consider:
- This is pretty good documentation, but it ends up in gpu/driver-uapi,
which is part of subsystem-apis/ when it really ought to display under
userspace-api/ (the "Linux kernel user-space API guide" book of the
documentation).
- More generally, we might want a warning if include/uapi/ files are
kerneldoc'd outside userspace-api/.
- I'd consider it cleaner if the #defines appeared between the kerneldoc
for the member and the member itself (which is something other DRM-
related UAPI docs do).
- The %IDENTIFIER kerneldoc syntax is intended for "constants", and is
more appropriate in this context than ``IDENTIFIER`` or &IDENTIFIER.
The DRM docs aren't very consistent on this.
Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231225065145.3060754-1-vegard.nossum@oracle.com
Change kernel-doc "/**" comments to common "/*" comments to prevent
kernel-doc warnings:
gf100.c:1044: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Wait until GR goes idle. GR is considered idle if it is disabled by the
gf100.c:1044: warning: missing initial short description on line:
* Wait until GR goes idle. GR is considered idle if it is disabled by the
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@redhat.com> Cc: nouveau@lists.freedesktop.org Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231231233633.6596-3-rdunlap@infradead.org
Randy Dunlap [Sun, 31 Dec 2023 23:36:31 +0000 (15:36 -0800)]
drm/nouveau: don't misuse kernel-doc comments
Change kernel-doc "/**" comments to common "/*" comments to prevent
kernel-doc warnings:
nouveau_ioc32.c:2: warning: Cannot understand * \file mga_ioc32.c
on line 2 - I thought it was a doc line
nouveau_ioc32.c:52: warning: Function parameter or member 'filp' not described in 'nouveau_compat_ioctl'
nouveau_ioc32.c:52: warning: Function parameter or member 'cmd' not described in 'nouveau_compat_ioctl'
nouveau_ioc32.c:52: warning: Function parameter or member 'arg' not described in 'nouveau_compat_ioctl'
nouveau_ioc32.c:52: warning: expecting prototype for Called whenever a 32-bit process running under a 64(). Prototype was for nouveau_compat_ioctl() instead
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@redhat.com> Cc: nouveau@lists.freedesktop.org Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231231233633.6596-2-rdunlap@infradead.org
Change kernel-doc "/**" comments to common "/*" comments to prevent
kernel-doc warnings:
crtc.c:453: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Sets up registers for the given mode/adjusted_mode pair.
crtc.c:453: warning: missing initial short description on line:
* Sets up registers for the given mode/adjusted_mode pair.
crtc.c:629: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Sets up registers for the given mode/adjusted_mode pair.
crtc.c:629: warning: missing initial short description on line:
* Sets up registers for the given mode/adjusted_mode pair.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@redhat.com> Cc: nouveau@lists.freedesktop.org Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231231233633.6596-1-rdunlap@infradead.org
Randy Dunlap [Sat, 16 Dec 2023 20:11:52 +0000 (12:11 -0800)]
drm/nouveau/bios/init: drop kernel-doc notation
The "/**" comments in this file are not kernel-doc comments. They are
used on static functions which can have kernel-doc comments, but that
is not the primary focus of kernel-doc comments.
Since these comments are incomplete for kernel-doc notation, remove
the kernel-doc "/**" markers and make them common comments.
This prevents scripts/kernel-doc from issuing 68 warnings:
init.c:584: warning: Function parameter or member 'init' not described in 'init_reserved'
and 67 warnings like this one:
init.c:611: warning: expecting prototype for INIT_DONE(). Prototype was for init_done() instead
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@redhat.com> Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: David Airlie <airlied@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231216201152.31376-1-rdunlap@infradead.org
Remove the unused drm_connector_helper_get_modes_from_ddc()
function. Most drivers should probably have this functionality split to
detect and get modes parts, so the helper is not the best abstraction.
drm/mgag200: Fix caching setup for remapped video memory
I/O video memory for the framebuffer supports write-combine caching
mode. Simplify the driver's code that sets up the caching mode.
* Map video memory with ioremap_wc(), which automatically sets up
the PAT entry with write-combine caching.
* Remove the now obsolete call to devm_arch_io_reserve_memtype_wc().
It is only required to mmap the video memory to user space, which the
driver doesn't do.
* According to the PAT documentation, arch_phys_wc_add() is best
called after remapping I/O memory, so move it after ioremap.
Markus Elfring [Tue, 26 Dec 2023 15:30:25 +0000 (16:30 +0100)]
drm/sched: One function call less in drm_sched_init() after error detection
The kfree() function was called in one case by the
drm_sched_init() function during error handling
even if the passed data structure member contained a null pointer.
This issue was detected by using the Coccinelle software.
drm: Move drm_set_preferred_mode() helper from drm_edid to drm_modes
The helper is generic, it doesn't use the opaque EDID type struct drm_edid
and is also used by drivers that only support non-probeable displays such
as fixed panels.
These drivers add a list of modes using drm_mode_probed_add() and then set
a preferred mode using the drm_set_preferred_mode() helper.
It seems more logical to have the helper definition in drm_modes.o instead
of drm_edid.o, since the former contains modes helper while the latter has
helpers to manage the EDID information.
Since both drm_edid.o and drm_modes.o object files are built-in the drm.o
object, there are no functional changes. But besides being a more logical
place for this helper, it could also allow to eventually make drm_edid.o
optional and not included in drm.o if only fixed panels must be supported
in a given system.
Quentin Schulz [Thu, 4 Jan 2024 12:41:57 +0000 (13:41 +0100)]
drm/panel: ltk050h3146w: only print message when GPIO getting is not EPROBE_DEFER
devm_gpiod_get_optional may return EPROBE_DEFER in case the GPIO
controller isn't yet probed when the panel driver is being probed.
In that case, a spurious and confusing error message about not being
able to get the reset GPIO is printed even though later on the device
actually manages to get probed.
Use dev_err_probe instead so that the message is only printed when it
truly matters.
Quentin Schulz [Mon, 20 Nov 2023 12:29:49 +0000 (13:29 +0100)]
drm/rockchip: lvds: do not print scary message when probing defer
This scary message can misled the user into thinking something bad has
happened and needs to be fixed, however it could simply be part of a
normal boot process where EPROBE_DEFER is taken into account. Therefore,
let's use dev_err_probe so that this message doesn't get shown (by
default) when the return code is EPROBE_DEFER.
Quentin Schulz [Mon, 20 Nov 2023 12:29:48 +0000 (13:29 +0100)]
drm/rockchip: lvds: do not overwrite error code
ret variable stores the return value of drm_of_find_panel_or_bridge
which can return error codes different from EPROBE_DEFER. Therefore,
let's just return that error code instead of forcing it to EPROBE_DEFER.
Alex Bee [Fri, 22 Dec 2023 17:42:17 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Drop custom fill_modes hook
Now that we have proper pixelclock-based mode validation we can drop the
custom fill_modes hook.
CRTC size validation for the display controller has been added with
Commit 8e140cb60270 ("drm/rockchip: vop: limit maximum resolution to
hardware capabilities")
As per TRM this controller supports pixelclocks starting from 25 MHz. The
maximum supported pixelclocks are defined by the phy configurations we
have. Also it can't support modes that require doubled clocks. If the
variant has a phy reference clock we can additionally validate against VESA
DMT'srecommendations.
Alex Bee [Fri, 22 Dec 2023 17:42:15 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Add RK3128 support
This variant requires the phy reference clock to be enabled before the DDC
block can work and the (initial) DDC bus frequency is calculated based on
the rate of this clock. Besides the only difference is phy configuration
required to make the driver working for this variant as well.
Alex Bee [Fri, 22 Dec 2023 17:42:14 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Add variant support
In preparation to support RK3128's integration of the controller, this
patch adds a simple variant implementation. They mainly differ in the phy
configuration required, so those are part of the match_data. The values
have been taken from downstream. The pixelclocks in there are meant to be
max-inclusive.
Zack Rusin [Sun, 24 Dec 2023 05:25:40 +0000 (00:25 -0500)]
drm/vmwgfx: Unmap the surface before resetting it on a plane state
Switch to a new plane state requires unreferencing of all held surfaces.
In the work required for mob cursors the mapped surfaces started being
cached but the variable indicating whether the surface is currently
mapped was not being reset. This leads to crashes as the duplicated
state, incorrectly, indicates the that surface is mapped even when
no surface is present. That's because after unreferencing the surface
it's perfectly possible for the plane to be backed by a bo instead of a
surface.
Reset the surface mapped flag when unreferencing the plane state surface
to fix null derefs in cleanup. Fixes crashes in KDE KWin 6.0 on Wayland:
Randy Dunlap [Fri, 15 Dec 2023 23:56:38 +0000 (15:56 -0800)]
drm/vmwgfx: fix kernel-doc Excess struct member 'base'
Fix a new kernel-doc warning reported by kernel test robot:
vmwgfx_surface.c:55: warning: Excess struct member 'base' description in 'vmw_user_surface'
The other warning is not correct: it is confused by "__counted_by".
Kees has made a separate patch for that.
In -Wall mode, kernel-doc still reports 20 warnings of this nature:
vmwgfx_surface.c:198: warning: No description found for return value of 'vmw_surface_dma_size'
but I am not addressing those.
Randy Dunlap [Fri, 15 Dec 2023 23:41:02 +0000 (15:41 -0800)]
drm/vmwgfx: fix all kernel-doc warnings in stdu
kernel test robot reports one kernel-doc warning in stdu, but
running scripts/kernel-doc in -Wall mode reports several more,
so fix all of them at one time:
vmwgfx_stdu.c:76: warning: Excess struct member 'transfer' description in 'vmw_stdu_dirty'
vmwgfx_stdu.c:103: warning: missing initial short description on line:
* struct vmw_screen_target_display_unit
vmwgfx_stdu.c:215: warning: No description found for return value of 'vmw_stdu_bind_st'
vmwgfx_stdu.c:320: warning: No description found for return value of 'vmw_stdu_destroy_st'
vmwgfx_stdu.c:551: warning: No description found for return value of 'vmw_kms_stdu_readback'
vmwgfx_stdu.c:719: warning: No description found for return value of 'vmw_kms_stdu_surface_dirty'
vmwgfx_stdu.c:895: warning: No description found for return value of 'vmw_stdu_primary_plane_prepare_fb'
vmwgfx_stdu.c:1470: warning: No description found for return value of 'vmw_stdu_init'
Andy Shevchenko [Tue, 19 Dec 2023 15:19:55 +0000 (17:19 +0200)]
drm/virtio: Spelling fixes
While making a spelling mistake myself for `git grep kvalloc`
I found that the only file has such a typo. Fix it and update
to the standard de facto of how we refer to the functions.
Also spell usr-out as user-out, it seems this driver uses its
own terminology nobody else can decypher, make it more readable.
Harry Wentland [Wed, 8 Nov 2023 16:36:24 +0000 (11:36 -0500)]
drm/vkms: Avoid reading beyond LUT array
When the floor LUT index (drm_fixp2int(lut_index) is the last
index of the array the ceil LUT index will point to an entry
beyond the array. Make sure we guard against it and use the
value of the floor LUT index.
v3:
- Drop bits from commit description that didn't contribute
anything of value
Fixes: db1f254f2cfa ("drm/vkms: Add support to 1D gamma LUT") Signed-off-by: Harry Wentland <harry.wentland@amd.com> Cc: Arthur Grillo <arthurgrillo@riseup.net> Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net> Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231108163647.106853-6-harry.wentland@amd.com
Harry Wentland [Wed, 8 Nov 2023 16:36:20 +0000 (11:36 -0500)]
drm: Don't treat 0 as -1 in drm_fixp2int_ceil
Unit testing this in VKMS shows that passing 0 into
this function returns -1, which is highly counter-
intuitive. Fix it by checking whether the input is
>= 0 instead of > 0.
Fixes: 64566b5e767f ("drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil") Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231108163647.106853-2-harry.wentland@amd.com
dt-bindings: display: ssd132x: Add vendor prefix to width and height
Commit 2d23e7d6bacb ("dt-bindings: display: Add SSD132x OLED controllers")
used the wrong properties for width and height, instead of the correct
"solomon,width" and "solomon,height" properties.
Fix this by adding the vendor prefix to the width and height properties.
dt-bindings: display: ssd1307fb: Add vendor prefix to width and height
The commit 591825fba8a2 ("dt-bindings: display: ssd1307fb: Remove default
width and height values") used the wrong properties for width and height,
instead of the correct "solomon,width" and "solomon,height" properties.
Fix this by adding the vendor prefix to the width and height properties.
Fixes: 591825fba8a2 ("dt-bindings: display: ssd1307fb: Remove default width and height values") Reported-by: Conor Dooley <conor@kernel.org> Closes: https://lore.kernel.org/dri-devel/20231218-example-envision-b41ca8efa251@spud/ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231229112026.2797483-2-javierm@redhat.com
Alex Bee [Fri, 22 Dec 2023 17:42:12 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Don't power up the phy after resetting
inno_hdmi_reset is only ever called when initializing the controller. At
this point it’s completely uneccessary to power up the PHY, since all
what has to work at this point is the DDC bus. The phy will be powered up
correctly when a mode is set in inno_hdmi_encoder_enable and disabled in
inno_hdmi_encoder_disable.
Set it to LOWER_PWR after resetting the controller.
Alex Bee [Fri, 22 Dec 2023 17:42:11 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Correctly setup HDMI quantization range
The display controller will always give full range RGB regardless of the
mode set, but HDMI requires certain modes to be transmitted in limited
range RGB. This is especially required for HDMI sinks which do not support
non-standard quantization ranges.
This enables color space conversion for those modes and sets the
quantization range accordingly in the AVI infoframe.
Alex Bee [Fri, 22 Dec 2023 17:42:10 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Subclass connector state
The data which is currently hold in hdmi_data should not be part of device
itself but of the connector state.
Introduce a connector state subclass and move the data from hdmi_data in
there.
Maxime Ripard [Fri, 22 Dec 2023 17:42:05 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Move infoframe disable to separate function
The code to upload infoframes to the controller uses a weird construct
which, based on the previous function call return code, will either
disable or enable that infoframe.
In order to get rid of that argument, let's split the function to
disable the infoframe into a separate function and make it obvious what
we are doing in the error path.
Maxime Ripard [Fri, 22 Dec 2023 17:42:04 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Drop HDMI Vendor Infoframe support
The HDMI vendor infoframe is only meant to be sent with 4k60 modes and
higher, but the controller doesn't support them. Let's drop them from
the kernel.
Maxime Ripard [Fri, 22 Dec 2023 17:42:03 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Remove tmds rate from structure
The tmds_rate field in the inno_hdmi structure is used mostly to
configure the internal i2c controller divider through a call to the
inno_hdmi_i2c_init() function.
We can simply make that rate an argument to that function, which also
removes a workaround to initialize the divider at probe time when we
don't have a mode yet.
Maxime Ripard [Fri, 22 Dec 2023 17:42:01 +0000 (18:42 +0100)]
drm/rockchip: inno_hdmi: Remove useless input format
The driver has a lot of logic to deal with multiple input formats, but
hardcodes it to RGB. This means that most of that code has been dead
code, so let's get rid of it.