From patchwork Tue Mar 28 10:01:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 667928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8CF1C77B78 for ; Tue, 28 Mar 2023 10:03:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232440AbjC1KCm (ORCPT ); Tue, 28 Mar 2023 06:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232893AbjC1KCP (ORCPT ); Tue, 28 Mar 2023 06:02:15 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86E0A6588; Tue, 28 Mar 2023 03:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679997734; x=1711533734; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5hkNgIaP0g/C3BTjHNqyHJHmBw3OxqK9Z0QZNFnAGY0=; b=XfLYGRadDRRq/cwNUcto5tal5d0CEqTWIjZtkU5afj0qBCbXEc0USOW2 iEPJC37lRNkuEvJFr2r9lm5Bz08hYKaKn0NiUstHVEKYyfO4xtJhwKrlB nyOW5OiOSE2z2kfi/2hAyfgSE2WAMrO02I2LJbuYEbAcUyS/WcibguDru vzgFSJAGY3URh1Z+kd5oPAJAdFs88Efw8wWJSUEcgeFdiwBLCbe+mq5AJ hOsDcuVXo/8tpeNPZGhaAu9/QG3j3QwRZ0fIsHrAvfqCOxg+jeXlYW1O1 bmyS3dscsABB87hRwt6hLH6dHZbN5GXt3kVfjkid3B/ufo+YRNJzOE/Z2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="324420025" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="324420025" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 03:02:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="753078565" X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208";a="753078565" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 03:02:12 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id AEEFC120243; Tue, 28 Mar 2023 13:02:09 +0300 (EEST) From: Sakari Ailus To: linux-acpi@vger.kernel.org Cc: linux-media@vger.kernel.org, rafael@kernel.org, andriy.shevchenko@linux.intel.com, heikki.krogerus@linux.intel.com Subject: [PATCH v6 09/10] ACPI: property: Skip MIPI property table without "mipi-img" prefix Date: Tue, 28 Mar 2023 13:01:58 +0300 Message-Id: <20230328100159.1457160-11-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230328100159.1457160-1-sakari.ailus@linux.intel.com> References: <20230328100159.1457160-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org For all _DSD properties, skip going through the MIPI DisCo for Imaging property name substitution table if the property doesn't have "mipi-img-" prefix. Signed-off-by: Sakari Ailus --- drivers/acpi/mipi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/acpi/mipi.c b/drivers/acpi/mipi.c index fcbef3677558..ae6bdc487363 100644 --- a/drivers/acpi/mipi.c +++ b/drivers/acpi/mipi.c @@ -717,6 +717,8 @@ void acpi_init_swnodes(struct acpi_device *device) primary->secondary = software_node_fwnode(ads->nodes); } +#define MIPI_IMG_PREFIX "mipi-img-" + static const struct mipi_disco_prop { const char *mipi_prop; const char *dt_prop; @@ -743,6 +745,9 @@ void acpi_properties_prepare_mipi(union acpi_object *elements) char *e0 = elements[0].string.pointer; unsigned int i; + if (!str_has_prefix(elements[0].string.pointer, MIPI_IMG_PREFIX)) + return; + /* Replace MIPI DisCo for Imaging property names with DT equivalents. */ for (i = 0; i < ARRAY_SIZE(mipi_disco_props); i++) { if (!strcmp(mipi_disco_props[i].mipi_prop, e0)) {