From: Thomas Zimmermann <tzimmermann@suse.de>
To: Francesco Lavra <flavra@baylibre.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Javier Martinez Canillas <javierm@redhat.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/fb-helper: Fix clipping when damage area spans a single scanline
Date: Mon, 4 May 2026 14:59:33 +0200 [thread overview]
Message-ID: <37e95374-bb59-4903-9a61-c90d221bf4cc@suse.de> (raw)
In-Reply-To: <b3c77e37128f8cc642ac7c14a5c269cd43c87cc4.camel@baylibre.com>
Hi
Am 30.04.26 um 17:35 schrieb Francesco Lavra:
> Friendly ping
Sorry, forgot this patch. It's merged now. Thanks a lot.
Best regards
Thomas
>
> On Tue, 2026-02-10 at 18:35 +0100, Francesco Lavra wrote:
>> When the damage area resulting from a dirty memory range spans a single
>> scanline, the width of the rectangle is calculated dynamically because it
>> may not coincide with the framebuffer width.
>> If the dirty range ends exactly at the end of the scanline, the `bit_end`
>> variable is incorrectly assigned a 0 value, which results in a bogus clip
>> rectangle where the x2 coordinate is 0. This prevents the dirty scanline
>> from being flushed to the hardware.
>> Change the calculation of the `bit_end` value to fix the x2 coordinate
>> value in the above edge case.
>>
>> Fixes: ded74cafeea9 ("drm/fb-helper: Clip damage area horizontally")
>> Signed-off-by: Francesco Lavra <flavra@baylibre.com>
>> ---
>> drivers/gpu/drm/drm_fb_helper.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c
>> b/drivers/gpu/drm/drm_fb_helper.c
>> index 4b47aa0dab35..d545342d24b3 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -608,7 +608,7 @@ static void drm_fb_helper_memory_range_to_clip(struct
>> fb_info *info, off_t off,
>> * the number of horizontal pixels that need an update.
>> */
>> off_t bit_off = (off % line_length) * 8;
>> - off_t bit_end = (end % line_length) * 8;
>> + off_t bit_end = bit_off + len * 8;
>>
>> x1 = bit_off / info->var.bits_per_pixel;
>> x2 = DIV_ROUND_UP(bit_end, info->var.bits_per_pixel);
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-05-04 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 17:35 Francesco Lavra
2026-02-11 10:03 ` Thomas Zimmermann
2026-04-30 15:35 ` Francesco Lavra
2026-05-04 12:59 ` Thomas Zimmermann [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=37e95374-bb59-4903-9a61-c90d221bf4cc@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=flavra@baylibre.com \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®