Message ID | 20230401145926.596216-29-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1picjh-00AbMc-Px; Sat, 01 Apr 2023 15:01:46 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbjDAPBo (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Sat, 1 Apr 2023 11:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbjDAPBd (ORCPT <rfc822;linux-media@vger.kernel.org>); Sat, 1 Apr 2023 11:01:33 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FCE820620 for <linux-media@vger.kernel.org>; Sat, 1 Apr 2023 08:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680361234; 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=Fu7akkSrLzuIcCNp6h4mKqSfsMWoS6+H12wTLO1rBuc=; b=AwOU2EzRTP8uqHdfP6KvWG9qoFOBXexizeuC2YSKY9DluAZhk2LsdkDi7D4boEP1y46Qs7 jSEqvaGrZfeZpZhqGu42Na/BKn4kK8v3j1OiL20eryp72Y6LExUqwG6A4Sb6c4/bfdADvo izsGYqJq0KpUF0ZIU94SbSl8yvlnKEk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-655-kMV-mPxANJiEzGhDF2hl3w-1; Sat, 01 Apr 2023 11:00:30 -0400 X-MC-Unique: kMV-mPxANJiEzGhDF2hl3w-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BEDAF3815F66; Sat, 1 Apr 2023 15:00:29 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.192.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B4E4483EC1; Sat, 1 Apr 2023 15:00:28 +0000 (UTC) From: Hans de Goede <hdegoede@redhat.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com>, Kate Hsuan <hpa@redhat.com>, Tsuchiya Yuto <kitakar@gmail.com>, Andy Shevchenko <andy@kernel.org>, Yury Luneff <yury.lunev@gmail.com>, Nable <nable.maininbox@googlemail.com>, andrey.i.trufanov@gmail.com, Fabio Aiuto <fabioaiuto83@gmail.com>, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 28/28] media: atomisp: gmin_platform: Add Lenovo Ideapad Miix 310 gmin_vars Date: Sat, 1 Apr 2023 16:59:26 +0200 Message-Id: <20230401145926.596216-29-hdegoede@redhat.com> In-Reply-To: <20230401145926.596216-1-hdegoede@redhat.com> References: <20230401145926.596216-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
media: atomisp: Further sensor rework + exotic features removal
|
|
Commit Message
Hans de Goede
April 1, 2023, 2:59 p.m. UTC
The _DSM used to get sensor variables like CsiPort returns the wrong
csi-port for the front OV2680 sensor on the Lenovo Ideapad Miix 310
add a gmin_vars DMI quirk / override setting the right CsiPort.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
.../media/atomisp/pci/atomisp_gmin_platform.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
Comments
On Sat, Apr 1, 2023 at 5:00 PM Hans de Goede <hdegoede@redhat.com> wrote: > > The _DSM used to get sensor variables like CsiPort returns the wrong > csi-port for the front OV2680 sensor on the Lenovo Ideapad Miix 310 > add a gmin_vars DMI quirk / override setting the right CsiPort. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> > --- > .../media/atomisp/pci/atomisp_gmin_platform.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c > index f83de0ffaf16..efcfc133311f 100644 > --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c > +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c > @@ -304,7 +304,17 @@ static struct gmin_cfg_var surface3_vars[] = { > {}, > }; > > +static struct gmin_cfg_var lenovo_ideapad_miix_310_vars[] = { > + /* _DSM contains the wrong CsiPort! */ > + { "OVTI2680:01_CsiPort", "0" }, > + {} > +}; > + > static const struct dmi_system_id gmin_vars[] = { > + /* > + * These DMI ids where present when the atomisp driver was merged into IDs were ? > + * drivers/staging and it is unclear if they are really necessary. > + */ MRD7 and FFD8 are the reference designs. At least MRD7 is what we have in the lab and we can run some tests there. That's, for example, one which I used to run atomisp before it got removed from the kernel a few years ago. > { > .ident = "BYT-T FFD8", > .matches = { > @@ -341,6 +351,7 @@ static const struct dmi_system_id gmin_vars[] = { > }, > .driver_data = i8880_vars, > }, > + /* Later added DMI ids, these are confirmed to really be necessary! */ > { > .ident = "Surface 3", > .matches = { > @@ -348,6 +359,14 @@ static const struct dmi_system_id gmin_vars[] = { > }, > .driver_data = surface3_vars, > }, > + { > + .ident = "Lenovo Ideapad Miix 310", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > + DMI_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10"), > + }, > + .driver_data = lenovo_ideapad_miix_310_vars, > + }, > {} > }; > > -- > 2.39.1 >
Hi, On 4/2/23 21:12, Andy Shevchenko wrote: > On Sat, Apr 1, 2023 at 5:00 PM Hans de Goede <hdegoede@redhat.com> wrote: >> >> The _DSM used to get sensor variables like CsiPort returns the wrong >> csi-port for the front OV2680 sensor on the Lenovo Ideapad Miix 310 >> add a gmin_vars DMI quirk / override setting the right CsiPort. >> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> >> --- >> .../media/atomisp/pci/atomisp_gmin_platform.c | 19 +++++++++++++++++++ >> 1 file changed, 19 insertions(+) >> >> diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c >> index f83de0ffaf16..efcfc133311f 100644 >> --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c >> +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c >> @@ -304,7 +304,17 @@ static struct gmin_cfg_var surface3_vars[] = { >> {}, >> }; >> >> +static struct gmin_cfg_var lenovo_ideapad_miix_310_vars[] = { >> + /* _DSM contains the wrong CsiPort! */ >> + { "OVTI2680:01_CsiPort", "0" }, >> + {} >> +}; >> + >> static const struct dmi_system_id gmin_vars[] = { >> + /* >> + * These DMI ids where present when the atomisp driver was merged into > > IDs > were ? Ack fixed. >> + * drivers/staging and it is unclear if they are really necessary. >> + */ > > MRD7 and FFD8 are the reference designs. At least MRD7 is what we have > in the lab and we can run some tests there. That's, for example, one > which I used to run atomisp before it got removed from the kernel a > few years ago. Right, but do these need the quirks ? Or is our auto-detection code good enough to get the right values ? Regards, Hans > >> { >> .ident = "BYT-T FFD8", >> .matches = { >> @@ -341,6 +351,7 @@ static const struct dmi_system_id gmin_vars[] = { >> }, >> .driver_data = i8880_vars, >> }, >> + /* Later added DMI ids, these are confirmed to really be necessary! */ >> { >> .ident = "Surface 3", >> .matches = { >> @@ -348,6 +359,14 @@ static const struct dmi_system_id gmin_vars[] = { >> }, >> .driver_data = surface3_vars, >> }, >> + { >> + .ident = "Lenovo Ideapad Miix 310", >> + .matches = { >> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), >> + DMI_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10"), >> + }, >> + .driver_data = lenovo_ideapad_miix_310_vars, >> + }, >> {} >> }; >> >> -- >> 2.39.1 >> > >
On Sun, Apr 9, 2023 at 4:01 PM Hans de Goede <hdegoede@redhat.com> wrote: > On 4/2/23 21:12, Andy Shevchenko wrote: > > On Sat, Apr 1, 2023 at 5:00 PM Hans de Goede <hdegoede@redhat.com> wrote: ... > > MRD7 and FFD8 are the reference designs. At least MRD7 is what we have > > in the lab and we can run some tests there. That's, for example, one > > which I used to run atomisp before it got removed from the kernel a > > few years ago. > > Right, but do these need the quirks ? Or is our auto-detection code > good enough to get the right values ? I will try to allocate some time to check it against the latest AtomISP code. Do you have a branch where you have been collecting the all related patches?
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index f83de0ffaf16..efcfc133311f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -304,7 +304,17 @@ static struct gmin_cfg_var surface3_vars[] = { {}, }; +static struct gmin_cfg_var lenovo_ideapad_miix_310_vars[] = { + /* _DSM contains the wrong CsiPort! */ + { "OVTI2680:01_CsiPort", "0" }, + {} +}; + static const struct dmi_system_id gmin_vars[] = { + /* + * These DMI ids where present when the atomisp driver was merged into + * drivers/staging and it is unclear if they are really necessary. + */ { .ident = "BYT-T FFD8", .matches = { @@ -341,6 +351,7 @@ static const struct dmi_system_id gmin_vars[] = { }, .driver_data = i8880_vars, }, + /* Later added DMI ids, these are confirmed to really be necessary! */ { .ident = "Surface 3", .matches = { @@ -348,6 +359,14 @@ static const struct dmi_system_id gmin_vars[] = { }, .driver_data = surface3_vars, }, + { + .ident = "Lenovo Ideapad Miix 310", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10"), + }, + .driver_data = lenovo_ideapad_miix_310_vars, + }, {} };