Tomi Valkeinen
bb5f268b76
drm/rcar-du: Write DPTSR only if the second source exists
...
Currently the driver always writes DPTSR when setting up the hardware.
However, writing the register is only meaningful when the second source
for a plane is used, and the register is not even documented for SoCs
that do not have the second source.
So move the write behind a condition.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Tested-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com > # On R-Car M3-N
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-2-e77421093c05@ideasonboard.com
2024-12-17 15:12:35 +02:00
Tomi Valkeinen
6389e616fa
drm/rcar-du: dsi: Fix PHY lock bit check
...
The driver checks for bit 16 (using CLOCKSET1_LOCK define) in CLOCKSET1
register when waiting for the PPI clock. However, the right bit to check
is bit 17 (CLOCKSET1_LOCK_PHY define). Not only that, but there's
nothing in the documents for bit 16 for V3U nor V4H.
So, fix the check to use bit 17, and drop the define for bit 16.
Fixes: 155358310f ("drm: rcar-du: Add R-Car DSI driver")
Fixes: 11696c5e89 ("drm: Place Renesas drivers in a separate dir")
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-1-e77421093c05@ideasonboard.com
2024-12-17 15:12:35 +02:00
Boris Brezillon
4181576d85
drm/panthor: Report innocent group kill
...
Groups can be killed during a reset even though they did nothing wrong.
That usually happens when the FW is put in a bad state by other groups,
resulting in group suspension failures when the reset happens.
If we end up in that situation, flag the group innocent and report
innocence through a new DRM_PANTHOR_GROUP_STATE flag.
Bump the minor driver version to reflect the uAPI change.
Changes in v4:
- Add an entry to the driver version changelog
- Add R-bs
Changes in v3:
- Actually report innocence to userspace
Changes in v2:
- New patch
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211080500.2349505-1-boris.brezillon@collabora.com
2024-12-17 10:56:12 +01:00
Dmitry Baryshkov
81a9a93b16
drm/vc4: hdmi: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-10-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
e99c0b517b
drm/sti: hdmi: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Acked-by: Raphael Gallais-Pou <rgallaispou@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-9-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
b54c14f824
drm/radeon: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-8-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
9aad030dc6
drm/msm/dp: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Acked-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-7-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
5db44dd152
drm/i915/audio: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-6-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
5e8436d334
drm/exynos: hdmi: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-5-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
819bee01ee
drm/amd/display: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-4-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
39ead6e02e
drm/bridge: ite-it66121: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-3-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:08 +02:00
Dmitry Baryshkov
e72bf423a6
drm/bridge: anx7625: use eld_mutex to protect access to connector->eld
...
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-2-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:07 +02:00
Dmitry Baryshkov
df7c8e3dde
drm/connector: add mutex to protect ELD from concurrent access
...
The connector->eld is accessed by the .get_eld() callback. This access
can collide with the drm_edid_to_eld() updating the data at the same
time. Add drm_connector.eld_mutex to protect the data from concurrenct
access. Individual drivers are not updated (to reduce possible issues
while applying the patch), maintainers are to find a best suitable way
to lock that mutex while accessing the ELD data.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-1-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-12-16 18:02:07 +02:00
Karol Przybylski
67a615c5cb
drm: zynqmp_dp: Fix integer overflow in zynqmp_dp_rate_get()
...
This patch fixes a potential integer overflow in the zynqmp_dp_rate_get()
The issue comes up when the expression
drm_dp_bw_code_to_link_rate(dp->test.bw_code) * 10000 is evaluated using 32-bit
Now the constant is a compatible 64-bit type.
Resolves coverity issues: CID 1636340 and CID 1635811
Cc: stable@vger.kernel.org
Fixes: 28edaacb82 ("drm: zynqmp_dp: Add debugfs interface for compliance testing")
Signed-off-by: Karol Przybylski <karprzy7@gmail.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: https://lore.kernel.org/stable/20241212095057.1015146-1-karprzy7%40gmail.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241215125355.938953-1-karprzy7@gmail.com
2024-12-16 12:03:30 +02:00
Andy Yan
0ca953ac22
drm/rockchip: vop2: Fix the windows switch between different layers
...
Every layer of vop2 should bind a window, and we also need to make
sure that this window is not used by other layer.
0x5 is a reserved layer sel value on rk3568, but it will select
Cluster3 on rk3588, configure unused layers to 0x5 will lead
alpha blending error on rk3588.
When we bind a window from layerM to layerN, we move the old window
on layerN to layerM.
Fixes: 604be85547 ("drm/rockchip: Add VOP2 driver")
Tested-by: Derek Foreman <derek.foreman@collabora.com >
Signed-off-by: Andy Yan <andy.yan@rock-chips.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-3-andyshrk@163.com
2024-12-15 00:05:45 +01:00
Andy Yan
779964556c
drm/rockchip: vop2: Add debugfs support
...
/sys/kernel/debug/dri/vop2/summary: dump vop display state
/sys/kernel/debug/dri/vop2/regs: dump whole vop registers
/sys/kernel/debug/dri/vop2/active_regs: only dump the registers of
activated modules
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de >
Signed-off-by: Andy Yan <andy.yan@rock-chips.com >
Tested-by: Michael Riesch <michael.riesch@wolfvision.net > # on RK3568
Tested-by: Detlev Casanova <detlev.casanova@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241214081719.3330518-2-andyshrk@163.com
2024-12-15 00:05:43 +01:00
Andy Yan
041c664da0
drm/rockchip: Fix Copyright description
...
The company name has update to Rockchip Electronics Co., Ltd.
since 2021.
And change Co.Ltd to Co., Ltd. to fix mail server warning:
DBL_SPAM(6.50)[co.ltd:url];
Signed-off-by: Andy Yan <andy.yan@rock-chips.com >
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241214071333.3325308-1-andyshrk@163.com
2024-12-14 23:52:49 +01:00
Ville Syrjälä
46e417b150
drm/modes: Fix drm_mode_vrefres() docs
...
We no longer store a cache vrefresh value in the mode.
Remove the stale information from drm_vrefresh() docs.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241129042629.18280-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-12-14 00:23:45 +02:00
Uwe Kleine-König
b690f5d955
drm: Drop explicit initialization of struct i2c_device_id::driver_data to 0
...
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.
While add it, also remove commas after the sentinel entries.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Liu Ying <victor.liu@nxp.com > # ite-it6263.c
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204105827.1682632-2-u.kleine-koenig@baylibre.com
2024-12-13 09:27:46 -08:00
Thomas Zimmermann
3a8e60188b
drm/tiny: panel-mipi-dbi: Include <linux/of.h>
...
Include <linux/of.h> directly to get of_property_read_string_index().
Avoids the proxy include via <linux/backlight.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: "Noralf Trønnes" <noralf@tronnes.org >
Reviewed-by: Noralf Trønnes <noralf@tronnes.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-7-tzimmermann@suse.de
2024-12-13 15:21:02 +01:00
Thomas Zimmermann
d1a1807bae
drm/panel: panel-samsung-s6e63m0: Include <linux/property.h>
...
Include <linux/property.h> directly to get device_property_read_u32().
Avoids the proxy include via <linux/backlight.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Neil Armstrong <neil.armstrong@linaro.org >
Cc: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-6-tzimmermann@suse.de
2024-12-13 15:21:02 +01:00
Thomas Zimmermann
dd49403a32
drm/panel: panel-samsung-s6e3ha2: Include <linux/mod_devicetable.h>
...
Include <linux/mod_devicetable.h> directly to get struct of_device_id.
Avoids the proxy include via <linux/backlight.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Neil Armstrong <neil.armstrong@linaro.org >
Cc: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-5-tzimmermann@suse.de
2024-12-13 15:21:02 +01:00
Thomas Zimmermann
5d09158305
drm/panel: panel-orisetech-otm8009a: Include <linux/mod_devicetable.h>
...
Include <linux/mod_devicetable.h> directly to get struct of_device_id.
Avoids the proxy include via <linux/backlight.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Neil Armstrong <neil.armstrong@linaro.org >
Cc: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-4-tzimmermann@suse.de
2024-12-13 15:21:02 +01:00
Thomas Zimmermann
8b974c5b39
drm/panel: Include <linux/of.h>
...
Include <linux/of.h> directly to get of_device_is_available(). Avoids
the proxy include via <linux/backlight.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Neil Armstrong <neil.armstrong@linaro.org >
Cc: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-3-tzimmermann@suse.de
2024-12-13 15:21:02 +01:00
Thomas Zimmermann
162fba2198
drm/fsl-dcu: Include <linux/of.h>
...
Include <linux/of.h> directly to get of_parse_phandle(). Avoids the
proxy include via <linux/backlight.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Stefan Agner <stefan@agner.ch >
Cc: Alison Wang <alison.wang@nxp.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011144632.90434-2-tzimmermann@suse.de
2024-12-13 15:20:40 +01:00
Marek Vasut
ba68e69060
drm/panel: simple: add Multi-Inno Technology MI0700A2T-30
...
Add Multi-Inno Technology MI0700A2T-30 7" 800x480 LVDS panel support.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20241125013413.160725-2-marex@denx.de
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241125013413.160725-2-marex@denx.de
2024-12-13 10:48:23 +01:00
Arnd Bergmann
322a00efec
drm/log: select CONFIG_FONT_SUPPORT
...
Without fonts, this fails to link:
drivers/gpu/drm/clients/drm_log.o: in function `drm_log_init_client':
drm_log.c:(.text+0x3d4): undefined reference to `get_default_font'
Select this, like the other users do.
Fixes: f7b42442c4 ("drm/log: Introduce a new boot logger to draw the kmsg on the screen")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241212154003.1313437-1-arnd@kernel.org
2024-12-12 18:26:32 +01:00
Dan Carpenter
fcf15fd8ed
drm/vc4: unlock on error in vc4_hvs_get_fifo_frame_count()
...
The default statement is never used in real life. However, if it were
used for some reason then call drm_dev_exit() before returning.
Fixes: 8f2fc64773 ("drm/vc4: Fix reading of frame count on GEN5 / Pi4")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b61a81b2-0101-43bd-a4f6-09cf3a016484@stanley.mountain
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-12-12 14:37:30 +00:00
Jocelyn Falempe
bc0e01b536
drm/client: Fix drm client endless Kconfig loop
...
if DRM_CLIENT_SELECTION is enabled, and none of the client is, the
"Default DRM Client" choice is empty, and this makes Kconfig goes
into an infinite loop of:
Default DRM Client
choice[1-0?]: 0
Default DRM Client
choice[1-0?]: 0
Default DRM Client
choice[1-0?]: 0
....
So only allow the choice if at least one of the client is selected.
Fixes: f7b42442c4 ("drm/log: Introduce a new boot logger to draw the kmsg on the screen")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/dri-devel/20241204160014.1171469-1-jfalempe@redhat.com/T/#md78853bba8904fd7614073f280f721d13ab0b432
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Tested-by: Dan Carpenter <dan.carpenter@linaro.org >
Acked-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20241212091153.1592096-1-jfalempe@redhat.com
2024-12-12 11:22:32 +01:00
Cristian Ciocaltea
19851fa2ba
drm/rockchip: dw_hdmi_qp: Simplify clock handling
...
Make use of the recently introduced devm_clk_bulk_get_all_enabled()
helper to simplify the code a bit.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241202-dw-hdmi-qp-rk-clk-bulk-v1-1-60a7cc9cd74e@collabora.com
2024-12-11 23:38:03 +01:00
Piotr Zalewski
9c22b6ece2
drm/rockchip: vop2: don't check color_mgmt_changed in atomic_enable
...
Remove color_mgmt_changed check from vop2_crtc_atomic_try_set_gamma to
allow gamma LUT rewrite during modeset when coming out of suspend. Add
a check for color_mgmt_changed directly in vop2_crtc_atomic_flush.
This patch fixes the patch adding gamma LUT support for vop2 [1].
[1] https://lore.kernel.org/linux-rockchip/20241101185545.559090-3-pZ010001011111@proton.me/
Suggested-by: Andy Yan <andy.yan@rock-chips.com >
Signed-off-by: Piotr Zalewski <pZ010001011111@proton.me >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206192013.342692-3-pZ010001011111@proton.me
2024-12-11 23:38:03 +01:00
Guoqing Jiang
8ddc8dfb83
drm/rockchip: Remove unnecessary checking
...
It is not needed since drm_atomic_helper_shutdown checks it.
Signed-off-by: Guoqing Jiang <guoqing.jiang@canonical.com >
Acked-by: Andy Yan <andyshrk@163.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206114233.1270989-1-guoqing.jiang@canonical.com
2024-12-11 23:38:03 +01:00
Dave Stevenson
c5cf801914
drm/vc4: plane: Remove WARN on state being set in plane_reset
...
It is permitted on situations such as system resume for plane->state
to be non-NULL, and that should be handled by freeing it. Do so.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Stefan Wahren <wahrenst@gmx.net >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241202120343.33726-1-wahrenst@gmx.net
2024-12-11 11:37:39 -03:00
Maíra Canal
4ee06e3b61
drm/v3d: Fix miscellaneous documentation errors
...
This commit fixes several miscellaneous documentation errors. Mostly,
delete/update comments that are outdated or are leftovers from past code
changes. Apart from that, remove double-spaces in several comments.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241206153908.62429-1-mcanal@igalia.com
2024-12-11 10:06:14 -03:00
Cristian Ciocaltea
0f818db20c
drm/rockchip: dw_hdmi_qp: Add support for RK3588 HDMI1 output
...
Provide the basic support required to enable the second HDMI TX port
found on RK3588 SoC.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Tested-by: Alexandre ARNOUD <aarnoud@me.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211-rk3588-hdmi1-v2-1-02cdca22ff68@collabora.com
2024-12-11 11:34:05 +01:00
Boris Brezillon
ec62d37d2c
drm/panthor: Fix the fast-reset logic
...
If we do a GPU soft-reset, that's no longer fast reset. This also means
the slow reset fallback doesn't work because the MCU state is only reset
after a GPU soft-reset.
Let's move the retry logic to panthor_device_resume() to issue a
soft-reset between the fast and slow attempts, and patch
panthor_gpu_suspend() to only power-off the L2 when a fast reset is
requested.
v3:
- No changes
v2:
- Add R-b
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-6-boris.brezillon@collabora.com
2024-12-11 10:04:12 +01:00
Boris Brezillon
303e9e981d
drm/panthor: Be robust against resume failures
...
When the runtime PM resume callback returns an error, it puts the device
in a state where it can't be resumed anymore. Make sure we can recover
from such transient failures by calling pm_runtime_set_suspended()
explicitly after a pm_runtime_resume_and_get() failure.
v3:
- Add R-b/A-b
v2:
- Add a comment explaining potential races in
panthor_device_resume_and_get()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com >
Acked-by: Steven Price <steven.price@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-5-boris.brezillon@collabora.com
2024-12-11 10:04:05 +01:00
Boris Brezillon
b0758224e5
drm/panthor: Ignore devfreq_{suspend, resume}_device() failures
...
devfreq_{resume,suspend}_device() don't bother undoing the suspend_count
modifications if something fails, so either it assumes failures are
harmless, or it's super fragile/buggy. In either case it's not something
we can address at the driver level, so let's just assume failures are
harmless for now, like is done in panfrost.
v3:
- Add R-b
v2:
- Add R-b
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-4-boris.brezillon@collabora.com
2024-12-11 10:03:59 +01:00
Boris Brezillon
dcddad6c89
drm/panthor: Be robust against runtime PM resume failures in the suspend path
...
The runtime PM resume operation is not guaranteed to succeed, but if it
fails, the device should be in a suspended state. Make sure we're robust
to resume failures in the unplug path.
v3:
- Fix typo
- Add R-bs
v2:
- Move the bit that belonged in the next commit
- Drop the panthor_device_unplug() changes
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-3-boris.brezillon@collabora.com
2024-12-11 10:03:54 +01:00
Boris Brezillon
4bd56ca822
drm/panthor: Preserve the result returned by panthor_fw_resume()
...
WARN() will return true if the condition is true, false otherwise.
If we store the return of drm_WARN_ON() in ret, we lose the actual
error code.
v3:
- Add R-b
v2:
- Add R-b
Fixes: 5fe909cae1 ("drm/panthor: Add the device logical block")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-2-boris.brezillon@collabora.com
2024-12-11 10:03:50 +01:00
Andy Yan
6b4dfdcde3
drm/rockchip: vop2: Fix the mixer alpha setup for layer 0
...
The alpha setup should start from the second layer, the current calculation
starts incorrectly from the first layer, a negative offset will be obtained
in the following formula:
offset = (mixer_id + zpos - 1) * 0x10
Fixes: 604be85547 ("drm/rockchip: Add VOP2 driver")
Tested-by: Derek Foreman <derek.foreman@collabora.com >
Signed-off-by: Andy Yan <andy.yan@rock-chips.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241209122943.2781431-7-andyshrk@163.com
2024-12-11 00:07:33 +01:00
Andy Yan
17b4b10a0d
drm/rockchip: vop2: Fix cluster windows alpha ctrl regsiters offset
...
The phy_id of cluster windws are not increase one for each window.
Fixes: 604be85547 ("drm/rockchip: Add VOP2 driver")
Tested-by: Derek Foreman <derek.foreman@collabora.com >
Signed-off-by: Andy Yan <andy.yan@rock-chips.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241209122943.2781431-6-andyshrk@163.com
2024-12-11 00:07:31 +01:00
Heiko Stuebner
9f1e1e14f5
drm/rockchip: Add MIPI DSI2 glue driver for RK3588
...
This adds the glue code for the MIPI DSI2 bridge on Rockchip SoCs and
enables its use on the RK3588.
Right now the DSI2 controller is always paired with a DC-phy based on a
Samsung IP, so the interface values are set statically for now.
This stays true for the upcoming RK3576 as well.
Tested-by: Daniel Semkowicz <dse@thaumatec.com >
Tested-by: Dmitry Yashin <dmt.yashin@gmail.com >
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de >
Reviewed-by: Andy Yan <andy.yan@rock-chips.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241209231021.2180582-4-heiko@sntech.de
2024-12-10 23:53:08 +01:00
Heiko Stuebner
0d6d86253f
drm/bridge/synopsys: Add MIPI DSI2 host controller bridge
...
Add a Synopsys Designware MIPI DSI host DRM bridge driver for their
DSI2 host controller, based on the Rockchip version from the driver
rockchip/dw-mipi-dsi2.c in their vendor-kernel with phy & bridge APIs.
While the driver is heavily modelled after the previous IP, the register
set of this DSI2 controller is completely different and there are also
additional properties like the variable-width phy interface.
Tested-by: Daniel Semkowicz <dse@thaumatec.com >
Tested-by: Dmitry Yashin <dmt.yashin@gmail.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de >
Reviewed-by: Andy Yan <andy.yan@rock-chips.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241209231021.2180582-2-heiko@sntech.de
2024-12-10 23:53:04 +01:00
Jocelyn Falempe
8a4b913df4
drm/log: Add integer scaling support
...
Add a module parameter, to increase the font size for HiDPI screen.
Even with CONFIG_FONT_TER16x32, it can still be a bit small to read.
In this case, adding drm_log.scale=2 to your kernel command line will
double the character size.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-7-jfalempe@redhat.com
2024-12-10 14:36:54 +01:00
Jocelyn Falempe
cd41b4489c
drm/log: Implement suspend/resume
...
Normally the console is already suspended when the graphic driver
suspend callback is called, but if the parameter no_console_suspend
is set, it might still be active.
So call console_stop()/console_start() in the suspend/resume
callbacks, to make sure it won't try to write to the framebuffer
while the graphic driver is suspended.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: John Ogness <john.ogness@linutronix.de >
Acked-by: Petr Mladek <pmladek@suse.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-6-jfalempe@redhat.com
2024-12-10 14:36:54 +01:00
Jocelyn Falempe
25e2c2a3ef
drm/log: Color the timestamp, to improve readability
...
Color the timesamp prefix, similar to dmesg.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-5-jfalempe@redhat.com
2024-12-10 14:36:54 +01:00
Jocelyn Falempe
eb30b4453e
drm/log: Do not draw if drm_master is taken
...
When userspace takes drm_master, the drm_client buffer is no more
visible, so drm_log shouldn't waste CPU cycle to draw on it.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-4-jfalempe@redhat.com
2024-12-10 14:36:53 +01:00
Jocelyn Falempe
f7b42442c4
drm/log: Introduce a new boot logger to draw the kmsg on the screen
...
drm_log is a simple logger that uses the drm_client API to print the
kmsg boot log on the screen. This is not a full replacement to fbcon,
as it will only print the kmsg. It will never handle user input, or a
terminal because this is better done in userspace.
Design decisions:
* It uses the drm_client API, so it should work on all drm drivers
from the start.
* It doesn't scroll the message, that way it doesn't need to redraw
the whole screen for each new message.
It also means it doesn't have to keep drawn messages in memory, to
redraw them when scrolling.
* It uses the new non-blocking console API, so it should work well
with PREEMPT_RT.
This patch also adds a Kconfig menu to select the drm client to use.
It can be overwritten on the kernel command line with:
drm_client_lib.active=log or drm_client_lib.active=fbdev
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: John Ogness <john.ogness@linutronix.de > # console API
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-3-jfalempe@redhat.com
2024-12-10 14:36:53 +01:00
Jocelyn Falempe
31fa2c1ca0
drm/panic: Move drawing functions to drm_draw
...
Move the color conversions, blit and fill functions to drm_draw.c,
so that they can be re-used by drm_log.
drm_draw is internal to the drm subsystem, and shouldn't be used by
gpu drivers.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-2-jfalempe@redhat.com
2024-12-10 14:36:41 +01:00