From patchwork Mon Mar 4 09:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13580210 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B92FAC54E41 for ; Mon, 4 Mar 2024 09:08:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D527710F92D; Mon, 4 Mar 2024 09:08:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="YwNgXp06"; dkim-atps=neutral Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A04610F854 for ; Mon, 4 Mar 2024 09:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709543296; bh=QPXsIbRatBSX4gi8djpHjmQR2L68eVQyR8dNMMXdxx0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YwNgXp06wXMbjM9K5VXqvsItUUkAbl9nK42Z6vhVfgXEQmi9HtbdJg4ePYphOyiI+ sI9NtCHd8xVpDjAFlUZlsTC3I/7G7LZdSpsFAB3joapqWEBL6mNpuN52P3Yl+PA9r+ njjXNF3mdIVOioiO2f9A4HnssJni8Q1/CewQ+9CgQSTbm6JisRqLqhDXyZgR/rizA4 ismOCu757x3Gr1wZK6zpeD38CpOs0NjC0SoNwLawaQR2wG1k++QYyn7Qgn0Hvkhwy0 930qIfXcVdS941VZm/48gxDqUo90gZNZaiOx4yGNYHbS7LOapODLYcGnbnbdKuMc5y y/KUlltve0nCg== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madrid.collaboradmins.com (Postfix) with ESMTPSA id ADAC83782076; Mon, 4 Mar 2024 09:08:15 +0000 (UTC) From: Boris Brezillon To: Boris Brezillon , Steven Price , Liviu Dudau Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com, kernel test robot Subject: [PATCH 1/3] drm/panthor: Fix panthor_devfreq kerneldoc Date: Mon, 4 Mar 2024 10:08:10 +0100 Message-ID: <20240304090812.3941084-2-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304090812.3941084-1-boris.brezillon@collabora.com> References: <20240304090812.3941084-1-boris.brezillon@collabora.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Missing '*' to have a valid kerneldoc prefix. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403031019.6jvrOqGT-lkp@intel.com/ Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/panthor_devfreq.c b/drivers/gpu/drm/panthor/panthor_devfreq.c index 7ac4fa290f27..c6d3c327cc24 100644 --- a/drivers/gpu/drm/panthor/panthor_devfreq.c +++ b/drivers/gpu/drm/panthor/panthor_devfreq.c @@ -34,7 +34,7 @@ struct panthor_devfreq { /** @last_busy_state: True if the GPU was busy last time we updated the state. */ bool last_busy_state; - /* + /** * @lock: Lock used to protect busy_time, idle_time, time_last_update and * last_busy_state. * From patchwork Mon Mar 4 09:08:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13580212 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A02DDC54E41 for ; Mon, 4 Mar 2024 09:08:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4DC710F854; Mon, 4 Mar 2024 09:08:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="gkuDDwLW"; dkim-atps=neutral Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 046CC10F81D for ; Mon, 4 Mar 2024 09:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709543296; bh=mdkjyKSCATVVY9J+XIO2JOeVw2i5dFVKvoUzHKs3xHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gkuDDwLWlOaxLlrFN6sAGpFaLFhs4jew/dLXR2SsV0AP0RMTSINz/JOBqvE8GZiXb A1oJgBd7MtVH0BnAtl8mTC2M9HUqNBXPEqTg6xLj98zv4m9XIszuwvb0kd1gyqTo49 D8o/ORLVtuKbCLvLsmQ/1E8S4spyW21uOB3RIKM4NaFYsSu1hYcPx/kZ0Z5dBxCJkT 5OWil9Z5zitJqv7eo0M8cjhBa94vX2wOYizUxDa9H3mPNm+pCpQROSTZ99LF+AHQrt dCxgyowaYvWa7UXxDa+IP1PVovXr6N5xlCBkarS3eVOsKEpZkgn7uSWlUW5KymHNZJ YxX9a1Z7TuGhQ== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5D61E3782091; Mon, 4 Mar 2024 09:08:16 +0000 (UTC) From: Boris Brezillon To: Boris Brezillon , Steven Price , Liviu Dudau Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com, kernel test robot Subject: [PATCH 2/3] drm/panthor: Explicitly include page.h for the {virt, __phys)_to_pfn() defs Date: Mon, 4 Mar 2024 10:08:11 +0100 Message-ID: <20240304090812.3941084-3-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304090812.3941084-1-boris.brezillon@collabora.com> References: <20240304090812.3941084-1-boris.brezillon@collabora.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Something on arm[64] must be including , but things fail to compile on sparc64. Make sure this header is included explicitly so this driver can be compile-tested on all supported architectures. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/ Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index bfe8da4a6e4c..68e467ee458a 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -3,6 +3,8 @@ /* Copyright 2019 Linaro, Ltd, Rob Herring */ /* Copyright 2023 Collabora ltd. */ +#include + #include #include #include From patchwork Mon Mar 4 09:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13580211 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DAA6AC48BF6 for ; Mon, 4 Mar 2024 09:08:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DEE4410F9B9; Mon, 4 Mar 2024 09:08:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="PKyJblPT"; dkim-atps=neutral Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id B222110F854 for ; Mon, 4 Mar 2024 09:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709543297; bh=JF7pYoYuekm/+xrcimq5rjyT6LvJu2tYAR7CeQRBj/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PKyJblPT3ykrcaedcDmzO+QGYvyZMPKsyLu/4ODEEE8TvNDUpgnbLmvYjGhvVbzDL JIpE8wr6+oCDr1xnsqcDAck9ngkqnK8QxHXqBWDXWQT04XNaP6yGU7/2NRV6pwA8tQ MBVHQR7Dxd/RGCrbGUuuZcayFl5LDxDmUExFQLU32LAhEKceNu38NhiBEDrul9AOay LsE1gnIXMk+6DgYFkX3XjjYr4rDcoeoNjkwU8LmHSyn8CJLOIwJbGjgZ2nyOrhqoh8 DzgcPVOy53tNXCIFqPanASpCO9WtJKQC7iT0v2cbYQUVqcANVw3VgHDzp9QdrHKDqH c0NTsrjfjsFEQ== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 0ECBB37820C3; Mon, 4 Mar 2024 09:08:17 +0000 (UTC) From: Boris Brezillon To: Boris Brezillon , Steven Price , Liviu Dudau Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com, kernel test robot Subject: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue Date: Mon, 4 Mar 2024 10:08:12 +0100 Message-ID: <20240304090812.3941084-4-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304090812.3941084-1-boris.brezillon@collabora.com> References: <20240304090812.3941084-1-boris.brezillon@collabora.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" panthor_device_resume/suspend() are only compiled when CONFIG_PM is enabled but panthro_drv.c doesn't use the pm_ptr() macro to conditionally discard resume/suspend assignments, which causes undefined symbol errors at link time when !PM. We could fix that by using pm_ptr(), but supporting the !PM case makes little sense (the whole point of these embedded GPUs is to be low power, so proper PM is a basic requirement in that case). So let's just enforce the presence of CONFIG_PM with a Kconfig dependency instead. If someone needs to relax this dependency, it can be done in a follow-up. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403031944.EOimQ8WK-lkp@intel.com/ Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/Kconfig | 1 + drivers/gpu/drm/panthor/panthor_device.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/Kconfig b/drivers/gpu/drm/panthor/Kconfig index 55b40ad07f3b..fdce7c1b2310 100644 --- a/drivers/gpu/drm/panthor/Kconfig +++ b/drivers/gpu/drm/panthor/Kconfig @@ -6,6 +6,7 @@ config DRM_PANTHOR depends on ARM || ARM64 || COMPILE_TEST depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE depends on MMU + depends on PM select DEVFREQ_GOV_SIMPLE_ONDEMAND select DRM_EXEC select DRM_GEM_SHMEM_HELPER diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index 68e467ee458a..efea29143a54 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -403,7 +403,6 @@ int panthor_device_mmap_io(struct panthor_device *ptdev, struct vm_area_struct * return 0; } -#ifdef CONFIG_PM int panthor_device_resume(struct device *dev) { struct panthor_device *ptdev = dev_get_drvdata(dev); @@ -548,4 +547,3 @@ int panthor_device_suspend(struct device *dev) mutex_unlock(&ptdev->pm.mmio_lock); return ret; } -#endif