<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/rockchip/rockchip_drm_gem.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-02-18T10:16:55Z</updated>
<entry>
<title>drm/rockchip: Respect page offset for PRIME mmap calls</title>
<updated>2018-02-18T10:16:55Z</updated>
<author>
<name>Ørjan Eide</name>
<email>orjan.eide@arm.com</email>
</author>
<published>2018-01-30T20:28:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=57de50af162b67612da99207b061ade3239e57db'/>
<id>urn:sha1:57de50af162b67612da99207b061ade3239e57db</id>
<content type='text'>
When mapping external DMA-bufs through the PRIME mmap call, we might be
given an offset which has to be respected. However for the internal DRM
GEM mmap path, we have to ignore the fake mmap offset used to identify
the buffer only. Currently the code always zeroes out vma-&gt;vm_pgoff,
which breaks the former.

This patch fixes the problem by moving the vm_pgoff assignment to a
function that is used only for GEM mmap path, so that the PRIME path
retains the original offset.

Cc: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
Signed-off-by: Ørjan Eide &lt;orjan.eide@arm.com&gt;
Signed-off-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180130202913.28724-4-thierry.escande@collabora.com
</content>
</entry>
<entry>
<title>drm/rockchip: support prime import sg table</title>
<updated>2018-02-18T10:16:40Z</updated>
<author>
<name>Haixia Shi</name>
<email>hshi@chromium.org</email>
</author>
<published>2018-01-30T20:28:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6fd0bfe2f7ea1a5828c44b8d8811820bf7be13a9'/>
<id>urn:sha1:6fd0bfe2f7ea1a5828c44b8d8811820bf7be13a9</id>
<content type='text'>
The prime fd to handle ioctl was not used with rockchip before. Support
was added in order to pass graphics_Gbm and to support potential uses
within Chrome OS (e.g. zero-copy video decode, camera).

Signed-off-by: Haixia Shi &lt;hshi@chromium.org&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Thierry Escande &lt;thierry.escande@collabora.com&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180130202913.28724-3-thierry.escande@collabora.com
</content>
</entry>
<entry>
<title>drm/rockchip: Cocci spatch "vma_pages"</title>
<updated>2017-09-26T06:32:36Z</updated>
<author>
<name>Thomas Meyer</name>
<email>thomas@m3y3r.de</email>
</author>
<published>2017-09-20T22:29:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f2a44dd02329707514af16fe0904a78604a97c0b'/>
<id>urn:sha1:f2a44dd02329707514af16fe0904a78604a97c0b</id>
<content type='text'>
Use vma_pages function on vma object instead of explicit computation.
Found by coccinelle spatch "api/vma_pages.cocci"

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Signed-off-by: Mark Yao &lt;mark.yao@rock-chips.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1505946334393-988165015-7-diffsplit-thomas@m3y3r.de
</content>
</entry>
<entry>
<title>drm/rockchip: switch to drm_*_get(), drm_*_put() helpers</title>
<updated>2017-08-11T15:35:21Z</updated>
<author>
<name>Cihangir Akturk</name>
<email>cakturk@gmail.com</email>
</author>
<published>2017-08-11T12:33:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=adedbf0325ef885e9599f9c812dc3bf5610adcf8'/>
<id>urn:sha1:adedbf0325ef885e9599f9c812dc3bf5610adcf8</id>
<content type='text'>
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference()
and drm_*_unreference() helpers.

drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() and should not be
used by new code. So convert all users of compatibility functions to
use the new APIs.

Generated by: scripts/coccinelle/api/drm-get-put.cocci

Signed-off-by: Cihangir Akturk &lt;cakturk@gmail.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502454794-28558-21-git-send-email-cakturk@gmail.com
</content>
</entry>
<entry>
<title>drm/rockchip: Use .dumb_map_offset and .dumb_destroy defaults</title>
<updated>2017-07-29T12:00:35Z</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2017-07-23T19:16:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8cfd4f5de4968daeb8f4535e72da9240f8661e20'/>
<id>urn:sha1:8cfd4f5de4968daeb8f4535e72da9240f8661e20</id>
<content type='text'>
This driver can use the drm_driver.dumb_destroy and
drm_driver.dumb_map_offset defaults, so no need to set them.

Cc: Mark Yao &lt;mark.yao@rock-chips.com&gt;
Signed-off-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1500837417-40580-25-git-send-email-noralf@tronnes.org
</content>
</entry>
<entry>
<title>drm/rockchip: gem: add the lacks lock and trivial changes</title>
<updated>2017-06-01T06:48:22Z</updated>
<author>
<name>Caesar Wang</name>
<email>wxt@rock-chips.com</email>
</author>
<published>2017-05-31T02:14:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2d7b56378d32b0cf006f8944cbba4046df45dd25'/>
<id>urn:sha1:2d7b56378d32b0cf006f8944cbba4046df45dd25</id>
<content type='text'>
As the allocation and free buffer that need to add mutex lock for drm mm,
but it lacks the locking on error path in rockchip_gem_iommu_map().
Also, the trivial changes like The comment should be  placed in the
kerneldoc and unused blank line.

Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Reviewed-by: Mark Yao &lt;mark.yao@rock-chips.com&gt;
Signed-off-by: Mark Yao &lt;mark.yao@rock-chips.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1496196863-25738-1-git-send-email-wxt@rock-chips.com
</content>
</entry>
<entry>
<title>drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain</title>
<updated>2017-02-15T00:52:13Z</updated>
<author>
<name>Tomasz Figa</name>
<email>tfiga@chromium.org</email>
</author>
<published>2016-06-24T02:13:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=38f993b7c59e261b8ff7deb66c96c7dff4017f7b'/>
<id>urn:sha1:38f993b7c59e261b8ff7deb66c96c7dff4017f7b</id>
<content type='text'>
The API is not suitable for subsystems consisting of multiple devices
and requires severe hacks to use it. To mitigate this, this patch
implements allocation and address space management locally by using
helpers provided by DRM framework, like other DRM drivers do, e.g.
Tegra.

This patch should not introduce any functional changes until the driver
is made to attach subdevices into an IOMMU domain with the generic IOMMU
API, which will happen in following patch. Based heavily on GEM
implementation of Tegra DRM driver.

Signed-off-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Signed-off-by: Shunqian Zheng &lt;zhengsq@rock-chips.com&gt;
Signed-off-by: Mark Yao &lt;mark.yao@rock-chips.com&gt;
Signed-off-by: rjan Eide &lt;orjan.eide@arm.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: use unsigned long for dma_attrs</title>
<updated>2016-08-04T12:50:07Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2016-08-03T20:46:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=00085f1efa387a8ce100e3734920f7639c80caa3'/>
<id>urn:sha1:00085f1efa387a8ce100e3734920f7639c80caa3</id>
<content type='text'>
The dma-mapping core and the implementations do not change the DMA
attributes passed by pointer.  Thus the pointer can point to const data.
However the attributes do not have to be a bitfield.  Instead unsigned
long will do fine:

1. This is just simpler.  Both in terms of reading the code and setting
   attributes.  Instead of initializing local attributes on the stack
   and passing pointer to it to dma_set_attr(), just set the bits.

2. It brings safeness and checking for const correctness because the
   attributes are passed by value.

Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
     )

and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
     )

Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Acked-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Acked-by: Hans-Christian Noren Egtvedt &lt;egtvedt@samfundet.no&gt;
Acked-by: Mark Salter &lt;msalter@redhat.com&gt; [c6x]
Acked-by: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt; [cris]
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; [drm]
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Acked-by: Joerg Roedel &lt;jroedel@suse.de&gt; [iommu]
Acked-by: Fabien Dessenne &lt;fabien.dessenne@st.com&gt; [bdisp]
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt; [vb2-core]
Acked-by: David Vrabel &lt;david.vrabel@citrix.com&gt; [xen]
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt; [xen swiotlb]
Acked-by: Joerg Roedel &lt;jroedel@suse.de&gt; [iommu]
Acked-by: Richard Kuo &lt;rkuo@codeaurora.org&gt; [hexagon]
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt; [m68k]
Acked-by: Gerald Schaefer &lt;gerald.schaefer@de.ibm.com&gt; [s390]
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Acked-by: Hans-Christian Noren Egtvedt &lt;egtvedt@samfundet.no&gt; [avr32]
Acked-by: Vineet Gupta &lt;vgupta@synopsys.com&gt; [arc]
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt; [arm64 and dma-iommu]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm/rockchip: fix compile warnings for 64-bit</title>
<updated>2016-06-10T14:33:40Z</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2016-06-09T17:46:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=913bb40a45f18f9a6b9bcd8ef91d4ea817170c0d'/>
<id>urn:sha1:913bb40a45f18f9a6b9bcd8ef91d4ea817170c0d</id>
<content type='text'>
Rockchip DRM does not yet build properly for ARM64, but we might as well
get the printf formatting correct now, to avoid the following warnings:

drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c: In function 'rockchip_drm_fbdev_create':
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:111:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]
  DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
  ^

drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_alloc_buf':
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:41:3: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=]
   DRM_ERROR("failed to allocate %#x byte dma buffer", obj-&gt;size);
   ^

Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Tested-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1465494392-92489-1-git-send-email-briannorris@chromium.org
</content>
</entry>
<entry>
<title>drm: Remove unused drm_device from drm_gem_object_lookup()</title>
<updated>2016-05-17T06:47:30Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2016-05-09T10:04:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a8ad0bd84f986072314595d05444719fdf29e412'/>
<id>urn:sha1:a8ad0bd84f986072314595d05444719fdf29e412</id>
<content type='text'>
drm_gem_object_lookup() has never required the drm_device for its file
local translation of the user handle to the GEM object. Let's remove the
unused parameter and save some space.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
[danvet: Fixup kerneldoc too.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
