Tvrtko Ursulin
71a18f7266
drm/sched: Move internal prototypes to internal header
...
Now that we have a header file for internal scheduler interfaces we can
move some more prototypes into it. By doing that we eliminate the chance
of drivers trying to use something which was not intended to be used.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: Philipp Stanner <phasta@kernel.org >
Signed-off-by: Philipp Stanner <phasta@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250221105038.79665-6-tvrtko.ursulin@igalia.com
2025-02-24 10:17:41 +01:00
Tvrtko Ursulin
4b7320bfd4
drm/sched: Move drm_sched_entity_is_ready to internal header
...
Helper is for scheduler internal use so lets hide it from DRM drivers
completely.
At the same time we change the method of checking whethere there is
anything in the queue from peeking to looking at the node count.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: Philipp Stanner <phasta@kernel.org >
Signed-off-by: Philipp Stanner <phasta@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250221105038.79665-5-tvrtko.ursulin@igalia.com
2025-02-24 10:17:41 +01:00
Tvrtko Ursulin
b76f1467dc
drm/sched: Remove a hole from struct drm_sched_job
...
We can re-order some struct members and take u32 credits outside of the
pointer sandwich and also for the last_dependency member we can get away
with an unsigned int since for dependency we use xa_limit_32b.
Pahole report before:
/* size: 160, cachelines: 3, members: 14 */
/* sum members: 156, holes: 1, sum holes: 4 */
/* last cacheline: 32 bytes */
And after:
/* size: 152, cachelines: 3, members: 14 */
/* last cacheline: 24 bytes */
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: Philipp Stanner <phasta@kernel.org >
Acked-by: Danilo Krummrich <dakr@kernel.org >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Philipp Stanner <phasta@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250221105038.79665-4-tvrtko.ursulin@igalia.com
2025-02-24 10:17:40 +01:00
Tvrtko Ursulin
80b6ef8ae2
drm/amdgpu: Pop jobs from the queue more robustly
...
Replace a copy of DRM scheduler's to_drm_sched_job with a copy of a newly
added drm_sched_entity_queue_pop.
This allows breaking the hidden dependency that queue_node has to be the
first element in struct drm_sched_job.
A comment is also added with a reference to the mailing list discussion
explaining the copied helper will be removed when the whole broken
amdgpu_job_stop_all_jobs_on_sched is removed.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: Philipp Stanner <phasta@kernel.org >
Cc: Zhang, Hawking <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Philipp Stanner <phasta@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250221105038.79665-3-tvrtko.ursulin@igalia.com
2025-02-24 10:17:40 +01:00
Tvrtko Ursulin
b6eb664d89
drm/sched: Add internal job peek/pop API
...
Idea is to add helpers for peeking and popping jobs from entities with
the goal of decoupling the hidden assumption in the code that queue_node
is the first element in struct drm_sched_job.
That assumption usually comes in the form of:
while ((job = to_drm_sched_job(spsc_queue_pop(&entity->job_queue))))
Which breaks if the queue_node is re-positioned due to_drm_sched_job
being implemented with a container_of.
This also allows us to remove duplicate definitions of to_drm_sched_job.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Cc: Christian König <christian.koenig@amd.com >
Cc: Danilo Krummrich <dakr@kernel.org >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: Philipp Stanner <phasta@kernel.org >
Signed-off-by: Philipp Stanner <phasta@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250221105038.79665-2-tvrtko.ursulin@igalia.com
2025-02-24 10:17:39 +01:00
Jeffrey Hugo
acf3256160
bus: mhi: host: Avoid possible uninitialized fw_load_type
...
If mhi_fw_load_handler() bails out early because the EE is not capable
of loading firmware, we may reference fw_load_type in cleanup which is
uninitialized at this point. The cleanup code checks fw_load_type as a
proxy for knowing if fbc_image was allocated and needs to be freed, but
we can directly test for that. This avoids the possible uninitialized
access and appears to be clearer code.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/all/e3148ac4-7bb8-422d-ae0f-18a8eb15e269@stanley.mountain/
Fixes: f88f1d0998 ("bus: mhi: host: Add a policy to enable image transfer via BHIe in PBL")
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org >
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com >
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250214162109.3555300-1-quic_jhugo@quicinc.com
2025-02-21 10:29:28 -07:00
Jeff Hugo
27e21f22db
MAINTAINERS: Update my email address
...
Qualcomm is migrating away from quicinc.com email addresses towards ones
with *.qualcomm.com.
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250219214112.2168604-1-jeff.hugo@oss.qualcomm.com
2025-02-21 10:25:21 -07:00
Herve Codina
60341a6d79
drm/atomic-helper: Add a note in drm_atomic_helper_reset_crtc() kernel-doc
...
As suggested in [0], add a note indicating that
drm_atomic_helper_reset_crtc() can be a no-op in some cases.
[0]:https://lore.kernel.org/all/Z7XfnPGDYspwG42y@phenom.ffwll.local/
Signed-off-by: Herve Codina <herve.codina@bootlin.com >
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20250220140406.593314-1-herve.codina@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-02-21 10:57:21 +01:00
John Keeping
4ce2c7e201
drm/panel: ilitek-ili9882t: fix GPIO name in error message
...
This driver uses the enable-gpios property and it is confusing that the
error message refers to reset-gpios. Use the correct name when the
enable GPIO is not found.
Fixes: e2450d32e5 ("drm/panel: ili9882t: Break out as separate driver")
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250217120428.3779197-1-jkeeping@inmusicbrands.com
2025-02-20 15:17:11 +01:00
Louis Chauvet
ddd147d91d
drm: writeback: Fix kernel doc name
...
During the creation of drmm_ variants for writeback connector, one
function was renamed, but not the kernel doc.
To remove the warning, use the proper name in kernel doc.
Fixes: 135d8fc7af ("drm: writeback: Create an helper for drm_writeback_connector initialization")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Closes: https://lore.kernel.org/all/20250207142201.550ce870@canb.auug.org.au/
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250207-b4-fix-warning-v1-1-b4964beb60a3@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com >
2025-02-20 15:02:09 +01:00
Thomas Zimmermann
e82e1a0c22
drm/ast: cursor: Move implementation to separate source file
...
Move the cursor code into a separate source file for readability. No
functional changes.
v2:
- include <linux/bits.h>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250217122336.230067-5-tzimmermann@suse.de
2025-02-20 08:38:34 +01:00
Thomas Zimmermann
19f4da84b6
drm/ast: cursor: Add support for ARGB4444
...
Add support for cursor image data in ARGB4444 format. This is the
hardware's native format and requires no conversion.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250217122336.230067-4-tzimmermann@suse.de
2025-02-20 08:38:34 +01:00
Thomas Zimmermann
966a0d49d1
drm/ast: cursor: Move format conversion to shared helper
...
User-space cursor-image data is encoded in ARBG8888, while hardware
supports ARGB4444. Implement the format conversion as part of the
format-helper framework, so that other drivers can benefit.
This allows to respect the damage area of the cursor update. In
previous code, all cursor image data had to be converted on each
update. Now, only the changed areas require an update. The hardware
image is always updated completely, as it is required for the
checksum update.
The format-conversion helper still contains the old implementation's
optimization of writing 2 output pixels at the same time.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250217122336.230067-3-tzimmermann@suse.de
2025-02-20 08:38:33 +01:00
Thomas Zimmermann
6ec054a52d
drm/ast: cursor: Calculate checksum in helper
...
Setting the cursor image requires a 32-bit checksum of the cursor
image data. The current cursor code converts the image to ARGB4444
format and computes the checksum in a single step. Moving the
checksum calculation into a separate helper will allow to move the
format conversion into a shared helper.
v2:
- don't loop for checksum'ing final pixel (Jocelyn)
- fix typo in commit message (Jocelyn)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20250217122336.230067-2-tzimmermann@suse.de
2025-02-20 08:38:32 +01:00
Maxime Ripard
f56b6db3e5
drm/atomic-helper: Change parameter name of drm_atomic_helper_wait_for_flip_done()
...
drm_atomic_helper_wait_for_flip_done() will wait for pages flips on all
CRTCs affected by a given commit. It takes the drm_atomic_state being
committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-26-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:24 +01:00
Maxime Ripard
bc8ab44023
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_cleanup_done()
...
drm_atomic_helper_wait_for_dependencies() is the final part of a commit
and signals it completion. It takes the drm_atomic_state being committed
as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-25-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:23 +01:00
Maxime Ripard
6280e96f8a
drm/atomic-helper: Change parameter name of drm_atomic_helper_cleanup_planes()
...
drm_atomic_helper_cleanup_planes() is one of the final part of a commit,
and will free up all plane resources used in the previous commit. It
takes the drm_atomic_state being committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-24-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:23 +01:00
Maxime Ripard
e64834b509
drm/atomic-helper: Change parameter name of drm_atomic_helper_wait_for_vblanks()
...
drm_atomic_helper_wait_for_vblanks() waits for vblank events on all the
CRTCs affected by a commit. It takes the drm_atomic_state being
committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-23-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:22 +01:00
Maxime Ripard
3fae6d20e3
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_hw_done()
...
drm_atomic_helper_commit_hw_done() signals hardware completion of a
given commit. It takes the drm_atomic_state being committed as a
parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-22-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:22 +01:00
Maxime Ripard
b756b0cbcb
drm/atomic-helper: Change parameter name of drm_atomic_helper_fake_vblank()
...
drm_atomic_helper_fake_vblank() fake a vblank event if needed when a new
commit is being applied. It takes the drm_atomic_state being committed
as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-21-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:21 +01:00
Maxime Ripard
f1296603cc
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_writebacks()
...
drm_atomic_helper_commit_writebacks() updates all writeback connectors
affected by a new commit. It takes the drm_atomic_state being committed
as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-20-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:21 +01:00
Maxime Ripard
742043c8af
drm/bridge: Change parameter name of drm_atomic_bridge_chain_enable()
...
drm_atomic_bridge_chain_enable() enables all bridges affected by a new
commit. It takes the drm_atomic_state being committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-19-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:20 +01:00
Maxime Ripard
b78fc1c135
drm/bridge: Change parameter name of drm_atomic_bridge_chain_pre_enable()
...
drm_atomic_bridge_chain_pre_enable() enables all bridges affected by
a new commit. It takes the drm_atomic_state being committed as a
parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-18-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:20 +01:00
Maxime Ripard
ba94ce115e
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_modeset_enables()
...
drm_atomic_helper_commit_modeset_enables() enables all outputs affected
by a new commit. It takes the drm_atomic_state being committed as a
parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-17-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:19 +01:00
Maxime Ripard
f302d33096
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_planes()
...
drm_atomic_helper_commit_planes() updates all planes affected by a new
commit. It takes the drm_atomic_state being committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-16-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:19 +01:00
Maxime Ripard
a9bb617f20
drm/atomic-helper: Change parameter name of crtc_set_mode()
...
crtc_set_mode() deals with calling the modeset related hooks for CRTC,
connectors and bridges if and when a new commit changes them. It takes
the drm_atomic_state being committed as a parameter.
However, that parameter name is called as old_state, which is pretty
confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-15-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:18 +01:00
Maxime Ripard
488e10740f
drm/atomic-helper: Change parameter name of drm_atomic_helper_update_legacy_modeset_state()
...
drm_atomic_helper_update_legacy_modeset_state() updates all the legacy
modeset pointers a connector, encoder or CRTC might have with the ones
being setup by a given commit. It takes the drm_atomic_state being
committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-14-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:17 +01:00
Maxime Ripard
72d1eda78b
drm/bridge: Change parameter name of drm_atomic_bridge_chain_post_disable()
...
drm_atomic_bridge_chain_post_disable() disables all bridges affected by
a new commit. It takes the drm_atomic_state being committed as a
parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-13-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:17 +01:00
Maxime Ripard
be8425c2fd
drm/bridge: Change parameter name of drm_atomic_bridge_chain_disable()
...
drm_atomic_bridge_chain_disable() disables all bridges affected by a new
commit. It takes the drm_atomic_state being committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-12-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:16 +01:00
Maxime Ripard
5af3ff97c5
drm/atomic-helper: Change parameter name of disable_outputs()
...
disable_outputs() disables all connectors and CRTCs affected by a
commit. It takes the drm_atomic_state being committed as a parameter.
However, that parameter name is called as old_state, which is pretty
confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-11-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:16 +01:00
Maxime Ripard
65d463807e
drm/atomic-helper: Change parameter name of drm_atomic_helper_modeset_disables()
...
drm_atomic_helper_modeset_disables() disables all the outputs affected
by a commit. It takes the drm_atomic_state being committed as a
parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-10-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:15 +01:00
Maxime Ripard
af2ea3d32e
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_tail_rpm()
...
drm_atomic_helper_commit_tail_rpm() is the final part of an atomic
commit, and is given the state being committed as a parameter.
However, that parameter is named old_state, but documented as the "new
modeset state" which is all super confusing.
Let's rename that parameter to state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-9-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:15 +01:00
Maxime Ripard
63379dbb50
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_tail()
...
drm_atomic_helper_commit_tail() is the final part of an atomic commit,
and is given a parameter with the drm_atomic_state being committed.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-8-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:14 +01:00
Maxime Ripard
c0a98824fe
drm/atomic-helper: Change parameter name of drm_atomic_helper_wait_for_dependencies()
...
drm_atomic_helper_wait_for_dependencies() waits for all the dependencies
a commit has before going forward with it. It takes the drm_atomic_state
being committed as a parameter.
However, that parameter name is called (and documented) as old_state,
which is pretty confusing. Let's rename that variable as state.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-7-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:14 +01:00
Maxime Ripard
6d5815e229
drm/atomic-helper: Fix commit_tail state variable name
...
Even though the commit_tail () drm_atomic_state parameter is called
old_state, it's actually the state being committed which is confusing.
It's even more confusing since the atomic_commit_tail hook being called
by commit_tail() parameter is called state.
Let's rename the variable from old_state to state to make it less
confusing.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-6-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:13 +01:00
Maxime Ripard
f82fe0d449
drm/bridge: Pass full state to atomic_post_disable
...
It's pretty inconvenient to access the full atomic state from
drm_bridges, so let's change the atomic_post_disable hook prototype to
pass it directly.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Tested-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-5-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:13 +01:00
Maxime Ripard
f5f6a5bf01
drm/bridge: Pass full state to atomic_disable
...
It's pretty inconvenient to access the full atomic state from
drm_bridges, so let's change the atomic_disable hook prototype to pass
it directly.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Tested-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-4-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:12 +01:00
Maxime Ripard
c2b190bf2a
drm/bridge: Pass full state to atomic_enable
...
It's pretty inconvenient to access the full atomic state from
drm_bridges, so let's change the atomic_enable hook prototype to pass it
directly.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Tested-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-3-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:12 +01:00
Maxime Ripard
e9db46e576
drm/bridge: Pass full state to atomic_pre_enable
...
It's pretty inconvenient to access the full atomic state from
drm_bridges, so let's change the atomic_pre_enable hook prototype to
pass it directly.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Tested-by: Douglas Anderson <dianders@chromium.org >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-2-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:11 +01:00
Maxime Ripard
56339ffaea
drm/atomic: Document history of drm_atomic_state
...
After some discussions on the mailing-list for an earlier revision of
the series, it was suggested to document the evolution of
drm_atomic_state and its use by drivers to explain some of the confusion
one might still encounter when reading the framework code.
Suggested-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://lore.kernel.org/dri-devel/Z4jtKHY4qN3RNZNG@phenom.ffwll.local/
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-1-e71598f49c8f@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2025-02-19 16:59:10 +01:00
Dan Carpenter
fdee05235a
drm/nouveau: Fix error pointer dereference in r535_gsp_msgq_recv()
...
If "rpc" is an error pointer then return directly. Otherwise it leads
to an error pointer dereference.
Fixes: 50f290053d ("drm/nouveau: support handling the return of large GSP message")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Acked-by: Zhi Wang <zhiw@nvidia.com >
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/b7052ac0-98e4-433b-ad58-f563bf51858c@stanley.mountain
2025-02-19 14:49:03 +01:00
Alexander Stein
9b6c03cb96
drm/bridge: nwl-dsi: Set bridge type
...
This is a DSI bridge, so set the bridge type accordingly.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250120132135.554391-2-alexander.stein@ew.tq-group.com
2025-02-18 10:09:39 +01:00
Alexander Stein
272f17229e
drm/bridge: ti-sn65dsi83: Set bridge type
...
This is a DSI to LVDS bridge, so set the bridge type accordingly.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250120132135.554391-1-alexander.stein@ew.tq-group.com
2025-02-18 10:09:39 +01:00
Shixiong Ou
43c00fb1a5
drm/bridge: analogix_dp: Use devm_platform_ioremap_resource()
...
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource().
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250128065645.27140-1-oushixiong1025@163.com
2025-02-18 10:09:38 +01:00
Thomas Zimmermann
8bd1a8e757
Merge drm/drm-next into drm-misc-next
...
Backmerging to get bugfixes from v6.14-rc2.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
2025-02-18 07:43:43 +01:00
Luca Ceresoli
b296955b3a
drm/bridge: panel: forbid initializing a panel with unknown connector type
...
Having an DRM_MODE_CONNECTOR_Unknown connector type is considered bad, and
drm_panel_bridge_add_typed() and derivatives are deprecated for this.
drm_panel_init() won't prevent initializing a panel with a
DRM_MODE_CONNECTOR_Unknown connector type. Luckily there are no in-tree
users doing it, so take this as an opportinuty to document a valid
connector type must be passed.
Returning an error if this rule is violated is not possible because
drm_panel_init() is a void function. Add at least a warning to make any
violations noticeable, especially to non-upstream drivers.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250214-drm-assorted-cleanups-v7-5-88ca5827d7af@bootlin.com
2025-02-17 14:17:59 +01:00
Luca Ceresoli
77053ef720
drm/bridge: panel: drm_panel_bridge_remove: warn when called on non-panel bridge
...
This function is for panel_bridge instances only. The silent return when
invoked on other bridges might hide actual errors, so avoid them to go
unnoticed.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250214-drm-assorted-cleanups-v7-4-88ca5827d7af@bootlin.com
2025-02-17 14:17:57 +01:00
Luca Ceresoli
cc46371e3d
drm/bridge: panel: use drm_bridge_is_panel() instead of open code
...
drm_panel_bridge_remove() reads bridge->funcs to find out whether this is a
panel bridge or another kind of bridge. drm_bridge_is_panel() is made
exactly for that, so use it.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250214-drm-assorted-cleanups-v7-3-88ca5827d7af@bootlin.com
2025-02-17 14:17:56 +01:00
Luca Ceresoli
9d60cf4e8c
drm: of: drm_of_find_panel_or_bridge: move misplaced comment
...
This comment is misleading as it refers to one of the inner if() branches
only, not the whole outer if(). Move it to the branch it refers to.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250214-drm-assorted-cleanups-v7-2-88ca5827d7af@bootlin.com
2025-02-17 14:17:55 +01:00
Luca Ceresoli
72443c730b
drm/debugfs: fix printk format for bridge index
...
idx is an unsigned int, use %u for printk-style strings.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com >
Signed-off-by: Robert Foss <rfoss@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20250214-drm-assorted-cleanups-v7-1-88ca5827d7af@bootlin.com
2025-02-17 14:17:53 +01:00