* [PATCHv1] drm/omap: get fbdev working for manually updated display
@ 2021-05-01 20:00 Sebastian Reichel
2021-05-01 20:12 ` Laurent Pinchart
2021-05-03 8:59 ` Tomi Valkeinen
0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Reichel @ 2021-05-01 20:00 UTC (permalink / raw)
To: Sebastian Reichel, Tomi Valkeinen, Tony Lindgren
Cc: Carl Philipp Klemm, kernel, David Airlie, Merlijn Wajer,
Sebastian Reichel, dri-devel, Laurent Pinchart, linux-omap
Running a legacy application, which directly uses /dev/fb0
currently results in display not being refreshed when the
application mmaps the memory instead of calling write().
Deferred IO support will also schedule dirty_work with the
damage collected from the mmap page writes and thus gets
some more legacy applications working.
Delay frequency settings have been taken over from
drm_fb_helper_generic_probe().
Reported-by: Carl Philipp Klemm <philipp@uvos.xyz>
Tested-by: Carl Philipp Klemm <philipp@uvos.xyz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
Hi,
I still need to fix my Droid 4, so I only compile tested this
myself.
-- Sebastian
---
drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 42eac6ad12bd..fc3897d2d7cc 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -87,6 +87,11 @@ static const struct fb_ops omap_fb_ops = {
.fb_imageblit = drm_fb_helper_sys_imageblit,
};
+static struct fb_deferred_io omap_fb_defio = {
+ .delay = HZ / 20,
+ .deferred_io = drm_fb_helper_deferred_io,
+};
+
static int omap_fbdev_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
@@ -176,6 +181,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
drm_fb_helper_fill_info(fbi, helper, sizes);
+ fbi->fbdefio = &omap_fb_defio;
+ fb_deferred_io_init(fbi);
+
dev->mode_config.fb_base = dma_addr;
fbi->screen_buffer = omap_gem_vaddr(fbdev->bo);
base-commit: 152d32aa846835987966fd20ee1143b0e05036a0
--
2.30.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv1] drm/omap: get fbdev working for manually updated display
2021-05-01 20:00 [PATCHv1] drm/omap: get fbdev working for manually updated display Sebastian Reichel
@ 2021-05-01 20:12 ` Laurent Pinchart
2021-05-03 8:59 ` Tomi Valkeinen
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2021-05-01 20:12 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Carl Philipp Klemm, kernel, Tony Lindgren, Tomi Valkeinen,
Merlijn Wajer, Sebastian Reichel, dri-devel, David Airlie,
linux-omap
On Sat, May 01, 2021 at 10:00:50PM +0200, Sebastian Reichel wrote:
> Running a legacy application, which directly uses /dev/fb0
> currently results in display not being refreshed when the
> application mmaps the memory instead of calling write().
>
> Deferred IO support will also schedule dirty_work with the
> damage collected from the mmap page writes and thus gets
> some more legacy applications working.
>
> Delay frequency settings have been taken over from
> drm_fb_helper_generic_probe().
>
> Reported-by: Carl Philipp Klemm <philipp@uvos.xyz>
> Tested-by: Carl Philipp Klemm <philipp@uvos.xyz>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
> Hi,
>
> I still need to fix my Droid 4, so I only compile tested this
> myself.
>
> -- Sebastian
> ---
> drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index 42eac6ad12bd..fc3897d2d7cc 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -87,6 +87,11 @@ static const struct fb_ops omap_fb_ops = {
> .fb_imageblit = drm_fb_helper_sys_imageblit,
> };
>
> +static struct fb_deferred_io omap_fb_defio = {
> + .delay = HZ / 20,
> + .deferred_io = drm_fb_helper_deferred_io,
> +};
Wish this could be const :-S
> +
> static int omap_fbdev_create(struct drm_fb_helper *helper,
> struct drm_fb_helper_surface_size *sizes)
> {
> @@ -176,6 +181,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
>
> drm_fb_helper_fill_info(fbi, helper, sizes);
>
> + fbi->fbdefio = &omap_fb_defio;
> + fb_deferred_io_init(fbi);
> +
This looks good to me. Trusting the Tested-by,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> dev->mode_config.fb_base = dma_addr;
>
> fbi->screen_buffer = omap_gem_vaddr(fbdev->bo);
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCHv1] drm/omap: get fbdev working for manually updated display
2021-05-01 20:00 [PATCHv1] drm/omap: get fbdev working for manually updated display Sebastian Reichel
2021-05-01 20:12 ` Laurent Pinchart
@ 2021-05-03 8:59 ` Tomi Valkeinen
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2021-05-03 8:59 UTC (permalink / raw)
To: Sebastian Reichel, Sebastian Reichel, Tony Lindgren
Cc: Carl Philipp Klemm, kernel, David Airlie, Merlijn Wajer,
dri-devel, Laurent Pinchart, linux-omap
On 01/05/2021 23:00, Sebastian Reichel wrote:
> Running a legacy application, which directly uses /dev/fb0
> currently results in display not being refreshed when the
> application mmaps the memory instead of calling write().
>
> Deferred IO support will also schedule dirty_work with the
> damage collected from the mmap page writes and thus gets
> some more legacy applications working.
>
> Delay frequency settings have been taken over from
> drm_fb_helper_generic_probe().
>
> Reported-by: Carl Philipp Klemm <philipp@uvos.xyz>
> Tested-by: Carl Philipp Klemm <philipp@uvos.xyz>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
> Hi,
>
> I still need to fix my Droid 4, so I only compile tested this
> myself.
>
> -- Sebastian
> ---
> drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index 42eac6ad12bd..fc3897d2d7cc 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -87,6 +87,11 @@ static const struct fb_ops omap_fb_ops = {
> .fb_imageblit = drm_fb_helper_sys_imageblit,
> };
>
> +static struct fb_deferred_io omap_fb_defio = {
> + .delay = HZ / 20,
> + .deferred_io = drm_fb_helper_deferred_io,
> +};
> +
> static int omap_fbdev_create(struct drm_fb_helper *helper,
> struct drm_fb_helper_surface_size *sizes)
> {
> @@ -176,6 +181,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
>
> drm_fb_helper_fill_info(fbi, helper, sizes);
>
> + fbi->fbdefio = &omap_fb_defio;
> + fb_deferred_io_init(fbi);
> +
> dev->mode_config.fb_base = dma_addr;
>
> fbi->screen_buffer = omap_gem_vaddr(fbdev->bo);
>
> base-commit: 152d32aa846835987966fd20ee1143b0e05036a0
>
On DRA76 EVM, with parallel output, this causes cache-flush problem.
When I run my simple fbtest, which just draws to the fb, I see lots of
cache-line artifacts.
When I run kmstest (from kms++), I get a flood of list corruptions
somewhere in omap_gem. Is it related to "Deferred I/O is not compatible
with SHMEM"?
Tomi
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-03 8:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 20:00 [PATCHv1] drm/omap: get fbdev working for manually updated display Sebastian Reichel
2021-05-01 20:12 ` Laurent Pinchart
2021-05-03 8:59 ` Tomi Valkeinen
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).