linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	daniel@ffwll.ch, deller@gmx.de, airlied@linux.ie,
	maarten.lankhorst@linux.intel.com
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 5/5] fbdev: Use pageref offset for deferred-I/O writeback
Date: Fri, 29 Apr 2022 09:34:01 +0200	[thread overview]
Message-ID: <00a89131-9cb6-4022-b7fd-7531c980ec32@redhat.com> (raw)
In-Reply-To: <20220426120359.17437-6-tzimmermann@suse.de>

On 4/26/22 14:03, Thomas Zimmermann wrote:
> Use pageref->offset instead of page->index for deferred-I/O writeback
> where appropriate. Distinguishes between file-mapping offset and video-
> memory offset. While at it, also remove unnecessary references to
> struct page.
> 
> Fbdev's deferred-I/O code uses the two related page->index and
> pageref->offset. The former is the page offset in the mapped file,
> the latter is the byte offset in the video memory (or fbdev screen
> buffer). It's the same value for fbdev drivers, but for DRM the values
> can be different. Because GEM buffer objects are mapped at an offset
> in the DRM device file, page->index has this offset added to it as well.
> We currently don't hit this case in DRM, because all affected mappings
> of GEM memory are performed with an internal, intermediate shadow buffer.
> 
> The value of page->index is required by page_mkclean(), which we
> call to reset the mappings during the writeback phase of the deferred
> I/O. The value of pageref->offset is for conveniently getting an offset
> into video memory in fb helpers.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Suggested-by: Javier Martinez Canillas <javierm@redhat.com>
> ---

Thanks for including this patch.

[snip]

>  	list_for_each_entry(pageref, pagereflist, list) {
> -		struct page *page = pageref->page;
> -		start = page->index << PAGE_SHIFT;
> +		start = pageref->offset;

It also has the side effect that makes the code easier to read and as you
said in the change description, eliminates the references to struct page.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat


  reply	other threads:[~2022-04-29  7:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 12:03 [PATCH v3 0/5] fbdev: Decouple deferred I/O from struct page Thomas Zimmermann
2022-04-26 12:03 ` [PATCH v3 1/5] fbdev: Put mmap for deferred I/O into drivers Thomas Zimmermann
2022-04-28  9:43   ` Dan Carpenter
2022-04-26 12:03 ` [PATCH v3 2/5] fbdev: Track deferred-I/O pages in pageref struct Thomas Zimmermann
2022-04-26 12:03 ` [PATCH v3 3/5] fbdev: Refactor implementation of page_mkwrite Thomas Zimmermann
2022-04-26 12:03 ` [PATCH v3 4/5] fbdev: Rename pagelist to pagereflist for deferred I/O Thomas Zimmermann
2022-04-29  7:21   ` Javier Martinez Canillas
2022-04-29  7:27     ` Thomas Zimmermann
2022-04-29  7:38       ` Javier Martinez Canillas
2022-04-26 12:03 ` [PATCH v3 5/5] fbdev: Use pageref offset for deferred-I/O writeback Thomas Zimmermann
2022-04-29  7:34   ` Javier Martinez Canillas [this message]
2022-04-26 12:05 ` [PATCH v3 0/5] fbdev: Decouple deferred I/O from struct page Thomas Zimmermann

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=00a89131-9cb6-4022-b7fd-7531c980ec32@redhat.com \
    --to=javierm@redhat.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=maarten.lankhorst@linux.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 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).