From: Javier Martinez Canillas <javierm@redhat.com>
To: John Keeping <jkeeping@inmusicbrands.com>
Cc: John Keeping <jkeeping@inmusicbrands.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] drm/ssd130x: ensure ssd132x pitch is correct
Date: Wed, 15 Jan 2025 00:19:28 +0100 [thread overview]
Message-ID: <87seplvv9b.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20250113152752.3369731-4-jkeeping@inmusicbrands.com>
John Keeping <jkeeping@inmusicbrands.com> writes:
> The bounding rectangle is adjusted to ensure it aligns to
> SSD132X_SEGMENT_WIDTH, which may adjust the pitch. Calcuate the pitch
Calculate
> after alighting the left and right edge.
>
aligning
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
> ---
> drivers/gpu/drm/solomon/ssd130x.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
> index 64f1123080996..38f31c3624062 100644
> --- a/drivers/gpu/drm/solomon/ssd130x.c
> +++ b/drivers/gpu/drm/solomon/ssd130x.c
> @@ -1037,7 +1037,7 @@ static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb,
> struct drm_format_conv_state *fmtcnv_state)
> {
> struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev);
> - unsigned int dst_pitch = drm_rect_width(rect);
> + unsigned int dst_pitch;
> struct iosys_map dst;
> int ret = 0;
>
> @@ -1046,6 +1046,8 @@ static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb,
> rect->x2 = min_t(unsigned int, round_up(rect->x2, SSD132X_SEGMENT_WIDTH),
> ssd130x->width);
>
> + dst_pitch = drm_rect_width(rect);
> +
> ret = drm_gem_fb_begin_cpu_access(fb, DMA_FROM_DEVICE);
> if (ret)
> return ret;
> --
> 2.47.1
>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2025-01-14 23:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 15:27 [PATCH 0/3] drm/ssd130x: some small ssd132x fixes John Keeping
2025-01-13 15:27 ` [PATCH 1/3] drm/ssd130x: Fix reset timing for ssd132x John Keeping
2025-01-14 22:21 ` Javier Martinez Canillas
2025-01-15 10:40 ` John Keeping
2025-01-15 11:01 ` Javier Martinez Canillas
2025-01-13 15:27 ` [PATCH 2/3] drm/ssd130x: fix ssd132x encoding John Keeping
2025-01-14 23:16 ` Javier Martinez Canillas
2025-01-13 15:27 ` [PATCH 3/3] drm/ssd130x: ensure ssd132x pitch is correct John Keeping
2025-01-14 23:19 ` Javier Martinez Canillas [this message]
2025-01-15 8:48 ` Javier Martinez Canillas
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=87seplvv9b.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jkeeping@inmusicbrands.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--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
all inboxes | Powered by JetHome®