From: Nam Cao <namcaov@gmail.com>
To: ChanSoo Shin <csshin9928@gmail.com>, andy@kernel.org
Cc: gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
ChanSoo Shin <csshin9928@gmail.com>
Subject: Re: [PATCH] fbtft: Improve damage_range to mark only changed rows
Date: Wed, 28 Jan 2026 18:05:26 +0100 [thread overview]
Message-ID: <87h5s5r7l5.fsf@yellow.woof> (raw)
In-Reply-To: <20260128130503.868466-1-csshin9928@gmail.com>
ChanSoo Shin <csshin9928@gmail.com> writes:
> Instead of marking the entire display as dirty, calculate
> start_row and end_row based on off/len and mark only those rows.
> This improves performance for partial framebuffer updates.
>
> Signed-off-by: ChanSoo Shin <csshin9928@gmail.com>
> ---
> drivers/staging/fbtft/fbtft-core.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index 8a5ccc8ae0a1..0fbdfdaaa94d 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -415,8 +415,11 @@ static void fbtft_ops_damage_range(struct fb_info *info, off_t off, size_t len)
> {
> struct fbtft_par *par = info->par;
>
> - /* TODO: only mark changed area update all for now */
> - par->fbtftops.mkdirty(info, -1, 0);
> + __u32 width = info->var.xres;
> + __u32 start_row = off / width;
> + __u32 end_row = (off + len - 1) / width;
> +
> + par->fbtftops.mkdirty(info, start_row, end_row);
This doesn't look right: mkdirty() takes start row and number of rows,
not start row and end row. Don't be fooled by how mkdirty() is declared,
look at how it is implemented.
Nam
next prev parent reply other threads:[~2026-01-28 17:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 13:05 [PATCH] fbtft: Improve damage_range to mark only changed rows ChanSoo Shin
2026-01-28 13:28 ` Dan Carpenter
2026-01-28 17:05 ` Nam Cao [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-01-28 9:22 Waffle0823
2026-01-28 9:57 ` Greg KH
2026-01-28 8:57 Waffle0823
2026-01-28 9:03 ` Greg KH
2026-01-28 13:26 ` Dan Carpenter
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=87h5s5r7l5.fsf@yellow.woof \
--to=namcaov@gmail.com \
--cc=andy@kernel.org \
--cc=csshin9928@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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