Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345619
b: refs/heads/master
c: 1169af2
h: refs/heads/master
i:
  345617: 3319c39
  345615: 7a752a9
v: v3
  • Loading branch information
Inki Dae committed Dec 14, 2012
1 parent 002cb7f commit f9c32c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2c0095acbf250b0e7a714bc42f7f32ddb34cfdf
refs/heads/master: 1169af218010ec7420c2f66c10284047774ba96c
18 changes: 16 additions & 2 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,
unsigned int flags, struct exynos_drm_gem_buf *buf)
{
int ret = 0;
enum dma_attr attr = DMA_ATTR_FORCE_CONTIGUOUS;
enum dma_attr attr;
unsigned int nr_pages;

DRM_DEBUG_KMS("%s\n", __FILE__);
Expand All @@ -46,8 +46,22 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,

init_dma_attrs(&buf->dma_attrs);

if (flags & EXYNOS_BO_NONCONTIG)
/*
* if EXYNOS_BO_CONTIG, fully physically contiguous memory
* region will be allocated else physically contiguous
* as possible.
*/
if (flags & EXYNOS_BO_CONTIG)
dma_set_attr(DMA_ATTR_FORCE_CONTIGUOUS, &buf->dma_attrs);

/*
* if EXYNOS_BO_WC or EXYNOS_BO_NONCACHABLE, writecombine mapping
* else cachable mapping.
*/
if (flags & EXYNOS_BO_WC || !(flags & EXYNOS_BO_CACHABLE))
attr = DMA_ATTR_WRITE_COMBINE;
else
attr = DMA_ATTR_NON_CONSISTENT;

dma_set_attr(attr, &buf->dma_attrs);
dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &buf->dma_attrs);
Expand Down

0 comments on commit f9c32c5

Please sign in to comment.