From: Karl Beldan <kbeldan@baylibre.com>
To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org
Cc: Karl Beldan <karl.beldan+oss@gmail.com>,
Kevin Hilman <khilman@baylibre.com>, Sekhar Nori <nsekhar@ti.com>,
Jyri Sarha <jsarha@ti.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Karl Beldan <kbeldan@baylibre.com>
Subject: [PATCH 1/3] drm/tilcdc: Adjust the FB_CEILING address
Date: Tue, 23 Aug 2016 12:56:59 +0000 [thread overview]
Message-ID: <20160823125701.25700-2-kbeldan@baylibre.com> (raw)
In-Reply-To: <20160823125701.25700-1-kbeldan@baylibre.com>
The LCDC seems to expect its framebuffer ceiling address pointer to be
an inclusive bound. The IP rev2 seems to cope with that but rev1 (as
found on the LCDK) don't.
Also note that this is what the framebuffer code does in da8xx-fb.c.
Since, as the TRM puts it, "The 2 LSBs are hardwired to 00b", the
dma_addr_t can be decremented without cast.
I tested it with a v2 (AM335x, rev 0x4F201000) and an LCDK (v1).
Signed-off-by: Karl Beldan <kbeldan@baylibre.com>
---
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 25d6b22..89d6916 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -80,7 +80,7 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)
end = start + (crtc->mode.vdisplay * fb->pitches[0]);
tilcdc_write(dev, LCDC_DMA_FB_BASE_ADDR_0_REG, start);
- tilcdc_write(dev, LCDC_DMA_FB_CEILING_ADDR_0_REG, end);
+ tilcdc_write(dev, LCDC_DMA_FB_CEILING_ADDR_0_REG, end - 1);
if (tilcdc_crtc->curr_fb)
drm_flip_work_queue(&tilcdc_crtc->unref_work,
--
2.9.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-08-23 12:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 12:56 [PATCH 0/3] drm/tilcdc: Some fixes for LCDC rev1 Karl Beldan
2016-08-23 12:56 ` Karl Beldan [this message]
2016-08-23 12:57 ` [PATCH 2/3] drm/tilcdc: Enable EOF interrupts for v1 LCDC Karl Beldan
2016-08-23 12:57 ` [PATCH 3/3] drm/tilcdc: Advertise the DRM_FORMATs according to the IP revision Karl Beldan
2016-08-23 16:24 ` [PATCH 0/3] drm/tilcdc: Some fixes for LCDC rev1 Jyri Sarha
2016-08-26 16:54 ` Karl Beldan
2016-08-31 22:11 ` Kevin Hilman
2016-09-02 12:29 ` Jyri Sarha
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=20160823125701.25700-2-kbeldan@baylibre.com \
--to=kbeldan@baylibre.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=karl.beldan+oss@gmail.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nsekhar@ti.com \
--cc=tomi.valkeinen@ti.com \
/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).