All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ali Nasrolahi <a.nasrolahi01@gmail.com>
To: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mchehab@kernel.org
Subject: [RFC] Discussion: VIDEO_NUM_DEVICES limit in v4l2-dev.c
Date: Sun, 2 Aug 2026 08:24:29 +0330	[thread overview]
Message-ID: <am7LpodognguIZN5@zephyr> (raw)

Hi everyone,

I'm working on a project involving high density video processing on a
single server using a large number of v4l2 loopback devices to route
virtual video streams to tenants.

While doing so, I ran into the hard limit imposed by `VIDEO_NUM_DEVICES`
(currently 256) in `drivers/media/v4l2-core/v4l2-dev.c`. Looking through
the code and git history, this limit has been there for quite a long time.
However, after searching the mailing list archives, I couldn't find any
previous discussion regarding this limitation.

May I ask:

1. Is there any internal design constraint that requires limiting the
   number of V4L2 devices to 256 on modern kernels?

2. Has this limit been discussed previously, or is there any relevant
   discussion that I may have missed?

If the current limit is no longer intentional and there's no historical
context that I might've missed, I'd be happy to work on a patch series to
address it, and I would appreciate any guidance on the preferred direction.

Cheers,
-Ali

             reply	other threads:[~2026-08-02  4:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02  4:54 Ali Nasrolahi [this message]
2026-08-02 10:57 ` [RFC] Discussion: VIDEO_NUM_DEVICES limit in v4l2-dev.c Mauro Carvalho Chehab
2026-08-02 18:25   ` Ali Nasrolahi
2026-08-03  7:04     ` Hans Verkuil
2026-08-03 17:56       ` Ali Nasrolahi

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=am7LpodognguIZN5@zephyr \
    --to=a.nasrolahi01@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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.