From patchwork Sun Oct 13 15:40: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: 835144 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 6E5A3143890 for ; Sun, 13 Oct 2024 15:41:10 +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=1728834072; cv=none; b=bSH4vlThu5I3Jk/uwIyUZQgnKnUix+u7P23+5fKfss88a3aIMxgSpgET7XH8mjrSU5XbEEPF5BnZzh9Ta5FmgsaxtXAyLM7tg6u9lh5by/pSl8Wa+wltl/V01yQ+vbYyoeKs698eWlCAf4lL4tmR0GdalL+vBMwZFz4SAf4EFnA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728834072; c=relaxed/simple; bh=yrFD90V6Cn5fCqvrrgjt7ea/S+600jiTu00Ob6Vji7o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oCS8UEOjLY+T1hMpBfOJf8WYAWMvuptLl3/9BT+JyZk/O/v8//dQpFPBpINJE6ygITuuLLcx7MSyLr2u6vP9+y/xXCqCxsRc0egx+PnZV0LU1DmRJ7CNNM8Ia7SZuXKl/p0+GRigp+75RFaAfFGs3LQXZaXXe/LpTOlk0Z3K1tg= 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=PXSCRS2s; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PXSCRS2s" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728834069; 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=M3SLJSXP7e4kGfBeIUTiQpLJl1uIykNaue+2p3v0dQs=; b=PXSCRS2sWfDWf61EkTZMgcR6ZrLxNUrh2QS49rG9Pkl0gOxyM0k2wNWH4elmXF+t6I+8aH lkSaNcJKuDjnKiWrRpZwPJijnoejl/o6AcnxalLbV6VNchH05OU9xpZFsvC4uMeDUrrmBu YejkC9GFnqZvz1pPyZ5M8D8mZ515MwM= Received: from mx-prod-mc-02.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-510-Fg-sDn55NnmttP5LBw3VOA-1; Sun, 13 Oct 2024 11:41:07 -0400 X-MC-Unique: Fg-sDn55NnmttP5LBw3VOA-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4AEE119560B0; Sun, 13 Oct 2024 15:41:06 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.70]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0631F19560AA; Sun, 13 Oct 2024 15:41:03 +0000 (UTC) From: Hans de Goede To: Sakari Ailus , Andy Shevchenko Cc: Hans de Goede , Mauro Carvalho Chehab , Kate Hsuan , Robert Mast , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 2/4] media: atomisp: mt9m114: Disable V4L2_CID_3A_LOCK control Date: Sun, 13 Oct 2024 17:40:54 +0200 Message-ID: <20241013154056.12532-3-hdegoede@redhat.com> In-Reply-To: <20241013154056.12532-1-hdegoede@redhat.com> References: <20241013154056.12532-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.0 on 10.30.177.40 The V4L2_CID_3A_LOCK control is causing v4l2_ctrl_new_custom() to fail with -ERANGE. It would be better to fix this control but this entire driver is going to be replaced with the drivers/media/i2c/mt9m114 standard v4l2 driver. This quick fix gets things going for now until the driver is replaced. Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 918ea4fa9f6b..b0b740dd3ca3 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -1224,6 +1224,7 @@ static struct v4l2_ctrl_config mt9m114_controls[] = { .def = 0, .flags = 0, }, +#if 0 /* Causes v4l2_ctrl_new_custom() to fail with -ERANGE, disable for now */ { .ops = &ctrl_ops, .id = V4L2_CID_3A_LOCK, @@ -1235,6 +1236,7 @@ static struct v4l2_ctrl_config mt9m114_controls[] = { .def = 0, .flags = 0, }, +#endif }; static int mt9m114_detect(struct mt9m114_device *dev, struct i2c_client *client) From patchwork Sun Oct 13 15:40: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: 835143 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 53ABA1474D9 for ; Sun, 13 Oct 2024 15:41:17 +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=1728834078; cv=none; b=HTMPJVKb5SsR7IekJK3w5AR4rLL/rGGGgQfC0ea1e2D9j86cy5vp4lFT908qvGomWAGh2tBdEXuXsE6sZ8afazfhJM8voAXL2HWnGnb999nrnmyxMvK7d0LVvPc10DsBxWYC9kxkdn40JTnstTcyblYYPp0iY3/5y/nZ13rWMAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728834078; c=relaxed/simple; bh=xG9LCXw1pL/9MIbtVaMsg8Kj1UVI+uhqwJaGwmF9m7w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I9yO/qe4aLsMtiCCUUqXJnXaFfUtDerDxoVrZvLlyeHWSymYuU6jMG88pMPUKJDu06uF5yOgoM6kgHQ6OyAp2158WWGBaOwLwtSa9rl71laY3YYp0P+5v2EqmxW06hB85UWgHv/IR75FZehlR2efmzNLSZYFqXoFmt/mXj9zqbo= 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=UCrddo/Y; 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="UCrddo/Y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728834076; 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=uhUkJYLDXF80tVlJU0WIahMtJ/wu9t7rdx3rs8/W9Nc=; b=UCrddo/Y4RAq2C/ROqvOV223Rbf25toooD5XZsVGS+fbKKT/i6hGlL/GAtK5VAj6iiv1OM xqNjxUOmuBUW5vXyjIM6pVS5wlXXtXD2E2zRcvtaVM4IC0kG8USJq5BV978UEM9y1Nzkkp ohNdRegroxBkY8rwgsT7X4DQkseuGZA= Received: from mx-prod-mc-04.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-47-mmuebRVsPxiEn5xgrdExKw-1; Sun, 13 Oct 2024 11:41:13 -0400 X-MC-Unique: mmuebRVsPxiEn5xgrdExKw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E258819560A2; Sun, 13 Oct 2024 15:41:11 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.70]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 71A5819560AA; Sun, 13 Oct 2024 15:41:09 +0000 (UTC) From: Hans de Goede To: Sakari Ailus , Andy Shevchenko Cc: Hans de Goede , Mauro Carvalho Chehab , Kate Hsuan , Robert Mast , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 4/4] media: atomisp: mt9m114: Fix fmt->code not getting set on try_fmt Date: Sun, 13 Oct 2024 17:40:56 +0200 Message-ID: <20241013154056.12532-5-hdegoede@redhat.com> In-Reply-To: <20241013154056.12532-1-hdegoede@redhat.com> References: <20241013154056.12532-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.0 on 10.30.177.40 Fix mt9m114_set_fmt() not setting format.format.code when called with format.which == V4L2_SUBDEV_FORMAT_TRY. This fixes atomisp failing to start streaming with the mt9m114 on an Asus T100TA because of __media_pipeline_start() returning -EPIPE. Signed-off-by: Hans de Goede --- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 1a67f93a53d7..7cf543986b91 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -665,6 +665,7 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd, fmt->width = res->width; fmt->height = res->height; + fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10; if (format->which == V4L2_SUBDEV_FORMAT_TRY) { *v4l2_subdev_state_get_format(sd_state, 0) = *fmt;