All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andy Shevchenko <andy@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Kate Hsuan <hpa@redhat.com>, Tsuchiya Yuto <kitakar@gmail.com>,
	Fabio Aiuto <fabioaiuto83@gmail.com>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH 19/23] media: atomisp: Remove clearing of ISP crop / compose rectangles on file release
Date: Mon, 15 Apr 2024 14:02:16 +0200	[thread overview]
Message-ID: <20240415120220.219480-20-hdegoede@redhat.com> (raw)
In-Reply-To: <20240415120220.219480-1-hdegoede@redhat.com>

There is no need to clear the ISP sink-pad crop and source-pad
compose rectangles  on release of the /dev/video# file.

Both will be reset by atomisp_set_fmt() which is guaranteed to
get called by atomisp_queue_setup() (if not called already)
before another stream starts and thus before these selections
are used again.

Also the file injection support the comment talks about has long
been dropped from the driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 .../staging/media/atomisp/pci/atomisp_fops.c  | 21 -------------------
 1 file changed, 21 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c
index 0d0c1649eaad..50c4123ba006 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
@@ -539,7 +539,6 @@ static int atomisp_release(struct file *file)
 	struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
 	struct atomisp_sub_device *asd = pipe->asd;
 	struct v4l2_subdev_fh fh;
-	struct v4l2_rect clear_compose = {0};
 
 	v4l2_fh_init(&fh.vfh, vdev);
 
@@ -552,21 +551,6 @@ static int atomisp_release(struct file *file)
 
 	pipe->users--;
 
-	/*
-	 * A little trick here:
-	 * file injection input resolution is recorded in the sink pad,
-	 * therefore can not be cleared when releaseing one device node.
-	 * The sink pad setting can only be cleared when all device nodes
-	 * get released.
-	 */
-	{
-		struct v4l2_mbus_framefmt isp_sink_fmt = { 0 };
-
-		atomisp_subdev_set_ffmt(&asd->subdev, fh.state,
-					V4L2_SUBDEV_FORMAT_ACTIVE,
-					ATOMISP_SUBDEV_PAD_SINK, &isp_sink_fmt);
-	}
-
 	atomisp_css_free_stat_buffers(asd);
 	atomisp_free_internal_buffers(asd);
 
@@ -577,11 +561,6 @@ static int atomisp_release(struct file *file)
 	if (pm_runtime_put_sync(vdev->v4l2_dev->dev) < 0)
 		dev_err(isp->dev, "Failed to power off device\n");
 
-	atomisp_subdev_set_selection(&asd->subdev, fh.state,
-				     V4L2_SUBDEV_FORMAT_ACTIVE,
-				     ATOMISP_SUBDEV_PAD_SOURCE,
-				     V4L2_SEL_TGT_COMPOSE, 0,
-				     &clear_compose);
 	mutex_unlock(&isp->mutex);
 	return 0;
 }
-- 
2.44.0


  parent reply	other threads:[~2024-04-15 12:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 12:01 [PATCH 00/23] media: atomisp: Further media-controller related fixes + dead code removal Hans de Goede
2024-04-15 12:01 ` [PATCH 01/23] media: atomisp: Add atomisp_s_sensor_power() helper Hans de Goede
2024-04-15 12:01 ` [PATCH 02/23] media: atomisp: Turn on sensor power from atomisp_set_fmt() Hans de Goede
2024-04-15 12:02 ` [PATCH 03/23] media: atomisp: Add atomisp_select_input() helper Hans de Goede
2024-04-15 12:02 ` [PATCH 04/23] media: atomisp: Simplify atomisp_s_input() input argument checking Hans de Goede
2024-04-15 12:02 ` [PATCH 05/23] media: atomisp: Ensure CSI-receiver[x] -> ISP links correctly reflect current sensor Hans de Goede
2024-04-15 12:02 ` [PATCH 06/23] media: atomisp: Propagate set_fmt on sensor results to CSI port Hans de Goede
2024-04-15 12:02 ` [PATCH 07/23] media: atomisp: Propagate v4l2_mbus_framefmt.field to CSI port sink pad Hans de Goede
2024-04-15 12:02 ` [PATCH 08/23] media: atomisp: Call media_pipeline_alloc_start() in stream start Hans de Goede
2024-04-15 12:02 ` [PATCH 09/23] media: atomisp: Drop atomisp_pipe_check() from atomisp_link_setup() Hans de Goede
2024-04-15 12:02 ` [PATCH 10/23] media: atomisp: ov2722: Remove power on sensor from set_fmt() callback Hans de Goede
2024-04-15 12:02 ` [PATCH 11/23] media: atomisp: Remove test pattern generator (TPG) support Hans de Goede
2024-04-15 14:40   ` Andy Shevchenko
2024-04-16  9:25     ` Hans de Goede
2024-04-16 13:34       ` Andy Shevchenko
2024-04-16 14:37         ` Kieran Bingham
2024-04-16 14:40           ` Kieran Bingham
2024-04-16 14:50             ` Andy Shevchenko
2024-04-16 14:52               ` Andy Shevchenko
2024-04-15 12:02 ` [PATCH 12/23] media: atomisp: Remove input_port_ID_t Hans de Goede
2024-04-15 12:02 ` [PATCH 13/23] media: atomisp: Drop the atomisp custom lm3554 flash driver Hans de Goede
2024-04-15 14:49   ` Andy Shevchenko
2024-04-15 14:50     ` Andy Shevchenko
2024-04-15 12:02 ` [PATCH 14/23] media: atomisp: Drop custom flash support Hans de Goede
2024-04-15 14:53   ` Andy Shevchenko
2024-04-15 12:02 ` [PATCH 15/23] media: atomisp: Drop unused frame_status tracking Hans de Goede
2024-04-15 12:02 ` [PATCH 16/23] media: atomisp: Drop intel_v4l2_subdev_type Hans de Goede
2024-04-15 14:55   ` Andy Shevchenko
2024-04-15 12:02 ` [PATCH 17/23] media: atomisp: Remove gmin_platform VCM code Hans de Goede
2024-04-15 12:02 ` [PATCH 18/23] media: atomisp: Remove struct atomisp_platform_data Hans de Goede
2024-04-15 12:02 ` Hans de Goede [this message]
2024-04-15 12:02 ` [PATCH 20/23] media: atomisp: Remove empty s_power() op from ISP subdev Hans de Goede
2024-04-15 12:02 ` [PATCH 21/23] media: atomisp: Remove empty s_stream() op from CSI subdev Hans de Goede
2024-04-15 12:02 ` [PATCH 22/23] media: atomisp: Cleanup atomisp_isr_thread() spinlock handling Hans de Goede
2024-04-15 12:02 ` [PATCH 23/23] media: atomisp: Remove setting of f->fmt.pix.priv from atomisp_set_fmt() Hans de Goede
2024-04-15 14:58 ` [PATCH 00/23] media: atomisp: Further media-controller related fixes + dead code removal Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240415120220.219480-20-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy@kernel.org \
    --cc=fabioaiuto83@gmail.com \
    --cc=hpa@redhat.com \
    --cc=kitakar@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.