Geert Uytterhoeven
294bbd1f26
drm/panic: Add support for drawing a monochrome graphical logo
...
Re-use the existing support for boot-up logos to draw a monochrome
graphical logo in the DRM panic handler. When no suitable graphical
logo is available, the code falls back to the ASCII art penguin logo.
Note that all graphical boot-up logos are freed during late kernel
initialization, hence a copy must be made for later use.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3f1a5f56213f3e4584773eb2813e212b2dff6d14.1718305355.git.geert+renesas@glider.be
2024-06-24 13:24:02 +02:00
Geert Uytterhoeven
a40d031d7b
drm/panic: Rename logo to logo_ascii
...
Rename variables related to the ASCII logo, to prepare for the advent of
support for graphical logos.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/df77372c16153655c321a290b5a3191ee2dcbc6b.1718305355.git.geert+renesas@glider.be
2024-06-24 13:24:02 +02:00
Geert Uytterhoeven
a3dfb1d120
drm/panic: Spelling s/formater/formatter/
...
Fix a misspelling of "formatter".
Fixes: 54034bebb2 ("drm/panic: Add a kmsg panic screen")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5a11f8caf8759aaa22d421034d3047368e9d5f33.1718305355.git.geert+renesas@glider.be
2024-06-24 13:18:02 +02:00
Geert Uytterhoeven
94ff11d3bd
drm/panic: Fix off-by-one logo size checks
...
Logos that are either just as wide or just as high as the display work
fine.
Fixes: bf9fb17c66 ("drm/panic: Add a drm panic handler")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1c9d02463cef3eac22cfac3ac6d1adad369f367b.1718305355.git.geert+renesas@glider.be
2024-06-24 13:18:01 +02:00
Geert Uytterhoeven
a63ee07883
drm/panic: Fix uninitialized drm_scanout_buffer.set_pixel() crash
...
No implementations of drm_plane_helper_funcs.get_scanout_buffer() fill
in the optional drm_scanout_buffer.set_pixel() member. Hence the member
may contain non-zero garbage, causing a crash when deferencing it during
drm panic.
Fix this by pre-initializing the drm_scanout_buffer object before
calling drm_plane_helper_funcs.get_scanout_buffer().
Fixes: 24d07f114e ("drm/panic: Add a set_pixel() callback to drm_scanout_buffer")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4c250d21880ca0b97e41da7b6a101bdf07e9d015.1718305355.git.geert+renesas@glider.be
2024-06-24 13:18:00 +02:00
Karolina Stolarek
07430fa524
drm/ttm/tests: Use u32 and u64 over uint*_t types
...
Update the tests and helpers to use unsigned kernel types.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/b36d71de78990ac5be1538cc3f735f7e40618cfe.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:26 +05:30
Karolina Stolarek
be487a2989
drm/ttm/tests: Correct modules' licenses
...
The test files are GPL and MIT, so update the definitions accordingly.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/54cd7289db67ec396b67ef48dbb45521d56ec03c.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:25 +05:30
Karolina Stolarek
99eec733e8
drm/ttm/tests: Add TODO file
...
List improvements for the test suite with some notes.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3856fbbeaf40078d59b45971002b8f9d0d85f8f0.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:24 +05:30
Karolina Stolarek
d6a82a1580
drm/ttm/tests: Add tests for ttm_tt_populate
...
Add tests for functions that add and release pages to TTs. Test the
swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and
ttm_tt_swapout symbols for testing purposes.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com >
Tested-by: Somalapuram, Amaranath <asomalap@amd.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ee42d83a472ba6bca22b4bce58f332f800891186.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:23 +05:30
Karolina Stolarek
5fe3943385
drm/ttm/tests: Add eviction testing
...
Add tests for ttm_bo_validate that focus on BO eviction and swapout.
Update device funcs definition with eviction-related callbacks. Add
alternative funcs where evict_flags() routes eviction to a domain
that can't allocate resources (dubbed "busy manager" in the tests).
Extract the common path of ttm_device init into a function.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com >
Tested-by: Somalapuram, Amaranath <asomalap@amd.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ae8e284d6c7e6bd0be259052bd4f42e07ce24641.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:21 +05:30
Karolina Stolarek
8eda41dfc9
drm/ttm/tests: Add test cases dependent on fence signaling
...
Add test cases that check how the state of dma fences in BO's
reservation object influence the ttm_bo_validation() flow. Do similar
tests for resource manager's move fence.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com >
Tested-by: Somalapuram, Amaranath <asomalap@amd.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/068791a27abd05bf2605f23cc31864a22c20b308.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:20 +05:30
Karolina Stolarek
32d618e946
drm/ttm/tests: Add tests with mock resource managers
...
Add mock resource manager to test ttm_bo_validate() with non-system
placements. Update KConfig entry to enable DRM Buddy allocator, used
by the mock manager. Update move function to do more than just assign
a resource.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Tested-by: Somalapuram, Amaranath <asomalap@amd.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/664791dbb7cbada29e705d2fcaf176023f1b8649.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:17 +05:30
Karolina Stolarek
8bd1ff5ddc
drm/ttm/tests: Test simple BO creation and validation
...
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use
sys manager. Define a simple move function in ttm_device_funcs. Expose
destroy callback of the buffer object to make testing of
ttm_bo_init_reserved() behaviour easier.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com >
Tested-by: Somalapuram, Amaranath <asomalap@amd.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ffba0d62eb98b2cbc61ae7ca90fee7dc0855719c.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:16 +05:30
Karolina Stolarek
f7ed0a7e42
drm/ttm/tests: Use an init function from the helpers lib
...
Add a new helper function that also initializes the device. Use it in
ttm_tt test suite and delete the local definition.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/235f110c1bdd2da7fac62ec03d177a5160dba1d5.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:14 +05:30
Karolina Stolarek
dc50165601
drm/ttm/tests: Set DMA mask in KUnit device
...
In commit d393acce7b ("drm/tests: Switch to kunit devices"),
DRM test helpers migrated away from using a dummy platform driver
in favour of KUnit device. This means that DMA masks for the device
are not set but are required by ttm_pool_alloc tests.
Set the DMA mask for coherent mappings to unblock testing.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/dbd83b01bc835d922c070ad1c5bd9023e631e6c4.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:13 +05:30
Karolina Stolarek
d0745846a3
drm/ttm/tests: Delete unnecessary config option
...
DRM KUnit helpers are selected automatically when TTM tests are enabled,
so there's no need to do it directly in the .kunitconfig file.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1f6f03ac5c6ba7d4b021c2a31638a0ae086486e8.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:13 +05:30
Karolina Stolarek
588c4c8d58
drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk
...
BOs in a bulk move have to share the same reservation object. That is
not the case in the ttm_bo_unreserve_bulk subtest. Update
ttm_bo_kunit_init() helper to accept dma_resv object so we can define
buffer objects that share the same resv. Update calls to that helper
accordingly.
Fixes: 995279d280 ("drm/ttm/tests: Add tests for ttm_bo functions")
Suggested-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c5bd2df114781b4eb5c1e8295b2ae4ac2c30a179.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:11 +05:30
Tejas Vipin
699f411dce
drm/panel: raydium-rm692e5: transition to mipi_dsi wrapped functions
...
Use functions introduced in commit 966e397e4f ("drm/mipi-dsi:
Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8
("drm/mipi-dsi: wrap more functions for streamline handling") for the
raydium-rm692e5 panel.
Additionally, the error handling in rm692e5_prepare() is changed to
properly power the panel off in the case of a wider range of
initialization commands failing than before.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Link: https://lore.kernel.org/r/20240620181051.102173-1-tejasvipin76@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240620181051.102173-1-tejasvipin76@gmail.com
2024-06-24 10:49:01 +02:00
Tejas Vipin
47e851ec4c
drm/panel: asus-z00t-tm5p5-n35596: transition to mipi_dsi wrapped functions
...
Use functions introduced in commit 966e397e4f ("drm/mipi-dsi:
Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8
("drm/mipi-dsi: wrap more functions for streamline handling") for the
asus-z00t-tm5p5-n35596 panel.
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20240621131648.131667-1-tejasvipin76@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621131648.131667-1-tejasvipin76@gmail.com
2024-06-24 10:48:19 +02:00
Aradhya Bhatia
4b12f91a06
drm/bridge: tc358767: Add format negotiation hooks for DPI/DSI to (e)DP
...
With new connector model, tc358767 will not create the connector, when
DRM_BRIDGE_ATTACH_NO_CONNECTOR is set and display-controller driver will
rely on format negotiation to setup the encoder format.
Add the missing bus format negotiation hooks in the
drm_bridge_funcs to complete DRM_BRIDGE_ATTACH_NO_CONNECTOR support.
Output format, for DPI/DSI to DP, is selected to
MEDIA_BUS_FMT_RGB888_1X24 as default, keeping in mind what the older
model used to support.
Reported-by: Jan Kiszka <jan.kiszka@siemens.com >
Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@siemens.com/
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20231108-tc358767-v2-1-25c5f70a2159@ideasonboard.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-22 15:20:19 +03:00
Tejas Vipin
c62b4fc4b9
drm/panel: truly-nt35521: transition to mipi_dsi wrapped functions
...
Use functions introduced in commit 966e397e4f ("drm/mipi-dsi: Introduce
mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8
("drm/mipi-dsi: wrap more functions for streamline handling") for the
sony tulip truly nt35521 panel.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240612163946.488684-1-tejasvipin76@gmail.com
2024-06-20 07:51:01 -07:00
Jeff Johnson
c139120575
drm/tests: add drm_hdmi_state_helper_test MODULE_DESCRIPTION()
...
make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_hdmi_state_helper_test.o
Add the missing invocation of the MODULE_DESCRIPTION() macro.
Fixes: eb66d34d79 ("drm/tests: Add output bpc tests")
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com >
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240619-md-drm-tests-drm_hdmi_state_helper_test-v1-1-41c5fe2fdb4a@quicinc.com
2024-06-20 10:15:41 +02:00
Dave Stevenson
fbe675b369
drm/vc4: vec: Add the margin properties to the connector
...
All the handling for the properties was present, but they
were never attached to the connector to allow userspace
to change them.
Add them to the connector.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240619153913.2804051-4-dave.stevenson@raspberrypi.com
2024-06-20 10:02:41 +02:00
Dave Stevenson
53c5da8573
drm/vc4: Add monochrome mode to the VEC.
...
The VEC supports not producing colour bursts for monochrome output.
It also has an option for disabling the chroma input to remove
chroma from the signal.
Now that there is a DRM_MODE_TV_MODE_MONOCHROME defined, plumb
this in.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240619153913.2804051-3-dave.stevenson@raspberrypi.com
2024-06-20 10:02:33 +02:00
Sebastian Andrzej Siewior
f85376c890
drm/ttm/tests: Let ttm_bo_test consider different ww_mutex implementation.
...
PREEMPT_RT has a different locking implementation for ww_mutex. The
base mutex of struct ww_mutex is declared as struct WW_MUTEX_BASE. The
latter is defined as `mutex' for non-PREEMPT_RT builds and `rt_mutex'
for PREEMPT_RT builds.
Using mutex_lock() directly on the base mutex in
ttm_bo_reserve_deadlock() leads to compile error on PREEMPT_RT.
The locking-selftest has its own defines to deal with this and it is
probably best to defines the needed one within the test program since
their usefulness is limited outside of well known selftests.
Provide ww_mutex_base_lock() which points to the correct function for
PREEMPT_RT and non-PREEMPT_RT builds.
Fixes: 995279d280 ("drm/ttm/tests: Add tests for ttm_bo functions")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240619144630.4DliKOmr@linutronix.de
2024-06-20 10:02:03 +02:00
AngeloGioacchino Del Regno
72533b6784
drm/panfrost: Add support for Mali on the MT8188 SoC
...
MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new
compatible and platform data using the same supplies and the
same power domain lists as MT8183 (one regulator, three power
domains).
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org >
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@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/20240611085602.491324-3-angelogioacchino.delregno@collabora.com
2024-06-19 13:41:28 +02:00
Marc Gonzalez
fbda4b2540
drm: bridge: simple-bridge: use devm_drm_bridge_add in probe
...
simple_bridge_probe() calls drm_bridge_add()
Thus, drm_bridge_remove() must be called in the remove() callback.
If we call devm_drm_bridge_add() instead, then drm_bridge_remove()
will be called automatically at device release, and the remove()
callback is no longer required.
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240618-devm-simple-bridge-v1-1-c7ed8a09fcc5@freebox.fr
2024-06-19 10:50:30 +02:00
Jocelyn Falempe
1ac6ac9ec0
drm/panic: depends on !VT_CONSOLE
...
The race condition between fbcon and drm_panic can only occurs if
VT_CONSOLE is set. So update drm_panic dependency accordingly.
This will make it easier for Linux distributions to enable drm_panic
by disabling VT_CONSOLE, and keeping fbcon terminal.
The only drawback is that fbcon won't display the boot kmsg, so it
should rely on userspace to do that.
At least plymouth already handle this case with
https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/224
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240613154041.325964-1-jfalempe@redhat.com
2024-06-18 17:18:56 +02:00
Nick Hollinghurst
41474d25be
drm: Add DRM_MODE_TV_MODE_MONOCHROME
...
Add this as a value for enum_drm_connector_tv_mode, represented
by the string "Mono", to generate video with no colour encoding
or bursts. Define it to have no pedestal (since only NTSC-M calls
for a pedestal).
Change default mode creation to acommodate the new tv_mode value
which comprises both 525-line and 625-line formats.
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com >
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240216184857.245372-2-dave.stevenson@raspberrypi.com
2024-06-18 11:13:30 +02:00
Javier Martinez Canillas
b2cb6011bc
drm/tidss: Add drm_panic support
...
Add support for the drm_panic infrastructure, which allows to display
a user friendly message on the screen when a Linux kernel panic occurs.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240615085326.1726262-1-javierm@redhat.com
2024-06-18 10:06:35 +02:00
Christophe JAILLET
118b4eed8b
drm/nouveau: Constify struct nouveau_job_ops
...
"struct nouveau_job_ops" is not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security.
In order to do it, "struct nouveau_job" and "struct nouveau_job_args" also
need to be adjusted to this new const qualifier.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
5570 152 0 5722 165a drivers/gpu/drm/nouveau/nouveau_exec.o
After:
=====
text data bss dec hex filename
5630 112 0 5742 166e drivers/gpu/drm/nouveau/nouveau_exec.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Danilo Krummrich <dakr@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/860e9753d7867aa46b003bb3d0497f1b04065b24.1718381285.git.christophe.jaillet@wanadoo.fr
2024-06-17 17:22:06 +02:00
Dave Airlie
d45bb9c5f7
nouveau: rip out busy fence waits
...
I'm pretty sure this optimisation is actually not a great idea,
and is racy with other things waiting for fences.
Just nuke it, there should be no need to do fence waits in a
busy CPU loop.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Ben Skeggs <bskeggs@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240417054032.3145721-1-airlied@gmail.com
2024-06-17 17:05:29 +02:00
Vignesh Raman
d2e02153f5
drm/ci: add tests on vkms
...
Add job that runs igt on top of vkms.
Acked-by: Maíra Canal <mcanal@igalia.com >
Acked-by: Helen Koike <helen.koike@collabora.com >
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com >
Acked-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Acked-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240614161835.55553-1-vignesh.raman@collabora.com
2024-06-17 08:02:48 -03:00
Sean Anderson
af197bef93
drm: zynqmp_dp: Don't delay work
...
We always call scheduled_delayed_work with no delay, so just use a
non-delayed work_struct instead.
Signed-off-by: Sean Anderson <sean.anderson@linux.dev >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-4-sean.anderson@linux.dev
2024-06-17 10:38:18 +03:00
Sean Anderson
c194dd025a
drm: zynqmp_dp: Rearrange zynqmp_dp for better padding
...
Sort the members of struct zynqmp_dp to reduce padding necessary for
alignment.
Signed-off-by: Sean Anderson <sean.anderson@linux.dev >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-3-sean.anderson@linux.dev
2024-06-17 10:38:17 +03:00
Sean Anderson
0743dafefd
drm: zynqmp_kms: Fix AUX bus not getting unregistered
...
drm_encoder_cleanup is responsible for calling drm_bridge_detach for
each bridge attached to the encoder. zynqmp_dp_bridge_detach is in turn
responsible for unregistering the AUX bus. However, we never ended up
calling drm_encoder_cleanup in the remove or error paths, so the AUX bus
would stick around after the rest of the driver had been removed.
I don't really understand why drm_mode_config_cleanup doesn't call
drm_encoder_cleanup for us. It will call destroy (which for
simple_encoder is drm_encoder_cleanup) on encoders in the mode_config's
encoder_list.
Should drm_encoder_cleanup get called before or after
drm_atomic_helper_shutdown?
Fixes: 2dfd045c84 ("drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-2-sean.anderson@linux.dev
2024-06-17 10:38:17 +03:00
Anatoliy Klymenko
fea7fad851
drm: xlnx: zynqmp_dpsub: Enable plane in atomic update
...
Unconditionally enable the DPSUB layer in the corresponding atomic plane
update callback. Setting the new display mode may require disabling and
re-enabling the CRTC. This effectively resets DPSUB to the default state
with all layers disabled. The original implementation of the plane atomic
update enables the corresponding DPSUB layer only if the framebuffer
format has changed. This would leave the layer disabled after switching to
a different display mode with the same framebuffer format.
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240523-dp-layer-enable-v2-1-d799020098fc@amd.com
2024-06-17 10:37:14 +03:00
Christophe JAILLET
4ea3deda13
drm: zynqmp_dpsub: Fix an error handling path in zynqmp_dpsub_probe()
...
If zynqmp_dpsub_drm_init() fails, we must undo the previous
drm_bridge_add() call.
Fixes: be3f304239 ("drm: zynqmp_dpsub: Always register bridge")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Reviewed-by: Sean Anderson <sean.anderso@linux.dev >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/974d1b062d7c61ee6db00d16fa7c69aa1218ee02.1716198025.git.christophe.jaillet@wanadoo.fr
2024-06-17 10:36:55 +03:00
Dmitry Baryshkov
d999aa2785
drm/ci: mark kms_addfb_basic@addfb25-bad-modifier as passing on msm
...
The commit b228501ff1 ("drm/msm: merge dpu format database to MDP
formats") made get_format take modifiers into account. This makes
kms_addfb_basic@addfb25-bad-modifier pass on MDP4 and MDP5 platforms.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Acked-by: Helen Koike <helen.koike@collabora.com >
Signed-off-by: Helen Koike <helen.koike@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240613-msm-pass-addfb25-bad-modifier-v1-1-23c556e96c8a@linaro.org
2024-06-14 14:53:00 -03:00
Dmitry Baryshkov
51e1fb144f
drm/panel-edp: drop several legacy panels
...
The panel-edp driver supports legacy compatible strings for several eDP
panels which were never used in DT files present in Linux tree and most
likely have never been used with the upstream kernel. Drop compatibles
for these panels in favour of using a generic "edp-panel" device on the
AUX bus.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240614-edp-panel-drop-v4-3-4e0a112eec46@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-14 18:58:12 +03:00
Dmitry Baryshkov
faeebafe1d
drm/panel-edp: add fat warning against adding new panel compatibles
...
Add a fat warning against adding new panel compatibles to the panel-edp
driver. All new users of the eDP panels are supposed to use the generic
"edp-panel" compatible device on the AUX bus. The remaining compatibles
are either used by the existing DT or were used previously and are
retained for backwards compatibility.
Suggested-by: Doug Anderson <dianders@chromium.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240614-edp-panel-drop-v4-1-4e0a112eec46@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-14 18:58:11 +03:00
Jayesh Choudhary
9324410846
drm/bridge: sii902x: Add pixel clock check in atomic_check
...
Check the pixel clock for the mode in atomic_check and ensure that
it is within the range supported by the bridge.
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com >
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240613083805.439337-4-j-choudhary@ti.com
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-06-13 17:36:44 +02:00
Jayesh Choudhary
96fddae126
drm/bridge: sii902x: Support atomic bridge APIs
...
Change exisitig enable() and disable() bridge hooks to their atomic
counterparts as the former hooks are deprecated.
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com >
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240613083805.439337-3-j-choudhary@ti.com
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-06-13 17:36:44 +02:00
Jayesh Choudhary
520dbf5423
drm/bridge: sii902x: Fix mode_valid hook
...
Currently, mode_valid is defined only in drm_connector_helper_funcs.
When the bridge is attached with the 'DRM_BRIDGE_ATTACH_NO_CONNECTOR'
flag, the connector is not initialized, and so is the mode_valid
hook under connector helper funcs.
It also returns MODE_OK for all modes without actually checking the
modes.
So move the mode_valid hook to drm_bridge_funcs with proper clock
checks for maximum and minimum pixel clock supported by the bridge.
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Acked-by: Sui Jingfeng <sui.jingfeng@linux.dev >
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240613083805.439337-2-j-choudhary@ti.com
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-06-13 17:36:43 +02:00
Thomas Zimmermann
2bae076f3e
drm/mgag200: Set .detect_ctx() and enable connector polling
...
Set .detect_ctx() in struct drm_connector_helper_funcs to the
common helper drm_connector_helper_detect_from_ddc() and enable
polling for the connector. Mgag200 will now test for the monitor's
presence by probing the DDC in regular intervals.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240610141141.29527-4-tzimmermann@suse.de
2024-06-13 09:31:36 +02:00
Thomas Zimmermann
202fe72cce
drm/mgag200: Add BMC output
...
The BMC output can be viewed via the BMC's web interface or a
similar client. Represent it as virtual encoder and connector.
It's attached to the same CRTC as the VGA connector.
The connector's status depends on the physical connector's status.
The BMC is only connected if the physical connector is not. This
is necessary to support userspace clients that can only handle a
single output per CRTC.
The BMC is a server feature. Add a BMC output for all server chips,
but not the desktop models.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240610141141.29527-3-tzimmermann@suse.de
2024-06-13 09:31:31 +02:00
Thomas Zimmermann
579d47838b
drm/mgag200: Consolidate VGA output
...
The various models have common code for the VGA output's encoder and
connector. Move everything into a single shared source file. Remove some
obsolete initializer macros. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240610141141.29527-2-tzimmermann@suse.de
2024-06-13 09:31:25 +02:00
Tejas Vipin
a13aaf1574
drm/panel: himax-hx83102: fix incorrect argument to mipi_dsi_msleep
...
mipi_dsi_msleep should be modified to accept ctx as a pointer and the
function call should be adjusted accordingly.
Fixes: a2ab7cb169 ("drm/panel: himax-hx83102: use wrapped MIPI DCS functions")
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20240612133550.473279-2-tejasvipin76@gmail.com
[narmstrong: fixed subject and fixes tag]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240612133550.473279-2-tejasvipin76@gmail.com
2024-06-12 16:33:30 +02:00
Dmitry Baryshkov
6b4468b0c6
drm/bridge-connector: implement glue code for HDMI connector
...
In order to let bridge chains implement HDMI connector infrastructure,
add necessary glue code to the drm_bridge_connector. In case there is a
bridge that sets DRM_BRIDGE_OP_HDMI, drm_bridge_connector will register
itself as a HDMI connector and provide proxy drm_connector_hdmi_funcs
implementation.
Note, to simplify implementation, there can be only one bridge in a
chain that sets DRM_BRIDGE_OP_HDMI. Setting more than one is considered
an error. This limitation can be lifted later, if the need arises.
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-3-ab384e6021af@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-12 10:56:57 +03:00
Dmitry Baryshkov
c12907be57
drm/bridge-connector: switch to using drmm allocations
...
Turn drm_bridge_connector to using drmm_kzalloc() and
drmm_connector_init() and drop the custom destroy function. The
drm_connector_unregister() and fwnode_handle_put() are already handled
by the drm_connector_cleanup() and so are safe to be dropped.
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-2-ab384e6021af@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-06-12 10:55:54 +03:00