All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/fbdev: Implement fb_dirty for intel custom fb helper
Date: Wed, 21 Dec 2022 17:22:37 +0200	[thread overview]
Message-ID: <Y6MkvVJ1ZLnhaXBi@intel.com> (raw)
In-Reply-To: <4e929234-8a88-4d81-7b4b-19d4d5e52b44@suse.de>

On Wed, Dec 21, 2022 at 04:08:13PM +0100, Thomas Zimmermann wrote:
> Hi
> 
> Am 21.12.22 um 15:51 schrieb Ville Syrjälä:
> > On Wed, Dec 21, 2022 at 11:49:59AM +0100, Thomas Zimmermann wrote:
> >> Hi
> >>
> >> Am 29.11.22 um 13:43 schrieb Jouni Högander:
> >>> After splitting generic drm_fb_helper into it's own file it's left to
> >>> helper implementation to have fb_dirty function. Currently intel
> >>> fb doesn't have it. This is causing problems when PSR is enabled.
> >>>
> >>> Implement simple fb_dirty callback to deliver notifications to psr
> >>> about updates in fb console.
> >>
> >> I'm a bit confused about i915's use of fb_dirty here. How is this
> >> supposed to interact with mmap?  i915 doesn't use deferred I/O so fbdev
> >> mmap will never call fb_dirty if userspace writes to mmap'ed pages. Is
> >> this only required for the kernel's graphics console?
> > 
> > It's required for everything. mmap is presumably borked for
> > the cases where we can't use any hw based damage tracking.
> 
> In this case, it would make sense to implement the update with fb_dirty 
> (instead of the fb_ops I mentioned).
> 
> For mmap you can use fbdev's deferred I/O. There's 
> drm_fb_helper_deferrer_io() that tracks mmaped pages and regularly calls 
> fb_dirty to let the driver do an update.

Not sure we want the extra defio overhead for a feature
no one is likely to ever need.

If we actually cared about any of this we could perhaps
just hook into .fb_mmap() and turn off any stuff that
needs software dirty tracking while the buffer is mapped.

-- 
Ville Syrjälä
Intel

      reply	other threads:[~2022-12-21 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 12:43 [Intel-gfx] [PATCH] drm/i915/fbdev: Implement fb_dirty for intel custom fb helper Jouni Högander
2022-11-29 13:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-11-29 17:21 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-12-20 17:53 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2022-12-20 17:58   ` Ville Syrjälä
2022-12-21  9:28     ` Hogander, Jouni
2022-12-21 10:49 ` Thomas Zimmermann
2022-12-21 11:22   ` Hogander, Jouni
2022-12-21 14:51   ` Ville Syrjälä
2022-12-21 15:08     ` Thomas Zimmermann
2022-12-21 15:22       ` Ville Syrjälä [this message]

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=Y6MkvVJ1ZLnhaXBi@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.