[PATCH 0/5] drm/dumb-buffers: Fix and improve buffer-size calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dumb-buffer pitch and size is specified by width, height, bits-per-pixel
plus various hardware-specific alignments. The calculation of these
values is inconsistent and duplicated among drivers. The results for
formats with bpp < 8 are incorrect.

This series begins to fix this. Default scanline pitch and buffer size
are now calculated with the existing 4CC helpers. The results are
provided to drivers to avoid recalculating them. The series fixes the
3 common GEM implementations for DMA, SHMEM and VRAM. Other memory
managers can later be addressed separately.

Thomas Zimmermann (5):
  drm/dumb-buffers: Sanitize output on errors
  drm/dumb-buffers: Fix size calculations and set default pitch and size
  drm/gem-dma: Use aligned default pitch and size for dumb buffers
  drm/gem-shmem: Use aligned default pitch and size for dumb buffers
  drm/gem-vram: Use default pitch and size for dumb buffers

 drivers/gpu/drm/drm_dumb_buffers.c       | 123 +++++++++++++++++------
 drivers/gpu/drm/drm_gem_dma_helper.c     |   7 +-
 drivers/gpu/drm/drm_gem_shmem_helper.c   |  16 +--
 drivers/gpu/drm/drm_gem_vram_helper.c    |  24 ++++-
 drivers/gpu/drm/imx/ipuv3/imx-drm-core.c |   2 +
 include/drm/drm_dumb_buffers.h           |  12 +++
 6 files changed, 141 insertions(+), 43 deletions(-)
 create mode 100644 include/drm/drm_dumb_buffers.h

-- 
2.47.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux