mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Rareș-Mihai Vladu" <vladurares@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andy Shevchenko <andy@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] media: atomisp: queue: remove unused local queue support
Date: Fri, 23 Oct 2026 17:12:32 +0300	[thread overview]
Message-ID: <attrUN_9ilg9W8ah@ashevche-desk.local> (raw)
In-Reply-To: <20261014111213.1967452-3-vladurares@gmail.com>

On Wed, Oct 14, 2026 at 11:12:11AM +0000, Rareș-Mihai Vladu wrote:
> ia_css_queue_local_init() has no callers, so no queue is ever created
> as local. ia_css_queue_uninit() only handles local queues and has no
> callers either.
> 
> All queue handles are in the static css_queues in bufq.c, and
> ia_css_bufq_init() sets up each of them with ia_css_queue_remote_init().
> This happens in ia_css_start_sp(), before the host sets
> host_sp_queues_initialized for the firmware, and css_queues is not
> cleared afterwards. Before that, the old code would have taken the local
> path with a NULL cb_local.desc and hit OP___assert(), so the handles do
> not seem to be used before initialization.
> 
> With only remote queues left, the queue type no longer serves a purpose.
> Remove the local queue code together with IA_CSS_QUEUE_TYPE_REMOTE, the
> type field and the type checks.
> 
> struct ia_css_queue appears to be host-only: it is not copied to SP or
> ISP memory, and the firmware uses struct host_sp_queues, whose addresses
> the handle stores. Removing the union member keeps the struct size on
> 32-bit and reduces it on 64-bit, where cb_local held two pointers.


I'm wondering if you use --histogram diff algo when preparing patches.
If not, use it next time.

...

> -int ia_css_queue_uninit(ia_css_queue_t *qhandle)
> +int ia_css_queue_enqueue(ia_css_queue_t *qhandle, uint32_t item)

This change is hard to read. Can you make an intermediate patch to just move
the "remote" branches to the helper functions first and in this patch actually
kill the local case altogether? Try to make it so that the ± statistics is
minimum for the changed lines. It means that create new helpers as they should
appear after this patch alone (just with different names). Example (ideal case):

// AFTER the mentioned intermediate change

static ia_css_queue_enqueue_remote()
{
	...
}

// in old function
static ia_css_queue_enqueue()
{
	if (LOCAL) {
		...
		return ...
	}

	ia_css_queue_enqueue_remote()
}

// In THIS change

-static ia_css_queue_enqueue_remote()
+static ia_css_queue_enqueue()
...
-static ia_css_queue_enqueue()
-{
-...
-}

Repeat the same for all affected functions.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-10-23 14:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 11:12 [PATCH v2 0/4] media: atomisp: remove the circbuf library Rareș-Mihai Vladu
2026-10-14 11:12 ` [PATCH v2 1/4] media: atomisp: sh_css_mipi: include assert_support.h directly Rareș-Mihai Vladu
2026-10-23 13:57   ` Andy Shevchenko
2026-10-14 11:12 ` [PATCH v2 2/4] media: atomisp: queue: remove unused local queue support Rareș-Mihai Vladu
2026-10-23 14:12   ` Andy Shevchenko [this message]
2026-10-14 11:12 ` [PATCH v2 3/4] media: atomisp: queue: move circbuf types and helpers to queue_comm.h Rareș-Mihai Vladu
2026-10-14 11:12 ` [PATCH v2 4/4] media: atomisp: remove unused circbuf library Rareș-Mihai Vladu

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=attrUN_9ilg9W8ah@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=vladurares@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®