<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_cache.c, branch v5.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-06-07T14:07:08Z</updated>
<entry>
<title>drm: Add a prefetching memcpy_from_wc</title>
<updated>2021-06-07T14:07:08Z</updated>
<author>
<name>Thomas Hellström</name>
<email>thomas.hellstrom@linux.intel.com</email>
</author>
<published>2021-06-02T08:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7e32bef4ae5f9149276203564b7911fac466588'/>
<id>urn:sha1:b7e32bef4ae5f9149276203564b7911fac466588</id>
<content type='text'>
Reading out of write-combining mapped memory is typically very slow
since the CPU doesn't prefetch. However some archs have special
instructions to do this.

So add a best-effort memcpy_from_wc taking dma-buf-map pointer
arguments that attempts to use a fast prefetching memcpy and
otherwise falls back to ordinary memcopies, taking the iomem tagging
into account.

The code is largely copied from i915_memcpy_from_wc.

Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Suggested-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Link: https://lore.kernel.org/r/20210602083818.241793-5-thomas.hellstrom@linux.intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-5-thomas.hellstrom@linux.intel.com
</content>
</entry>
<entry>
<title>drm: Include &lt;linux/mem_encrypt.h&gt; in drm_cache.c</title>
<updated>2021-01-14T08:42:31Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-01-14T08:05:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=681045819636792158a93c556cab283311b17cc2'/>
<id>urn:sha1:681045819636792158a93c556cab283311b17cc2</id>
<content type='text'>
The function drm_need_swiotbl() needs mem_encrypt_active() from
&lt;linux/mem_encrypt.h&gt;. The include got lost when refactoring the
code recently.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 3abc66706385 ("drm: Implement drm_need_swiotlb() in drm_cache.c")
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210114080535.17132-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm: Implement drm_need_swiotlb() in drm_cache.c</title>
<updated>2021-01-13T13:22:29Z</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-01-12T08:10:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3abc66706385e08f7003ca746be005e4c2152b09'/>
<id>urn:sha1:3abc66706385e08f7003ca746be005e4c2152b09</id>
<content type='text'>
The function is declared in drm_cache.h. I also removed the curly
braces from the for loop to adhere to kernel coding style.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210112081035.6882-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm: core: fix common struct sg_table related issues</title>
<updated>2020-09-10T06:17:48Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2020-05-11T10:27:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c6fa39ca958d5313ff90d3e6c3064e0043c1da3'/>
<id>urn:sha1:6c6fa39ca958d5313ff90d3e6c3064e0043c1da3</id>
<content type='text'>
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function
returns the number of the created entries in the DMA address space.
However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and
dma_unmap_sg must be called with the original number of the entries
passed to the dma_map_sg().

struct sg_table is a common structure used for describing a non-contiguous
memory buffer, used commonly in the DRM and graphics subsystems. It
consists of a scatterlist with memory pages and DMA addresses (sgl entry),
as well as the number of scatterlist entries: CPU pages (orig_nents entry)
and DMA mapped pages (nents entry).

It turned out that it was a common mistake to misuse nents and orig_nents
entries, calling DMA-mapping functions with a wrong number of entries or
ignoring the number of mapped entries returned by the dma_map_sg()
function.

To avoid such issues, lets use a common dma-mapping wrappers operating
directly on the struct sg_table objects and use scatterlist page
iterators where possible. This, almost always, hides references to the
nents and orig_nents entries, making the code robust, easier to follow
and copy/paste safe.

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
</content>
</entry>
<entry>
<title>drm/gpu: Fix Memory barrier without comment Issue</title>
<updated>2019-10-25T07:35:06Z</updated>
<author>
<name>Bhanusree</name>
<email>bhanusreemahesh@gmail.com</email>
</author>
<published>2019-10-25T06:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6a5f8daff1179a443f3bf797c0400d84a8818a0'/>
<id>urn:sha1:c6a5f8daff1179a443f3bf797c0400d84a8818a0</id>
<content type='text'>
-Issue found using checkpatch.pl
-Insert comments for memory barrier usage

Signed-off-by: Bhanusree &lt;bhanusreemahesh@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1571984858-4644-1-git-send-email-bhanusreemahesh@gmail.com
</content>
</entry>
<entry>
<title>drm/gpu: Fix Missing blank line after declarations</title>
<updated>2019-10-25T07:34:46Z</updated>
<author>
<name>Bhanusree</name>
<email>bhanusreemahesh@gmail.com</email>
</author>
<published>2019-10-25T06:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e109c6db528c02ee3d81e43d9571b499c75f55f5'/>
<id>urn:sha1:e109c6db528c02ee3d81e43d9571b499c75f55f5</id>
<content type='text'>
-Insert a blank line after the declarations.
-Issue found using checkpatch.pl

Signed-off-by: Bhanusree &lt;bhanusreemahesh@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1571984833-4596-1-git-send-email-bhanusreemahesh@gmail.com
</content>
</entry>
<entry>
<title>drm/gpu: Add comment for memory barrier</title>
<updated>2019-10-24T12:32:47Z</updated>
<author>
<name>Bhanusree</name>
<email>bhanusreemahesh@gmail.com</email>
</author>
<published>2019-10-24T04:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=606be04724b6003bd00038c43eb9e1ae5e9c0993'/>
<id>urn:sha1:606be04724b6003bd00038c43eb9e1ae5e9c0993</id>
<content type='text'>
-Add comment for memory barrier
-Issue found using checkpatch.pl

Signed-off-by: Bhanusree &lt;bhanusreemahesh@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1571891313-14341-1-git-send-email-bhanusreemahesh@gmail.com
</content>
</entry>
<entry>
<title>gpu: drm: core: Convert printk(KERN_&lt;LEVEL&gt; to pr_&lt;level&gt;</title>
<updated>2017-02-28T13:32:19Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2017-02-28T12:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=499447db0ebf43596d05a3a5301123ae25110024'/>
<id>urn:sha1:499447db0ebf43596d05a3a5301123ae25110024</id>
<content type='text'>
Use a more common logging style.

Miscellanea:

o Coalesce formats and realign arguments

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
[danvet: Resolve minor conflict in drm_edid.c]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Update drm_cache.c to pull in the new drm_cache.h</title>
<updated>2017-01-24T10:00:22Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-01-21T18:19:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b46b54a55841ceaba8097460dfa8e65435872c0e'/>
<id>urn:sha1:b46b54a55841ceaba8097460dfa8e65435872c0e</id>
<content type='text'>
The prototypes were moved to a new header, but the function definitions
were not updated to pull in the declarations.

drivers/gpu/drm/drm_cache.c:79:1: warning: no previous prototype for ‘drm_clflush_pages’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_cache.c:120:1: warning: no previous prototype for ‘drm_clflush_sg’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_cache.c:152:1: warning: no previous prototype for ‘drm_clflush_virt_range’ [-Wmissing-prototypes]

Fixes: f9a87bd7d5b6 ("drm: Move drm_clflush prototypes to drm_cache header file")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Gabriel Krisman Bertazi &lt;krisman@collabora.co.uk&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Gabriel Krisman Bertazi &lt;krisman@collabora.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170121181944.24672-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm: Document drm_cache interface</title>
<updated>2017-01-10T10:16:33Z</updated>
<author>
<name>Gabriel Krisman Bertazi</name>
<email>krisman@collabora.co.uk</email>
</author>
<published>2017-01-09T21:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0e36723a68dfd959168c73bfa7ca6fa426eadf5'/>
<id>urn:sha1:f0e36723a68dfd959168c73bfa7ca6fa426eadf5</id>
<content type='text'>
Notice that this uncovers an issue with the kernel-doc handling of array
arguments, causing the first parameter of drm_clflush_pages() to not
show up in the rst-generated page.  A proposed fix is under review in
linux-doc: &lt;http://www.spinics.net/lists/linux-doc/msg42544.html&gt;

Changes since v1:
 - Add section to drm-mm.rst.
 - Fix kernel-doc style issues.
 - s/memory/kernel memory/.

Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.co.uk&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170109215649.6860-1-krisman@collabora.co.uk
</content>
</entry>
</feed>
