From patchwork Tue Apr 30 12:55:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 793946 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D89E17109A for ; Tue, 30 Apr 2024 12:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481748; cv=none; b=ojPjD5EUccoKVB6g3qUamKacoFXPh0r4cIT87EguxTwmQAbaffXu0dnE82lSoNrbNFjHyZKGklGpfFeIflw0TD5o9GM2MeVhRwPvHWg2ljbmpztB3rYIIC88WEKspFHkpclLsZVm8eoiXIzIaKFOXPBNtspKmCnE0U8TaH4vOZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481748; c=relaxed/simple; bh=oYyX5A2u0qlsJz3Khs22Q9EKJnbR1seZtA56i5V7sUo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s5f0g6HzXcY71C2DWgQB+uhoNe17l+L2b/whY6hZ4Dm13vP7pMR9ACPpPqO8NAFSpDcmV2P7oiwvoyD5hMjEuyVC6oHaqKK5UwIyOpFqkItynGzN5pfoshCU8mv13NDGhLlQWqg1Jy3sOsLfY0RkN5DxgvFqspDW2CB5gpDjlFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=S4CF5NqS; arc=none smtp.client-ip=209.85.210.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="S4CF5NqS" Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6eb55942409so2686191a34.1 for ; Tue, 30 Apr 2024 05:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481746; x=1715086546; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=cjV8GfCP2WHHQ01Aqc8mQQXzl2eD7DwGYj59FGy18+c=; b=S4CF5NqSV/7sgOb3QnBMrMwTsDvF2yVdSw75bDWzsB7HH/rCZpRYZROh2fl3msiXyh vr0teOHwY0GR+uCv2QaZ6kTgSRL9p2Ya7yMzlJvPJBNgUJISeAMlhFk5wlFllXp9ZEHY 1UQpbe0SRJoTRkYZHcq54R+0JNI+rYZdFpduM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481746; x=1715086546; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cjV8GfCP2WHHQ01Aqc8mQQXzl2eD7DwGYj59FGy18+c=; b=akdAh92DLtXhVE0MPW0seSdMncuua/dY957QRcCMgweWLGNJ59hoceuauWMiKvvAx0 tx19hax2FuTkvOPyI6i/f1m0j5284aQ5WYNx3kqpyaLAjOH8zkx0gsCfDBMWYIstkgXE ajKM8rUwHC54lqkNCx+vj3DofsXnWeqGvVZSAu/GBAwK5nZKOfpqjVNZG3foBcMDbWWu 1dnaNcDxsNjky9WXJ/xijw32/w8cqehuwo4DY94wHPDYv5Js3e3ttp/EtAFFwU0oyEel 2RkrG1VXO8rnt/ejNBhlJBg98+EInANzF4Yt3e3bt9Ap6dbJzf/2ZcTVw7kxOlur5UH3 vSWw== X-Gm-Message-State: AOJu0Yy2jYhbncKS04zWY6J/oSoRf62KlFUOSk4rsFFns41ksuomdOYo Ep8LY9xHYwsfksIEcl9+U55brn84iOQyxPK88HkRm5VppFqI5S18Pt/idSkLgw== X-Google-Smtp-Source: AGHT+IEgUWZ5sviYRGNJaeAywK807QZ4gEbNChyUYkiHWKS+u2I4svAfqrFMNl4wY8mlmeEBL/dfjQ== X-Received: by 2002:a9d:7dd5:0:b0:6eb:e0a2:bbb4 with SMTP id k21-20020a9d7dd5000000b006ebe0a2bbb4mr2938580otn.16.1714481746548; Tue, 30 Apr 2024 05:55:46 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:45 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:33 +0000 Subject: [PATCH 1/4] media: bcm2835-unicam: Fix build with !PM Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-1-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 The driver can only match the device vide the DT table, so the table should always be used, of_match_ptr does not make sense here. Fixes: drivers/media/platform/broadcom/bcm2835-unicam.c:2724:34: warning: ‘unicam_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index bd2bbb53070e..c590e26fe2cf 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2733,7 +2733,7 @@ static struct platform_driver unicam_driver = { .driver = { .name = UNICAM_MODULE_NAME, .pm = pm_ptr(&unicam_pm_ops), - .of_match_table = of_match_ptr(unicam_of_match), + .of_match_table = unicam_of_match, }, }; From patchwork Tue Apr 30 12:55:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 793945 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65654171E4F for ; Tue, 30 Apr 2024 12:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481752; cv=none; b=Q3bAp832XKtGrDU61UY46TW96C/58ApY+fSZRYJwQAyEIPZgw63NPvMdgw5Uba8CXzM3KYrAK+BFd7n/DGLEmx2kFfP2Z0KlPAnKDmmgpHEiO74IhBANgCQrWXL23OzSLZ6KR3u/EA/FzfLS72rz+lbFfnJu9ii7bbA9PB6MzK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481752; c=relaxed/simple; bh=fECPpxQCPx5VlV9ywdoFmxEqDVmv+UQlkwXRIu9kjcE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VTMRBZzQ2LuKvbvPBJTkL/cmhX0UEm2gGjXs7IlPikQVkO6+0vGm00KcN8AeSL2nDe0AaS0nWkUPcD074wDcyxj8duziA4V2p5kE1GjW+bzpsPd1u4Rvc0iCOpoyNqXC9i8kbCh9wVaiZYO4lVIRUSPHA69HE5TB6a/3RyKSskg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=L4d5hDGW; arc=none smtp.client-ip=209.85.222.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="L4d5hDGW" Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-78f05afc8d6so427973485a.3 for ; Tue, 30 Apr 2024 05:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481748; x=1715086548; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/vGWU+yuHMlxGeQ2v0UxRXrwFtugXz7htO5Olbld0OY=; b=L4d5hDGW//a5z9Kf2K6U9z3nrC2F3PyPIABO8Vzv74hD9mWGnL44Da4hx30Y6K5/mG U2257tYst1pSmvXL7DY7P7vBIwMimm9UDhr3Iy2P1q6WsyxvcwbXzfiYys0MxJiRMO0M aMB9A/iD3cH5WB25FYrNRqi0Kd+xmw3o+i9kI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481748; x=1715086548; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/vGWU+yuHMlxGeQ2v0UxRXrwFtugXz7htO5Olbld0OY=; b=gLuTQz3pAIG2r2JjK+nj2ymyFhd57ZFiACy1TG1BOwUlco8eschm2gYZN79jVEcsM6 HgOLKLMQ9g1klAUCPxAJmqJ0znbcSdCADimK7Z8FPxZCx4ZHsMDnNqAunq9MoPzbeGi3 eFuGZps+JbRLSFj1YrZMUU0SY8QoWOLSdbknQqtXEjyhim2r86LiX5vBIHt33LO0+Rff T+RPolz+KQZTCv1FlbasEly85E+Afevwzrrb5eEnioJ+6CB4bk0W2zaN0hk0CzJuE5H9 wgxc4G4OGdQ/KXPqeLrhZv1x6iB234t0IMpzSXuvngTLY4mMYpAWYxgk/ECyEE/bcScI j+zg== X-Gm-Message-State: AOJu0Yx1j8smwwRdYvmKFtggSTtvvQGQ4lDV5waLwAPM5Ii1Khk/8SoE YinE3fWqcxig2gMEcbbwBjhWsRDmY697bty3KFz5yq4MUTgoDg8BIa7qwfcNtQ== X-Google-Smtp-Source: AGHT+IHmc9EduiMj1OpTnvSkXwddOA0ZCHmY0W5Zlq6AnSEMhPm3qZQyuicCrl7kaS0cmeF1jbBCsg== X-Received: by 2002:a05:620a:57d7:b0:78d:68fa:6e41 with SMTP id wl23-20020a05620a57d700b0078d68fa6e41mr15004216qkn.64.1714481748273; Tue, 30 Apr 2024 05:55:48 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:47 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:34 +0000 Subject: [PATCH 2/4] media: intel/ipu6: Switch to RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-2-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 Replace the old helpers with its modern alternative. Now we do not need to set '__maybe_unused' annotations when we are not enabling the PM configurations. Fixes: drivers/media/pci/intel/ipu6/ipu6.c:841:12: warning: ‘ipu6_runtime_resume’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu6/ipu6.c:806:12: warning: ‘ipu6_resume’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu6/ipu6.c:801:12: warning: ‘ipu6_suspend’ defined but not used [-Wunused-function] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu6/ipu6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index 4b1f69d14d71..ff5ca0c52781 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -803,7 +803,7 @@ static int ipu6_suspend(struct device *dev) return 0; } -static int ipu6_resume(struct device *dev) +static int __maybe_unused ipu6_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct ipu6_device *isp = pci_get_drvdata(pdev); @@ -860,8 +860,8 @@ static int ipu6_runtime_resume(struct device *dev) } static const struct dev_pm_ops ipu6_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(&ipu6_suspend, &ipu6_resume) - SET_RUNTIME_PM_OPS(&ipu6_suspend, &ipu6_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(&ipu6_suspend, &ipu6_resume) + RUNTIME_PM_OPS(&ipu6_suspend, &ipu6_runtime_resume, NULL) }; MODULE_DEVICE_TABLE(pci, ipu6_pci_tbl); From patchwork Tue Apr 30 12:55:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 793559 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63930171E68 for ; Tue, 30 Apr 2024 12:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481751; cv=none; b=UlA/lNRdohkZJb9+awn5LNSnG6OjapQ+H97Z04BZjFrMTXZNdafxg0pAW8d/VVe2uox9TYBeazLIB0VvMZwhpBKGTl7Q6xPHrgsK+Xt9K19I6lBkQ9KBOVVUde9u2vhE3Y1MlB1r6dsjUNYH3l/LYecgadUuu35E1tqN/OAUVC0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481751; c=relaxed/simple; bh=xV1K4KLPnklnDF7lOie2R6AQ5cvRhbfpv/8EnvxSB74=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IAwIwU1sECQOus9XybXOofewFAx6aLdA9DnHpz5CR8fGahZTY4B+Z7jmShqkABcNwZBFOH8GjP8ZHGU7c3YzafqiXutA2/eQ8qMlJEMLCQPEctq9YjrxF0di4UPQRAsNTaNkNUyxE4tnNJxQ8HTi3GuhY+2SngCqwxGkLTIzEv4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=KdBCq68q; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KdBCq68q" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-78f02298dc6so477635285a.1 for ; Tue, 30 Apr 2024 05:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481749; x=1715086549; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/GcAbiNwsFkaasnu7HjDiQ9YZzAJwofieKdp6b+SC5I=; b=KdBCq68qghDeddcHy9merFA2tKDmVR5kcetHWX+YIP9xGutiSSmBcEsFwdD+SLZyTe nz5NYdloKrNOwHaP3uJVAr72LY5nhi50lrCBm7EgJRWvev7sJXBxvInIUW9GLi0AO7Mp 4dFMJ8oqmmxNWCG6ZZBd5hmcMn+JPjkyG1VA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481749; x=1715086549; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/GcAbiNwsFkaasnu7HjDiQ9YZzAJwofieKdp6b+SC5I=; b=b0ujowMszN1CmQ8vyRxbKci9F0pyovpY47mR6Gk/pGWKASo5QTKcbxN/jgDYuIQBTV xiuqdcjN8QukTUiz/mnwfXAd5Q6oibC/SW6ANmY7GLVfekBSOPw0uY1yoblBzzNMft+9 E+FQMTpXQXigU4j+GyvBtUdK+2PYcq+4oBVGBPiFDrC1IQ43jtd+KPLxlOCDkSFEM7Pm QauLb7YOq+SmXHh8FHle1IrmH1fWSePAKC1bJa2weanMmxEqgI8BLRbq3r/1kUEvW4zV ZttIfRf/CEdEgdlMwTZg/mXfkNNXzbYgrMCaYLOBYiocfD9R8ZmraXOyGd05nhBKA7P6 lNJA== X-Gm-Message-State: AOJu0Ywd8IJnYkKkuEcRWNsQFL8x3towBINJuyoh4CVGCuxMfWLrzjdZ GhISfe2xGAlngIFLd6n8WDAalk/ZZSX3g7iYM+KBZ70mxeSTGjVwsOWco7Aglw== X-Google-Smtp-Source: AGHT+IHNUD/YiHktyxC/S/O2UQl0N67mb9RwGDBuz8dW13b6LjI/xcWOtt6224r6GWtpcizS5VcWeQ== X-Received: by 2002:a05:620a:40c1:b0:790:77d4:5e7a with SMTP id g1-20020a05620a40c100b0079077d45e7amr4364674qko.20.1714481749374; Tue, 30 Apr 2024 05:55:49 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:48 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:35 +0000 Subject: [PATCH 3/4] media: intel/ipu6: Fix direct dependency Kconfig error Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-3-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 VIDEO_INTEL_IPU6 selects IPU6_BRIDGE, but they have different set of dependencies. Fixes: WARNING: unmet direct dependencies detected for IPU_BRIDGE Depends on [n]: MEDIA_SUPPORT [=y] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && I2C [=y] && ACPI [=n] Selected by [y]: - VIDEO_INTEL_IPU6 [=y] && MEDIA_SUPPORT [=y] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=n] || COMPILE_TEST [=y]) && VIDEO_DEV [=y] && X86 [=y] && X86_64 [=y] && HAS_DMA [=y] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig index 04cb3d253486..d9fcddce028b 100644 --- a/drivers/media/pci/intel/Kconfig +++ b/drivers/media/pci/intel/Kconfig @@ -6,7 +6,8 @@ source "drivers/media/pci/intel/ivsc/Kconfig" config IPU_BRIDGE tristate "Intel IPU Bridge" - depends on I2C && ACPI + depends on ACPI || COMPILE_TEST + depends on I2C help The IPU bridge is a helper library for Intel IPU drivers to function on systems shipped with Windows. From patchwork Tue Apr 30 12:55:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 793558 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5761E172763 for ; Tue, 30 Apr 2024 12:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481753; cv=none; b=Ksu5Y4Eq5yML5fEWbg7iFp+2wUg8BjQItZx8ogfBcFLP5QO6MpqLEiu76PuF/XXDxqanUzBfLkGoMvIR8NubjdR/9gU9Pq7R4wFSrd/U6TPUOpVXunaOnCxzaOY+5KsY7KszYYjuXnCNFFx164Zi2Vk41Nwihxji5Ht5+qaFsJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481753; c=relaxed/simple; bh=Im0i0nSeZTVU1ukqye2O2p/hIKmI9wUUQGfLF9dIgdI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bLN8w0Qv2pGbsTiem/Pcp9mevvgfA+qIajUhSobauO5jlvFQprS2mR+ddDt6qzABaDlyLaNTxlFSBFiA4OEHBnb+oRk5ZutQUWzhKp4J6GzIA0jvk0v9iFZMszxrWlpcCLt3Pl8cvYXUwLo5uyU+PKo0UN4R9WsIvRtFQKd4aCk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ZO2BY4xL; arc=none smtp.client-ip=209.85.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ZO2BY4xL" Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6eb86b69e65so3378785a34.3 for ; Tue, 30 Apr 2024 05:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714481750; x=1715086550; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=W3aDGh51WrAJ8PgiOFsXpuERP1GOnupX3ZgEurXatu8=; b=ZO2BY4xLX64F0HVKthqggR/ATljB/BjPLhoKhd9b6K5WJb6WkQdipGG8mf6cW4MXaV dTY4PiedgcXCmdNyTXcCdE96dlgeHj5zauIyNVIgbeIjX2xE9tWM74/U4fu6l9A0zn/J OtrMVbgubNt/5uCK2wAaovBy9srvRNj5sQNWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714481750; x=1715086550; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W3aDGh51WrAJ8PgiOFsXpuERP1GOnupX3ZgEurXatu8=; b=k1BqMcr0dFx8qqouCFiefIpqzXnpOvsCiE+gMQoob3CJCFRICBSVEnQBrukl9i3/uc /wpz6WM4GkQlKLzsnpV4HY1T7eo4tNwR17bBzddX0tHPM5qUt1o7NC/OicFI7Xg6gwh5 x/PYlINKPzGzvaguyr4Kz/49kCvT5toArGu4/77zl8FEvqhCg4z9q4e6mnfEbc4uooYx qu78npKXyZIAANUymzHErEH8l4txP+pbjN422XYoq+sWnHMoWxGKoldXlSW7h/a2/OV+ +5ph8S9csg8b54RgVQqzg4zjUsSbmCOAL8p3S3b5vMOWvqTpJAXPeizPuRDY73nz3Qhj JTLA== X-Gm-Message-State: AOJu0Yz7egGMxo+opbDTYvZE+hz24KK3teehDPZD0uwS0hBXKg8Wq6/s XqZTg4Aj3bRUi13EbCbGuR6bB7KO0LBrAKZZ8FnfuLZ2LJVC+7av+s1M2omqmA== X-Google-Smtp-Source: AGHT+IE8F+k3g5uPOihti5THP9s3MwDIIlO9hpY6CvqxL5rmWFHHurCg96j6xwnb0ZfdYm2sA2WP/g== X-Received: by 2002:a9d:6e0f:0:b0:6ee:3720:aaec with SMTP id e15-20020a9d6e0f000000b006ee3720aaecmr8448773otr.16.1714481750570; Tue, 30 Apr 2024 05:55:50 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id o16-20020a05620a111000b00790f90ffc32sm1553667qkk.22.2024.04.30.05.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:55:49 -0700 (PDT) From: Ricardo Ribalda Date: Tue, 30 Apr 2024 12:55:36 +0000 Subject: [PATCH 4/4] media: intel/ipu6: Fix build with !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240430-fix-ipu6-v1-4-9b31fbbce6e4@chromium.org> References: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> In-Reply-To: <20240430-fix-ipu6-v1-0-9b31fbbce6e4@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 Modify the code so it can be compiled tested in configurations that do not have ACPI enabled. Fixes: drivers/media/pci/intel/ipu-bridge.c:103:30: error: implicit declaration of function ‘acpi_device_handle’; did you mean ‘acpi_fwnode_handle’? [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:103:30: warning: initialization of ‘acpi_handle’ {aka ‘void *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] drivers/media/pci/intel/ipu-bridge.c:110:17: error: implicit declaration of function ‘for_each_acpi_dev_match’ [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:110:74: error: expected ‘;’ before ‘for_each_acpi_consumer_dev’ drivers/media/pci/intel/ipu-bridge.c:104:29: warning: unused variable ‘consumer’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:103:21: warning: unused variable ‘handle’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:166:38: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:185:43: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:191:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:196:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:202:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:223:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:236:18: error: implicit declaration of function ‘acpi_get_physical_device_location’ [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:236:56: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:238:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:256:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:275:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:280:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:469:26: error: implicit declaration of function ‘acpi_device_hid’; did you mean ‘dmi_device_id’? [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:468:74: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=] drivers/media/pci/intel/ipu-bridge.c:637:58: error: expected ‘;’ before ‘{’ token drivers/media/pci/intel/ipu-bridge.c:696:1: warning: label ‘err_put_adev’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:693:1: warning: label ‘err_put_ivsc’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:691:1: warning: label ‘err_free_swnodes’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:632:40: warning: unused variable ‘primary’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:632:31: warning: unused variable ‘fwnode’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:733:73: error: expected ‘;’ before ‘{’ token drivers/media/pci/intel/ipu-bridge.c:725:24: warning: unused variable ‘csi_dev’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:724:43: warning: unused variable ‘adev’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:599:12: warning: ‘ipu_bridge_instantiate_ivsc’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:444:13: warning: ‘ipu_bridge_create_connection_swnodes’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:297:13: warning: ‘ipu_bridge_create_fwnode_properties’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:155:12: warning: ‘ipu_bridge_check_ivsc_dev’ defined but not used [-Wunused-function] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu-bridge.c | 66 +++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index e994db4f4d91..61750cc98d70 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -15,6 +15,8 @@ #include #include +#define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev)) + /* * 92335fcf-3203-4472-af93-7b4453ac29da * @@ -87,6 +89,7 @@ static const char * const ipu_vcm_types[] = { "lc898212axb", }; +#if IS_ENABLED(CONFIG_ACPI) /* * Used to figure out IVSC acpi device by ipu_bridge_get_ivsc_acpi_dev() * instead of device and driver match to probe IVSC device. @@ -100,13 +103,13 @@ static const struct acpi_device_id ivsc_acpi_ids[] = { static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) { - acpi_handle handle = acpi_device_handle(adev); - struct acpi_device *consumer, *ivsc_adev; unsigned int i; for (i = 0; i < ARRAY_SIZE(ivsc_acpi_ids); i++) { const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i]; + struct acpi_device *consumer, *ivsc_adev; + acpi_handle handle = acpi_device_handle(adev); for_each_acpi_dev_match(ivsc_adev, acpi_id->id, NULL, -1) /* camera sensor depends on IVSC in DSDT if exist */ for_each_acpi_consumer_dev(ivsc_adev, consumer) @@ -118,6 +121,12 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev return NULL; } +#else +static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) +{ + return NULL; +} +#endif static int ipu_bridge_match_ivsc_dev(struct device *dev, const void *adev) { @@ -163,7 +172,7 @@ static int ipu_bridge_check_ivsc_dev(struct ipu_sensor *sensor, csi_dev = ipu_bridge_get_ivsc_csi_dev(adev); if (!csi_dev) { acpi_dev_put(adev); - dev_err(&adev->dev, "Failed to find MEI CSI dev\n"); + dev_err(ADEV_DEV(adev), "Failed to find MEI CSI dev\n"); return -ENODEV; } @@ -182,24 +191,25 @@ static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id, acpi_status status; int ret = 0; - status = acpi_evaluate_object(adev->handle, id, NULL, &buffer); + status = acpi_evaluate_object(ACPI_PTR(adev->handle), + id, NULL, &buffer); if (ACPI_FAILURE(status)) return -ENODEV; obj = buffer.pointer; if (!obj) { - dev_err(&adev->dev, "Couldn't locate ACPI buffer\n"); + dev_err(ADEV_DEV(adev), "Couldn't locate ACPI buffer\n"); return -ENODEV; } if (obj->type != ACPI_TYPE_BUFFER) { - dev_err(&adev->dev, "Not an ACPI buffer\n"); + dev_err(ADEV_DEV(adev), "Not an ACPI buffer\n"); ret = -ENODEV; goto out_free_buff; } if (obj->buffer.length > size) { - dev_err(&adev->dev, "Given buffer is too small\n"); + dev_err(ADEV_DEV(adev), "Given buffer is too small\n"); ret = -EINVAL; goto out_free_buff; } @@ -220,7 +230,7 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, case IPU_SENSOR_ROTATION_INVERTED: return 180; default: - dev_warn(&adev->dev, + dev_warn(ADEV_DEV(adev), "Unknown rotation %d. Assume 0 degree rotation\n", ssdb->degree); return 0; @@ -230,12 +240,14 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev) { enum v4l2_fwnode_orientation orientation; - struct acpi_pld_info *pld; - acpi_status status; + struct acpi_pld_info *pld = NULL; + acpi_status status = AE_ERROR; +#if IS_ENABLED(CONFIG_ACPI) status = acpi_get_physical_device_location(adev->handle, &pld); +#endif if (ACPI_FAILURE(status)) { - dev_warn(&adev->dev, "_PLD call failed, using default orientation\n"); + dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; } @@ -253,7 +265,8 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; break; default: - dev_warn(&adev->dev, "Unknown _PLD panel val %d\n", pld->panel); + dev_warn(ADEV_DEV(adev), "Unknown _PLD panel val %d\n", + pld->panel); orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; break; } @@ -272,12 +285,12 @@ int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor) return ret; if (ssdb.vcmtype > ARRAY_SIZE(ipu_vcm_types)) { - dev_warn(&adev->dev, "Unknown VCM type %d\n", ssdb.vcmtype); + dev_warn(ADEV_DEV(adev), "Unknown VCM type %d\n", ssdb.vcmtype); ssdb.vcmtype = 0; } if (ssdb.lanes > IPU_MAX_LANES) { - dev_err(&adev->dev, "Number of lanes in SSDB is invalid\n"); + dev_err(ADEV_DEV(adev), "Number of lanes in SSDB is invalid\n"); return -EINVAL; } @@ -465,8 +478,14 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, sensor->ipu_properties); if (sensor->csi_dev) { + const char *device_hid = ""; + +#if IS_ENABLED(CONFIG_ACPI) + device_hid = acpi_device_hid(sensor->ivsc_adev); +#endif + snprintf(sensor->ivsc_name, sizeof(sensor->ivsc_name), "%s-%u", - acpi_device_hid(sensor->ivsc_adev), sensor->link); + device_hid, sensor->link); nodes[SWNODE_IVSC_HID] = NODE_SENSOR(sensor->ivsc_name, sensor->ivsc_properties); @@ -631,11 +650,15 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, { struct fwnode_handle *fwnode, *primary; struct ipu_sensor *sensor; - struct acpi_device *adev; + struct acpi_device *adev = NULL; int ret; +#if IS_ENABLED(CONFIG_ACPI) for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) { - if (!adev->status.enabled) +#else + while (true) { +#endif + if (!ACPI_PTR(adev->status.enabled)) continue; if (bridge->n_sensors >= IPU_MAX_PORTS) { @@ -671,7 +694,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, goto err_free_swnodes; } - sensor->adev = acpi_dev_get(adev); + sensor->adev = ACPI_PTR(acpi_dev_get(adev)); primary = acpi_fwnode_handle(adev); primary->secondary = fwnode; @@ -727,11 +750,16 @@ static int ipu_bridge_ivsc_is_ready(void) unsigned int i; for (i = 0; i < ARRAY_SIZE(ipu_supported_sensors); i++) { +#if IS_ENABLED(CONFIG_ACPI) const struct ipu_sensor_config *cfg = &ipu_supported_sensors[i]; for_each_acpi_dev_match(sensor_adev, cfg->hid, NULL, -1) { - if (!sensor_adev->status.enabled) +#else + while (true) { + sensor_adev = NULL; +#endif + if (!ACPI_PTR(sensor_adev->status.enabled)) continue; adev = ipu_bridge_get_ivsc_acpi_dev(sensor_adev);