From patchwork Mon Jun 3 13:20:54 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: 801338 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 249D712C491 for ; Mon, 3 Jun 2024 13:21:05 +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=1717420867; cv=none; b=T4unTxzKJ1oRj+jLceXwadWrJRP9JkeNP9YR3geFiW9ZRR7Ngr9LtmAm4dshx0TmLE84azbS3z+FmTI3w5JaEV9PlAW2TTgOTpnfCbRuNOHhHxM0recVjNUvTteQ01r4MSgdj73E41b+PYwTTjXGF6FEGHMCT10V4gCFdvYN/Uk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717420867; c=relaxed/simple; bh=NXw9nCtkI1f8co+Ud3DCEg89rss/axt+7n5r0ur1Tp8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Pyqo8KoVRHnOCyvtEoSusHNzCk9qkMJJBAF3eV+rVCjGI+l21tULu0fRvruBEMUu0EkxJMpzCm8QAKi1IXrlUL3t9cedc2CaAHvoM0nK/n266alSPlErH3DUO96xuo4meIP1Efm4Pkkrvmi+m0Eirk9VdymdCCqxEIsTo535ORY= 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=CnbmaE22; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CnbmaE22" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717420865; 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=7oXGDm/SNy832yxtqns/YI95WzFQEbZ2sxWnGAEr+E8=; b=CnbmaE22oFvXWQZEaFa/a4aL/xnQlce4ewuzLBGriwY+ufkWWYxn7izue9fScbso81KfCJ 9UmxrduP4gY/8HzcVcOkwC9A2DH4PW/S7B2GRuG34h1CeUnCXyh5H71h39e0BOJ1gySNx8 +mBZEhq3PvDoUi2mjtDzIIEfjK7RlEY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-531-h0AFabFgNs-fzF06jkaILQ-1; Mon, 03 Jun 2024 09:21:02 -0400 X-MC-Unique: h0AFabFgNs-fzF06jkaILQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0E0D29AA38A; Mon, 3 Jun 2024 13:21:01 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.193.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 520B95624; Mon, 3 Jun 2024 13:21:00 +0000 (UTC) From: Hans de Goede To: Sakari Ailus , Mauro Carvalho Chehab Cc: Hans de Goede , Tsuchiya Yuto , Andy Shevchenko , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , Kate Hsuan , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 2/5] media: atomisp: Remove firmware_name module parameter Date: Mon, 3 Jun 2024 15:20:54 +0200 Message-ID: <20240603132057.255917-2-hdegoede@redhat.com> In-Reply-To: <20240603132057.255917-1-hdegoede@redhat.com> References: <20240603132057.255917-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.11.54.1 There is no need for the user to be able to specify a different name for the firmware being loaded. Most other kernel drivers do not have this and work fine without it. Drop this unnecessary module parameter. Signed-off-by: Hans de Goede --- .../staging/media/atomisp/pci/atomisp_v4l2.c | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 8b522baf2e66..cfdfbf96c3fe 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -66,10 +66,6 @@ module_param(dbg_func, int, 0644); MODULE_PARM_DESC(dbg_func, "log function switch non/printk (default:printk)"); -static char firmware_name[256]; -module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0); -MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the default firmware name."); - /* * Set to 16x16 since this is the amount of lines and pixels the sensor * exports extra. If these are kept at the 10x8 that they were on, in yuv @@ -1101,23 +1097,19 @@ atomisp_load_firmware(struct atomisp_device *isp) int rc; char *fw_path = NULL; - if (firmware_name[0] != '\0') { - fw_path = firmware_name; - } else { - if ((isp->media_dev.hw_revision >> ATOMISP_HW_REVISION_SHIFT) - == ATOMISP_HW_REVISION_ISP2401) - fw_path = "shisp_2401a0_v21.bin"; + if ((isp->media_dev.hw_revision >> ATOMISP_HW_REVISION_SHIFT) == + ATOMISP_HW_REVISION_ISP2401) + fw_path = "shisp_2401a0_v21.bin"; - if (isp->media_dev.hw_revision == - ((ATOMISP_HW_REVISION_ISP2401_LEGACY << ATOMISP_HW_REVISION_SHIFT) - | ATOMISP_HW_STEPPING_A0)) - fw_path = "shisp_2401a0_legacy_v21.bin"; + if (isp->media_dev.hw_revision == + ((ATOMISP_HW_REVISION_ISP2401_LEGACY << ATOMISP_HW_REVISION_SHIFT) | + ATOMISP_HW_STEPPING_A0)) + fw_path = "shisp_2401a0_legacy_v21.bin"; - if (isp->media_dev.hw_revision == - ((ATOMISP_HW_REVISION_ISP2400 << ATOMISP_HW_REVISION_SHIFT) - | ATOMISP_HW_STEPPING_B0)) - fw_path = "shisp_2400b0_v21.bin"; - } + if (isp->media_dev.hw_revision == + ((ATOMISP_HW_REVISION_ISP2400 << ATOMISP_HW_REVISION_SHIFT) | + ATOMISP_HW_STEPPING_B0)) + fw_path = "shisp_2400b0_v21.bin"; if (!fw_path) { dev_err(isp->dev, "Unsupported hw_revision 0x%x\n", From patchwork Mon Jun 3 13:20:56 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: 801337 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 E4B0E12CD91 for ; Mon, 3 Jun 2024 13:21:11 +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=1717420873; cv=none; b=A5FNhI+yIUz6JxS65kXGkvJFM5LZpLlUXtAfF52JMkUcR55uF/9iZTdk1LJYAumHLwbrImiVpUnLC1K/H4RlMGBY5r75bHj1EusMe21XfxQZR02SFlQOIt9u+TjD1RTRmSb0lShtm/R8kpHyjLvhfPWek1heL++YSNxrK8Pm4ww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717420873; c=relaxed/simple; bh=vW/DrzcA2QaVC+nVsqekgkqJdKqV/8/tn9VGlbhxtfU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WDJDnuB9VXCuQMD3B87GM8cuG/T4mf8nKHesuxya5NN59Ep/GQyW7bxXukT+XGi3Lm2b7OpbIXMAt4xHvjI0RtfPeQy07MSj4ocu4QgWj1udADoDWK3h1Mg7IoitXGxWXMu4vU0WtwzAKlmNvMlIcMK/pvLGy32XmO6zTQ2m5n8= 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=deF0CkkT; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="deF0CkkT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717420871; 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=wjM1+CX6ixdtpG/JpZd7uV7NuQ2/9yw1tY17ILpmXKE=; b=deF0CkkT3OZt5rV/TGbYPbpMYKsH2bFmrpgKpl0YkwfT57QLlRNQEtaK7eUy2GSaZJPsYB LkLC7IhAAMcDRiqpc6eNAXdUd3a+4/q1PS6v3xTZb0NDsMNjukfR9WvcQ/ak/I3fY/v1od tT+uHb2Ii8Xo3yxU79ox6Tg83fs9W/8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-Z8vMpfmdN2ep5jd_2_43Yg-1; Mon, 03 Jun 2024 09:21:05 -0400 X-MC-Unique: Z8vMpfmdN2ep5jd_2_43Yg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 182081C05131; Mon, 3 Jun 2024 13:21:05 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.193.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 931761552; Mon, 3 Jun 2024 13:21:03 +0000 (UTC) From: Hans de Goede To: Sakari Ailus , Mauro Carvalho Chehab Cc: Hans de Goede , Tsuchiya Yuto , Andy Shevchenko , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , Kate Hsuan , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 4/5] media: atomisp: Update TODO Date: Mon, 3 Jun 2024 15:20:56 +0200 Message-ID: <20240603132057.255917-4-hdegoede@redhat.com> In-Reply-To: <20240603132057.255917-1-hdegoede@redhat.com> References: <20240603132057.255917-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.11.54.1 Update the TODO list: - Remove comment about adding firmware to linux-firmware this has been done - Add a comment about removing unnecessary / unwanted module parameters Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/TODO | 31 ++---------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/drivers/staging/media/atomisp/TODO b/drivers/staging/media/atomisp/TODO index bfef99997a1d..27cbbde93b1e 100644 --- a/drivers/staging/media/atomisp/TODO +++ b/drivers/staging/media/atomisp/TODO @@ -1,29 +1,3 @@ -Required firmware -================= - -The atomisp driver requires the following firmware: - -- for BYT: /lib/firmware/shisp_2400b0_v21.bin - - With a version of "irci_stable_candrpv_0415_20150423_1753" to check - the version run: "strings shisp_2400b0_v21.bin | head -n1", sha256sum: - - 3847b95fb9f1f8352c595ba7394d55b33176751372baae17f89aa483ec02a21b shisp_2400b0_v21.bin - - The shisp_2400b0_v21.bin file with this version can be found on - the Android factory images of various X86 Android tablets such as - e.g. the Chuwi Hi8 Pro. - -- for CHT: /lib/firmware/shisp_2401a0_v21.bin - - With a version of "irci_stable_candrpv_0415_20150521_0458", sha256sum: - - e89359f4e4934c410c83d525e283f34c5fcce9cb5caa75ad8a32d66d3842d95c shisp_2401a0_v21.bin - - This can be found here: - https://github.com/intel-aero/meta-intel-aero-base/blob/master/recipes-kernel/linux/linux-yocto/shisp_2401a0_v21.bin - - TODO ==== @@ -35,6 +9,8 @@ TODO * Remove custom sysfs files created by atomisp_drvfs.c +* Remove unnecessary/unwanted module parameters + * Remove abuse of priv field in various v4l2 userspace API structs * Without a 3A library the capture behaviour is not very good. To take a good @@ -61,9 +37,6 @@ TODO * Fix not all v4l2 apps working, e.g. cheese does not work -* Get manufacturer's authorization to redistribute the binaries for - the firmware files - * The atomisp code still has a lot of cruft which needs cleaning up