From patchwork Mon Mar 13 15:51:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172788 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 18E9EC6FD19 for ; Mon, 13 Mar 2023 15:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fFTi+pzVLZvvYO1OLNIlrW+AsXFmCEbHVK0oA9cz9js=; b=CULwATUxessJUG yLfD4kkmgDpS/4dDtExsVig8BcA537YA6xVvxUlFbDsF7V4CT8ulYtqI2vkrDWhNuplcJVyXWGQ8m VyyVvnGS1cPYvNp7T+8C3LVbqzxbQC/GJuWCfARVurJ+ExmeRQyXOhJdBQWH9a63dsQ7f/OwNvCJc QRdCORXNBaAXfyPVm1sl6i6iDHZLS1JrZAkrg5coJ06NVoB/P6npHcxiJjECPqmO07wjQmCBxpCjx AXgNcsAdUszdDrZC8FUU5lurs5lsYJPi+KrqEooHjhz+yuOsDPBXpMOFLThloBaQ+skQYsCDcA/HQ 3zla1eX33YSb9LzBTlpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkVr-006XDl-Kd; Mon, 13 Mar 2023 15:55:03 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VN9-FA; Mon, 13 Mar 2023 15:51:53 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7039D1FE0F; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p532xRUWBiuDPUEGC7aXFLCPvj+NzD7g9LrLjnd2wgk=; b=TsvXNvChis9ecdXD1hwWq2ixLiX6YoTEMYT66wBPiudp+1SyGYgDUv9Py7TVc7logtfiex qEcmKxRQ+kwetnp6PfBWrbUrDyYyS7lJpSH9DFzSfegFVNIYSENca6fbZcUV4rn1GfLUml c3LT/wEAi/JiVhgmzlvj544PoeqH+No= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p532xRUWBiuDPUEGC7aXFLCPvj+NzD7g9LrLjnd2wgk=; b=6GRfMy3qx8Dr50KUa5SVqzND5mQu0x0eHsOpJGO1D9D5I1QO58ZpFlEOHcV97uxEZ9SN/F dDwWiG8afiUA6ZBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2F447139F9; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oDqiCoxGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:40 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 01/25] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Date: Mon, 13 Mar 2023 16:51:14 +0100 Message-Id: <20230313155138.20584-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085147_015091_F843AD16 X-CRM114-Status: GOOD ( 25.17 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Implement fbdev emulation that is optimized for drivers that use DMA helpers. The buffers may no tbe moveable, may not require damage handling and have to be located in system memory. This allows fbdev emulation to operate directly on the buffer and mmap it to userspace. Besides those constraints, the emulation works like in the generic code. As an internal DRM client provides, it receives hotplug, restore and unregister events. The DRM client is independent from the fbdev probing, which runs on the first successful hotplug event. The emulation is part of the DMA helper module and not build unless DMA helpers and fbdev emulation has been configured. Tested with vc4. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_fbdev_dma.c | 275 ++++++++++++++++++++++++++++++++ include/drm/drm_fbdev_dma.h | 15 ++ 3 files changed, 291 insertions(+) create mode 100644 drivers/gpu/drm/drm_fbdev_dma.c create mode 100644 include/drm/drm_fbdev_dma.h diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 1e04d135e866..a33257d2bc7f 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -82,6 +82,7 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o drm_dma_helper-y := drm_gem_dma_helper.o +drm_dma_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_dma.o drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c new file mode 100644 index 000000000000..cf553ac12a0f --- /dev/null +++ b/drivers/gpu/drm/drm_fbdev_dma.c @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: MIT + +#include +#include +#include +#include +#include + +#include + +/* + * struct fb_ops + */ + +static int drm_fbdev_dma_fb_open(struct fb_info *info, int user) +{ + struct drm_fb_helper *fb_helper = info->par; + + /* No need to take a ref for fbcon because it unbinds on unregister */ + if (user && !try_module_get(fb_helper->dev->driver->fops->owner)) + return -ENODEV; + + return 0; +} + +static int drm_fbdev_dma_fb_release(struct fb_info *info, int user) +{ + struct drm_fb_helper *fb_helper = info->par; + + if (user) + module_put(fb_helper->dev->driver->fops->owner); + + return 0; +} + +static void drm_fbdev_dma_fb_destroy(struct fb_info *info) +{ + struct drm_fb_helper *fb_helper = info->par; + + if (!fb_helper->dev) + return; + + drm_fb_helper_fini(fb_helper); + + drm_client_buffer_vunmap(fb_helper->buffer); + drm_client_framebuffer_delete(fb_helper->buffer); + drm_client_release(&fb_helper->client); + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); +} + +static int drm_fbdev_dma_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_device *dev = fb_helper->dev; + + if (drm_WARN_ON_ONCE(dev, !fb_helper->dev->driver->gem_prime_mmap)) + return -ENODEV; + + return fb_helper->dev->driver->gem_prime_mmap(fb_helper->buffer->gem, vma); +} + +static const struct fb_ops drm_fbdev_dma_fb_ops = { + .owner = THIS_MODULE, + .fb_open = drm_fbdev_dma_fb_open, + .fb_release = drm_fbdev_dma_fb_release, + .fb_read = drm_fb_helper_sys_read, + .fb_write = drm_fb_helper_sys_write, + DRM_FB_HELPER_DEFAULT_OPS, + .fb_fillrect = drm_fb_helper_sys_fillrect, + .fb_copyarea = drm_fb_helper_sys_copyarea, + .fb_imageblit = drm_fb_helper_sys_imageblit, + .fb_destroy = drm_fbdev_dma_fb_destroy, + .fb_mmap = drm_fbdev_dma_fb_mmap, +}; + +/* + * struct drm_fb_helper + */ + +static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, + struct drm_fb_helper_surface_size *sizes) +{ + struct drm_client_dev *client = &fb_helper->client; + struct drm_device *dev = fb_helper->dev; + struct drm_client_buffer *buffer; + struct drm_gem_dma_object *dma_obj; + struct drm_framebuffer *fb; + struct fb_info *info; + u32 format; + struct iosys_map map; + int ret; + + drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n", + sizes->surface_width, sizes->surface_height, + sizes->surface_bpp); + + format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth); + buffer = drm_client_framebuffer_create(client, sizes->surface_width, + sizes->surface_height, format); + if (IS_ERR(buffer)) + return PTR_ERR(buffer); + dma_obj = to_drm_gem_dma_obj(buffer->gem); + + fb = buffer->fb; + if (drm_WARN_ON(dev, fb->funcs->dirty)) { + ret = -ENODEV; /* damage handling not supported; use generic emulation */ + goto err_drm_client_buffer_delete; + } + + ret = drm_client_buffer_vmap(buffer, &map); + if (ret) { + goto err_drm_client_buffer_delete; + } else if (drm_WARN_ON(dev, map.is_iomem)) { + ret = -ENODEV; /* I/O memory not supported; use generic emulation */ + goto err_drm_client_buffer_delete; + } + + fb_helper->buffer = buffer; + fb_helper->fb = buffer->fb; + + info = drm_fb_helper_alloc_info(fb_helper); + if (IS_ERR(info)) { + ret = PTR_ERR(info); + goto err_drm_client_buffer_vunmap; + } + + drm_fb_helper_fill_info(info, fb_helper, sizes); + + info->fbops = &drm_fbdev_dma_fb_ops; + info->flags = FBINFO_DEFAULT; + + /* screen */ + info->flags |= FBINFO_VIRTFB; /* system memory */ + if (dma_obj->map_noncoherent) + info->flags |= FBINFO_READS_FAST; /* signal caching */ + info->screen_size = sizes->surface_height * fb->pitches[0]; + info->screen_buffer = map.vaddr; + info->fix.smem_len = info->screen_size; + +#if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM) + /* + * Shamelessly leak the physical address to user-space. + */ + if (fb_helper->hint_leak_smem_start && !info->fix.smem_start) + info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer)); +#endif + + return 0; + +err_drm_client_buffer_vunmap: + fb_helper->fb = NULL; + fb_helper->buffer = NULL; + drm_client_buffer_vunmap(buffer); +err_drm_client_buffer_delete: + drm_client_framebuffer_delete(buffer); + return ret; +} + +static const struct drm_fb_helper_funcs drm_fbdev_dma_helper_funcs = { + .fb_probe = drm_fbdev_dma_helper_fb_probe, +}; + +/* + * struct drm_client_funcs + */ + +static void drm_fbdev_dma_client_unregister(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + + if (fb_helper->info) { + drm_fb_helper_unregister_info(fb_helper); + } else { + drm_client_release(&fb_helper->client); + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); + } +} + +static int drm_fbdev_dma_client_restore(struct drm_client_dev *client) +{ + drm_fb_helper_lastclose(client->dev); + + return 0; +} + +static int drm_fbdev_dma_client_hotplug(struct drm_client_dev *client) +{ + struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); + struct drm_device *dev = client->dev; + int ret; + + if (dev->fb_helper) + return drm_fb_helper_hotplug_event(dev->fb_helper); + + ret = drm_fb_helper_init(dev, fb_helper); + if (ret) + goto err_drm_err; + + if (!drm_drv_uses_atomic_modeset(dev)) + drm_helper_disable_unused_functions(dev); + + ret = drm_fb_helper_initial_config(fb_helper); + if (ret) + goto err_drm_fb_helper_fini; + + return 0; + +err_drm_fb_helper_fini: + drm_fb_helper_fini(fb_helper); +err_drm_err: + drm_err(dev, "fbdev-dma: Failed to setup generic emulation (ret=%d)\n", ret); + return ret; +} + +static const struct drm_client_funcs drm_fbdev_dma_client_funcs = { + .owner = THIS_MODULE, + .unregister = drm_fbdev_dma_client_unregister, + .restore = drm_fbdev_dma_client_restore, + .hotplug = drm_fbdev_dma_client_hotplug, +}; + +/** + * drm_fbdev_dma_setup() - Setup fbdev emulation for GEM DMA helpers + * @dev: DRM device + * @preferred_bpp: Preferred bits per pixel for the device. + * @dev->mode_config.preferred_depth is used if this is zero. + * + * This function sets up fbdev emulation for GEM DMA drivers that support + * dumb buffers with a virtual address and that can be mmap'ed. + * drm_fbdev_dma_setup() shall be called after the DRM driver registered + * the new DRM device with drm_dev_register(). + * + * Restore, hotplug events and teardown are all taken care of. Drivers that do + * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves. + * Simple drivers might use drm_mode_config_helper_suspend(). + * + * This function is safe to call even when there are no connectors present. + * Setup will be retried on the next hotplug event. + * + * The fbdev is destroyed by drm_dev_unregister(). + */ +void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp) +{ + struct drm_fb_helper *fb_helper; + int ret; + + drm_WARN(dev, !dev->registered, "Device has not been registered.\n"); + drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n"); + + fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL); + if (!fb_helper) + return; + drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_dma_helper_funcs); + + ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_dma_client_funcs); + if (ret) { + drm_err(dev, "Failed to register client: %d\n", ret); + goto err_drm_client_init; + } + + ret = drm_fbdev_dma_client_hotplug(&fb_helper->client); + if (ret) + drm_dbg_kms(dev, "client hotplug ret=%d\n", ret); + + drm_client_register(&fb_helper->client); + + return; + +err_drm_client_init: + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); +} +EXPORT_SYMBOL(drm_fbdev_dma_setup); diff --git a/include/drm/drm_fbdev_dma.h b/include/drm/drm_fbdev_dma.h new file mode 100644 index 000000000000..2da7ee784133 --- /dev/null +++ b/include/drm/drm_fbdev_dma.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef DRM_FBDEV_DMA_H +#define DRM_FBDEV_DMA_H + +struct drm_device; + +#ifdef CONFIG_DRM_FBDEV_EMULATION +void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp); +#else +static inline void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp) +{ } +#endif + +#endif From patchwork Mon Mar 13 15:51:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172784 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BC0EDC6FD19 for ; Mon, 13 Mar 2023 15:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UmCmXsrNw7RuRVF8heSkXQvxi6FOLe4Hn/6uxqLF61s=; b=4RNFytwGzNTugf ni6g0WIE+0BefmP/rgXKkc8OR5k2qmVJAVj9hRa7iTEUpPOyxzR+uydkp08sFWMhC1RPDWBexDwiw TeDTPx7IHA7n1B/fiXC758ZpLK2W25zcQJOnqtjd83wn8Gu4PS/DbFPgsUft2qwBSkxXEQd91NBZd 1qN68ZcZnIZbcsDz0aN+zQaB+lniHsb1/bvmEp54ZfhORZhp4tf8gjjNI535TcLUSfVyxdm2b+wOt gtQLglEkdNWLODBW6J0r37+s6uoTQdQt0o1hy5JBxnWUY2y6iYlRgoH6+gVtmzV6UDB2qQnNJKufT n1px7cRY1LQLZVAfipZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkVF-006Wn4-EM; Mon, 13 Mar 2023 15:54:25 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VNJ-FC; Mon, 13 Mar 2023 15:51:52 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AB2DF1FE10; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z19a8G8KUa8TMzYjSZmaNwZCxLvxOp6UVu7ZTlpMZEQ=; b=ZOkapXC1oqVxk61KwrpXPZdtRskpMlSVmEM6Db8g1kWNnE679+mP8WfN7MMK6Do73BfXNF 16FwvFB/CryIh0K0bCCYA6cBHs6mD12YargbaZWgvcsOBmfH/yT/vXZKFh+Kx67yiEbRXV rSkwARTCVaYczbFhMkvdczm2bh/yUyE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z19a8G8KUa8TMzYjSZmaNwZCxLvxOp6UVu7ZTlpMZEQ=; b=wGbyjFc2cEuk8rFT9UnmTEdtBMnL3kxhnuJ9rf4sDgpvK0TTnZEV0hnFzug523rrEJpozP Q4FW2/rOmqXbi/AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 73A0713517; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yIpzG4xGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:40 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 02/25] arm/hdlcd: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:15 +0100 Message-Id: <20230313155138.20584-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085147_062602_46DFA0E2 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/arm/hdlcd_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index e3507dd6f82a..a554c79dcd39 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -301,7 +301,7 @@ static int hdlcd_drm_bind(struct device *dev) if (ret) goto err_register; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Mon Mar 13 15:51:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172768 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 319FAC6FD19 for ; Mon, 13 Mar 2023 15:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3r7WjG3/1M3cl+erUHdRmR1U2r+GDOrKiYyz+1rEUUg=; b=FO7yhIMKj8ObfI g1j9HMDIUgkPqI3Maqk70QbVt0atjEOsIbD1HF1hXJR/6NzSU5/cdDjEqpF046dCmaXzaCf3dOsRT pwfiULAL8CBESyXOqYBJRSWxiCzB3XVfK7aR/JQv+Ck5eq1IoSaTX2YaKFyhryRBZS2gdOsHLcFef 3foerx5qyeFt+rdF5jNwHpA+pJIftxlDiCZn/puks5FwpfLSc224X2lXR+zRzvcpASvX6huVlhgZj jzE8uaFyj0PATJchaniKMMZ9CAMT6iKPOxObAXU0eJLKDaTHy/65ndvz05Npvq/NiTPnQy4rLW7Fh d/h3phk5gH3byE2eZS0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkTb-006W2E-5n; Mon, 13 Mar 2023 15:52:43 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VNI-FI; Mon, 13 Mar 2023 15:51:50 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EAA2722A37; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SBgiZ5pOBVAhDeiQD0Gqs4CcRPPfRC3wOuRJKuz/FGo=; b=YXnk6pV3vuJZCfOTEZ6NwjNvehdpNSKvvTa+GlzfklnaOzXMLfS6njTLyOUTIOOZZbyihh hhZIhpUneqddiEmLuwS9+WpSIt88YKy+ghK+fsh8S3iXSGsy+PQQsd3cLtqvFQUqus2RVY +5DVo1vbKOr90Pf1YCiJ7cgar6TcX6M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SBgiZ5pOBVAhDeiQD0Gqs4CcRPPfRC3wOuRJKuz/FGo=; b=lKZhT6RNsm5rWgnI0YxIiJDIgt5TK0NPbZ2iR/Nsl0JbHffzEtXkGrYqdFKYTv2NQ8RZdH MWP9lJhVHM9oCKAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AF246139F9; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QJLWKYxGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:40 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 03/25] arm/malidp: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:16 +0100 Message-Id: <20230313155138.20584-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085146_941713_A284351F X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/arm/malidp_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index cf040e2e9efe..0597e6ad56e7 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -852,7 +852,7 @@ static int malidp_bind(struct device *dev) if (ret) goto register_fail; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Mon Mar 13 15:51:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172783 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 33958C61DA4 for ; Mon, 13 Mar 2023 15:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dQRn9Lq3Lay309t+JSt2tq+JHChNLSzLjO0Hi4RsH+w=; b=yj+3a+qzAMIqnQ iKUMxhojYI8xU5xMHl1P4zWgKBqaeUOIlW7x3YVViEeDido5hW9dqaQXyCOmuqvoLjOux/4yUC0qN y8rY1n1gj/GnbLRZeETHJ47dUprL8n1CUsW4XVely0aN1AbtyeMz/IYjMAmFdsWSwZSuu9nmbHqGO AqenL0e2g7uCFs+ritBBrcK143V260cBd7VtUktIfCeU+ico0sR7wmtQBCBo4T5NcjPLKc04lhcbh xHyG3ymfpThJUT8LPmcTcbI3Vh25jWIKekVF/XvBXcL6/wSCHnKdGBlnYvj1lmNnSKHuW4XqD/zMZ hhg7rjb3zz31bWFiEukQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkVE-006WmZ-N5; Mon, 13 Mar 2023 15:54:24 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VNU-FE; Mon, 13 Mar 2023 15:51:52 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 36A2922ACC; Mon, 13 Mar 2023 15:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722701; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D947hMyj6Sf4KC9scv1ctmRh6r+SrOLFp5Zz2aFZxb4=; b=U0hZhj5YwK5iCePZ25aOLA4fqtC1fIjaDdYPIUNG/Wvw1LCaQeBOUdEmwso7+aGsjp7V/x jLL2kHHycjqikYn6ei556Ls8leiTL7YiCldLuT7WqrV68m2x88hQqFnHx067smyr6eBU0V LvcTeiq8aEHPEF2cB0qjdTWA9uVEsJ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722701; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D947hMyj6Sf4KC9scv1ctmRh6r+SrOLFp5Zz2aFZxb4=; b=SbwpIotjiNQeIQ5cMm8P9G+U6oYW4wzejkqnKnG/g535+ILggY7DOkWeJKyXDQMe0aI2YN biUWME37ufzbtECA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id ED00713517; Mon, 13 Mar 2023 15:51:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kLT/OIxGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:40 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 04/25] drm/aspeed: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:17 +0100 Message-Id: <20230313155138.20584-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085147_116809_AA916195 X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index ecfb060d2557..c8c7f8215155 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -341,7 +341,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev) if (ret) goto err_unload; - drm_fbdev_generic_setup(&priv->drm, 32); + drm_fbdev_dma_setup(&priv->drm, 32); return 0; err_unload: From patchwork Mon Mar 13 15:51:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172770 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 202D2C6FD19 for ; Mon, 13 Mar 2023 15:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Cq+n5bC7cgqwEOj3EDpbyybQqIbWMdCdeO+gGmlnmrE=; b=S5R76H8m4ENceJ GFRVi5bREgHY2sQNMTtAPWbJVep4YT/K1SbmqZB64JMG2iLOwEITku7ZCHT/JT9A1wqjxfaXkD5Sp OKg8f/KbEOOIKczI0mb/CO2vT4LrzAxqR9+VG0NNXGdtftTQ2W7pBgeg+l3Cniwk33/SqUG+YBsYd krqqSTSFgsTws2qaxwuN344a4XHAGjID8NJeUPIMJbVCeYPOKU/oAd4IR/C9YWTZv7LW4h8yEI2Sy tWmJsRPeEWHRIy3mglc246FuqK/Zv6zFaZ7uvsAsNegqkPQdLhBgHJxWngGmCCw74mKhzz3mgjMt1 HGGEuse80X2igfBJYePg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkTh-006W52-LP; Mon, 13 Mar 2023 15:52:49 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VNV-FG; Mon, 13 Mar 2023 15:51:50 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7B4F922AD9; Mon, 13 Mar 2023 15:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722701; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I76Fe6FqrVxfXaZM/gmg/QnxaIxQLNv8LHJQmmKh8Nk=; b=Ej53HgvVcrJNM0sVS+CfM33bDSTi2cgVJFzo2I1CmkcMx7cwLNvyjgtlOi/kIpk5o4WiMC MNwB56NrlIwWEQuh2Woyt/SSk9+URyDLXwiOwcVYp1ge9NSWd4pqBEEI488qgTHwIUs1du sXhCzYrxlONFrnAJ7yiYZR6Qgaz+wuI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722701; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I76Fe6FqrVxfXaZM/gmg/QnxaIxQLNv8LHJQmmKh8Nk=; b=M93XM9oH6MufUSsVEiShX5jwir984Zuk7fx/Andi9E2uWRS4bhYHL3o9CWfxgg8EQ03ml3 Bwdjp1RryBNDkXAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3B522139F9; Mon, 13 Mar 2023 15:51:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yICfDY1GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:41 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann , Sam Ravnborg Subject: [PATCH v2 05/25] drm/atmel-hlcdc: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:18 +0100 Message-Id: <20230313155138.20584-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085147_094482_687C0C3E X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Sam Ravnborg --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index 4e806b06d35d..29603561d501 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -760,7 +760,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev) if (ret) goto err_unload; - drm_fbdev_generic_setup(ddev, 24); + drm_fbdev_dma_setup(ddev, 24); return 0; From patchwork Mon Mar 13 15:51:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172767 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 91B1AC61DA4 for ; Mon, 13 Mar 2023 15:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jQkpU7Xy5mwWuM7MiXfljjUBFd/aCQWUtHCEiblpGFc=; b=y48DSGhzUno0Ir RuwQSZTcMk4hO8sDwvZa1lDKoncFfJy9fdC2QLyNybXQSi0QYo9/2kOQUmSgocEesMJ2Quy40zfD0 qhKrBS23elJ9a6cjKdNjCeOsc8i3RbagBMgDl9n0wgl4GmlZVyRyIMBIDmi0uPC80tJ69ASHtTuxh iSJxfyw7AMDoEa4cgIjOjBEAnZcGSiDbgYVRziefb4rFF/QlaGmjxCGQYsgR7fHCbJO/6CBwSpaU0 /7MhmYEc6hU8r7yd6doBIHFimaq38Yd8Pgug6DZp+NO3gNJeiVhAMBAE0qfv9P7/VW9Nr9xkfYhkc jSvVm3I6IKb5RRjlXEmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSk-006VSp-Og; Mon, 13 Mar 2023 15:51:50 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VNY-DY; Mon, 13 Mar 2023 15:51:48 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BE9EB1FE11; Mon, 13 Mar 2023 15:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722701; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e9tHsUCjDPd9jdHngzUELtdqEbSwTIzTBRxnWmIHxWw=; b=UreD8Unlia8qIMxdWmYBTFaa3Zz8grpRPcQdwhBJvgGxZSi7bzYN+0gpDand7/ZKYg+exG sla+hhLDi+n0AQzAUFNxjwHlTksYnunHDKVw8iEyYAGnqYcW++h4Hwpq5UVB6aBT6AnJUL KvGOBHNyn9zbNro9GSOtx8GHW+3rPBo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722701; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e9tHsUCjDPd9jdHngzUELtdqEbSwTIzTBRxnWmIHxWw=; b=qh7ijtEgqVs+Gu9y6TurdRp9FqbGvCtzZzuPM18sflo4YES1dyMQBETS6yvMabNWHV50nH R5LqXpjWF/94hpBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7F9FC13517; Mon, 13 Mar 2023 15:51:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mKtIHo1GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:41 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 06/25] drm/fsl-dcu: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:19 +0100 Message-Id: <20230313155138.20584-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085146_653962_CF9CA5B5 X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 8579c7629f5e..c09ba019ba5e 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -333,7 +333,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) if (ret < 0) goto put; - drm_fbdev_generic_setup(drm, legacyfb_depth); + drm_fbdev_dma_setup(drm, legacyfb_depth); return 0; From patchwork Mon Mar 13 15:51:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172769 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9FEDEC61DA4 for ; Mon, 13 Mar 2023 15:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+J+MKLdB9ztJzvvv5OozGQc4ITpRyZiMSw7KnTh360A=; b=bjoU/T7mkjxnpH yMecDSHn6sN0Ty8zjTTkhIyKtvBPaYBZwozrWHiVgA4sJa2zD0LTqXg7BRJboo3GDgjo6tV9YgE7e cAjQLn50mQWH3y5vD5ZIGpGWYUkWCO+bjcXF+c/1MMDTnFqesuskm4PnDWCU+1Hz2NTFGhWOAUykJ rfeY5JbR5hyUzSYBrw7Awp4RTcq8J5n84GToNcb51ByDBlZjE9PJWlTCqtAzfut1gRBAqmWyZdAac j/SYf8Orx/OFiUwl/7Aq8gdrtKkPBuDID+20x9ACHkYJ15+wUONjIpInhXIAP49VhClvuqMdXadVS BIQB6n/dKJEfM2Amhd3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkTd-006W3S-Gf; Mon, 13 Mar 2023 15:52:45 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VNc-FF; Mon, 13 Mar 2023 15:51:50 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 08FB51FE13; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3YtpAFN7zjrzgA2sJtiUME75jFZgyE7NtvmD9EOyGjs=; b=wzQ39T44QFfYdkBuyD4VDUtGta6KBpK9Y4jJCGgfsJNJtPfJzt/aNhzlULMA4sjU2aTS9Y NiQN9pkP1E62jp64fHvCTcIat/5w4neqJmXcTxPHODN5BxAnmWprJXT8j07m9ssnNn8sfj jghWxgxM7/E82JPRpQuCWQyfzPv7Igo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3YtpAFN7zjrzgA2sJtiUME75jFZgyE7NtvmD9EOyGjs=; b=zN16K2UHPs5QlAUyX90yUGduAdC7QmOS1dTo7ryxgQ7ZEkgruawtVpYVTP/UUnGdwObn5L I4ExCnnr6izJpACQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C0FA9139F9; Mon, 13 Mar 2023 15:51:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CKdALo1GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:41 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 07/25] drm/imx/dcss: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:20 +0100 Message-Id: <20230313155138.20584-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085146_864974_AB702396 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index dab5e664920d..896de946f8df 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.c +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -145,7 +145,7 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss) if (ret) goto cleanup_crtc; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return kms; From patchwork Mon Mar 13 15:51:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172786 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 19215C6FD19 for ; Mon, 13 Mar 2023 15:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rjtN1ovEfnQLmlc7yIkhmNQ0CqEs+moY42LfQRZwEhg=; b=jopTZl41sJoHf1 dG9AhS+Mem382XoH7wg4JGbEGzhArSF6xfobuWWKZM14fOiySP+7nY6vhSdg7dwxBBthiHBLxWgtD ylbPMaBQhFVrZdUsN87DEdrqP3H/U8uUP7RDusDCcMGh3xx7cF2YgXXkPADxmZGfE9NaRmR354hL/ qDPvcho898R3DgWNPSOeD9iv5ycGeCUG56RObDGyg9dqKN1u2GzBGK5QYt89XEc2xNlmL+1TM568Z /dcsBuVUPR887DOee1UMX5cqR8Mt/I3Tu3MPd99EblBKUYvQWPSSmjHHSTkHLNIAUIapHhCimP2mG ooHcRr0ZMMmrvyJziuGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkVV-006WyU-QH; Mon, 13 Mar 2023 15:54:41 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSj-006VRi-Kn; Mon, 13 Mar 2023 15:51:53 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 498521FE14; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XF7PI4m7rH191dWxDe37OmyAauL1InscvYo2DQE4Lyc=; b=v4WKIPT3966Umv/1ghx7xwJR+bLm5GtSwe5h3jZcozDLfDHP1051TkrvSLs8KHtMd/dFFc 2J4EddqArIU3vu8IbQ1uGfqwGr0a5kjCzn5IH3sjnV01itsoWEMvM+Bb8zCQNLn/ANZEsG Pa+/n/pnJFr0rigorAN8NbvmYsJ80Xg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XF7PI4m7rH191dWxDe37OmyAauL1InscvYo2DQE4Lyc=; b=X4gI2+jxP4L9NcfNJ7X+Fr9IacfQEuVZJHfUohOpgvMrqpiaPaz1eX0PuyBiHIXjJSESRG JkNMW+8QYu0HcrAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0DA2E13517; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kAZsAo5GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:42 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 08/25] drm/imx: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:21 +0100 Message-Id: <20230313155138.20584-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085149_928946_4DD08BBC X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c index e060fa6cbcb9..4a866ac60fff 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -249,7 +249,7 @@ static int imx_drm_bind(struct device *dev) if (ret) goto err_poll_fini; - drm_fbdev_generic_setup(drm, legacyfb_depth); + drm_fbdev_dma_setup(drm, legacyfb_depth); return 0; From patchwork Mon Mar 13 15:51:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172789 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 37889C61DA4 for ; Mon, 13 Mar 2023 15:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JLOmL/us8r5p3qj1zQtKBgUZkdZWXnaTeKnNWg5d/jw=; b=f8uM4M320YM2wS xz6ARTG0cmgPls6kyxUgg8qU2atEUMH+fdL3NNbYcIBvoC+BSMf1ANP+ALC5honhx7K5fMEzXZTXY CJM3sz7dJDyAy5Duy3vgQJ0cuUY8pqo22X1CysFTs+FZVsn3Ry95TJdDAcGsdCTyue8Y3rDHynPtn okFDGt3OMjM30TMuPuTE9PiWCXfl9JkVR9Cp9r7U7BbxlatU8MuPYRqfj+YmV4H3xyogGserYwuab E6m8S3xqoFr2o9wxIL2UtpCEyGJVd+IsW6Fnv536knxvC8+SrqMQjLvykCiCDNywgPGXMDlJTAuP3 EXPi8EDaKP78ovO3rvcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkWI-006XU4-Co; Mon, 13 Mar 2023 15:55:30 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSj-006VRj-Ko; Mon, 13 Mar 2023 15:51:54 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8C72F1FE15; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LuOD+aDhe6zNHu2B9JmUuRrg0jwdJ2ywrRklBNP4PEI=; b=PMacKL63BxvZEOToDk+WQWf7vsf1OYdfJssfnjho/cjbW5WcD0kgktvgwX9F32rq7paEIk vEJOoQOa1pKY7Lrd3bvCmx0UKEZUACEskjOz7tqGn03rdmwDucX6hxoORm2z6O9rlXpyOC oNMxtonYhPtG+EHxvj5UKSdFOnIEtoY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LuOD+aDhe6zNHu2B9JmUuRrg0jwdJ2ywrRklBNP4PEI=; b=WHECN9mXveRPfS/dWX4eEjj8fcz5mCqGQ+SgqFK2aQrly9oLzDFctdPHxHMwqYHiLdDISc mZopNiKkx72snwDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4D7AC139F9; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8DICEo5GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:42 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann , Anitha Chrisanthus Subject: [PATCH v2 09/25] drm/kmb: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:22 +0100 Message-Id: <20230313155138.20584-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085149_933761_83829537 X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c index d29c678f6c91..24035b53441c 100644 --- a/drivers/gpu/drm/kmb/kmb_drv.c +++ b/drivers/gpu/drm/kmb/kmb_drv.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -562,7 +562,7 @@ static int kmb_probe(struct platform_device *pdev) if (ret) goto err_register; - drm_fbdev_generic_setup(&kmb->drm, 0); + drm_fbdev_dma_setup(&kmb->drm, 0); return 0; From patchwork Mon Mar 13 15:51:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172794 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2258BC6FD19 for ; Mon, 13 Mar 2023 15:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NZLmc+25FDg2Lzu6ift04zveFS+sbRNJ9m2ukzK2s0U=; b=wI4KrJxQ6lDdzu VpjV9gF6XWujI5p+fyCAlZ92xppm7ifM8aKZIYJdgqvOUzkFEa66GROnC9znbNwIS4LOJjmcCqYzh swR8r2vuh3mCqAXguzm67g3QPOzF8l1X+1axLNDZfyCrjrLXA3U0sW1e2ci+r8RVk496NJu05GUzw oEoHONNFbOuqijSyX0NSdQ+Frnr/P3SEZdzlSaVPI0mllWkQH8uh8OyeHFxnRbug1jwBov+M3gOVM ofPeZasprQhWkLrB/HweN7Az1+ptGOLYNC4X58HXoEbTqEJB7SQCcYg10K51LBCHVdlL50hQgSLKO bMqVVlW6qdfpYjkUG7IA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkXD-006Y2k-Na; Mon, 13 Mar 2023 15:56:27 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSl-006VT5-Ov; Mon, 13 Mar 2023 15:51:57 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CF3381FE16; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JI68li34nf8r+2nUrNHZmX4hKQvUyE0ZZUpp5nWneIw=; b=BnwlTYawB5bFA3kqmbXp7CEPRWps6udml4C1xpmTEizpXzD8DKSwE0/ZPn/0a8kQ0dx5EZ 8GJDlmM8Ya5Zh5NTNFaQOhXjFAyJBdfXmZEmRA4wnSfaPyGKy+MJqURBfGp+lTW4CBFGaW OY0eCNh1cIaQrwk9d9KQ1K+sUkamiN4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722702; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JI68li34nf8r+2nUrNHZmX4hKQvUyE0ZZUpp5nWneIw=; b=zf4jbo7TlMMpEPJttARFsghshmXlvMuSYYAbtUx7pianWvNxqwrEYh1uTeMXeBjfvmqaFn BpNs3Ri7SYXdJFDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 910FF13517; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AFWIIo5GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:42 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 10/25] drm/logicvc: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:23 +0100 Message-Id: <20230313155138.20584-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085152_104054_3B6D2CD7 X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/logicvc/logicvc_drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/logicvc/logicvc_drm.c b/drivers/gpu/drm/logicvc/logicvc_drm.c index 2fb23697740a..c35c453fd025 100644 --- a/drivers/gpu/drm/logicvc/logicvc_drm.c +++ b/drivers/gpu/drm/logicvc/logicvc_drm.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -449,7 +449,7 @@ static int logicvc_drm_probe(struct platform_device *pdev) preferred_bpp = 32; break; } - drm_fbdev_generic_setup(drm_dev, preferred_bpp); + drm_fbdev_dma_setup(drm_dev, preferred_bpp); return 0; From patchwork Mon Mar 13 15:51:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172820 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 94E63C6FD19 for ; Mon, 13 Mar 2023 16:07:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dJOlUTgrQmf6skjoaK7+XDhklTO02Bx0kCh+4WRkwF8=; b=WpCenKwDMtRWGe n+m5h6GYLFeVyQNU+VWmevY61kjCIT405iZG+70Ee275M0Ft2MkIgRdqpNdw3CLH3pdfMJwWniy/o wL/phBqa/H1Hiu4r8DG3oJqQU2ycMdI3G2756Q8VMWxKhCoJ45pPTq2ra8ynAYpxQihj3gxoHHbAp vPsJhEyUHLQWRIaKbSDr+zhjzvry4WFVtFwrXdm2PGeqFw2xFQMivlLsMSZzT6TzgEAdU6fAiGV36 vtF20c059fuS1RsRCc7j6Z/Dvqto+v9Vh9bRcZG738B4wg1PYa3H7F/lm4WjlFshHz9yuNMMNvaSX a4Q2OfFP7VynFpZtiNbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkha-006cqy-Rs; Mon, 13 Mar 2023 16:07:10 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkT2-006Vge-Cc; Mon, 13 Mar 2023 15:52:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Ek06wiRvjrNh7KML5L+9ZhCl1dorqZM+tNafXQU3C+g=; b=btmRp2TH6n39iXlrAWa2IexLFu yYvLDKMaexUHoOZDcxXtXJIA1f5KseHzGfP8S8BUho36IB2JF7epMojgWuqyZQqYl7LK0vxoDxYI0 JNtyqEdV+RCc44OCbN1Djuc3FQbp7vHM5SJydBTkeuwiWQzNYHPxMztKy7lT3Jfd0GkcWJVX507Cu vTR4jOzDneJYEYliqi6Q125reZ0tuW/5y9kQs6ZQIvayjCx4nwSIE1yp+WQ6/+Q12QC3Wjcdzk8Wm y5kr+Ch+hH407tvwg0/KdmzOOUFxbFqoKZS4sBY4w3SQxzZB+SJXCdt4n2WR0MrVVUkLDIVqarBgl HcpQkQjA==; Received: from smtp-out2.suse.de ([195.135.220.29]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pbkSu-001QSu-1S; Mon, 13 Mar 2023 15:52:05 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1F6ED1FE17; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ek06wiRvjrNh7KML5L+9ZhCl1dorqZM+tNafXQU3C+g=; b=sdnrodf1Q+zO6xRk2m8n75jY/fXu6X1DHqfEpUmN5QMkHae5wzVui+ZfFDY5oZFFVlcbMZ gb/8iUnZqeqV1uatR+2XXWBnzpUPLh+LVz1uz8wNnftw1BzD3mSVoPCZ2OJPyMXS765pr3 APRvqksqKNnUFiLGJ8K/NnONvTAzsHU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ek06wiRvjrNh7KML5L+9ZhCl1dorqZM+tNafXQU3C+g=; b=Yyx9O7M7i4T4wVnYwBk22kDwDZtYAiBJIzeYfmb6ksOX+ttJXkzxAqCq6dYiMKG0SllX/i U7brWIWoTTxHdRAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D32AE139F9; Mon, 13 Mar 2023 15:51:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0DfAMo5GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:42 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann , Martin Blumenstingl Subject: [PATCH v2 11/25] drm/meson: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:24 +0100 Message-Id: <20230313155138.20584-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155200_680046_D32710B0 X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Martin Blumenstingl --- drivers/gpu/drm/meson/meson_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 79bfe3938d3c..6608a251106b 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -353,7 +353,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) if (ret) goto uninstall_irq; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Mon Mar 13 15:51:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172795 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B9B6CC74A4B for ; Mon, 13 Mar 2023 15:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=677L60BUVy21FTGDIYqQxjRIJg/l5qe6claUWaDNN4Q=; b=W5lnXzdMyJu9H5 GrwY5ZwTVM69Vy7+NNpRwtbDurKAxlduaU2htlDzazfZgUdQeZBg+aQx66S7ofr82IFDw0pAoZjw+ hUbsDBt10muLboVj/w5Unfaw/GHBrRpv1E9Lz4llDtKKhXY8KxY2Cq35sEtOKDYiQR3kjgLa1Zki9 yq2lYW1mztGfDlzRCwdkQvq75uVVIDZTLySRwwTwf4VpPYEaumkWv+hXnQ0rEbJhvgDLbx8nkth67 IGEiLQibgjnTrHDxtANAcBuq1bOWhB7dwXVLlsTlBGVpvjj+kiwTpoyyJRltzNAkVzjYk6BW6FZZb c1T+eVOVsC3Su4hOFIKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkXF-006Y45-LH; Mon, 13 Mar 2023 15:56:29 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSm-006VTL-CH; Mon, 13 Mar 2023 15:51:57 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5EF6C1FE18; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xfGmaQVnp7J0+BpWWcPGxHc/h4EFJhDuMIO3+FaezIs=; b=iTlvRJuvSdRYL2pqaGCMvYZv7QheE/U/XTKWwHYPPKrFaYXOrNvT0EaCJa0vLha9Y0Ui94 TDb3yd+CBI+S4j/TKhoLSYQprHiUwsN7SWn/CKirNrQFbo1zR/E33eqc5QaD/7dGBYVS98 ILdfg2t94RuDsUs/XdbRRbOiCR8hBao= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xfGmaQVnp7J0+BpWWcPGxHc/h4EFJhDuMIO3+FaezIs=; b=y0bGpH5lI5x9/fFRiYSe4QSt1lWbSepwxHr8iSMLDVLJv89V8AK8epV4p71VPnXqje+j5g QiX2y41Eag4dt3CQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2319913517; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SJ2fB49GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:43 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 12/25] drm/mxsfb/lcdif: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:25 +0100 Message-Id: <20230313155138.20584-13-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085152_655302_8823B154 X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/mxsfb/lcdif_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index cc2ceb301b96..6fb5b469ee5a 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -220,7 +220,7 @@ static int lcdif_probe(struct platform_device *pdev) if (ret) goto err_unload; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Mon Mar 13 15:51:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172785 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C475DC6FD1F for ; Mon, 13 Mar 2023 15:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xk7u6slIGe12mAKQMo2IAsRdkJt2FQaLTzX8OWkPYVM=; b=X1Npt427meDVPj Qgz6YQAMkMm2xi0DXSjxdrol6D1+gkweZca2EfREuK973Op1VeNpq8se6aUWEi36hCIbBy1fTW0Ht ZeopLbV1y8fNYVNvaDMwwYMHoe9o/tgZ22PlmIrhQrL3AaBolPHA+dE3ixL+2iMXymJ84oLrSbcXP /1s7b7Sz+5z05GX6pZfisf/wzwdYbI0iLQsHSUYbN8Iic729tyfSnRBlz0THdHZPTJGkna7EwaoHx 4DiIteLq/GIYsH4SgbwrTwy9K9h+LA6mXdZogHYID8m+erbpjcaxn+TEkU3rbncM9xK69GPIhK3yM 5HOV6TtjNVBonEN6iwxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkVG-006Wnm-Ed; Mon, 13 Mar 2023 15:54:26 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSg-006VO1-FQ; Mon, 13 Mar 2023 15:51:52 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A305F22ADA; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oevLJFADilkotbcm5yS5B0FgMhaUILVGYF4+ZsP8huQ=; b=rfKVDJJUf1iAU8e8AR6jNDKDHW8grrYb8opdF3/CCZlQKysaVFHEl/gY9krhzmaQvOzV7H F8l3zfDeBlgFpdhQwO5CHPlnnmH9Tsp0gIvFHzOFjYdWH1y7HeDbXYBtg0gmOCjyLhjvKk zcVVcP+ubqJmsrCnDdUtOONoAu5hVXw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oevLJFADilkotbcm5yS5B0FgMhaUILVGYF4+ZsP8huQ=; b=akKLn9pTAgJOlEHJXFjipFO24CADA+pYZprJVNriwqt4Nc83JL1EaY/bYdDH4AN7XpkXDC fpinzR4aJjh9OQBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 62FF5139F9; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eBJAF49GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:43 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 13/25] drm/mxsfb: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:26 +0100 Message-Id: <20230313155138.20584-14-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085147_089464_75200B99 X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index b3ab86ad1b36..368b1fbd8305 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -365,7 +365,7 @@ static int mxsfb_probe(struct platform_device *pdev) if (ret) goto err_unload; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Mon Mar 13 15:51:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172818 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D04EFC61DA4 for ; Mon, 13 Mar 2023 16:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2x9+frnbFvA0/iwqk7MozGAcPPrd/0V1dBRih3UPzRg=; b=1blMA0+NLmmgvo lVbWNEy2jJyTt+DbnPXxiUakMlU6ldlU3VovHjkZn4ZhqkfTEhFie4EFSdpxiSnOByNzLU2yIK/CJ 3J317H/SM080NEATj0XMbMXAZRjlPeJgSJaDABiHHb7256npQ7ZLzmTOj4hSfpMtGWHPUhpbOrgTu ysqo42J9uZCCZbrIvS8HtIxrdauZ8bK2zf7p5PhSw+/tBrNTPpiKnBIZArItz0Gf/mlcVazxVN49B 6Q/eUXTwErhcFWa5i1s/MO249IKPoXGFqtw3MSVvDvVmqUAvlrlTzVZWX/Rp2hq6NrcBH+X7vEVeg UcAu752V6/UhtVjTFJFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkhZ-006cqH-QU; Mon, 13 Mar 2023 16:07:09 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkT2-006Vgd-Cg; Mon, 13 Mar 2023 15:52:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=KKEYUxZu+JYHv+sdwTweA2t6Q6UTV9pLk2mYvTgn+cE=; b=KwpWekMkY1wFmMs/V7SuigNrsA HwleyLSZBPv2U+Y/MxbtZhgY3kdsvLxbj+Mqj4mTMk3674iVt3v9AhC+2NNlbCJ/BhOEW14wlctYy tvfbxpVyl1rOgB6RSLwBGYzGPKZfia7q+0c0g1J4bdQoowA3Z6q4sj+l6yNAGDVtXIl9R+1ntQ2tq 1ycyr5AwyD15K5bmPonHJApjOSYDhZuUvEVfSG5m8VLXOx/XUKOeGllF5+V6xjYgQFX++GAVitf0Q GWylD9Rx7M39rhw6Rzz9jyvTO4uan2Oaowr5rSm4BczRSgP5fGONAidjMC1HSuGd+kMvLBMiwjFGM 3gqkWUQg==; Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pbkSu-001QSw-0B; Mon, 13 Mar 2023 15:52:05 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E33B91FE1B; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KKEYUxZu+JYHv+sdwTweA2t6Q6UTV9pLk2mYvTgn+cE=; b=giRjr8+QEjl6DFY6HM4RdeF2JGatrPCkRDd0sXJ6W/plQZEOZ102MTHtnlrqwZP1xJ6hvu xY7tkG00MzhOWiCxdl6A1F7UvhTSGOy3rZbPOVoODWQJlvuW0bZr+KL7ZI3tbf2/xeLcBu uvWVqMzEo4yfIWn173CV+ju6GvjuhLc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722703; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KKEYUxZu+JYHv+sdwTweA2t6Q6UTV9pLk2mYvTgn+cE=; b=qV0ZRxTj2xKTz/9EPBI3fX8zva/Pvp7vklNCGJcDQSMyTQATsoet32cjHfufLWAUDPA/r7 rHYJT8gh/JLZk3Bg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A713D13517; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WLjbJ49GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:43 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 14/25] drm/sti: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:27 +0100 Message-Id: <20230313155138.20584-15-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155200_587613_ED856B33 X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/sti/sti_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index ef6a4e63198f..1b87b5899f9e 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -199,7 +199,7 @@ static int sti_bind(struct device *dev) drm_mode_config_reset(ddev); - drm_fbdev_generic_setup(ddev, 32); + drm_fbdev_dma_setup(ddev, 32); return 0; From patchwork Mon Mar 13 15:51:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172787 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C05B0C61DA4 for ; Mon, 13 Mar 2023 15:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KLXswNXABrvXW1sDDxp7CA7TgFNYRHAAqukk6LNK9Rc=; b=q3gPpyQvScfT5L CLjrpwqOnpbYgQM36V+GbhgsD4itY3LzWQhqyvWqT7J8Cs0xchtZ98TBlwy/ixEnZDEuGwAMq+P9M NdcmYq4SVmNWtOszMkYQBrwzzLuEGGyuc7SWaMDPmCoNIOCUrWK0MY7XiVb2E1dsg7LBXSOZzl16F qvyDgnkgoI7CmMhazU2DXlAZX4tgb9EXtahWTiEJcmevArHxYyGtxIfWWT9WPgOEqnrQBCQ+vZa77 C+xJwoBFUYlFNH+/e9Xb7pyGTF+9xbSatSsoGSeUihUBnoPt8eScoOR00QHYO+FJ53mKWSe93hnOZ zQ+idtNRHJPn50yzbHGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkVW-006WzG-Io; Mon, 13 Mar 2023 15:54:42 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSh-006VO5-6e; Mon, 13 Mar 2023 15:51:53 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3274022ADB; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fR+2SJ4TrEUtPfEMU6CNLBFUyBog9EUVJWhhdGLQeX8=; b=cTyn6r2RY4e4WUTaBER8Tu1tgVGV36dDhw6397d9UpdVnhDGEuL+A6UNXnaQQatpJZ/Qx4 6HPF4pUIliblc8/Bbmhhz0XjYvoPZm+/NvUNGZDO7lPe+5amglreel52jy3KMIWHk+znPa ZENRQMGZGm5duGbTp8sQxS0KRs0TX4w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fR+2SJ4TrEUtPfEMU6CNLBFUyBog9EUVJWhhdGLQeX8=; b=ybdBi+7Vn+ELxTRjS5aU29KQCFf22mx/qwOvvamqS/3QJ9Kq9p3BC0vM0cmTNrMSb3pdyA T0u3cHJ6HaWR4ACA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E82CE139F9; Mon, 13 Mar 2023 15:51:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0F/FN49GD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:43 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 15/25] drm/stm: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:28 +0100 Message-Id: <20230313155138.20584-16-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085147_502345_14A3DE1C X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/stm/drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 50410bd99dfe..422220df7d8c 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -203,7 +203,7 @@ static int stm_drm_platform_probe(struct platform_device *pdev) if (ret) goto err_put; - drm_fbdev_generic_setup(ddev, 16); + drm_fbdev_dma_setup(ddev, 16); return 0; From patchwork Mon Mar 13 15:51:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172819 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7E680C74A4B for ; Mon, 13 Mar 2023 16:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QJBBV/6CwexTgBwXny4Lss0dIWep94xvy3dtQhQyA7A=; b=eWbEc6H870EtEK mq15qlhPVdYQvbmfigGCMf3sEDzMCDLE3zjGiz4qSHouZXCgQEzSWo23rGKK7ynR3w03Lb52fVb7o Ek7zTosYkzryxmFWUOZqJTBqceOTTX6vZiSWemc1yyrdEf7X+nNe/5KJsYyaaeY7VGSydxM0tGhGN HsygI3en4kcKevu+cDgjUYgSKVAq3XBKSmrrMf2r5u3UciOpF+CoLrcgCIoa0xJ+3bNsYiQ4EW9sT L0XAZKXoBQuNKYtiBGsFdWiGuUqY31ppvVvdpAY6fEelgIU/7YrepFu5TtNQdAlVzth9O1Zbou+T4 M5tVJ9+PLU4jSZby6iYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkhc-006crl-6Y; Mon, 13 Mar 2023 16:07:12 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkT2-006Vgb-Cv; Mon, 13 Mar 2023 15:52:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=gI4OaAtbM26LV2A1893cD8w+HeuYtYS/hY0+uW4tXYM=; b=DXVsUaXIlnkqO5dDtatH0M9Zjd Z24WyIw7sZpgw+Ab/FoW5XGLsVq5FFRbeXNIpXU0G8d2Em6cUcg6qygO3aTOCzEHSYs7xn7MnkcCz l84GXsLzgBXoAm0gTvqGbbsAc+8jIgJ2Bm2+/UcZaQ+tmCz8itsvKko+DFlJRm/ZAygbAr7go/RhU O4/r8w+jFKu1otQmQS35RLuzgxdTP44fBKxuq3BxuQwaFmrw0xO/KeYTq6+RxJCw+QGx5FdRyhbGp +kYUINowk8o5x9OlHrZiOhkK3edR1IslP0kQTxaLyg1TbFona9XQyK1ZZTP0GN8W0BUIteh5hwpX+ ooYcrWyw==; Received: from smtp-out2.suse.de ([195.135.220.29]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pbkSu-001QSz-1S; Mon, 13 Mar 2023 15:52:05 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 71B921FE1C; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gI4OaAtbM26LV2A1893cD8w+HeuYtYS/hY0+uW4tXYM=; b=b9L/u308rqWHUJTJzdeLzM0/hV3X7EPsI1ISkNuLtSBBSdYU586gN6v3yzOiuuTbgM5xlC xhgefKnQFTcSAVHEaNqjb28KJoVDI7ZghWn2PEU4lp7UyFT0oHEEp+EVvxXjeSGFMNpgwx ipcrHRBp80CQPwNgCKSSb+tnCPCwah8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gI4OaAtbM26LV2A1893cD8w+HeuYtYS/hY0+uW4tXYM=; b=+NhRsMbPsn0LPBVxh7zIZg+O/NBHwZ9/mmsZgEtbpdjshImbNdFe+dNk/E2kInUN7lzr9N VQCXa/qWJI1gmqBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3645013517; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yK1fDJBGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:44 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 16/25] drm/sun4i: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:29 +0100 Message-Id: <20230313155138.20584-17-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155200_678283_DA29A888 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index d6c741716167..e49f78a6a8cf 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -111,7 +111,7 @@ static int sun4i_drv_bind(struct device *dev) if (ret) goto finish_poll; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); dev_set_drvdata(dev, drm); From patchwork Mon Mar 13 15:51:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172791 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AE71CC61DA4 for ; Mon, 13 Mar 2023 15:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t1taelkT49bYa5+rD/dxfchMMZOgAkmgChh4jNCJM3U=; b=ns087sg/UgiUgi 1gVLIT/wenP95mXsLuSC9hWnYK8317UGXbkfNJx2itpG+u10iBO/gInST19SmmbOI572gfAdIVTRa 6Dg7FH9p7hkKPQXLffnJpelqempBIgEC6h0P0fw0CUWBHIahULOjDaCg3BdOnC+TADtgglNrHcbjW 1kkl4h0u+dT0Ik4uFADW0aVpzUq5QelY2n2SBpwVQ5w/xxAGNkCJoy3i2Dxaz0rNJBvcJEZs1uR89 OlQdlsnST5Od3ACDQKQlWGN0aKCaNjEqmCIDEfWV4dfgDHK5f4JrA64BSe+k4LpfOArSoRxGs6Peq xBj2XJ8Lvy3tSRRPFvJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkWc-006Xfi-Vu; Mon, 13 Mar 2023 15:55:51 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSl-006VSu-I0; Mon, 13 Mar 2023 15:51:55 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B1CCC22ADC; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wHsNxN+T58moHCXZIMlhkta+G9FLgtSCtd15ChHYnck=; b=vbM6OwQQpTsz4iVgCDUC3B9qBjgAo06mLqIyFLUNHBJPpZ8tC7Qzua4EM8ertQHJG2xard QuGlnUsR9QE5fsm6Bko7aDlr6DunpgtwM7dKOYV2rdEzoBZdqVETPIWXr7NMYdYhOhqWNP ylrNWpj+xoC3/chVgbdqM+MbOKiug9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wHsNxN+T58moHCXZIMlhkta+G9FLgtSCtd15ChHYnck=; b=R8viqkEBJlP9yneK1cqaHz5HZ474nl7LOCuB4XShUeLGwDnkkw8d7d5zrXqEtQiZui/IzW /BfFteOZq7bO4vCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 75936139F9; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QMbOG5BGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:44 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 17/25] drm/tidss: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:30 +0100 Message-Id: <20230313155138.20584-18-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085151_994319_6FA2A7EC X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tidss/tidss_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index 2dac8727d2f4..3f5f27fb6ebc 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -179,7 +179,7 @@ static int tidss_probe(struct platform_device *pdev) goto err_irq_uninstall; } - drm_fbdev_generic_setup(ddev, 32); + drm_fbdev_dma_setup(ddev, 32); dev_dbg(dev, "%s done\n", __func__); From patchwork Mon Mar 13 15:51:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172790 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 37371C6FD1F for ; Mon, 13 Mar 2023 15:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2rh1dHeqV5HiMjE12WARFAXQTrKeHybg8bpBfkmoQFM=; b=slsbUUbEesFHvL pVlblNGrOLsM5KdohWj8knbRRyLerbrjig2AAcmYuMx5uuzeVrUjBSEJhiuf3MPhYUQANnbljtY2W eTaRbbEyGHVJ/URM6ZOwno2vth3qIfAqkJBnh6Can8jSUrPqU/qVarQwnn1yVvo52+0iXnFAxmzVD vvz2u+ZXyO5ztB3UxkQlszElTt4+Tv2QUbwKUS4GhgtHGVFU4OmCnj+1KzdUevx6le7pZDdbfJR2B j2PjAMhcvBwOf9wFtNkDCzHiQAMP2ia12JwSVgRazFEOPuAM5g32bmRyunMIcTHOyXrx8dysttNhr 6qI5yMYVVyyg3ZYJAh4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkWd-006XgC-Hn; Mon, 13 Mar 2023 15:55:51 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSl-006VSv-J1; Mon, 13 Mar 2023 15:51:55 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F200D22ADD; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHFiCsB3IDYKlAvL2lFtzoZfB7BMGeJXyYnJ8qTY5Eo=; b=icBNQHMBpLDwzITR4vIgyITKGULzMAEnktGY9mFl4ZKs8y5/CxWG593LGhEITrEZd6GFsF mDEq6fupN5oKcErGPWs3TlakezzunQ2ybgrpBTOv8JowPR805y2OqBVfT8rBf3b1HFevXg bCFa4R1pY1WeOxuyoNoNIyFmAxPaiMA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHFiCsB3IDYKlAvL2lFtzoZfB7BMGeJXyYnJ8qTY5Eo=; b=Pt2E3/tzSNiybftYLacs6wwVm6tld2888mfJDI0sKQf61xJBo5r7f/hqBUjTexCig8O+j9 B1HX6zpmcIFtRzDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B6E9513517; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mDe0K5BGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:44 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 18/25] drm/tilcdc: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:31 +0100 Message-Id: <20230313155138.20584-19-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085152_066123_EF099330 X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 4ca426007dc8..fe56beea3e93 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -384,7 +384,7 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev) goto init_failed; priv->is_registered = true; - drm_fbdev_generic_setup(ddev, bpp); + drm_fbdev_dma_setup(ddev, bpp); return 0; init_failed: From patchwork Mon Mar 13 15:51:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172793 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5A36EC61DA4 for ; Mon, 13 Mar 2023 15:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xYPh+ftwcAYS47QhomfAHjVHBfkihUEQ7TuVthc3xpo=; b=OmQ7b5GqNoS9Ow L69VG5Dda71geuozZq/jmcmUDwNuDdG9e0AVnvpZoElJVFpL5c4BJ9WKoS8S+mmLpkJZnoJu2ThiM 3CuMn9sc2e3cHsq3kvDZwtdVQ7TijZhV1mPDyAyq4xwu6stcYiojvcAYReN0Dg6jUC90RfI/Dyl2Y rlob6qEipU1mp2kHq9SztdSATl6LuPJgW0UjSKDN4q9LArWByzz2Zb258c8eB+GkAClHiWNuT2wyF HKlFVQI8Tj5aOBfZ3CpLZu3xqc5N7pt5O+GOD01s5rxqhmcEK1F70kUp7ctdBCIT/Ixd1P6NwdFBe sR5jtmZK5FJlhYpcIrrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkXB-006Y1U-QT; Mon, 13 Mar 2023 15:56:25 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSl-006VSw-I1; Mon, 13 Mar 2023 15:51:56 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 37FCA22ADE; Mon, 13 Mar 2023 15:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uaaDncR+NAiG12dcHe+qzbnHajGTEwLoznBzGG7LNzo=; b=Eg3jKFtZ7S8CPGj5VIz3a5Q2PhXwqKyu5CsZL/qXUavVbLnOFqDXtK4OQA6Z6Fb0ie2ftD dNpARZ9iA8f1WT8mhCHec8VKi69cJr6jsNCdrPYnQyqGzSVwALd9eV5I9lRx+uL4bDcZUE dZVf7W0jE53zjDi9ner3EtEtXFgq9v0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uaaDncR+NAiG12dcHe+qzbnHajGTEwLoznBzGG7LNzo=; b=cjKCMg1p1LCIaVOaBVqhlkDHEQaNWQphy1Nq0QimVUCu2Qa3VJIlRW79dxyMUlZo5uWA1M DjDLo39lcvX46YAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 018B0139F9; Mon, 13 Mar 2023 15:51:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IO05O5BGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:44 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 19/25] drm/arcpgu: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:32 +0100 Message-Id: <20230313155138.20584-20-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085152_092843_A82625CD X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tiny/arcpgu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c index 611bbee15071..e5b10e41554a 100644 --- a/drivers/gpu/drm/tiny/arcpgu.c +++ b/drivers/gpu/drm/tiny/arcpgu.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -394,7 +394,7 @@ static int arcpgu_probe(struct platform_device *pdev) if (ret) goto err_unload; - drm_fbdev_generic_setup(&arcpgu->drm, 16); + drm_fbdev_dma_setup(&arcpgu->drm, 16); return 0; From patchwork Mon Mar 13 15:51:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172808 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 ACF87C6FD19 for ; Mon, 13 Mar 2023 15:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lPYc834W6M0ntJrXAke9ViVeO4UcDMZylXuXtG6V7HQ=; b=e/ZKd8rGSngoHE l1jB2YMbAg0kZEM+WnTbR7oZ81Np6pbb4jAix2lYjBgyI1kyIrBRNMm8w11ufZd8S6HkaYYyFIU7x aWoRFXSmKkH+E8ZmC2zBRFDZSB3ptESvVjpFlQt28wk5G5MOObgss7Iv9hKWAIS7qGDOJwXIV2IxO P3OG+foysV+WuS9eIzLn34iU3ugWLdDkEUZXOYGU+gducD2DqSxrJsEOI7fmlc8aldMDECVhsTxBe yS6+14a+VL59uKWxGsR+Y9r1Scc4hqO4wsnZuIBSqw0xkVMaAfVnvfuoBbi5YCblF37ep1fPFqJLs I9yVtrVwMitNVD7VH1Kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkYy-006Yy9-2Y; Mon, 13 Mar 2023 15:58:16 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSn-006VVH-HZ; Mon, 13 Mar 2023 15:51:57 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7B3E71FE1D; Mon, 13 Mar 2023 15:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L93lWgJRIuBGoR48iodJJKhwvTdp+KkfaYG8MtRn1I4=; b=1/P+p9s1jnEL+/LlgLInSo8oUWls3Qy5ylHPkhy/+vYj+xP1ddQ6vCgCWb55rdlbPpydHx DUXeENg6zxRoRoEs9JrJaZbGKv/kGPc1VxbqENClhivflq7SWE8G8HVEZbIzIjwM/uM6Z+ tZz42d7M5RXKpm8+GGLUX9KohA9WOoY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L93lWgJRIuBGoR48iodJJKhwvTdp+KkfaYG8MtRn1I4=; b=UE57EwzWTrgenIc/eWI+NWeoM8dgCOIeDhY057uvTeJFev7UDfZ8q1Gq6P62ieBan20ZiL jiwJa7pNIJZMoZDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3BD3A13517; Mon, 13 Mar 2023 15:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iK28DZFGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:45 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 20/25] drm/tve200: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:33 +0100 Message-Id: <20230313155138.20584-21-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085153_797207_1F44F354 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij --- drivers/gpu/drm/tve200/tve200_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 0d05c386d303..abd557332b28 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -227,7 +227,7 @@ static int tve200_probe(struct platform_device *pdev) * Passing in 16 here will make the RGB565 mode the default * Passing in 32 will use XRGB8888 mode */ - drm_fbdev_generic_setup(drm, 16); + drm_fbdev_dma_setup(drm, 16); return 0; From patchwork Mon Mar 13 15:51:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172810 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 F0703C61DA4 for ; Mon, 13 Mar 2023 16:00:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LNtTmRg+C7JNSYjITmzbOb/zUCr6Cf+a/X5+DZb8tIg=; b=ICsZCtsVb6KnqN 88xwOnOMeIOnslW5H9hpSLLVa15mNH4oNkR5ARKcjiccNJHJWbIH2TlJXZb4za4NOFaeRthqERUPq bRPNkly8TjCt7Wo6bPpuYg3UCA5tGlPDUpVuGZXPV5+nz9tNUfgI9Y95otk7ZE+E0c61a5pXUoT98 Qs9htvLn9lFuQVY0s7CWRXNm15G02g3iehiNC3oQYbRUoN2mH0WE+Ug/IhUmA9Kujs04rGtvhVJjF hGFSA8ovvB7jXvdRf3FMJZYUdtHwCiltg5nvL1EJuamSat+FZ/A2FznBCHWkYMvx8uSRZbw+LchdT XOZiTzM3NMlrlgJjxWSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkaX-006Zib-2Y; Mon, 13 Mar 2023 15:59:53 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSp-006VWf-BK; Mon, 13 Mar 2023 15:51:59 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BF97A1FE1E; Mon, 13 Mar 2023 15:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iVPD3hmO7oBhoUD8QW0KwzqOFpqLgHoEibuscV/kT6Y=; b=lUaP6DoJE3QYOVpVUjA/uuZ3KhbXwT0vffOZLpK3gHMvdGuGuyZ98ifj43GFz+tkqmKmc9 GN1BUduz9KUso0n++u1MTJqvYoiw0LTM5SmaO2bFX4dwLEgpYSVEDGGP6Y/H+7A0cTK0nO OoVPnMxQK7A3DELvOcXA1DEvmkJEmMc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iVPD3hmO7oBhoUD8QW0KwzqOFpqLgHoEibuscV/kT6Y=; b=FcIUu7F5RTx4gTbDF9bZviIfY2WWQvmh8yF9kIVIFiePQbGzRovpb4iOnBXMB35W7b+l2P WSfk20VeViZp9dAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 80214139F9; Mon, 13 Mar 2023 15:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eMdgHpFGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:45 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 21/25] drm/vc4: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:34 +0100 Message-Id: <20230313155138.20584-22-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085155_661670_33F65CC4 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/vc4/vc4_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 0ccaee57fe9a..c8bf954042e0 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -387,7 +387,7 @@ static int vc4_drm_bind(struct device *dev) if (ret < 0) goto unbind_all; - drm_fbdev_generic_setup(drm, 16); + drm_fbdev_dma_setup(drm, 16); return 0; From patchwork Mon Mar 13 15:51:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172807 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E4C4EC74A4B for ; Mon, 13 Mar 2023 15:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2QWlH3L1dk6v/IKHX30wBa+gHs2ewG7++YXdNYcZI9A=; b=kPDUm1wds+wlMw 6xSZcjFjeyxuGxeZYU745xeVkuLbrcC8s9fPyKw2+xQ5Qgl6vNdNPJxm02OFY8f3XyWVk4BfUXM4A UUVDnhsdGSkbHLM+8CaRCqE5uSGFJjn3NwgYZTpJC8bdNK9AMkIbSuoREjDFrsVTc3eivj3WVfRb2 8tTEH6bZ+2P0T1+QU4yEJsll84W5jOHGV+RHt/jz6iFyJtrAfguK0rTe4QxAGPRJTZXbcSrt/Oblh wlxRiJGw0ASQVKKbHw/uM2ZMb4oekfBmHReVgD9/19EUWCFN2Ulbw8YCel54EjxoOC+EevXl3Wu/A SIdlTXne9+niRS+lFL1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkYz-006YzQ-RF; Mon, 13 Mar 2023 15:58:17 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSp-006VWg-BJ; Mon, 13 Mar 2023 15:51:58 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0DD131FE1F; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xMwjnP6zIVSQGG8pAXetBMHsPFi3J0uJb5Gjp9vR/N0=; b=osxUvvhDs1MjPOCyADk4yoalDlkr83uJzQNFDLqc3izWnellFSx1hd2Iq3dPeavoS9MGYE LrcmZWD4QsUmLtdxE+SdrNMXG8ZyDMlLqFCjLH8ZL9HTh5Ehj5mRVBTCcqtpCf7XprEiFW WFjjJRTd2VmdBxMixtv3KYmGRbIH2Q0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xMwjnP6zIVSQGG8pAXetBMHsPFi3J0uJb5Gjp9vR/N0=; b=KnkC9NyReA2uMFScf39WYAR46YQwvpmtVSzorprNHk4/f/W/HYt4uYcNG5mxa47Qa88gt+ 4Fh8Dt4yOqJxplBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C3C0613517; Mon, 13 Mar 2023 15:51:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6JjcLpFGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:45 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 22/25] drm/xlnx: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:35 +0100 Message-Id: <20230313155138.20584-23-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085155_616136_78BF7646 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/xlnx/zynqmp_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c index 776ef5480206..a7f8611be6f4 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_kms.c +++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -515,7 +515,7 @@ int zynqmp_dpsub_drm_init(struct zynqmp_dpsub *dpsub) goto err_poll_fini; /* Initialize fbdev generic emulation. */ - drm_fbdev_generic_setup(drm, 24); + drm_fbdev_dma_setup(drm, 24); return 0; From patchwork Mon Mar 13 15:51:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172792 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 62F36C6FD1F for ; Mon, 13 Mar 2023 15:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yZ5mTDNFpJl9Trk3E0SsBozsJotE97uK2vDrO3Yp30o=; b=dN4M9GcCJatJNv 6XnNSwDRlCj/Du5zDajSlAyoH4WvxJpkvqR1I4D3E52mWt4BAWZJDKv8/9x+BIg+Nqfnw2TbK7fIy Pz3T1x4z+xF/qNqF8ED02+ZktBUnrwBR2vN+WwGxFmddez4rhitAux1lAco/oir831QspbB5JNxZs VEJAhUGoelMlpRcWbTS43kSdXhwBlQfZ41kV6yfWFDwS6QNSoXY2jUu7uMsBOaPJHHTvb1jMZF1PN 2x4sbjlDz+Cc/cF8CE4PGx8PTFZsQyrQWE9MdRAR20ahNYg2Zw9Uz4gAmWAn9/yVmO9HsDYGBIgE/ 8NlML/ZvFc4ULsitsusg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkXC-006Y29-Fv; Mon, 13 Mar 2023 15:56:26 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSl-006VSt-NM; Mon, 13 Mar 2023 15:51:56 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 515C922AE0; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RrI2Z623laCpkz5xcMwL8KspUXzsIgPKKjaFMh8wl0U=; b=wi8QMsI5aDOplZY/NoEJsVAlSpGSZ7Xb354KfzRV7zXDfr0ZfFfWIl+SF6BRm4XmDo1N2C OjA66cNc+VqYhm6p4vLkQO7UiOt9wit/9CNvMhP7tkG55kA/PsqGCHD55zcOylLF6a70Qr zXUSfuA1vw4330xlp5Zx5FG0yQFCUwU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RrI2Z623laCpkz5xcMwL8KspUXzsIgPKKjaFMh8wl0U=; b=VN6Lcutmcpynay5pIsmC9uuTNoJNS5ExZKUPLPJXIvpdYJInd+iB9OD3R6RMoTScynQ7d/ XnKdYjSpTRp6nLBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 12BCB139F9; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KCCqA5JGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:46 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 23/25] drm/mcde: Do not use dirty GEM FB handling Date: Mon, 13 Mar 2023 16:51:36 +0100 Message-Id: <20230313155138.20584-24-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085152_020169_599F065A X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org From: Linus Walleij This driver has no way to handle damage, the reason the drm_gem_fb_create_with_dirty() was used was because I had the ambition that the driver would only send out updates to DSI command displays whenever something changed, so as to minimize traffic. It turns out this ambition with command mode isn't working in practice because all the MCDE does is to create a continuous stream of DSI commands and while it is possible to send single frame updates with it, it's not been worthwhile. So we are just setting up continuous updates. Reported-by: Thomas Zimmermann Link: https://lore.kernel.org/dri-devel/0e789778-03ca-e3cb-9c94-e8b55573894c@suse.de/ Signed-off-by: Linus Walleij Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/mcde/mcde_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index 4aedb050d2a5..a592ad0d7886 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -94,7 +94,7 @@ #define MCDE_PID_MAJOR_VERSION_MASK 0xFF000000 static const struct drm_mode_config_funcs mcde_mode_config_funcs = { - .fb_create = drm_gem_fb_create_with_dirty, + .fb_create = drm_gem_fb_create, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, }; From patchwork Mon Mar 13 15:51:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172809 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 12F67C6FD1F for ; Mon, 13 Mar 2023 16:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ybNq/p07Z11A8I+mkVBnw9efuAOaFNXtL69GukFRrOI=; b=ceAWsdPMxDSPVd 2CHMgN4GPUTbtMXZWsjotqsenLzJ5JjSzd6REWo7ZvQ49QqfSChSY9l91sa9YpAn/P/RSKkn0FMUv NArz9hyjzDEI9p790JQfAZkHB6idxQzVRtH5gFXCbmU6cnjZNVtpe1v8UoynGWAQ8Pq25bPYOtOG0 U+ege7RcrsPZgweMacWyNKq0sh2iEOGYloJ6V/b/K4balYyKokqTURlcWdR6uDOhE8Y3ZVAedQhQl jTgiiOlMOTRLYyRzeXhv6rd2ydlfDHwNyuE/ApmMWwbVfzF1w8fU3AAVqQcTIkfVxGVUSvWDeIZbe TCThK1JhGsCyhRpdzdSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkaU-006ZhG-TZ; Mon, 13 Mar 2023 15:59:51 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSp-006VWh-CH; Mon, 13 Mar 2023 15:51:59 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 911591FE20; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2pZK9hJVZsRtkuXk4C1IP2Gtl5RKfKzAeU/AIX4IAqY=; b=TtLkiSgbd5/M8hmaMjQW6VQqbIH46B6pho2w6vL7NVtzMoJU1+j/k/CmU4utAkQvglfr6n 1A/mfq5E1J0gD6D8/ozCwk99+gmIE1j4tzw1KqwO8D3dRxtLsrQdvPLaOOJplMtV3H8KQa f/3riqT83ipCpeSMcv/R7mnQRPhxwbI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2pZK9hJVZsRtkuXk4C1IP2Gtl5RKfKzAeU/AIX4IAqY=; b=zdpwQmo8klnYhpkZZMI6/wOcJRQ4rK/nZO0q0kfFEkb+mBwa3slhkRewisiWrJhPy4eBzd psA0Khfyx9J737BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5521E13517; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SPDbE5JGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:46 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:37 +0100 Message-Id: <20230313155138.20584-25-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085155_655357_BDCA4268 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Reported-by: Linus Walleij Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ@mail.gmail.com/ Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Tested-by: Linus Walleij --- drivers/gpu/drm/mcde/mcde_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index a592ad0d7886..a8cd86c06c14 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -69,7 +69,7 @@ #include #include #include -#include +#include #include #include #include @@ -237,7 +237,7 @@ static int mcde_drm_bind(struct device *dev) if (ret < 0) goto unbind; - drm_fbdev_generic_setup(drm, 32); + drm_fbdev_dma_setup(drm, 32); return 0; From patchwork Mon Mar 13 15:51:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13172806 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2E95CC61DA4 for ; Mon, 13 Mar 2023 15:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZSgrTSYMsDVZQ/CFgfBiZh6U4IKlzebLLZ4OKO+Y3Ck=; b=kLq2rYr5TF0XTC kpNvdTNpotldUYrRNnJ9Vm1CKoJ7VTs6LBVBExULF7R6ZhLj/mcMEw06T+txsHPP44Zw+Bd53Ge/G DwfmdehF0VesZ6FLHgoxk6JqGRv4Ndi2ZqOgx+AXIA/f4Rp0+fnyOlFhThxDOVKARZY31gHIIdfLj enNJiYn11Bndkj/Fsm3julWtzyk/meLPdbPFXDX7FXnbgveGujjptp51gRsZz+npJ/Cxb4kns2YlA K+Dvm3Ug+VlhQFcen4kAGmUadtm7VsZl7FpuJctziLrTdVn4tQEBjbkkv5w2Vmsj2QNYoOOoADr5L cyvFvX+UAOT2Ki3A6IzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkYy-006Yyf-S3; Mon, 13 Mar 2023 15:58:17 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbkSn-006VVG-If; Mon, 13 Mar 2023 15:51:58 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D3D6422AE2; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YvjxTL+yszp3Qk83TsIdpDskTlMr4i6JlrFyXHd0Dq4=; b=DoLM46yIRboaMIKMa8epGJMiWJyMZ+D+CUJG4w+79JP9NgpZSxGVWKbtOZ0OIAzgVOaudv wZsk6hFWNtM1TFQu3r6ZBs4TeUH8nrECdhN6qy9j7LoVu5gL96N3IZ1HeqJ8aSC38fyxSr 23ksaRSyPMNioUWhJKn4B31d7CSvUDo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678722706; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YvjxTL+yszp3Qk83TsIdpDskTlMr4i6JlrFyXHd0Dq4=; b=NfUPabzmLwXAej4fxUfruTNpIBzlnHdOCQ4KwUYDtQF7ZNBAH5V+qDkMolTYLFcNij3IsO L4WQN2y7QF94aPDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9537313517; Mon, 13 Mar 2023 15:51:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KK2OI5JGD2RhegAAMHmgww (envelope-from ); Mon, 13 Mar 2023 15:51:46 +0000 From: Thomas Zimmermann To: javierm@redhat.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch, linus.walleij@linaro.org Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Thomas Zimmermann Subject: [PATCH v2 25/25] drm/pl111: Use GEM DMA fbdev emulation Date: Mon, 13 Mar 2023 16:51:38 +0100 Message-Id: <20230313155138.20584-26-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313155138.20584-1-tzimmermann@suse.de> References: <20230313155138.20584-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_085153_836318_DEC8B1E8 X-CRM114-Status: GOOD ( 12.05 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Reported-by: Linus Walleij Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ@mail.gmail.com/ Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij --- drivers/gpu/drm/pl111/pl111_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 00deba0b7271..4b2a9e9753f6 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include @@ -308,7 +308,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev, if (ret < 0) goto dev_put; - drm_fbdev_generic_setup(drm, priv->variant->fb_bpp); + drm_fbdev_dma_setup(drm, priv->variant->fb_bpp); return 0;