<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/ingenic, branch v5.10.257</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-01-14T09:16:37+00:00</updated>
<entry>
<title>drm/ingenic: Fix missing platform_driver_unregister() call in ingenic_drm_init()</title>
<updated>2023-01-14T09:16:37+00:00</updated>
<author>
<name>Yuan Can</name>
<email>yuancan@huawei.com</email>
</author>
<published>2022-11-04T06:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68af1a4842b4e69e1ac4a3488fad387972e98ee0'/>
<id>urn:sha1:68af1a4842b4e69e1ac4a3488fad387972e98ee0</id>
<content type='text'>
commit 47078311b8efebdefd5b3b2f87e2b02b14f49c66 upstream.

A problem about modprobe ingenic-drm failed is triggered with the following
log given:

 [  303.561088] Error: Driver 'ingenic-ipu' is already registered, aborting...
 modprobe: ERROR: could not insert 'ingenic_drm': Device or resource busy

The reason is that ingenic_drm_init() returns platform_driver_register()
directly without checking its return value, if platform_driver_register()
failed, it returns without unregistering ingenic_ipu_driver_ptr, resulting
the ingenic-drm can never be installed later.
A simple call graph is shown as below:

 ingenic_drm_init()
   platform_driver_register() # ingenic_ipu_driver_ptr are registered
   platform_driver_register()
     driver_register()
       bus_add_driver()
         priv = kzalloc(...) # OOM happened
   # return without unregister ingenic_ipu_driver_ptr

Fixing this problem by checking the return value of
platform_driver_register() and do platform_unregister_drivers() if
error happened.

Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU")
Signed-off-by: Yuan Can &lt;yuancan@huawei.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221104064512.8569-1-yuancan@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/ingenic: Reset pixclock rate when parent clock rate changes</title>
<updated>2022-06-09T08:21:00+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-09-26T17:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=032f8c67fe95608cf51cbf72163f7fa02f8913b3'/>
<id>urn:sha1:032f8c67fe95608cf51cbf72163f7fa02f8913b3</id>
<content type='text'>
[ Upstream commit 33700f6f7d9f6b4e1e6df933ef7fd388889c662c ]

Old Ingenic SoCs can overclock very well, up to +50% of their nominal
clock rate, whithout requiring overvolting or anything like that, just
by changing the rate of the main PLL. Unfortunately, all clocks on the
system are derived from that PLL, and when the PLL rate is updated, so
is our pixel clock.

To counter that issue, we make sure that the panel is in VBLANK before
the rate change happens, and we will then re-set the pixel clock rate
afterwards, once the PLL has been changed, to be as close as possible to
the pixel rate requested by the encoder.

v2: Add comment about mutex usage

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-2-paul@crapouillou.net
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/ingenic: Switch IPU plane to type OVERLAY</title>
<updated>2021-07-20T14:05:37+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2021-03-29T17:50:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3f8120039d5c33230e4a2cf5cbb30a91aa64bc3'/>
<id>urn:sha1:b3f8120039d5c33230e4a2cf5cbb30a91aa64bc3</id>
<content type='text'>
commit 68b433fe6937cfa3f8975d18643d5956254edd6a upstream.

It should have been an OVERLAY from the beginning. The documentation
stipulates that there should be an unique PRIMARY plane per CRTC.

Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU")
Cc: &lt;stable@vger.kernel.org&gt; # 5.8+
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Simon Ser &lt;contact@emersion.fr&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210329175046.214629-2-paul@crapouillou.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/ingenic: Fix non-OSD mode</title>
<updated>2021-07-20T14:05:37+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2021-01-24T08:55:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f6dcc4dd7315b35ec48ddf200f5715bee440e57'/>
<id>urn:sha1:8f6dcc4dd7315b35ec48ddf200f5715bee440e57</id>
<content type='text'>
commit 7b4957684e5d813fcbdc98144e3cc5c4467b3e2e upstream.

Even though the JZ4740 did not have the OSD mode, it had (according to
the documentation) two DMA channels, but there is absolutely no
information about how to select the second DMA channel.

Make the ingenic-drm driver work in non-OSD mode by using the
foreground0 plane (which is bound to the DMA0 channel) as the primary
plane, instead of the foreground1 plane, which is the primary plane
when in OSD mode.

Fixes: 3c9bea4ef32b ("drm/ingenic: Add support for OSD mode")
Cc: &lt;stable@vger.kernel.org&gt; # v5.8+
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Tested-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210124085552.29146-5-paul@crapouillou.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/ingenic: Fix bad revert</title>
<updated>2020-10-12T18:26:14+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-10-12T10:25:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3c8f2784d3266d27956659c78835ee1d1925ad2'/>
<id>urn:sha1:d3c8f2784d3266d27956659c78835ee1d1925ad2</id>
<content type='text'>
Fix a badly reverted commit. The revert commit was cherry-picked from
drm-misc-next to drm-misc-next-fixes, and in the process some unrelated
code was added.

Fixes: a3fb64c00d44 ("Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"")
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201012102509.10690-1-paul@crapouillou.net
</content>
</entry>
<entry>
<title>Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"</title>
<updated>2020-10-07T19:57:59+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-10-04T14:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3fb64c00d44a3ce869c0ca8210f95f99497aa9e'/>
<id>urn:sha1:a3fb64c00d44a3ce869c0ca8210f95f99497aa9e</id>
<content type='text'>
This reverts commit 37054fc81443 ("gpu/drm: ingenic: Add option to mmap
GEM buffers cached")

At the very moment this commit was created, the DMA API it relied on was
modified in the DMA tree, which caused the driver to break in
linux-next.

Revert it for now, and it will be resubmitted later to work with the new
DMA API.

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201004141758.1013317-1-paul@crapouillou.net
</content>
</entry>
<entry>
<title>gpu/drm: ingenic: Add option to mmap GEM buffers cached</title>
<updated>2020-09-14T23:32:26+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-09-12T19:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37054fc81443cc6a8c3a38395f384412b8373d82'/>
<id>urn:sha1:37054fc81443cc6a8c3a38395f384412b8373d82</id>
<content type='text'>
Ingenic SoCs are most notably used in cheap chinese handheld gaming
consoles. There, the games and applications generally render in software
directly into GEM buffers.

Traditionally, GEM buffers are mapped write-combine. Writes to the
buffer are accelerated, and reads are slow. Application doing lots of
alpha-blending paint inside shadow buffers, which is then memcpy'd into
the final GEM buffer.

On recent Ingenic SoCs however, it is much faster to have a fully cached
GEM buffer, in which applications paint directly, and whose data is
invalidated before scanout, than having a write-combine GEM buffer, even
when alpha blending is not used.

Add an optional 'cached_gem_buffers' parameter to the ingenic-drm driver
to allow GEM buffers to be mapped fully-cached, in order to speed up
software rendering.

v2: Use standard noncoherent DMA APIs

v3: Use damage clips instead of invalidating full frames

v4: Avoid dma_pgprot() which is not exported. Using vm_get_page_prot()
    is enough in this case.

v5:
- Avoid calling drm_gem_cma_prime_mmap(). It has the side effect that an
  extra object reference is obtained, which causes our dumb buffers to
  never be freed. It should have been drm_gem_cma_mmap_obj(). However,
  our custom mmap function only differs with one flag, so we can cleanly
  handle both modes in ingenic_drm_gem_mmap().
- Call drm_gem_vm_close() if drm_mmap_attrs() failed, just like in
  drm_gem_cma_mmap_obj().

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200912195639.176001-1-paul@crapouillou.net
</content>
</entry>
<entry>
<title>Merge v5.9-rc5 into drm-next</title>
<updated>2020-09-14T15:19:11+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-09-14T15:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=818280d5adf1d80e78f95821815148abe9407e14'/>
<id>urn:sha1:818280d5adf1d80e78f95821815148abe9407e14</id>
<content type='text'>
Paul needs 1a21e5b930e8 ("drm/ingenic: Fix leak of device_node
pointer") and 3b5b005ef7d9 ("drm/ingenic: Fix driver not probing when
IPU port is missing") from -fixes to be able to merge further ingenic
patches into -next.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/ingenic: Fix driver not probing when IPU port is missing</title>
<updated>2020-08-30T22:52:40+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-08-27T11:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b5b005ef7d9e2ff1693c1d14a0f4459dcedb4e0'/>
<id>urn:sha1:3b5b005ef7d9e2ff1693c1d14a0f4459dcedb4e0</id>
<content type='text'>
Even if support for the IPU was compiled in, we may run on a device
(e.g. the Qi LB60) where the IPU is not available, or simply with an old
devicetree without the IPU node. In that case the ingenic-drm refused to
probe.

Fix the driver so that it will probe even if the IPU node is not present
in devicetree (but then IPU support is disabled of course).

v2: Take a different approach

Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU")
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200827114404.36748-2-paul@crapouillou.net
</content>
</entry>
<entry>
<title>drm/ingenic: Fix leak of device_node pointer</title>
<updated>2020-08-30T22:52:32+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-08-27T11:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a21e5b930e8454438ebb707f558b256e4b06ec7'/>
<id>urn:sha1:1a21e5b930e8454438ebb707f558b256e4b06ec7</id>
<content type='text'>
of_graph_get_remote_node() requires of_node_put() to be called on the
device_node pointer when it's no more in use.

Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU")
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200827114404.36748-1-paul@crapouillou.net
</content>
</entry>
</feed>
