From patchwork Wed Mar 29 10:09:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 668154 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 D7B3CC6FD18 for ; Wed, 29 Mar 2023 10:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbjC2KKP (ORCPT ); Wed, 29 Mar 2023 06:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231506AbjC2KKL (ORCPT ); Wed, 29 Mar 2023 06:10:11 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02D67469C; Wed, 29 Mar 2023 03:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680084606; x=1711620606; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h64xUav8wBcQemeG9qzU+lo83YD2+PtgrOwwLLWQClw=; b=cRb0OoqFUN/mGBXyO8+YT/kseJv8T0f/2cnrIgZoNlQoQBKDX7qe6Ty2 l/pb28UFC289An2S2VYHkLzxPi/OufkDWWTu7Y7TqgVE7yXzWr3t58Bth ssPVH0nceRZ+bjJPqgSYRLoUTsM+8EZXf1UXKSiQdkH2g9NyHYhqnPHFa d6gZwdFZ9EvsWdO8i8eG4EewNDkRZ4VgRa9ry+wk+L+n/U2T1ykc0uF0V 5yrWMwOMCUnesFVmKQNhxx5UuB9M2/Dje+nb9ROsFnGTRNExx1jVemp4d Z4CyvjHEag2hRlAamNkvUpX6DXz+YGC/YQF3D7eNeZZB5egmuBwv1RIul Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="343256266" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="343256266" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 03:10:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="773517745" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="773517745" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 03:10:04 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 3371B1227DF; Wed, 29 Mar 2023 13:10:00 +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 v8 09/10] ACPI: property: Skip MIPI property table without "mipi-img" prefix Date: Wed, 29 Mar 2023 13:09:50 +0300 Message-Id: <20230329100951.1522322-10-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329100951.1522322-1-sakari.ailus@linux.intel.com> References: <20230329100951.1522322-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 576301b9bb89..90ad4b43f008 100644 --- a/drivers/acpi/mipi.c +++ b/drivers/acpi/mipi.c @@ -715,6 +715,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; @@ -741,6 +743,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)) {