FAILED: patch "[PATCH] media: vivid: add vivid_update_reduced_fps()" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 1d793a29efb4260f90913f5287939bf95573b073
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072932-scuttle-monorail-eabe@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 1d793a29efb4260f90913f5287939bf95573b073 Mon Sep 17 00:00:00 2001
From: Hans Verkuil <[email protected]>
Date: Wed, 20 May 2026 09:30:44 +0200
Subject: [PATCH] media: vivid: add vivid_update_reduced_fps()
Don't call vivid_update_format_cap() when switching to/from reduced fps for HDMI inputs: that will also reset the format, which is overkill for this.
Make a new vivid_update_reduced_fps() function that just updates the dev->timeperframe_vid_cap.
drivers/media/test-drivers/vivid/vivid-ctrls.c +2 -1
@@ -609,7 +609,8 @@ static int vivid_vid_cap_s_ctrl(struct v4l2_ctrl *ctrl)break ;case VIVID_CID_REDUCED_FPS : dev->reduced_fps = ctrl->val; -vivid_update_format_cap (dev, true); +if (dev->input_type[dev->input] ==HDMI ) +vivid_update_reduced_fps (dev);break ;case VIVID_CID_HAS_CROP_CAP : dev->has_crop_cap = ctrl->val;
drivers/media/test-drivers/vivid/vivid-vid-cap.c +19 -13
@@ -364,6 +364,24 @@ static enum tpg_pixel_aspect vivid_get_pixel_aspect(const struct vivid_dev *dev)return TPG_PIXEL_ASPECT_SQUARE ; } +void vivid_update_reduced_fps (struct vivid_dev *dev) +{ +struct v4l2_bt_timings *bt = &dev->dv_timings_cap[dev->input].bt; +unsigned int size =V4L2_DV_BT_FRAME_WIDTH (bt) *V4L2_DV_BT_FRAME_HEIGHT (bt); +u64 pixelclock; + +if (dev->reduced_fps &&can_reduce_fps (bt)) { + pixelclock =div_u64 (bt->pixelclock *1000 ,1001 ); + bt->flags |=V4L2_DV_FL_REDUCED_FPS ; + }else { + pixelclock = bt->pixelclock; + bt->flags &= ~V4L2_DV_FL_REDUCED_FPS ; + } + dev->timeperframe_vid_cap = (struct v4l2_fract ) { + size /100 , (u32 )pixelclock /100 + }; +} +/* * Called whenever the format has to be reset which can occur when * changing inputs, standard, timings, etc.
@@ -372,8 +390,6 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {struct v4l2_bt_timings *bt = &dev->dv_timings_cap[dev->input].bt;u32 dims[V4L2_CTRL_MAX_DIMS ] = {}; -unsigned size; -u64 pixelclock;switch (dev->input_type[dev->input]) {case WEBCAM :
@@ -402,17 +418,7 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls)case HDMI : dev->src_rect.width = bt->width; dev->src_rect.height = bt->height; - size =V4L2_DV_BT_FRAME_WIDTH (bt) *V4L2_DV_BT_FRAME_HEIGHT (bt); -if (dev->reduced_fps &&can_reduce_fps (bt)) { - pixelclock =div_u64 (bt->pixelclock *1000 ,1001 ); - bt->flags |=V4L2_DV_FL_REDUCED_FPS ; - }else { - pixelclock = bt->pixelclock; - bt->flags &= ~V4L2_DV_FL_REDUCED_FPS ; - } - dev->timeperframe_vid_cap = (struct v4l2_fract ) { - size /100 , (u32 )pixelclock /100 - }; +vivid_update_reduced_fps (dev);if (bt->interlaced) dev->field_cap =V4L2_FIELD_ALTERNATE ;else
drivers/media/test-drivers/vivid/vivid-vid-cap.h +1 -0
@@ -9,6 +9,7 @@#define _VIVID_VID_CAP_H_void vivid_update_quality (struct vivid_dev *dev); +void vivid_update_reduced_fps (struct vivid_dev *dev);void vivid_update_format_cap (struct vivid_dev *dev,bool keep_controls);void vivid_update_outputs (struct vivid_dev *dev);void vivid_update_connected_outputs (struct vivid_dev *dev);