dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] drm/tegra: Fixes for v3.19-rc1
@ 2014-12-16 16:15 Thierry Reding
  2014-12-16 16:15 ` [PATCH 1/8] drm/irq: Add drm_crtc_send_vblank_event() Thierry Reding
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Thierry Reding @ 2014-12-16 16:15 UTC (permalink / raw)
  To: dri-devel; +Cc: Alexandre Courbot

From: Thierry Reding <treding@nvidia.com>

Hi,

This is a set of fixes for two regressions and one bug in the IOMMU
mapping code. It turns out that all of these issues turn up primarily
on Tegra30 hardware. The IOMMU mapping bug only manifests on buffers
that aren't multiples of the page size. I happened to be testing HDMI
with 1080p while writing the code and framebuffers for that happen to
fit exactly within 2025 pages of 4 KiB each.

One of the regressions is caused by the IOMMU code allocating pages from
shmem which can have associated cache lines. If the pages aren't flushed
then these cache lines may be flushed later on and cause framebuffer
corruption. I'm not sure why I didn't see this before. Perhaps the board
that I was using had enough RAM so that the pages shmem would hand out
had a better chance of being unused. Or maybe I didn't look too closely.
The fix for this, implementing drm_clflush_*() for ARM, has also been
tested by Rob. The long-term plan is to make architectures expose an API
to flush pages, but for now drm_clflush_*() provides exactly what we
need.

The second regression is caused by a mismatch between the hardware pipe
number and the CRTC's DRM index. These were used inconsistently, which
could cause one code location to call drm_vblank_get() with a different
pipe than the corresponding drm_vblank_put(), thereby causing the
reference count to become unbalanced. Alexandre also reported a possible
race condition related to this, which this series also fixes.

I'm hoping to get reviews on this, especially the drm/irq and drm/cache
patches, quickly so that I can send a pull request to Dave, hopefully to
get this included, given the size, in v3.19-rc1 still.

Thierry

Thierry Reding (8):
  drm/irq: Add drm_crtc_send_vblank_event()
  drm/irq: Add drm_crtc_handle_vblank()
  drm/irq: Add drm_crtc_vblank_count()
  drm/tegra: dc: Consistently use the same pipe
  drm/tegra: dc: Fix a potential race on page-flip completion
  drm/cache: Implement drm_clflush_*() for ARM
  drm/tegra: gem: Flush buffer objects upon allocation
  drm/tegra: gem: Use the proper size for GEM objects

 drivers/gpu/drm/drm_cache.c | 45 ++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_irq.c   | 60 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/tegra/dc.c  | 24 ++++++++++--------
 drivers/gpu/drm/tegra/drm.c | 16 +++++++-----
 drivers/gpu/drm/tegra/gem.c | 16 ++++++------
 include/drm/drmP.h          |  4 +++
 6 files changed, 142 insertions(+), 23 deletions(-)

-- 
2.1.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-12-18 13:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 16:15 [PATCH 0/8] drm/tegra: Fixes for v3.19-rc1 Thierry Reding
2014-12-16 16:15 ` [PATCH 1/8] drm/irq: Add drm_crtc_send_vblank_event() Thierry Reding
2014-12-16 16:15 ` [PATCH 2/8] drm/irq: Add drm_crtc_handle_vblank() Thierry Reding
2014-12-16 16:15 ` [PATCH 3/8] drm/irq: Add drm_crtc_vblank_count() Thierry Reding
2014-12-16 21:03   ` Daniel Vetter
2014-12-16 16:15 ` [PATCH 4/8] drm/tegra: dc: Consistently use the same pipe Thierry Reding
2014-12-16 16:15 ` [PATCH 5/8] drm/tegra: dc: Fix a potential race on page-flip completion Thierry Reding
2014-12-18 13:45   ` Alexandre Courbot
2014-12-16 16:15 ` [PATCH 6/8] drm/cache: Implement drm_clflush_*() for ARM Thierry Reding
2014-12-16 16:15 ` [PATCH 7/8] drm/tegra: gem: Flush buffer objects upon allocation Thierry Reding
2014-12-16 16:15 ` [PATCH 8/8] drm/tegra: gem: Use the proper size for GEM objects Thierry Reding
2014-12-16 18:38 ` [PATCH 0/8] drm/tegra: Fixes for v3.19-rc1 Sean Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox