Langyan Ye
05345cea4f
drm/panel: panel-himax-hx83102: support for csot-pna957qt1-1 MIPI-DSI panel
...
The csot-pna957qt1-1 is a 10.95" TFT panel. The MIPI controller on this
panel is the same as the other panels here, so add this panel to this
driver.
Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250206131300.1295111-4-yelangyan@huaqin.corp-partner.google.com
2025-02-07 09:56:02 -08:00
Langyan Ye
36947218ca
dt-bindings: display: panel: Add compatible for CSOT PNA957QT1-1
...
Add a new compatible for the panel CSOT PNA957QT1-1. This panel uses
HX83102 IC, so add the compatible to the hx83102 binding files.
Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250206131300.1295111-3-yelangyan@huaqin.corp-partner.google.com
2025-02-07 09:56:02 -08:00
Langyan Ye
75e80af7d6
dt-bindings: vendor-prefixes: add csot
...
Add "csot" to the Devicetree Vendor Prefix Registry.
Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250206131300.1295111-2-yelangyan@huaqin.corp-partner.google.com
2025-02-07 09:56:02 -08:00
Rob Herring (Arm)
4f5f701c55
drm/panthor: Convert IOCTL defines to an enum
...
Use an enum instead of #defines for panthor IOCTLs. This allows the
header to be used with Rust code as bindgen can't handle complex
defines.
Cc: Beata Michalska <beata.michalska@arm.com >
Signed-off-by: Rob Herring (Arm) <robh@kernel.org >
Reviewed-by: Alice Ryhl <aliceryhl@google.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250204232824.3819437-1-robh@kernel.org
2025-02-07 18:35:25 +01:00
Jocelyn Falempe
dbed4a797e
drm/panic: Better binary encoding in QR code
...
The current encoding, is done by converting 13bits of input into 4
decimal digits, that are then encoded efficiently using the numeric
encoding of the QR code specification.
The Fido v2.2 specification [1] uses a similar approach for its
QR-initiated authentication. The only difference is that it converts
7 bytes (56bits) of input into 17 decimal digits. The benefit is that
the algorithm doesn't require to split input bytes into 13bits chunk,
and the ratio is a bit better.
This improvement was proposed by Jó Ágila Bitsch in [2].
drm_panic is still young, and the QR code feature is not widely used,
so it's still time to switch to a common algorithm, shared with a
widely used standard.
I also changed the name of the url parameter, from zl= to z=, so the
website can keep backward compatibility if needed.
[1] https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html#hybrid-qr-initiated
[2] https://github.com/kdj0c/panic_report/issues/2
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250128165254.893204-1-jfalempe@redhat.com
2025-02-07 17:52:09 +01:00
Adrián Larumbe
0590c94c35
drm/panthor: Fix race condition when gathering fdinfo group samples
...
Commit e16635d88f ("drm/panthor: add DRM fdinfo support") failed to
protect access to groups with an xarray lock, which could lead to
use-after-free errors.
Fixes: e16635d88f ("drm/panthor: add DRM fdinfo support")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-6-adrian.larumbe@collabora.com
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173310.88329-1-florent.tomasin@arm.com
2025-02-07 15:27:01 +01:00
Adrián Larumbe
f780ef56f7
Documentation/gpu: Add fdinfo meanings of panthor-*-memory tags
...
A previous commit enabled display of driver-internal kernel BO sizes
through the device file's fdinfo interface.
Expand the description of the relevant driver-specific key:value pairs
with the definitions of the new panthor-*-memory ones.
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com >
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-5-adrian.larumbe@collabora.com
2025-02-07 15:23:39 +01:00
Adrián Larumbe
434e5ca5b5
drm/panthor: Expose size of driver internal BO's over fdinfo
...
This will display the sizes of kenrel BO's bound to an open file, which are
otherwise not exposed to UM through a handle.
The sizes recorded are as follows:
- Per group: suspend buffer, protm-suspend buffer, syncobjcs
- Per queue: ringbuffer, profiling slots, firmware interface
- For all heaps in all heap pools across all VM's bound to an open file,
record size of all heap chuks, and for each pool the gpu_context BO too.
This does not record the size of FW regions, as these aren't bound to a
specific open file and remain active through the whole life of the driver.
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com >
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com >
Reviewed-by: Steven Price <steven.price@arm.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-4-adrian.larumbe@collabora.com
2025-02-07 15:23:39 +01:00
Adrián Larumbe
af6c2b7c46
drm/file: Add fdinfo helper for printing regions with prefix
...
This is motivated by the desire of some drivers (eg. Panthor) to print the
size of internal memory regions with a prefix that reflects the driver
name, as suggested in the previous documentation commit.
That means adding a new argument to print_size and making it available for
DRM users.
Cc: Tvrtko Ursulin <tursulin@ursulin.net >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-3-adrian.larumbe@collabora.com
2025-02-07 15:23:36 +01:00
Adrián Larumbe
3ddf003c7e
Documentation/gpu: Clarify format of driver-specific fidnfo keys
...
This change reflects de facto usage by amdgpu, as exemplified by commit
d6530c33a9 ("drm/amdgpu: expose more memory stats in fdinfo").
Cc: Tvrtko Ursulin <tursulin@ursulin.net >
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-2-adrian.larumbe@collabora.com
2025-02-07 15:22:46 +01:00
Tvrtko Ursulin
2eca617f12
drm/scheduler: Remove some unused prototypes
...
As far as I can tell some removed prototypes were introduced by probably
bad conflict resolution in
fc58764bbf ("Merge tag 'amd-drm-next-6.2-2022-11-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-next").
Remove them.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Danilo Krummrich <dakr@redhat.com >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: Philipp Stanner <pstanner@redhat.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250205110410.7941-1-tvrtko.ursulin@igalia.com
2025-02-07 10:07:24 +00:00
Hermes Wu
a5072fc77f
drm/bridge: it6505: fix HDCP V match check is not performed correctly
...
Fix a typo where V compare incorrectly compares av[] with av[] itself,
which can result in HDCP failure.
The loop of V compare is expected to iterate for 5 times
which compare V array form av[0][] to av[4][].
It should check loop counter reach the last statement "i == 5"
before return true
Fixes: 0989c02c7a ("drm/bridge: it6505: fix HDCP CTS compare V matching")
Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250121-fix-hdcp-v-comp-v4-1-185f45c728dc@ite.com.tw
2025-02-06 14:40:47 +01:00
Maxime Ripard
93c7dd1b39
Merge drm/drm-next into drm-misc-next
...
Bring rc1 to start the new release dev.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-06 13:47:32 +01:00
Cristian Ciocaltea
2c1268e7aa
drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI0
...
The RK3588 specific implementation is currently quite limited in terms
of handling the full range of display modes supported by the connected
screens, e.g. 2560x1440@75Hz, 2048x1152@60Hz, 1024x768@60Hz are just a
few of them.
Additionally, it doesn't cope well with non-integer refresh rates like
59.94, 29.97, 23.98, etc.
Make use of HDMI0 PHY PLL as a more accurate DCLK source to handle
all display modes up to 4K@60Hz.
Tested-by: FUKAUMI Naoki <naoki@radxa.com >
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20250204-vop2-hdmi0-disp-modes-v3-3-d71c6a196e58@collabora.com
2025-02-06 11:57:54 +01:00
Cristian Ciocaltea
9f40d7a944
drm/rockchip: vop2: Drop unnecessary if_pixclk_rate computation
...
The if_pixclk_rate variable is not being used outside of the if-block in
rk3588_calc_cru_cfg(), hence move the superfluous assignment from the
first branch to the inner comment-block.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com >
Tested-by: FUKAUMI Naoki <naoki@radxa.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20250204-vop2-hdmi0-disp-modes-v3-2-d71c6a196e58@collabora.com
2025-02-06 11:57:53 +01:00
Cristian Ciocaltea
79982cbac8
dt-bindings: display: vop2: Add optional PLL clock properties
...
On RK3588, HDMI PHY PLL can be used as an alternative and more accurate
pixel clock source for VOP2 video ports 0, 1 and 2.
Document the optional PLL clock properties corresponding to the two HDMI
PHYs available on the SoC.
Acked-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com >
Tested-by: FUKAUMI Naoki <naoki@radxa.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20250204-vop2-hdmi0-disp-modes-v3-1-d71c6a196e58@collabora.com
2025-02-06 11:57:52 +01:00
Damon Ding
81dde32e72
dt-bindings: display: rockchip: Fix label name of hdptxphy for RK3588 HDMI TX Controller
...
The hdptxphy is a combo transmit-PHY for HDMI2.1 TMDS Link, FRL Link, DP
and eDP Link. Therefore, it is better to name it hdptxphy0 other than
hdptxphy_hdmi0, which will be referenced by both hdmi0 and edp0 nodes.
Acked-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: Damon Ding <damon.ding@rock-chips.com >
Signed-off-by: Heiko Stuebner <heiko@sntech.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20250206030330.680424-2-damon.ding@rock-chips.com
2025-02-06 11:52:24 +01:00
Tejas Vipin
7e3bf00047
drm/panel: sharp-ls060t1sx01: transition to mipi_dsi wrapped functions
...
Changes the sharp-ls060t1sx01 panel to use multi style functions for
improved error handling.
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250201185439.157613-1-tejasvipin76@gmail.com
2025-02-05 12:48:22 -08:00
Damon Ding
0e1daf2b32
drm/edp-panel: Add LG Display panel model LP079QX1-SP0V
...
The raw edid for LP079QX1-SP0V panel model is:
00 ff ff ff ff ff ff 00 16 83 00 00 00 00 00 00
04 17 01 00 a5 10 0c 78 06 ef 05 a3 54 4c 99 26
0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 ea 4e 00 4c 60 00 14 80 0c 10
84 00 78 a0 00 00 00 18 00 00 00 10 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 fe 00 4c
50 30 37 39 51 58 31 2d 53 50 30 56 00 00 00 fc
00 43 6f 6c 6f 72 20 4c 43 44 0a 20 20 20 00 3f
Signed-off-by: Damon Ding <damon.ding@rock-chips.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250205094734.562992-1-damon.ding@rock-chips.com
2025-02-05 12:46:51 -08:00
Vignesh Raman
c5d82ed17e
drm/ci: update expectation files
...
Update expectation files for the mesa uprev.
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/20250205081652.1928927-4-vignesh.raman@collabora.com
2025-02-05 10:10:51 -03:00
Vignesh Raman
df54f04f20
drm/ci: update gitlab rules
...
Update gitlab rules to include scheduled pipelines.
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/20250205081652.1928927-3-vignesh.raman@collabora.com
2025-02-05 10:10:50 -03:00
Vignesh Raman
550b82651b
drm/ci: uprev mesa
...
Uprev mesa to adapt to the latest changes in mesa ci
which includes new container jobs and stages. Also update
lava-submit script to adapt to the recent changes in mesa
to use LAVA rootfs overlays.
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/20250205081652.1928927-2-vignesh.raman@collabora.com
2025-02-05 10:10:47 -03:00
Paz Zcharya
8cca475b80
drm/vkms: Add support for ABGR8888 pixel format
...
Add support for pixel format ABGR8888, which is the default format
on Android devices. This will allow us to use VKMS as the default
display driver in Android Emulator (Cuttlefish) and increase VKMS
adoption.
Signed-off-by: Paz Zcharya <pazz@chromium.org >
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129142238.562999-1-pazz@google.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-02-04 14:44:13 +01:00
Luca Ceresoli
51d262a96b
drm/atomic-helper: improve CRTC enabled/connectors mismatch logging message
...
This message reports a mismatch between new_crtc_state->enable and
has_connectors, which should be either both true or both false. However it
does not mention which one is true and which is false, which can be useful
for debugging. Add the value of both avriables to the log message.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Acked-by: Louis Chauvet <louis.chauvet@bootlin.com >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250204-drm-small-improvements-v4-2-d6bbc92f12f1@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-02-04 14:11:15 +01:00
Luca Ceresoli
f269e5eac4
drm/drm_mode_object: fix typo in kerneldoc
...
Remove unintended extra word.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Acked-by: Louis Chauvet <louis.chauvet@bootlin.com >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250204-drm-small-improvements-v4-1-d6bbc92f12f1@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-02-04 14:11:14 +01:00
Suraj Kandpal
242d9bf59a
drm/i915/lttpr: Enable Extended Wake Timeout
...
Usually retimers take around 30 to 40ms to exit all devices from
sleep state. Extended wake timeout mechanism helps to give
that additional time.
--v2
-Grant the requested time only if greater than 1ms [Arun/Jani]
-Reframe commit message [Arun]
--v3
-Move the function to drm_core [Dmitry/Jani]
Spec: DP v2.1 Section 3.6.12.3
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-4-suraj.kandpal@intel.com
2025-02-04 17:57:31 +05:30
Suraj Kandpal
eaf53ac490
drm/display/dp: Define function to setup Extended wake time
...
Extended wake timeout request helps to give additional
time by reading the DPCD register through which sink requests the
minimal amount of time required to wake the sink up.
Source device shall keep retying the AUX tansaction till the
extended timeout that is being granted for LTTPRs from the
sink device.
--v2
-Add documentation [Dmitry]
Spec: DP v2.1 Section 3.6.12.3
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-3-suraj.kandpal@intel.com
2025-02-04 17:57:31 +05:30
Suraj Kandpal
e5e8367d25
drm/dp: Add the DPCD register required for Extended wake timeout
...
Add DPCD registers required to configure Extended Wake Timeout
for LTTPR.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-2-suraj.kandpal@intel.com
2025-02-04 17:57:30 +05:30
Thomas Zimmermann
0c5f9cb678
drm/ast: Only look up VBIOS mode on full modesets
...
Only look up the VBIOS mode during atomic_check if the display mode
changes. For page flips, the previous settings still apply. Avoids the
runtime overhead of looking up the VBIOS mode on each page flip.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-17-tzimmermann@suse.de
2025-02-03 14:01:16 +01:00
Thomas Zimmermann
ec1d13fa90
drm/ast: Remove struct ast_vbios_mode_info
...
The type struct ast_vbios_mode_info used to store information about
the color format and display mode. It has outlived its purpose. Inline
its fields into struct ast_crtc_state and replace all instances.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-16-tzimmermann@suse.de
2025-02-03 14:01:15 +01:00
Thomas Zimmermann
6af7e16c4d
drm/ast: astdp: Look up mode index from table
...
Replace the large switch statement with a look-up table when selecting
the mode index. Makes the code easier to read. The table is sorted by
resolutions; if run-time overhead from traversal becomes significant,
binary search would be a possible optimization.
The mode index requires a refresh-rate index to be added or subtracted,
which still requires a minimal switch. In the original code, some of
the indices did not contain this computation. Those cases would have been
equivalent to adding 0, so they are now all subsumed in the switch's
default branch.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Suggested-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
v3:
- explain the semantics of the new switch statement (Jocelyn)
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-15-tzimmermann@suse.de
2025-02-03 14:01:15 +01:00
Thomas Zimmermann
d86f6beed0
drm/ast: astdp: Rework display-mode setting
...
ASTDP requires a mode index, depending on the resolution. Move the
look-up code from ast_dp_set_mode() into a separate helper. Inline
the rest of the function into its only caller. Rename the variable
names and register constants to match the programming manual.
As before, the mode-index lookup still happens during the update's
atomic commit. Right now, there's no way of doing it during the atomic
check. The lookup requires the VBIOS mode, which is not available at
the atomic check's invocation. At least warn now if the mode index
could not be found.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-14-tzimmermann@suse.de
2025-02-03 14:01:14 +01:00
Thomas Zimmermann
c337d4c1de
drm/ast: Inline ast_get_vbios_mode_info()
...
The helper ast_get_vbios_mode_info() retrieves hardware-specific format
and display-mode information. Inline the function into its only caller.
While at it, also replace a use of struct drm_format_info.cpp with the
correct DRM 4CC codes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-13-tzimmermann@suse.de
2025-02-03 14:01:14 +01:00
Thomas Zimmermann
2e90349bf4
drm/ast: Validate DRM display modes against VBIOS modes
...
Test DRM display modes against the list of modes supported by the
VBIOS. The helper will respect the supported-modes flags in struct
ast_device. Hence only DRM display modes supported by the VBIOS
will be reported; without the current duplication of this information.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-12-tzimmermann@suse.de
2025-02-03 14:01:13 +01:00
Thomas Zimmermann
517e28d40c
drm/ast: Add helpers for VBIOS mode lookup
...
Mode lines are independent from hardware Gen or TX chip, so hide all
VBIOS mode tables in ast_vbios.c.
Move the look-up code for VBIOS modes from ast_vbios_get_mode_info()
to ast_vbios_find_mode(). The new look-up function respects the
supported-mode flags in struct ast_device. For example, if a device
does not have struct ast_device.support_fullhd set, the helper does
not return a valid mode for 1920x1080. Taking the supported-mode flags
into account allows for making the VBIOS tables the single reference
for validating and setting display modes against hardware capabilities.
v2:
- replace mode switch with look-up table (Jocelyn)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-11-tzimmermann@suse.de
2025-02-03 14:01:12 +01:00
Thomas Zimmermann
192cc9f2b7
drm/ast: Add empty initializer for VBIOS modes
...
VBIOS mode tables are terminated by an entry with a refresh rate of
0xff. The code is hard to read and fragile to use. Therefore create
an empty entry with AST_VBIOS_MODE_INVALID to terminate each mode list.
Stop at the invalid entry when searching for modes in the tables.
Instead of testing for refresh == 0xff, test with a helper function if
the mode's size and refresh have meaningful values.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-10-tzimmermann@suse.de
2025-02-03 14:01:11 +01:00
Thomas Zimmermann
c81202906b
drm/ast: Find VBIOS mode from regular display size
...
The ast driver looks up supplied display modes from an internal list of
display modes supported by the VBIOS.
Do not use the crtc_-prefixed display values from struct drm_display_mode
for looking up the VBIOS mode. The fields contain raw values that the
driver programs to hardware. They are affected by display settings like
double-scan or interlace.
Instead use the regular vdisplay and hdisplay fields for lookup. As the
programmed values can now differ from the values used for lookup, set
struct drm_display_mode.crtc_vdisplay and .crtc_hdisplay from the VBIOS
mode.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-9-tzimmermann@suse.de
2025-02-03 14:01:11 +01:00
Thomas Zimmermann
255b3ff65d
drm/ast: Always validate H/V sync flags
...
The ast driver matches DRM display modes against an internal list of
modes supported by the VBIOS. Matching H/V sync flags between modes is
preferred, but optional. If sync flags are not matching, the driver
would program the VBIOS settings to hardware and let the display handle
the difference.
DRM modes are generated from attached displays or standard mode lines.
Therefore differences to the VBIOS modes are not just cosmetical, but
signal possible incompatibility with the display hardware.
Hence make matching H/V sync flags mandatory. If the VBIOS does not
support a certain mode, we should report it as unsupported. Note that
the VBIOS mode tables all appear to refer to standard modes.
(If sync flags really make no difference to the VBIOS, the ast driver
shouldn't match them in the first place.)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-8-tzimmermann@suse.de
2025-02-03 14:01:08 +01:00
Thomas Zimmermann
454bdaccca
drm/ast: Add support_wuxga flag to struct ast_device
...
Detect support for 1920x1200 (WUXGA) in ast_detect_widescreen(). The
flag is cleared by default. The test logic has been taken from existing
code in ast_crtc_helper_mode_valid(). The code in that function is being
replaced by the new flag.
v2:
- move shared detection code into helper (Jocelyn)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-7-tzimmermann@suse.de
2025-02-03 14:01:07 +01:00
Thomas Zimmermann
7a74caabe1
drm/ast: Add support_fullhd flag to struct ast_device
...
Detect support for 1920x1080 (FullHD) in ast_detect_widescreen(). The
flag is cleared by default. The test logic has been taken from existing
code in ast_crtc_helper_mode_valid(). The code in that function is being
replaced by the new flag.
For Gen3, a new branch duplicates the Gen2 logic and adds a test for
AST2200. Gen2 adds a test for AST2100.
v2:
- use fullhd flag for setting max width/height
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-6-tzimmermann@suse.de
2025-02-03 14:01:06 +01:00
Thomas Zimmermann
1bb3f70c41
drm/ast: Reorganize widescreen test around hardware Gens
...
Testing for support of widescreen modes mixes up various hardware
Gens. First branch by hardware Gen, then do specific tests for each
Gen. By default, widesscreen support is disabled.
Later patches will add more specific tests for each Gen.
v2:
- move shared detection code into helper (Jocelyn)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-5-tzimmermann@suse.de
2025-02-03 14:01:06 +01:00
Thomas Zimmermann
219c6a4a6f
drm/ast: Rename support_wide_screen to support_wsxga_p
...
The flag support_wide_screen in struct ast_device selects devices that
support resolutions of at least 1680x1050 (WSXGA+). Name it accordingly.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-4-tzimmermann@suse.de
2025-02-03 14:01:05 +01:00
Thomas Zimmermann
fdebbb2cec
drm/ast: Align naming in widescreen detection code to manual
...
Rename variables and register constants to align with the programming
manual. Add new constants where necessary.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-3-tzimmermann@suse.de
2025-02-03 14:01:04 +01:00
Thomas Zimmermann
707e860119
drm/ast: Remove 1152x864 from list of widescreen resolutions
...
The resolution 1152x864 has a ratio of 4:3 and is already handled
as such. Remove it from the list of widescreen resolutions.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-2-tzimmermann@suse.de
2025-02-03 14:01:04 +01:00
Karol Wachowski
d24b85df79
accel/ivpu: Move recovery work to system_unbound_wq
...
Recovery work doesn't need to be bound to any specific CPU, so move it
to unbound workqueue to improve execution time and system latency.
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-7-jacek.lawrynowicz@linux.intel.com
2025-02-03 10:40:34 +01:00
Tomasz Rusinowicz
af80fe138b
accel/ivpu: Enable recovery and adjust timeouts for fpga
...
Recovery now works on fpga. JSM state dump timeout needs to
be really long for the new fpga model releases.
Enable punit on fpga.
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-6-jacek.lawrynowicz@linux.intel.com
2025-02-03 10:40:34 +01:00
Karol Wachowski
3a40d4f461
accel/ivpu: Turn on HWS by default on all platforms
...
Hardware scheduling (HWS) is supposed to be supported on all existing
platform with recent FW including pre-silicon ones. Turn on HWS by
default.
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-5-jacek.lawrynowicz@linux.intel.com
2025-02-03 10:40:34 +01:00
Karol Wachowski
2f5bbea180
accel/ivpu: Fix missing MMU events if file_priv is unbound
...
Move the ivpu_mmu_discard_events() function to the common portion of
the abort work function. This ensures it is called only once, even if
there are no faulty contexts in context_xa, to guarantee that MMU events
are discarded and new events are not missed.
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-4-jacek.lawrynowicz@linux.intel.com
2025-02-03 10:40:34 +01:00
Jacek Lawrynowicz
b8c00323ae
accel/ivpu: Update last_busy in IRQ handler
...
Call pm_runtime_mark_last_busy() in top half of IRQ handler to prevent
device from being runtime suspended before bottom half is executed on
a workqueue.
Reviewed-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-3-jacek.lawrynowicz@linux.intel.com
2025-02-03 10:40:34 +01:00
Jacek Lawrynowicz
3477696345
accel/ivpu: Add support for hardware fault injection
...
Introduces the capability to simulate hardware faults for testing
purposes. The new `fail_hw` fault can be injected in
`ivpu_hw_reg_poll_fld()`, which is used in various parts of the driver
to wait for the hardware to reach a specific state. This allows to test
failures during NPU boot and shutdown, IPC message handling and more.
Fault injection can be enabled using debugfs or a module parameter.
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-2-jacek.lawrynowicz@linux.intel.com
2025-02-03 10:39:45 +01:00