From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
deller@gmx.de, airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH v2 21/43] drm/fbdev-dma: Implement damage handling and deferred I/O
Date: Tue, 16 Apr 2024 14:18:24 +0200 [thread overview]
Message-ID: <871q757b73.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20240410130557.31572-22-tzimmermann@suse.de>
Thomas Zimmermann <tzimmermann@suse.de> writes:
> Add support for damage handling and deferred I/O to fbdev-dma. This
> enables fbdev-dma to support all DMA-memory-based DRM drivers, even
> such with a dirty callback in their framebuffers.
>
> The patch adds the code for deferred I/O and also sets a dedicated
> helper for struct fb_ops.fb_mmap that support coherent mappings.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/drm_fbdev_dma.c | 65 ++++++++++++++++++++++++++-------
> 1 file changed, 51 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
> index 6c9427bb4053b..8ffd072368bca 100644
> --- a/drivers/gpu/drm/drm_fbdev_dma.c
> +++ b/drivers/gpu/drm/drm_fbdev_dma.c
> @@ -4,6 +4,7 @@
>
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_drv.h>
> +#include <drm/drm_fb_dma_helper.h>
> #include <drm/drm_fb_helper.h>
> #include <drm/drm_framebuffer.h>
> #include <drm/drm_gem_dma_helper.h>
> @@ -35,6 +36,22 @@ static int drm_fbdev_dma_fb_release(struct fb_info *info, int user)
> return 0;
> }
>
> +FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(drm_fbdev_dma,
> + drm_fb_helper_damage_range,
> + drm_fb_helper_damage_area);
> +
Shouldn't this be FB_GEN_DEFAULT_DEFERRED_DMAMEM_OPS() instead ?
I know that right now the macros are the same but I believe that it was
added it for a reason ?
> +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_framebuffer *fb = fb_helper->fb;
> + struct drm_gem_dma_object *dma = drm_fb_dma_get_gem_obj(fb, 0);
> +
> + if (!dma->map_noncoherent)
> + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
I noticed that some drivers do:
vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
I see that vm_get_page_prot() is a per-architecture function, but I don't
know about the implications of getting the pgprot_t from the vma->vm_flags
set or just using the current vma->vm_page_prot value...
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2024-04-16 12:18 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 13:01 [PATCH v2 00/43] drm: Provide fbdev emulation per memory manager Thomas Zimmermann
2024-04-10 13:01 ` [PATCH v2 01/43] drm/fbdev-generic: Do not set physical framebuffer address Thomas Zimmermann
2024-04-15 6:43 ` Maxime Ripard
2024-04-10 13:01 ` [PATCH v2 02/43] fbdev/deferred-io: Move pageref setup into separate helper Thomas Zimmermann
2024-04-10 13:01 ` [PATCH v2 03/43] fbdev/deferred-io: Clean up pageref on lastclose Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 04/43] fbdev/deferred-io: Test screen_buffer for vmalloc'ed memory Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 05/43] fbdev/deferred-io: Test smem_start for I/O memory Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 06/43] fbdev/deferred-io: Always call get_page() for framebuffer pages Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 07/43] fbdev/deferred-io: Provide get_page hook in struct fb_deferred_io Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 08/43] drm/fbdev: Add fbdev-shmem Thomas Zimmermann
2024-04-16 11:25 ` Javier Martinez Canillas
2024-04-16 12:07 ` Thomas Zimmermann
2024-04-16 12:23 ` Javier Martinez Canillas
2024-04-17 7:30 ` Geert Uytterhoeven
2024-04-10 13:02 ` [PATCH v2 09/43] drm/ast: Use fbdev-shmem Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 10/43] drm/gud: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 11/43] drm/hyperv: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 12/43] drm/mgag200: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 13/43] drm/solomon: " Thomas Zimmermann
2024-04-16 11:35 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 14/43] drm/tiny/cirrus: " Thomas Zimmermann
2024-04-16 11:36 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 15/43] drm/tiny/gm12u320: " Thomas Zimmermann
2024-04-10 13:20 ` Hans de Goede
2024-04-10 13:02 ` [PATCH v2 16/43] drm/tiny/ofdrm: " Thomas Zimmermann
2024-04-16 11:43 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 17/43] drm/tiny/simpledrm: " Thomas Zimmermann
2024-04-16 11:43 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 18/43] drm/udl: " Thomas Zimmermann
2024-04-16 11:44 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 19/43] drm/virtio: " Thomas Zimmermann
2024-04-19 7:03 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 20/43] drm/vkms: " Thomas Zimmermann
2024-04-16 11:44 ` Javier Martinez Canillas
2024-04-16 16:03 ` Maíra Canal
2024-04-10 13:02 ` [PATCH v2 21/43] drm/fbdev-dma: Implement damage handling and deferred I/O Thomas Zimmermann
2024-04-16 12:18 ` Javier Martinez Canillas [this message]
2024-04-16 12:44 ` Thomas Zimmermann
2024-04-16 12:52 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 22/43] drm/arm/komeda: Use fbdev-dma Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 23/43] drm/hisilicon/kirin: " Thomas Zimmermann
2024-04-16 12:33 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 24/43] drm/imx/lcdc: " Thomas Zimmermann
2024-04-16 12:33 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 25/43] drm/ingenic: " Thomas Zimmermann
2024-04-10 15:00 ` Paul Cercueil
2024-04-10 13:02 ` [PATCH v2 26/43] drm/mediatek: " Thomas Zimmermann
2024-04-16 12:35 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 27/43] drm/panel/panel-ilitek-9341: " Thomas Zimmermann
2024-04-16 12:36 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 28/43] drm/renesas/rcar-du: " Thomas Zimmermann
2024-04-12 18:57 ` Laurent Pinchart
2024-04-12 19:03 ` Laurent Pinchart
2024-04-15 6:59 ` Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 29/43] drm/renesas/rz-du: " Thomas Zimmermann
2024-04-19 7:04 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 30/43] drm/renesas/shmobile: " Thomas Zimmermann
2024-04-12 19:03 ` Laurent Pinchart
2024-04-10 13:02 ` [PATCH v2 31/43] drm/rockchip: " Thomas Zimmermann
2024-04-16 12:36 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 32/43] drm/tiny/hx8357d: " Thomas Zimmermann
2024-04-16 12:37 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 33/43] drm/tiny/ili9163: " Thomas Zimmermann
2024-04-16 12:37 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 34/43] drm/tiny/ili9225: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 35/43] drm/tiny/ili9341: " Thomas Zimmermann
2024-04-16 12:38 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 36/43] drm/tiny/ili9486: " Thomas Zimmermann
2024-04-16 12:38 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 37/43] drm/tiny/mi0283qt: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 38/43] drm/tiny/panel-mipi-dbi: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 39/43] drm/tiny/repaper: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 40/43] drm/tiny/st7586: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 41/43] drm/tiny/st7735r: " Thomas Zimmermann
2024-04-10 13:02 ` [PATCH v2 42/43] drm/fbdev-generic: Convert to fbdev-ttm Thomas Zimmermann
2024-04-16 12:41 ` Javier Martinez Canillas
2024-04-10 13:02 ` [PATCH v2 43/43] drm/fbdev: Clean up fbdev documentation Thomas Zimmermann
2024-04-16 12:42 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871q757b73.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).