From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A67FD158074 for ; Fri, 20 Jun 2025 12:16:14 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 9200D340D33 for ; Fri, 20 Jun 2025 12:16:14 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 8476C1104D9; Fri, 20 Jun 2025 12:16:13 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 76CCD1104D9 for ; Fri, 20 Jun 2025 12:16:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FCA4340EF5 for ; Fri, 20 Jun 2025 12:16:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7EF20284A for ; Fri, 20 Jun 2025 12:16:11 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1750421701.d5d34ec3567ffcb11f761f06621499b0b9f16279.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:6.6 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 2810_media-v4l-subdev-state-comfig-media-controller-fix.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: d5d34ec3567ffcb11f761f06621499b0b9f16279 X-VCS-Branch: 6.6 Date: Fri, 20 Jun 2025 12:16:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e7fcf39a-0533-48d1-82ae-3ec2c03a1f95 X-Archives-Hash: 5ad83148d2548cf4e9134d9b050c6280 commit: d5d34ec3567ffcb11f761f06621499b0b9f16279 Author: Mike Pagano gentoo org> AuthorDate: Fri Jun 20 12:15:01 2025 +0000 Commit: Mike Pagano gentoo org> CommitDate: Fri Jun 20 12:15:01 2025 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d5d34ec3 media: v4l: subdev: Move out subdev state lock macros outside CONFIG_MEDIA_CONTROLLER Signed-off-by: Mike Pagano gentoo.org> 0000_README | 4 + ...-subdev-state-comfig-media-controller-fix.patch | 180 +++++++++++++++++++++ 2 files changed, 184 insertions(+) diff --git a/0000_README b/0000_README index 297e68f5..4b972bde 100644 --- a/0000_README +++ b/0000_README @@ -451,6 +451,10 @@ Patch: 2800_amdgpu-Adj-kmalloc-array-calls-for-new-Walloc-size.patch From: sam@gentoo.org Desc: amdgpu: Adjust kmalloc_array calls for new -Walloc-size +Patch: 2810_media-v4l-subdev-state-comfig-media-controller-fix.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=08e5c36410ca5cb14237e47e6dfe3fde02e0f275 +Desc: media: v4l: subdev: Move out subdev state lock macros outside CONFIG_MEDIA_CONTROLLER + Patch: 2910_bfp-mark-get-entry-ip-as--maybe-unused.patch From: https://www.spinics.net/lists/stable/msg604665.html Desc: bpf: mark get_entry_ip as __maybe_unused diff --git a/2810_media-v4l-subdev-state-comfig-media-controller-fix.patch b/2810_media-v4l-subdev-state-comfig-media-controller-fix.patch new file mode 100644 index 00000000..f9c03b13 --- /dev/null +++ b/2810_media-v4l-subdev-state-comfig-media-controller-fix.patch @@ -0,0 +1,180 @@ +--- a/include/media/v4l2-subdev.h 2025-06-20 08:05:39.760188537 -0400 ++++ b/include/media/v4l2-subdev.h 2025-06-20 08:10:39.163557126 -0400 +@@ -1397,88 +1397,6 @@ int __v4l2_subdev_init_finalize(struct v + */ + void v4l2_subdev_cleanup(struct v4l2_subdev *sd); + +-/** +- * v4l2_subdev_lock_state() - Locks the subdev state +- * @state: The subdevice state +- * +- * Locks the given subdev state. +- * +- * The state must be unlocked with v4l2_subdev_unlock_state() after use. +- */ +-static inline void v4l2_subdev_lock_state(struct v4l2_subdev_state *state) +-{ +- mutex_lock(state->lock); +-} +- +-/** +- * v4l2_subdev_unlock_state() - Unlocks the subdev state +- * @state: The subdevice state +- * +- * Unlocks the given subdev state. +- */ +-static inline void v4l2_subdev_unlock_state(struct v4l2_subdev_state *state) +-{ +- mutex_unlock(state->lock); +-} +- +-/** +- * v4l2_subdev_get_unlocked_active_state() - Checks that the active subdev state +- * is unlocked and returns it +- * @sd: The subdevice +- * +- * Returns the active state for the subdevice, or NULL if the subdev does not +- * support active state. If the state is not NULL, calls +- * lockdep_assert_not_held() to issue a warning if the state is locked. +- * +- * This function is to be used e.g. when getting the active state for the sole +- * purpose of passing it forward, without accessing the state fields. +- */ +-static inline struct v4l2_subdev_state * +-v4l2_subdev_get_unlocked_active_state(struct v4l2_subdev *sd) +-{ +- if (sd->active_state) +- lockdep_assert_not_held(sd->active_state->lock); +- return sd->active_state; +-} +- +-/** +- * v4l2_subdev_get_locked_active_state() - Checks that the active subdev state +- * is locked and returns it +- * +- * @sd: The subdevice +- * +- * Returns the active state for the subdevice, or NULL if the subdev does not +- * support active state. If the state is not NULL, calls lockdep_assert_held() +- * to issue a warning if the state is not locked. +- * +- * This function is to be used when the caller knows that the active state is +- * already locked. +- */ +-static inline struct v4l2_subdev_state * +-v4l2_subdev_get_locked_active_state(struct v4l2_subdev *sd) +-{ +- if (sd->active_state) +- lockdep_assert_held(sd->active_state->lock); +- return sd->active_state; +-} +- +-/** +- * v4l2_subdev_lock_and_get_active_state() - Locks and returns the active subdev +- * state for the subdevice +- * @sd: The subdevice +- * +- * Returns the locked active state for the subdevice, or NULL if the subdev +- * does not support active state. +- * +- * The state must be unlocked with v4l2_subdev_unlock_state() after use. +- */ +-static inline struct v4l2_subdev_state * +-v4l2_subdev_lock_and_get_active_state(struct v4l2_subdev *sd) +-{ +- if (sd->active_state) +- v4l2_subdev_lock_state(sd->active_state); +- return sd->active_state; +-} + + #if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) + +@@ -1792,6 +1710,88 @@ int v4l2_subdev_s_stream_helper(struct v + #endif /* CONFIG_MEDIA_CONTROLLER */ + + /** ++ * v4l2_subdev_lock_state() - Locks the subdev state ++ * @state: The subdevice state ++ * ++ * Locks the given subdev state. ++ * ++ * The state must be unlocked with v4l2_subdev_unlock_state() after use. ++ */ ++static inline void v4l2_subdev_lock_state(struct v4l2_subdev_state *state) ++{ ++ mutex_lock(state->lock); ++} ++ ++/** ++ * v4l2_subdev_unlock_state() - Unlocks the subdev state ++ * @state: The subdevice state ++ * ++ * Unlocks the given subdev state. ++ */ ++static inline void v4l2_subdev_unlock_state(struct v4l2_subdev_state *state) ++{ ++ mutex_unlock(state->lock); ++} ++ ++/** ++ * v4l2_subdev_get_unlocked_active_state() - Checks that the active subdev state ++ * is unlocked and returns it ++ * @sd: The subdevice ++ * ++ * Returns the active state for the subdevice, or NULL if the subdev does not ++ * support active state. If the state is not NULL, calls ++ * lockdep_assert_not_held() to issue a warning if the state is locked. ++ * ++ * This function is to be used e.g. when getting the active state for the sole ++ * purpose of passing it forward, without accessing the state fields. ++ */ ++static inline struct v4l2_subdev_state * ++v4l2_subdev_get_unlocked_active_state(struct v4l2_subdev *sd) ++{ ++ if (sd->active_state) ++ lockdep_assert_not_held(sd->active_state->lock); ++ return sd->active_state; ++} ++ ++/** ++ * v4l2_subdev_get_locked_active_state() - Checks that the active subdev state ++ * is locked and returns it ++ * ++ * @sd: The subdevice ++ * ++ * Returns the active state for the subdevice, or NULL if the subdev does not ++ * support active state. If the state is not NULL, calls lockdep_assert_held() ++ * to issue a warning if the state is not locked. ++ * ++ * This function is to be used when the caller knows that the active state is ++ * already locked. ++ */ ++static inline struct v4l2_subdev_state * ++v4l2_subdev_get_locked_active_state(struct v4l2_subdev *sd) ++{ ++ if (sd->active_state) ++ lockdep_assert_held(sd->active_state->lock); ++ return sd->active_state; ++} ++ ++/** ++ * v4l2_subdev_lock_and_get_active_state() - Locks and returns the active subdev ++ * state for the subdevice ++ * @sd: The subdevice ++ * ++ * Returns the locked active state for the subdevice, or NULL if the subdev ++ * does not support active state. ++ * ++ * The state must be unlocked with v4l2_subdev_unlock_state() after use. ++ */ ++static inline struct v4l2_subdev_state * ++v4l2_subdev_lock_and_get_active_state(struct v4l2_subdev *sd) ++{ ++ if (sd->active_state) ++ v4l2_subdev_lock_state(sd->active_state); ++ return sd->active_state; ++} ++/** + * v4l2_subdev_init - initializes the sub-device struct + * + * @sd: pointer to the &struct v4l2_subdev to be initialized