From patchwork Wed Oct 19 08:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 13011485 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 851B3C4332F for ; Wed, 19 Oct 2022 08:54:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D4AE10F1A6; Wed, 19 Oct 2022 08:54:07 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09CC610F1A7 for ; Wed, 19 Oct 2022 08:54:00 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1E83BB82398; Wed, 19 Oct 2022 08:53:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 681ADC433C1; Wed, 19 Oct 2022 08:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169637; bh=0n3wCM2FLB57ac0bicBovbICBhHb3K3wk0u9suBfZPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=asJX0QaTJV8qDwBShXtiIXXHST2Qybn+sceGuRkw6+BW9Ed6TMkB6Bemzm2WfmJ/u G1c2WwoHEUg/WUpDrK2fkWWT92B+zagQucJAkc9sJEeeNJao1WQL2qk/IJc/E6lwmY A3UQv3oyYv3nugP2SEBSCQl8dlcrIULq37teh2fQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Subject: [PATCH 6.0 352/862] video/aperture: Disable and unregister sysfb devices via aperture helpers Date: Wed, 19 Oct 2022 10:27:19 +0200 Message-Id: <20221019083305.595661084@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 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: , Cc: dri-devel@lists.freedesktop.org, Sasha Levin , Greg Kroah-Hartman , Helge Deller , Zhen Lei , Javier Martinez Canillas , stable@vger.kernel.org, Changcheng Deng , Thomas Zimmermann , Daniel Vetter , Alex Deucher , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thomas Zimmermann [ Upstream commit 5e01376124309b4dbd30d413f43c0d9c2f60edea ] Call sysfb_disable() before removing conflicting devices in aperture helpers. Fixes sysfb state if fbdev has been disabled. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Fixes: fb84efa28a48 ("drm/aperture: Run fbdev removal before internal helpers") Cc: Zack Rusin Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Daniel Vetter Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Helge Deller Cc: Alex Deucher Cc: Zhen Lei Cc: Changcheng Deng Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20220718072322.8927-8-tzimmermann@suse.de Signed-off-by: Sasha Levin --- drivers/video/aperture.c | 14 ++++++++++++++ drivers/video/fbdev/core/fbmem.c | 12 ------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index 538f2d40acda..d245826a9324 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -286,7 +287,20 @@ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t si #if IS_REACHABLE(CONFIG_FB) struct apertures_struct *a; int ret; +#endif + + /* + * If a driver asked to unregister a platform device registered by + * sysfb, then can be assumed that this is a driver for a display + * that is set up by the system firmware and has a generic driver. + * + * Drivers for devices that don't have a generic driver will never + * ask for this, so let's assume that a real driver for the display + * was already probed and prevent sysfb to register devices later. + */ + sysfb_disable(); +#if IS_REACHABLE(CONFIG_FB) a = alloc_apertures(1); if (!a) return -ENOMEM; diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 02b0cf2cfafe..bda4d304feb6 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -1777,17 +1776,6 @@ int remove_conflicting_framebuffers(struct apertures_struct *a, do_free = true; } - /* - * If a driver asked to unregister a platform device registered by - * sysfb, then can be assumed that this is a driver for a display - * that is set up by the system firmware and has a generic driver. - * - * Drivers for devices that don't have a generic driver will never - * ask for this, so let's assume that a real driver for the display - * was already probed and prevent sysfb to register devices later. - */ - sysfb_disable(); - mutex_lock(®istration_lock); do_remove_conflicting_framebuffers(a, name, primary); mutex_unlock(®istration_lock); From patchwork Wed Oct 19 08:27:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 13011486 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 0C2A3C433FE for ; Wed, 19 Oct 2022 08:55:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C5C710F1A7; Wed, 19 Oct 2022 08:55:05 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA11810F1A7 for ; Wed, 19 Oct 2022 08:54:58 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 618766174E; Wed, 19 Oct 2022 08:54:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ABABC433C1; Wed, 19 Oct 2022 08:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169697; bh=UX8Cs3Mm3tSWVe+7/xzWvQqmQ5T7ga5ab7VqL2bSUis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gZ+QEZ/WHmbDj7KqZuweukyTD7UpC2dFb+nNYVa6LQX603ui4qpZ31QH15cNiDc/u 8ZlrvJczBqnL/tB8P6tGk8ZM+Ld8l+jv4T1ZJlWRt12M7CszelIA+CMgLFr8SDulNA 9eedJ0yGIcmWHGhh9B1F9UTe0kLnFKw3elxHOOw8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Subject: [PATCH 6.0 373/862] drm/panel: use select for Ili9341 panel driver helpers Date: Wed, 19 Oct 2022 10:27:40 +0200 Message-Id: <20221019083306.471257645@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 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: , Cc: Sasha Levin , David Airlie , Greg Kroah-Hartman , Randy Dunlap , Dillon Min , stable@vger.kernel.org, =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Thierry Reding , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Randy Dunlap [ Upstream commit 84dfc46594b0167e5d3736273b0e0e05365da641 ] Use 'select' instead of 'depends on' for DRM helpers for the Ilitek ILI9341 panel driver. This is what is done in the vast majority of other cases and this makes it possible to fix a build error with drm_mipi_dbi. Fixes: 5a04227326b0 ("drm/panel: Add ilitek ili9341 panel driver") Signed-off-by: Randy Dunlap Cc: Dillon Min Cc: Linus Walleij Cc: Sam Ravnborg Cc: Noralf Trønnes Cc: Thomas Zimmermann Cc: Thierry Reding Cc: dri-devel@lists.freedesktop.org Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220823004227.10820-1-rdunlap@infradead.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index a9043eacce97..a582ddd583c2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -165,8 +165,8 @@ config DRM_PANEL_ILITEK_IL9322 config DRM_PANEL_ILITEK_ILI9341 tristate "Ilitek ILI9341 240x320 QVGA panels" depends on OF && SPI - depends on DRM_KMS_HELPER - depends on DRM_GEM_CMA_HELPER + select DRM_KMS_HELPER + select DRM_GEM_DMA_HELPER depends on BACKLIGHT_CLASS_DEVICE select DRM_MIPI_DBI help From patchwork Wed Oct 19 08:27:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 13011491 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 A11C8C4332F for ; Wed, 19 Oct 2022 08:56:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C884F10F1A9; Wed, 19 Oct 2022 08:56:56 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C7A210F1A9 for ; Wed, 19 Oct 2022 08:56:49 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7BFF66187C; Wed, 19 Oct 2022 08:56:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C63C7C433C1; Wed, 19 Oct 2022 08:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169808; bh=nm6Fk68lTXLToM7w7rO0akGlkXWx4flW07EYl2/lIzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1IL9dqqiM9wCKopoehh9+4J8UF0ofA0Eg1wwR08q/TOLxzIKwjhqBbS5zPoxBXPZU qazA73ea6TW0aXyl+qRVofoKEiadnDeO19o7oU9RxyGGsFALignDTYwEoxt11EeAwZ lgJEL7mJaYUuU7RQVRcG7OnWHcY2tjHxRx/3A+Lg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Subject: [PATCH 6.0 374/862] drm: fix drm_mipi_dbi build errors Date: Wed, 19 Oct 2022 10:27:41 +0200 Message-Id: <20221019083306.505648663@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 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: , Cc: Sasha Levin , kernel test robot , Sam Ravnborg , David Airlie , Greg Kroah-Hartman , Randy Dunlap , stable@vger.kernel.org, =?utf-8?q?Nor?= =?utf-8?q?alf_Tr=C3=B8nnes?= , Thierry Reding , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Dillon Min Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Randy Dunlap [ Upstream commit eb7de496451bd969e203f02f66585131228ba4ae ] drm_mipi_dbi needs lots of DRM_KMS_HELPER support, so select that Kconfig symbol like it is done is most other uses, and the way that it was before MIPS_DBI was moved from tinydrm to its core location. Fixes these build errors: ld: drivers/gpu/drm/drm_mipi_dbi.o: in function `mipi_dbi_buf_copy': drivers/gpu/drm/drm_mipi_dbi.c:205: undefined reference to `drm_gem_fb_get_obj' ld: drivers/gpu/drm/drm_mipi_dbi.c:211: undefined reference to `drm_gem_fb_begin_cpu_access' ld: drivers/gpu/drm/drm_mipi_dbi.c:215: undefined reference to `drm_gem_fb_vmap' ld: drivers/gpu/drm/drm_mipi_dbi.c:222: undefined reference to `drm_fb_swab' ld: drivers/gpu/drm/drm_mipi_dbi.c:224: undefined reference to `drm_fb_memcpy' ld: drivers/gpu/drm/drm_mipi_dbi.c:227: undefined reference to `drm_fb_xrgb8888_to_rgb565' ld: drivers/gpu/drm/drm_mipi_dbi.c:235: undefined reference to `drm_gem_fb_vunmap' ld: drivers/gpu/drm/drm_mipi_dbi.c:237: undefined reference to `drm_gem_fb_end_cpu_access' ld: drivers/gpu/drm/drm_mipi_dbi.o: in function `mipi_dbi_dev_init_with_formats': ld: drivers/gpu/drm/drm_mipi_dbi.o:/X64/../drivers/gpu/drm/drm_mipi_dbi.c:469: undefined reference to `drm_gem_fb_create_with_dirty' Fixes: 174102f4de23 ("drm/tinydrm: Move mipi-dbi") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Dillon Min Cc: Linus Walleij Cc: Sam Ravnborg Cc: Noralf Trønnes Cc: Thomas Zimmermann Cc: Thierry Reding Cc: dri-devel@lists.freedesktop.org Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20220823004243.11596-1-rdunlap@infradead.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 6c2256e8474b..679ad054ea4b 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -31,6 +31,7 @@ menuconfig DRM config DRM_MIPI_DBI tristate depends on DRM + select DRM_KMS_HELPER config DRM_MIPI_DSI bool