From patchwork Mon Jun 10 17:34:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 102335 X-Patchwork-Delegate: sakari.ailus@iki.fi Received: from am.mirrors.kernel.org ([147.75.80.249]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sGiui-0005VG-22 for patchwork@linuxtv.org; Mon, 10 Jun 2024 17:34:41 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 701111F22C14 for ; Mon, 10 Jun 2024 17:34:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D38E145352; Mon, 10 Jun 2024 17:34:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FLO52sL2" X-Original-To: linux-media@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FE548F6D for ; Mon, 10 Jun 2024 17:34:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718040868; cv=none; b=T9WCNrh4KwFPU3NGxE0G+DcNmr3wWocf3P/lObeQKrhIdlCVTEVey9n1XWzmNGuxBndNB9Cc6UZVgI0+aVahAEtXVtqg5Ze/5RRc4UxXFSl5U619zpY8iX8z3Nudj7NLN6bHHFMYjCg7kYRJyLG9S02/Z2pkoUfGTz4qjGdOGjY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718040868; c=relaxed/simple; bh=6BL43B9XAdbcFfry/EVwYGwfmvcVYVpkVARnqTHxVfY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mgPZd2BAKvi3bpWlZa6aii+V694G0AlV3ALsu/gS6wDAZFC1SW/iY74rkusmsvcZOoXkRxxmbVccXXr4FIBabPDturQA96v6dKudL18kTWxDMhWS5mZjSr4BNw1VtIjs0LcEZshrK79PzsndbADsAiI8M2Yev6IHg1hAZuRyW/w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FLO52sL2; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718040865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lD06i76qDc78lsTuKc4whE4gcJwNVz6YxpAk8sVYZ1s=; b=FLO52sL27eqWMroA++Wt52GKVw9TJ7FbcXRLiiEKWYKK33PuIigLK+VJzfDUJZatHz1liQ 6wYM5VrEa5/viYuIQk3TPHe4k9XrJzcpqTsvKjVLvixvs0NubpMzP1zCkLSdhfSCkpJisX NkILYD63M0WHjzIOBQQ5xH2F+zGxo6A= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-rHgAfufKPOOj5bXTjkZBrQ-1; Mon, 10 Jun 2024 13:34:23 -0400 X-MC-Unique: rHgAfufKPOOj5bXTjkZBrQ-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E86A719560AD; Mon, 10 Jun 2024 17:34:21 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.77]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D63DD30000C3; Mon, 10 Jun 2024 17:34:19 +0000 (UTC) From: Hans de Goede To: Sakari Ailus Cc: Hans de Goede , Mauro Carvalho Chehab , Kate Hsuan , linux-media@vger.kernel.org Subject: [PATCH 1/2] media: ipu-bridge: Sort ipu_supported_sensors[] array by ACPI HID Date: Mon, 10 Jun 2024 19:34:17 +0200 Message-ID: <20240610173418.16119-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-LSpam-Score: -0.3 (/) X-LSpam-Report: No, score=-0.3 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_SBL_CSS=3.335,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=no autolearn_force=no Sort the sensors in ipu_supported_sensors[] by ACPI HID rather then having them in some random order. While at it also use the correct (same as datasheet) capitalization for the sensor names in the comments. Instead of sometimes writing OV#### and sometimes ov####. Signed-off-by: Hans de Goede --- drivers/media/pci/intel/ipu-bridge.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 61750cc98d70..f1d0d5f4854e 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -43,28 +43,30 @@ * becoming apparent in the future. * * Do not add an entry for a sensor that is not actually supported. + * + * Please keep the list sorted by ACPI HID. */ static const struct ipu_sensor_config ipu_supported_sensors[] = { + /* GalaxyCore GC0310 */ + IPU_SENSOR_CONFIG("INT0310", 0), /* Omnivision OV5693 */ IPU_SENSOR_CONFIG("INT33BE", 1, 419200000), + /* Omnivision OV2740 */ + IPU_SENSOR_CONFIG("INT3474", 1, 180000000), /* Omnivision OV8865 */ IPU_SENSOR_CONFIG("INT347A", 1, 360000000), /* Omnivision OV7251 */ IPU_SENSOR_CONFIG("INT347E", 1, 319200000), + /* Hynix Hi-556 */ + IPU_SENSOR_CONFIG("INT3537", 1, 437000000), + /* Omnivision OV01A10 */ + IPU_SENSOR_CONFIG("OVTI01A0", 1, 400000000), /* Omnivision OV2680 */ IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000), - /* Omnivision ov8856 */ + /* Omnivision OV8856 */ IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000), - /* Omnivision ov2740 */ - IPU_SENSOR_CONFIG("INT3474", 1, 180000000), - /* Hynix hi556 */ - IPU_SENSOR_CONFIG("INT3537", 1, 437000000), - /* Omnivision ov13b10 */ + /* Omnivision OV13B10 */ IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000), - /* GalaxyCore GC0310 */ - IPU_SENSOR_CONFIG("INT0310", 0), - /* Omnivision ov01a10 */ - IPU_SENSOR_CONFIG("OVTI01A0", 1, 400000000), }; static const struct ipu_property_names prop_names = { From patchwork Mon Jun 10 17:34:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 102336 X-Patchwork-Delegate: sakari.ailus@iki.fi Received: from sv.mirrors.kernel.org ([139.178.88.99]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sGium-0005Vm-1S for patchwork@linuxtv.org; Mon, 10 Jun 2024 17:34:42 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 915102818E7 for ; Mon, 10 Jun 2024 17:34:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 285B5147C85; Mon, 10 Jun 2024 17:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="P/9QKB6o" X-Original-To: linux-media@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FAB08F6D for ; Mon, 10 Jun 2024 17:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718040870; cv=none; b=Fx+ciPd+6/Yd89NAzCZJDKz71aIUFkBTQcX+X7H+DzANrBcGiXOxLnUlnMuQ3HpsanGgmrC/c89z41lhdleuAmti4tZwhjzwTlMcF4TsjHxmCd2odqYy1h5xa2FswI8dESTsinWFlN7gZoHcFnsx3mSSCzGbR/zPb8QWECcagvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718040870; c=relaxed/simple; bh=OI1ctTHkCsMH4Yd0bz8xm9EXdTGTPnqRPNky58Yo9h4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jguX63JqcKNRjB2ChjhHvmcHrXo2NTlmQC4Nbi5cxu2P0e37/SCzBf1JwiWuuHmvs2Rs6rR9E6wlcFS6qP5CMsI0BSPTpDpoK2nsysUYnpMB/Y5PHq1cwfPUInXNGE3Me/fGRbUO0M19hCFU/JmNzV4jXLSLJxpQnlzlLxUScHg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=P/9QKB6o; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718040868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/t2Kvn5czuKZiRPB4kiAYw1d5tMUfUZmntRPocdNxUM=; b=P/9QKB6oBGHbXeO+rR1ZjmtnR1I4R2G6ovMZLqB+vRTkBlDf5qrzObCgGSzdLJK9+8gp+P rlaeyhnoBlKI+ILdxqvAUX2D97cxQjShXR62FrLdVVI9wBCVi/mOo/odiEatqL23/JPcwU 4G8czRi7a3KHmmMo01LRFGIuhw1X90I= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-85-ZXH68SGVN-iRdvOQYIW6WQ-1; Mon, 10 Jun 2024 13:34:24 -0400 X-MC-Unique: ZXH68SGVN-iRdvOQYIW6WQ-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E34C1195608A; Mon, 10 Jun 2024 17:34:23 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.77]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E5E1830000C4; Mon, 10 Jun 2024 17:34:21 +0000 (UTC) From: Hans de Goede To: Sakari Ailus Cc: Hans de Goede , Mauro Carvalho Chehab , Kate Hsuan , linux-media@vger.kernel.org Subject: [PATCH 2/2] media: ipu-bridge: Add HIDs from out of tree IPU6 driver ipu-bridge copy Date: Mon, 10 Jun 2024 19:34:18 +0200 Message-ID: <20240610173418.16119-2-hdegoede@redhat.com> In-Reply-To: <20240610173418.16119-1-hdegoede@redhat.com> References: <20240610173418.16119-1-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIMWL_WL_HIGH=-1,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_PASS=-0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,RCVD_IN_SBL_CSS=3.335,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=ham autolearn_force=no The out of tree IPU6 driver comes with its own copy of the ipu-bridge code. It also comes bundled with standard v4l2 sensor drivers. Many of these have been mainlined and the rest is being mainlined but not all are upstream yet. The latest version of the out of tree code now will use the mainline kernel ipu-bridge version when build against new enough kernels. This however breaks support for (bundled) sensor drivers which do not (yet) have an entry in the mainline ipu-bridge code. Add the missing entries to the mainline ipu-bridge code to make the transition to having everything in mainline easier. The alternative HID for the OV13B10 and the OV08x40 entries both are for sensors already supported in mainline which were missing. The downside of adding these HIDs is that this will cause the IPU3 / IPU6 drivers to delay registering there /dev/video# nodes until a sensor driver has bound, which for the non mainline drivers may never happen. This is not really an issue because almost all IPU designs only have front (user) facing sensors and all the added HIDs are for the main RGB (not IR) sensor. So if the sensor driver is missing then the user can already not use the camera and adding these HIDs does not really change that. Signed-off-by: Hans de Goede --- drivers/media/pci/intel/ipu-bridge.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index f1d0d5f4854e..a0e9a71580b5 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -47,6 +47,12 @@ * Please keep the list sorted by ACPI HID. */ static const struct ipu_sensor_config ipu_supported_sensors[] = { + /* Himax HM11B1 */ + IPU_SENSOR_CONFIG("HIMX11B1", 1, 384000000), + /* Himax HM2170 */ + IPU_SENSOR_CONFIG("HIMX2170", 1, 384000000), + /* Himax HM2172 */ + IPU_SENSOR_CONFIG("HIMX2172", 1, 384000000), /* GalaxyCore GC0310 */ IPU_SENSOR_CONFIG("INT0310", 0), /* Omnivision OV5693 */ @@ -59,14 +65,24 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = { IPU_SENSOR_CONFIG("INT347E", 1, 319200000), /* Hynix Hi-556 */ IPU_SENSOR_CONFIG("INT3537", 1, 437000000), - /* Omnivision OV01A10 */ + /* Omnivision OV01A10 / OV01A1S */ IPU_SENSOR_CONFIG("OVTI01A0", 1, 400000000), + IPU_SENSOR_CONFIG("OVTI01AS", 1, 400000000), + /* Omnivision OV02C10 */ + IPU_SENSOR_CONFIG("OVTI02C1", 1, 400000000), + /* Omnivision OV02E10 */ + IPU_SENSOR_CONFIG("OVTI02E1", 1, 360000000), + /* Omnivision OV08A10 */ + IPU_SENSOR_CONFIG("OVTI08A1", 1, 500000000), + /* Omnivision OV08x40 */ + IPU_SENSOR_CONFIG("OVTI08F4", 1, 400000000), + /* Omnivision OV13B10 */ + IPU_SENSOR_CONFIG("OVTI13B1", 1, 560000000), + IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000), /* Omnivision OV2680 */ IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000), /* Omnivision OV8856 */ IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000), - /* Omnivision OV13B10 */ - IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000), }; static const struct ipu_property_names prop_names = {