<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu, branch v4.19.170</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.170</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.170'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-01-19T17:22:37+00:00</updated>
<entry>
<title>drm/msm: Call msm_init_vram before binding the gpu</title>
<updated>2021-01-19T17:22:37+00:00</updated>
<author>
<name>Craig Tatlor</name>
<email>ctatlor97@gmail.com</email>
</author>
<published>2020-12-30T15:29:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0680689c609c7b2a15e52a9b9ca58fc2a04b2eee'/>
<id>urn:sha1:0680689c609c7b2a15e52a9b9ca58fc2a04b2eee</id>
<content type='text'>
[ Upstream commit d863f0c7b536288e2bd40cbc01c10465dd226b11 ]

vram.size is needed when binding a gpu without an iommu and is defined
in msm_init_vram(), so run that before binding it.

Signed-off-by: Craig Tatlor &lt;ctatlor97@gmail.com&gt;
Reviewed-by: Brian Masney &lt;masneyb@onstation.org&gt;
Tested-by: Alexey Minnekhanov &lt;alexeymin@postmarketos.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/i915: Fix mismatch between misplaced vma check and vma insert</title>
<updated>2021-01-17T13:04:20+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2020-12-16T09:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f30c728d5b72112b475469dfeb8023ce4121db3c'/>
<id>urn:sha1:f30c728d5b72112b475469dfeb8023ce4121db3c</id>
<content type='text'>
commit 0e53656ad8abc99e0a80c3de611e593ebbf55829 upstream

When inserting a VMA, we restrict the placement to the low 4G unless the
caller opts into using the full range. This was done to allow usersapce
the opportunity to transition slowly from a 32b address space, and to
avoid breaking inherent 32b assumptions of some commands.

However, for insert we limited ourselves to 4G-4K, but on verification
we allowed the full 4G. This causes some attempts to bind a new buffer
to sporadically fail with -ENOSPC, but at other times be bound
successfully.

commit 48ea1e32c39d ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1
page") suggests that there is a genuine problem with stateless addressing
that cannot utilize the last page in 4G and so we purposefully excluded
it. This means that the quick pin pass may cause us to utilize a buggy
placement.

Reported-by: CQ Tang &lt;cq.tang@intel.com&gt;
Testcase: igt/gem_exec_params/larger-than-life-batch
Fixes: 48ea1e32c39d ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1 page")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: CQ Tang &lt;cq.tang@intel.com&gt;
Reviewed-by: CQ Tang &lt;cq.tang@intel.com&gt;
Reviewed-by: Matthew Auld &lt;matthew.auld@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v4.5+
Link: https://patchwork.freedesktop.org/patch/msgid/20201216092951.7124-1-chris@chris-wilson.co.uk
(cherry picked from commit 5f22cc0b134ab702d7f64b714e26018f7288ffee)
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
[sudip: use file from old path]
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/dp_aux_dev: check aux_dev before use in drm_dp_aux_dev_get_by_minor()</title>
<updated>2020-12-30T10:26:13+00:00</updated>
<author>
<name>Zwane Mwaikambo</name>
<email>zwane@yosper.io</email>
</author>
<published>2020-10-13T05:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=031ac02811bb34428f5d6c66a406657bd591acbb'/>
<id>urn:sha1:031ac02811bb34428f5d6c66a406657bd591acbb</id>
<content type='text'>
commit 73b62cdb93b68d7e2c1d373c6a411bc00c53e702 upstream.

I observed this when unplugging a DP monitor whilst a computer is asleep
and then waking it up. This left DP chardev nodes still being present on
the filesystem and accessing these device nodes caused an oops because
drm_dp_aux_dev_get_by_minor() assumes a device exists if it is opened.
This can also be reproduced by creating a device node with mknod(1) and
issuing an open(2)

[166164.933198] BUG: kernel NULL pointer dereference, address: 0000000000000018
[166164.933202] #PF: supervisor read access in kernel mode
[166164.933204] #PF: error_code(0x0000) - not-present page
[166164.933205] PGD 0 P4D 0
[166164.933208] Oops: 0000 [#1] PREEMPT SMP NOPTI
[166164.933211] CPU: 4 PID: 99071 Comm: fwupd Tainted: G        W
5.8.0-rc6+ #1
[166164.933213] Hardware name: LENOVO 20RD002VUS/20RD002VUS, BIOS R16ET25W
(1.11 ) 04/21/2020
[166164.933232] RIP: 0010:drm_dp_aux_dev_get_by_minor+0x29/0x70
[drm_kms_helper]
[166164.933234] Code: 00 0f 1f 44 00 00 55 48 89 e5 41 54 41 89 fc 48 c7
c7 60 01 a4 c0 e8 26 ab 30 d7 44 89 e6 48 c7 c7 80 01 a4 c0 e8 47 94 d6 d6
&lt;8b&gt; 50 18 49 89 c4 48 8d 78 18 85 d2 74 33 8d 4a 01 89 d0 f0 0f b1
[166164.933236] RSP: 0018:ffffb7d7c41cbbf0 EFLAGS: 00010246
[166164.933237] RAX: 0000000000000000 RBX: ffff8a90001fe900 RCX: 0000000000000000
[166164.933238] RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffffffffc0a40180
[166164.933239] RBP: ffffb7d7c41cbbf8 R08: 0000000000000000 R09: ffff8a93e157d6d0
[166164.933240] R10: 0000000000000000 R11: ffffffffc0a40188 R12: 0000000000000003
[166164.933241] R13: ffff8a9402200e80 R14: ffff8a90001fe900 R15: 0000000000000000
[166164.933244] FS:  00007f7fb041eb00(0000) GS:ffff8a9411500000(0000)
knlGS:0000000000000000
[166164.933245] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[166164.933246] CR2: 0000000000000018 CR3: 00000000352c2003 CR4: 00000000003606e0
[166164.933247] Call Trace:
[166164.933264]  auxdev_open+0x1b/0x40 [drm_kms_helper]
[166164.933278]  chrdev_open+0xa7/0x1c0
[166164.933282]  ? cdev_put.part.0+0x20/0x20
[166164.933287]  do_dentry_open+0x161/0x3c0
[166164.933291]  vfs_open+0x2d/0x30
[166164.933297]  path_openat+0xb27/0x10e0
[166164.933306]  ? atime_needs_update+0x73/0xd0
[166164.933309]  do_filp_open+0x91/0x100
[166164.933313]  ? __alloc_fd+0xb2/0x150
[166164.933316]  do_sys_openat2+0x210/0x2d0
[166164.933318]  do_sys_open+0x46/0x80
[166164.933320]  __x64_sys_openat+0x20/0x30
[166164.933328]  do_syscall_64+0x52/0xc0
[166164.933336]  entry_SYSCALL_64_after_hwframe+0x44/0xa9

(gdb) disassemble drm_dp_aux_dev_get_by_minor+0x29
Dump of assembler code for function drm_dp_aux_dev_get_by_minor:
   0x0000000000017b10 &lt;+0&gt;:     callq  0x17b15 &lt;drm_dp_aux_dev_get_by_minor+5&gt;
   0x0000000000017b15 &lt;+5&gt;:     push   %rbp
   0x0000000000017b16 &lt;+6&gt;:     mov    %rsp,%rbp
   0x0000000000017b19 &lt;+9&gt;:     push   %r12
   0x0000000000017b1b &lt;+11&gt;:    mov    %edi,%r12d
   0x0000000000017b1e &lt;+14&gt;:    mov    $0x0,%rdi
   0x0000000000017b25 &lt;+21&gt;:    callq  0x17b2a &lt;drm_dp_aux_dev_get_by_minor+26&gt;
   0x0000000000017b2a &lt;+26&gt;:    mov    %r12d,%esi
   0x0000000000017b2d &lt;+29&gt;:    mov    $0x0,%rdi
   0x0000000000017b34 &lt;+36&gt;:    callq  0x17b39 &lt;drm_dp_aux_dev_get_by_minor+41&gt;
   0x0000000000017b39 &lt;+41&gt;:    mov    0x18(%rax),%edx &lt;=========
   0x0000000000017b3c &lt;+44&gt;:    mov    %rax,%r12
   0x0000000000017b3f &lt;+47&gt;:    lea    0x18(%rax),%rdi
   0x0000000000017b43 &lt;+51&gt;:    test   %edx,%edx
   0x0000000000017b45 &lt;+53&gt;:    je     0x17b7a &lt;drm_dp_aux_dev_get_by_minor+106&gt;
   0x0000000000017b47 &lt;+55&gt;:    lea    0x1(%rdx),%ecx
   0x0000000000017b4a &lt;+58&gt;:    mov    %edx,%eax
   0x0000000000017b4c &lt;+60&gt;:    lock cmpxchg %ecx,(%rdi)
   0x0000000000017b50 &lt;+64&gt;:    jne    0x17b76 &lt;drm_dp_aux_dev_get_by_minor+102&gt;
   0x0000000000017b52 &lt;+66&gt;:    test   %edx,%edx
   0x0000000000017b54 &lt;+68&gt;:    js     0x17b6d &lt;drm_dp_aux_dev_get_by_minor+93&gt;
   0x0000000000017b56 &lt;+70&gt;:    test   %ecx,%ecx
   0x0000000000017b58 &lt;+72&gt;:    js     0x17b6d &lt;drm_dp_aux_dev_get_by_minor+93&gt;
   0x0000000000017b5a &lt;+74&gt;:    mov    $0x0,%rdi
   0x0000000000017b61 &lt;+81&gt;:    callq  0x17b66 &lt;drm_dp_aux_dev_get_by_minor+86&gt;
   0x0000000000017b66 &lt;+86&gt;:    mov    %r12,%rax
   0x0000000000017b69 &lt;+89&gt;:    pop    %r12
   0x0000000000017b6b &lt;+91&gt;:    pop    %rbp
   0x0000000000017b6c &lt;+92&gt;:    retq
   0x0000000000017b6d &lt;+93&gt;:    xor    %esi,%esi
   0x0000000000017b6f &lt;+95&gt;:    callq  0x17b74 &lt;drm_dp_aux_dev_get_by_minor+100&gt;
   0x0000000000017b74 &lt;+100&gt;:   jmp    0x17b5a &lt;drm_dp_aux_dev_get_by_minor+74&gt;
   0x0000000000017b76 &lt;+102&gt;:   mov    %eax,%edx
   0x0000000000017b78 &lt;+104&gt;:   jmp    0x17b43 &lt;drm_dp_aux_dev_get_by_minor+51&gt;
   0x0000000000017b7a &lt;+106&gt;:   xor    %r12d,%r12d
   0x0000000000017b7d &lt;+109&gt;:   jmp    0x17b5a &lt;drm_dp_aux_dev_get_by_minor+74&gt;
End of assembler dump.

(gdb) list *drm_dp_aux_dev_get_by_minor+0x29
0x17b39 is in drm_dp_aux_dev_get_by_minor (drivers/gpu/drm/drm_dp_aux_dev.c:65).
60      static struct drm_dp_aux_dev *drm_dp_aux_dev_get_by_minor(unsigned index)
61      {
62              struct drm_dp_aux_dev *aux_dev = NULL;
63
64              mutex_lock(&amp;aux_idr_mutex);
65              aux_dev = idr_find(&amp;aux_idr, index);
66              if (!kref_get_unless_zero(&amp;aux_dev-&gt;refcount))
67                      aux_dev = NULL;
68              mutex_unlock(&amp;aux_idr_mutex);
69
(gdb) p/x &amp;((struct drm_dp_aux_dev *)(0x0))-&gt;refcount
$8 = 0x18

Looking at the caller, checks on the minor are pushed down to
drm_dp_aux_dev_get_by_minor()

static int auxdev_open(struct inode *inode, struct file *file)
{
    unsigned int minor = iminor(inode);
    struct drm_dp_aux_dev *aux_dev;

    aux_dev = drm_dp_aux_dev_get_by_minor(minor); &lt;====
    if (!aux_dev)
        return -ENODEV;

    file-&gt;private_data = aux_dev;
    return 0;
}

Fixes: e94cb37b34eb ("drm/dp: Add a drm_aux-dev module for reading/writing dpcd registers.")
Cc: &lt;stable@vger.kernel.org&gt; # v4.6+
Signed-off-by: Zwane Mwaikambo &lt;zwane@yosper.io&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
[added Cc to stable]
Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.21.2010122231070.38717@montezuma.home
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/omap: dmm_tiler: fix return error code in omap_dmm_probe()</title>
<updated>2020-12-30T10:25:54+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2020-11-17T06:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d4a8dd1a3eec63a7b2e6f4ffd9922d5fbc4bc30'/>
<id>urn:sha1:0d4a8dd1a3eec63a7b2e6f4ffd9922d5fbc4bc30</id>
<content type='text'>
[ Upstream commit 723ae803218da993143387bf966042eccefac077 ]

Return -ENOMEM when allocating refill memory failed.

Fixes: 71e8831f6407 ("drm/omap: DMM/TILER support for OMAP4+ platform")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201117061045.3452287-1-yangyingliang@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/msm/dsi_pll_10nm: restore VCO rate during restore_state</title>
<updated>2020-12-30T10:25:51+00:00</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@linaro.org</email>
</author>
<published>2020-10-15T19:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b529e921c6f3e24c6e500de8d26cdc362453a8b7'/>
<id>urn:sha1:b529e921c6f3e24c6e500de8d26cdc362453a8b7</id>
<content type='text'>
[ Upstream commit a4ccc37693a271330a46208afbeaed939d54fdbb ]

PHY disable/enable resets PLL registers to default values. Thus in
addition to restoring several registers we also need to restore VCO rate
settings.

Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Fixes: c6659785dfb3 ("drm/msm/dsi/pll: call vco set rate explicitly")
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tve200: Fix handling of platform_get_irq() error</title>
<updated>2020-12-30T10:25:49+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-08-27T07:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=577dcd1af8c680dd31e5de08289d5c1ca0674967'/>
<id>urn:sha1:577dcd1af8c680dd31e5de08289d5c1ca0674967</id>
<content type='text'>
[ Upstream commit 77bb5aaf2bb8180e7d1bb70b4df306f511707a7d ]

platform_get_irq() returns -ERRNO on error.  In such case comparison
to 0 would pass the check.

Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200")
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200827071107.27429-2-krzk@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/gma500: fix double free of gma_connector</title>
<updated>2020-12-30T10:25:49+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2020-10-03T19:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18a4a903b4684b420fb1facd496769f21a1cd1b1'/>
<id>urn:sha1:18a4a903b4684b420fb1facd496769f21a1cd1b1</id>
<content type='text'>
[ Upstream commit 4e19d51ca5b28a1d435a844c7b2a8e1b1b6fa237 ]

clang static analysis reports this problem:

cdv_intel_dp.c:2101:2: warning: Attempt to free released memory
        kfree(gma_connector);
        ^~~~~~~~~~~~~~~~~~~~

In cdv_intel_dp_init() when the call to cdv_intel_edp_panel_vdd_off()
fails, the handler calls cdv_intel_dp_destroy(connector) which does
the first free of gma_connector. So adjust the goto label and skip
the second free.

Fixes: d112a8163f83 ("gma500/cdv: Add eDP support")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201003193928.18869-1-trix@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tegra: sor: Disable clocks on error in tegra_sor_init()</title>
<updated>2020-12-30T10:25:46+00:00</updated>
<author>
<name>Qinglang Miao</name>
<email>miaoqinglang@huawei.com</email>
</author>
<published>2020-10-30T01:34:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4069f4247a8bb5d33902232e1ab9fb703a3d2729'/>
<id>urn:sha1:4069f4247a8bb5d33902232e1ab9fb703a3d2729</id>
<content type='text'>
[ Upstream commit bf3a3cdcad40e5928a22ea0fd200d17fd6d6308d ]

Fix the missing clk_disable_unprepare() before return from
tegra_sor_init() in the error handling case.

Signed-off-by: Qinglang Miao &lt;miaoqinglang@huawei.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tegra: replace idr_init() by idr_init_base()</title>
<updated>2020-12-30T10:25:45+00:00</updated>
<author>
<name>Deepak R Varma</name>
<email>mh12gx2825@gmail.com</email>
</author>
<published>2020-11-05T17:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d90be35eaf5a0867c606d7b4ad96fa2e4806810b'/>
<id>urn:sha1:d90be35eaf5a0867c606d7b4ad96fa2e4806810b</id>
<content type='text'>
[ Upstream commit 41f71629b4c432f8dd47d70ace813be5f79d4d75 ]

idr_init() uses base 0 which is an invalid identifier for this driver.
The new function idr_init_base allows IDR to set the ID lookup from
base 1. This avoids all lookups that otherwise starts from 0 since
0 is always unused.

References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient")

Signed-off-by: Deepak R Varma &lt;mh12gx2825@gmail.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi</title>
<updated>2020-12-30T10:25:43+00:00</updated>
<author>
<name>Xin Xiong</name>
<email>xiongx18@fudan.edu.cn</email>
</author>
<published>2020-07-19T15:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88ee1af064560d62df2d419484a96c6b01c0eb71'/>
<id>urn:sha1:88ee1af064560d62df2d419484a96c6b01c0eb71</id>
<content type='text'>
commit a34a0a632dd991a371fec56431d73279f9c54029 upstream

drm_dp_mst_allocate_vcpi() invokes
drm_dp_mst_topology_get_port_validated(), which increases the refcount
of the "port".

These reference counting issues take place in two exception handling
paths separately. Either when “slots” is less than 0 or when
drm_dp_init_vcpi() returns a negative value, the function forgets to
reduce the refcnt increased drm_dp_mst_topology_get_port_validated(),
which results in a refcount leak.

Fix these issues by pulling up the error handling when "slots" is less
than 0, and calling drm_dp_mst_topology_put_port() before termination
when drm_dp_init_vcpi() returns a negative value.

Fixes: 1e797f556c61 ("drm/dp: Split drm_dp_mst_allocate_vcpi")
Cc: &lt;stable@vger.kernel.org&gt; # v4.12+
Signed-off-by: Xiyu Yang &lt;xiyuyang19@fudan.edu.cn&gt;
Signed-off-by: Xin Tan &lt;tanxin.ctf@gmail.com&gt;
Signed-off-by: Xin Xiong &lt;xiongx18@fudan.edu.cn&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200719154545.GA41231@xin-virtual-machine
[sudip: use old functions before rename]
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
