From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFE0818DB1A for ; Sun, 2 Aug 2026 04:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785646483; cv=none; b=nCmmYhMCedg0iU5So2qmDZ62l0kcj6pOCqmjIo/4cdxB8q44VSR2SwHEYM0MSk7V2Fh0fvswrRRLD4f4xcA92+O9RiqYknL2nzGPJVJtZfWB2lACX9wUmxlo6DeNtp612Zl0wHHUjpcBBvKAy/14qCumzlWm9Qz2RaNuEU05Q/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785646483; c=relaxed/simple; bh=lLzEQSl9+ShMoZNGWYEr9B1dIP4jPDpshp2XHDCkA4I=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=NMb90R2H38EObYEfHWtsp5NGvlygn79j1ZMYjHJ/gud1auPLlvAOd6BwWD+5pMun/0JSUQkWBNijbyuCCQyAJzTzsaNLq3XENsno1l2HWrLcIZ1qHaDuDB/eJeN7pEdOKnEFDIZDJhSyPm8LPVj90w/ICv0jMGR4jl1Ix+LWh60= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XJflNWQ9; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XJflNWQ9" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5b2a4359d16so2149790e87.3 for ; Sat, 01 Aug 2026 21:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785646480; x=1786251280; darn=vger.kernel.org; h=content-disposition:content-type:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JXt+Qk58b9KPYqJkr6UYxY89Q8+l77fvxEmxNiNV0Aw=; b=XJflNWQ9KC3+ar0u2oPrmtejiWCzYorJj2SWoKe1+U0klMabinPvIje1oB2o9bxNsf AiQaDx7qpuzXaA5cS94g1tuSlbipsPL4JXP6TTvd44tKy2/6PtldwqO/YInuJBnvGqeE U3j4QhqJaalBD3+s7zDDMUzH4kkyd56nDt1rJ/SiWVLJoXCuUFvdkqXeNIziej9bGTbx UkpG24eJdiA3N1YILWuKICV7WFoRW1ncAmH9sYArwizzpOVqHq2DiT8dWpc8sSK9MaEL SD/jnm2c7WeDrKlDIAw2TJxJsDtfi1qFKXTilTu9wpHjgF/ydPWoNTZjgVy/Y5U/ef7C GOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785646480; x=1786251280; h=content-disposition:content-type:mime-version:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JXt+Qk58b9KPYqJkr6UYxY89Q8+l77fvxEmxNiNV0Aw=; b=hwBRkAGhJxrN1QwoezqohczJmAZjDG1oYFhOXKzpdXI9YV04aS6d2SnOXBbDqxspZE pQzGBUR0Gz2fXclDnHqbaXQ+1QX6lfyzLo9FsmO+OFeHkp7bxOljegkkChtcR9jrrYp/ Q8mK92+ZJ8N+gsQqRr6RgEXbmlvBOgQR+qrh6opHP7PKMUdWucsGUVj48uWWamuvMzBF r71U0o1ALp4mSlzhVuFaTX8NPBkuHQxBOI0kn0pddNQ1cBdzbVRiotMK9j82XyPbi+GA QUqLC+esDmsYEy2WOOSvVis9GpYABWfJKQjF8x8MnA/IWbYoPQNjEsWL6oa7rm/rI//w h7FA== X-Gm-Message-State: AOJu0Yzscan07X+8RyX9a//LRowDp1UqaE3hI5xwihk2Iwv/pPmwnz0z k85C+fu/tIJOaj+vR2uSBUSJypS51D4XM/CBy4+R+ZxjC2m5KDFvx8Dsw/tHWZ8nuYkWWg== X-Gm-Gg: AR+sD113jdIUDVD75WYeo+ShWpCyrHp6sIDW3XYdNV32FW9N3gJ6BUSDEOa59a1+DyG ZtTbiKEWPomUoi3XZ7gmZlWM5+sNDpS7ygWIEiOvBu4MDXLFvEmZXs9/JlMqAC9VTyaXFsxxIwO d2J0iNilCSdzNiakwQvx7S951hpX48WUEZ4gSV0S7QmqTUyWINtoxeVtK+pf/GzBjvnctB1GgHi kZg+8WUWhfUDwHU/t81cwO8nJkSyzC3j5Jw9M1D5xcWCXCvXo406YRQm+yYsiqLdcA6XKScGHZg ygF9IuAipvG8m7KVIoTufG9M6dB9gMzEHijQuiLJy3ZBaR06D6YwFc4nT6M/NPBuR7POpk2hU3I soQs2PCZ2Mngrf1Z7AdhXKiXMvSYe8Ra2lCfmnNgFLqskA5LFVTJPngD0Kc5q6DLf5bZs22brGi 8NEO7qDb2/N1sElW7RM3V5FfjWeTkWyLGnUrM5+7OPr9P/krl/uQ/kojVagsHfHsWKygp+MB++j QmQpw8EVf36Qo0PKgm31bM= X-Received: by 2002:a05:6512:669c:20b0:5ae:c003:4b8b with SMTP id 2adb3069b0e04-5b2e4f96438mr604356e87.59.1785646479443; Sat, 01 Aug 2026 21:54:39 -0700 (PDT) Received: from localhost ([77.237.185.162]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b2e244d709sm1273185e87.55.2026.08.01.21.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2026 21:54:37 -0700 (PDT) Date: Sun, 2 Aug 2026 08:24:29 +0330 From: Ali Nasrolahi 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 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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