From: Eric Anholt <eric@anholt.net>
To: dri-devel@lists.freedesktop.org,
"Noralf Trønnes" <noralf@tronnes.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Heiner Kallweit <hkallweit1@gmail.com>,
Eric Anholt <eric@anholt.net>
Subject: [PATCH 3/3] drm/tinydrm: Fix setting of the column/page end addresses.
Date: Wed, 24 Oct 2018 11:43:13 -0700 [thread overview]
Message-ID: <20181024184313.2967-4-eric@anholt.net> (raw)
In-Reply-To: <20181024184313.2967-1-eric@anholt.net>
If the clipped dirty region's x/y happened to align to 256, we would
have set the top 8 bits wrong. Noticed by inspection, not by
reproducing a bug.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
drivers/gpu/drm/tinydrm/mipi-dbi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
index cb3441e51d5f..1bb870021f6e 100644
--- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
+++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
@@ -240,10 +240,10 @@ static int mipi_dbi_fb_dirty(struct drm_framebuffer *fb,
mipi_dbi_command(mipi, MIPI_DCS_SET_COLUMN_ADDRESS,
(clip.x1 >> 8) & 0xFF, clip.x1 & 0xFF,
- (clip.x2 >> 8) & 0xFF, (clip.x2 - 1) & 0xFF);
+ ((clip.x2 - 1) >> 8) & 0xFF, (clip.x2 - 1) & 0xFF);
mipi_dbi_command(mipi, MIPI_DCS_SET_PAGE_ADDRESS,
(clip.y1 >> 8) & 0xFF, clip.y1 & 0xFF,
- (clip.y2 >> 8) & 0xFF, (clip.y2 - 1) & 0xFF);
+ ((clip.y2 - 1) >> 8) & 0xFF, (clip.y2 - 1) & 0xFF);
ret = mipi_dbi_command_buf(mipi, MIPI_DCS_WRITE_MEMORY_START, tr,
(clip.x2 - clip.x1) * (clip.y2 - clip.y1) * 2);
--
2.19.1
next prev parent reply other threads:[~2018-10-24 18:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 18:43 [PATCH 0/3] drm: tinydrm driver for adafruit PiTFT 3.5" touchscreen Eric Anholt
2018-10-24 18:43 ` [PATCH 1/3] dt-bindings: new binding for Himax HX8357D display panels Eric Anholt
2018-10-25 21:42 ` Rob Herring
2018-10-27 16:10 ` Noralf Trønnes
2018-10-27 16:10 ` Noralf Trønnes
2018-10-24 18:43 ` [PATCH 2/3] drm: Add an hx8367d tinydrm driver Eric Anholt
2018-10-27 16:12 ` Noralf Trønnes
2018-10-27 16:12 ` Noralf Trønnes
2018-10-30 22:46 ` Eric Anholt
2018-10-30 22:46 ` Eric Anholt
2018-10-24 18:43 ` Eric Anholt [this message]
2018-10-27 16:13 ` [PATCH 3/3] drm/tinydrm: Fix setting of the column/page end addresses Noralf Trønnes
2018-10-27 16:13 ` Noralf Trønnes
2018-10-25 16:29 ` [PATCH 0/3] drm: tinydrm driver for adafruit PiTFT 3.5" touchscreen Eric Anholt
2018-10-25 16:29 ` Eric Anholt
2018-10-25 21:52 ` Noralf Trønnes
2018-10-25 21:52 ` Noralf Trønnes
2018-10-26 2:30 ` Eric Anholt
2018-10-26 2:30 ` Eric Anholt
2018-10-26 19:16 ` Noralf Trønnes
2018-10-26 19:16 ` Noralf Trønnes
2018-10-26 20:57 ` Noralf Trønnes
2018-10-26 20:57 ` Noralf Trønnes
2018-10-31 16:27 ` Noralf Trønnes
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=20181024184313.2967-4-eric@anholt.net \
--to=eric@anholt.net \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=noralf@tronnes.org \
--cc=robh+dt@kernel.org \
/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.