Re: [PATCH] drm/nouveau/therm: Fix pointer dereferenced before checking

2022-05-30 Thread baihaowen
在 2022/5/30 上午11:10, Haowen Bai 写道: > The fan->base is dereferencing before null checking, so move > it after checking. > > Signed-off-by: Haowen Bai > --- > drivers/gpu/drm/nouveau/nvkm/subdev/therm/fanpwm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH] drm: hisilicon: depends on MMU

2022-05-30 Thread Randy Dunlap
Prevent a kconfig warning when MMU is not enabled by making DRM_HISI_HIBMC depend on MMU. WARNING: unmet direct dependencies detected for DRM_TTM Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && MMU [=n] Selected by [m]: - DRM_TTM_HELPER [=m] && HAS_IOMEM [=y] && DRM [=m] - DRM_HISI_HIBMC

Re: [PATCH] dma-fence: allow dma fence to have their own lock

2022-05-30 Thread Sergey Senozhatsky
On (22/05/30 16:55), Christian König wrote: > Am 30.05.22 um 16:22 schrieb Sergey Senozhatsky: > > [SNIP] > > So the `lock` should have at least same lifespan as the DMA fence > > that borrows it, which is impossible to guarantee in our case. > > Nope, that's not correct. The lock should have at

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-30 Thread baihaowen
在 2022/5/31 上午8:36, Abhinav Kumar 写道: > > > On 5/30/2022 12:33 AM, Haowen Bai wrote: >> The ctx->hw is dereferencing before null checking, so move >> it after checking. >> >> Signed-off-by: Haowen Bai > > Agree with Dmitry's comment. Adjust the patch subject to a different one > otherwise PW

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-30 Thread baihaowen
在 2022/5/30 下午3:33, Haowen Bai 写道: > The ctx->hw is dereferencing before null checking, so move > it after checking. > > Signed-off-by: Haowen Bai > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-30 Thread Abhinav Kumar
On 5/30/2022 12:33 AM, Haowen Bai wrote: The ctx->hw is dereferencing before null checking, so move it after checking. Signed-off-by: Haowen Bai Agree with Dmitry's comment. Adjust the patch subject to a different one otherwise PW thinks they are same patches. Reviewed-by: Abhinav

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-30 Thread Dmitry Baryshkov
On Mon, 30 May 2022 at 05:20, Haowen Bai wrote: > > The phys_enc->wb_idx is dereferencing before null checking, so move > it after checking. > > Signed-off-by: Haowen Bai > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-30 Thread Dmitry Baryshkov
A nit: patchwork thinks that two patches from the same author with the same subject are two versions of the same patch. In future, could you please send such patches with distinct names? No need to send v2 now unless review shows other issues with the patches. On Mon, 30 May 2022 at 10:33, Haowen

Re: [GIT PULL] fbdev updates & fixes for v5.19-rc1

2022-05-30 Thread pr-tracker-bot
The pull request you sent on Mon, 30 May 2022 21:44:08 +0200: > http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git > tags/for-5.19/fbdev-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/8ab2afa23bd197df47819a87f0265c0ac95c5b6a Thank you! --

[GIT PULL] fbdev updates & fixes for v5.19-rc1

2022-05-30 Thread Helge Deller
The following changes since commit 42226c989789d8da4af1de0c31070c96726d990c: Linux 5.18-rc7 (2022-05-15 18:08:58 -0700) are available in the Git repository at: http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/for-5.19/fbdev-1 for you to fetch changes up to

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 10:20 AM Thomas Zimmermann wrote: > > Hi > > Am 30.05.22 um 17:41 schrieb Rob Clark: > > On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > >> > >> On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > >>> > >>> On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > >>>

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Thomas Zimmermann
Hi Am 30.05.22 um 17:41 schrieb Rob Clark: On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: On Mon, 30 May 2022 at 15:54, Rob Clark wrote: On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: Hi Am 29.05.22 um 18:29 schrieb Rob Clark: From: Rob Clark If a GEM object is

Re: [PATCH 03/10] drm/i915/uapi: expose the avail tracking

2022-05-30 Thread Matthew Auld
On 26/05/2022 09:33, Tvrtko Ursulin wrote: On 26/05/2022 09:10, Matthew Auld wrote: On 26/05/2022 08:58, Tvrtko Ursulin wrote: On 25/05/2022 19:43, Matthew Auld wrote: Vulkan would like to have a rough measure of how much device memory can in theory be allocated. Also add

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-30 Thread Russell King (Oracle)
On Mon, May 30, 2022 at 03:35:28PM +0200, Arnd Bergmann wrote: > The annotations for edid are completely correct and necessary. However > other driver authors just slap __packed annotations on any structure > even if the layout is not fixed at all like: > > struct my_driver_priv { >struct

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-30 Thread Russell King (Oracle)
On Mon, May 30, 2022 at 02:43:45PM +0200, Arnd Bergmann wrote: > Overall I'm not that worried because the only machines running OABI > kernels would be on really old hardware that runs a limited set of > driver code. ... and from what I remember, none of them care about EDID anyway. -- RMK's

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-30 Thread Russell King (Oracle)
On Mon, May 30, 2022 at 12:33:17PM +0300, Jani Nikula wrote: > On Mon, 30 May 2022, Jani Nikula wrote: > > On Sat, 28 May 2022, Linus Torvalds wrote: > >> On Sat, May 28, 2022 at 11:59 AM Arnd Bergmann wrote: > >>> > >>> It's CONFIG_ARM_AEABI, which is normally set everywhere. Without this >

Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

2022-05-30 Thread José Expósito
Hi Maxime, On Mon, May 30, 2022 at 03:11:58PM +0200, Maxime Ripard wrote: > > Hi, > > On Mon, May 30, 2022 at 12:20:17PM +0200, José Expósito wrote: > > Test the conversion from XRGB to RGB332. > > > > What is tested? > > > > - Different values for the X in XRGB to make sure it is

[PATCH v3 3/3] drm/panel: introduce ebbg,ft8719 panel

2022-05-30 Thread Joel Selvaraj
Add DRM panel driver for EBBG FT8719 6.18" 2246x1080 DSI video mode panel, which can be found on some Xiaomi Poco F1 phones. The panel's backlight is managed through QCOM WLED driver. Signed-off-by: Joel Selvaraj Reviewed-by: Sam Ravnborg --- Changes in v3: (Mostly Linus Walleij's Suggestions)

[PATCH v3 2/3] dt-bindings: display: Add bindings for EBBG FT8719

2022-05-30 Thread Joel Selvaraj
Add bindings for the EBBG FT8719 6.18" 2246x1080 DSI video mode panel, which can be found on some Xiaomi Poco F1 phones. The backlight is managed through the QCOM WLED driver. Signed-off-by: Joel Selvaraj Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij --- Changes in v2: (Krzysztof

[PATCH v3 1/3] dt-bindings: vendor-prefixes: Add prefix for EBBG

2022-05-30 Thread Joel Selvaraj
Add a prefix for EBBG. They manufacture displays which are used in some Xiaomi phones, but I could not find much details about the company. Signed-off-by: Joel Selvaraj Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2

[PATCH v3 0/3] Introduce EBBG FT8719 DRM panel driver

2022-05-30 Thread Joel Selvaraj
Add bindings and DRM panel driver for EBBG FT8719 6.18" 2246x1080 DSI video mode panel, which can be found on some Xiaomi Poco F1 phones. The panel's backlight is managed through QCOM WLED driver. The driver is built using linux-mdss-dsi-panel-driver-generator[1], and additionally support for

Re: [PATCH] dma-fence: allow dma fence to have their own lock

2022-05-30 Thread Sergey Senozhatsky
On (22/05/30 16:55), Christian König wrote: > > If you just want to create a single dma_fence which is also only bound to a > single context you can embed the lock into the fence without much problem. > > See how the dma_fence_array does that for example: >

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > > On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > wrote: > > > > > > Hi > > > > > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > > > From: Rob Clark > > > > > > > > If a GEM

Re: [PATCH] dma-fence: allow dma fence to have their own lock

2022-05-30 Thread Sergey Senozhatsky
Hi Christian, On (22/05/30 16:55), Christian König wrote: > Hi Sergey, > > I'm removing most of the mail because you have a very fundamental > misunderstanding about what this dma_fence lock is all about. Happy to learn. > Am 30.05.22 um 16:22 schrieb Sergey Senozhatsky: > > [SNIP] > > So the

[PATCH 4/6] drm/bridge: ti-sn65dsi83: make use of dev_err_probe

2022-05-30 Thread Marco Felsch
Use the new helper to improve the debug capabilities. Signed-off-by: Marco Felsch --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c index

[PATCH 6/6] drm/bridge: ti-sn65dsi83: add support for a external reset controller

2022-05-30 Thread Marco Felsch
The bridge chip has an enable gpio which of course can enable/disable the bridge. Most the time this gpio is connected directly to the host but sometimes it is connected to a reset controller chip and the host controlls the reset controller chip instead. This commit adds the support to handle

[PATCH 5/6] dt-bindings: drm/bridge: ti-sn65dsi83: Add reset controller documentation

2022-05-30 Thread Marco Felsch
The bridge device can now also be enabled/disabled by an external reset controller. So the device now supports either enable/disable by simple GPIO or by an Reset-Controller. Signed-off-by: Marco Felsch --- .../devicetree/bindings/display/bridge/ti,sn65dsi83.yaml| 6 ++ 1 file changed,

[PATCH 1/6] drm/bridge: ti-sn65dsi83: make lvds lane register setup more readable

2022-05-30 Thread Marco Felsch
No functional change. Just reuse the already existing val variable to setup the register. This is in preparation for adding the new feature to reverse the CHA/CHB lane orders. Without this change this call gets very unreadable. Signed-off-by: Marco Felsch ---

[PATCH 0/6] TI SN65DSI83 Features

2022-05-30 Thread Marco Felsch
Hi, the purpose of this small series is to enable the support for the reverse lane feature and to add support for reset controllers which can drive the enable pin. Regards, Marco Marco Felsch (6): drm/bridge: ti-sn65dsi83: make lvds lane register setup more readable dt-bindings:

[PATCH 3/6] drm/bridge: ti-sn65dsi83: add support to swap the LVDS data lanes

2022-05-30 Thread Marco Felsch
The chip can swap the LVDS channel A/B data lanes e.g. to improve the layout characteristic. This commit adds the feature so the system integrator can specify it within the device-tree. Signed-off-by: Marco Felsch --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 64 +++ 1

[PATCH 2/6] dt-bindings: drm/bridge: ti-sn65dsi83: add documentation for reverse lvds lanes

2022-05-30 Thread Marco Felsch
The TI converter chip can swap the LVDS data lanes in a pre-defined manner. This can be useful to improve the layout characteristic. Signed-off-by: Marco Felsch --- .../bindings/display/bridge/ti,sn65dsi83.yaml | 58 ++- 1 file changed, 56 insertions(+), 2 deletions(-) diff

Re: [PATCH] dma-fence: allow dma fence to have their own lock

2022-05-30 Thread Christian König
Hi Sergey, I'm removing most of the mail because you have a very fundamental misunderstanding about what this dma_fence lock is all about. Am 30.05.22 um 16:22 schrieb Sergey Senozhatsky: [SNIP] So the `lock` should have at least same lifespan as the DMA fence that borrows it, which is

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Daniel Vetter
On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > wrote: > > > > Hi > > > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > > From: Rob Clark > > > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > > mmap'd

Re: [PATCH AUTOSEL 4.19 16/38] drm/sun4i: Add support for D1 TCONs

2022-05-30 Thread Samuel Holland
Hi Sasha, On 5/30/22 8:49 AM, Sasha Levin wrote: > From: Samuel Holland > > [ Upstream commit b9b52d2f4aafa2bd637ace0f24615bdad8e49f01 ] > > D1 has a TCON TOP, so its quirks are similar to those for the R40 TCONs. > While there are some register changes, the part of the TCON TV supported > by

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 7:16 AM Thomas Zimmermann wrote: > > Hi > > Am 30.05.22 um 15:47 schrieb Rob Clark: > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > wrote: > >> > >> Hi > >> > >> Am 29.05.22 um 18:29 schrieb Rob Clark: > >>> From: Rob Clark > >>> > >>> If a GEM object is

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-30 Thread Arnd Bergmann
On Mon, May 30, 2022 at 4:08 PM Jani Nikula wrote: > On Mon, 30 May 2022, Arnd Bergmann wrote: > > struct my_driver_priv { > >struct device dev; > >u8 causes_misalignment; > >spinlock_t lock; > >atomic_t counter; > > } __packed; /* this annotation is harmful

[PATCH] dma-fence: allow dma fence to have their own lock

2022-05-30 Thread Sergey Senozhatsky
RFC I don't have a good name for this yet and I did not spend any time on documentataion (for that reason) We create fences (out fences) as part of operations execution, which are short-lived objects, we want to release all memory after operation execution is completed or

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Thomas Zimmermann
Hi Am 30.05.22 um 15:47 schrieb Rob Clark: On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: Hi Am 29.05.22 um 18:29 schrieb Rob Clark: From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly

[PATCH AUTOSEL 4.19 18/38] drm/plane: Move range check for format_count earlier

2022-05-30 Thread Sasha Levin
From: Steven Price [ Upstream commit 4b674dd69701c2e22e8e7770c1706a69f3b17269 ] While the check for format_count > 64 in __drm_universal_plane_init() shouldn't be hit (it's a WARN_ON), in its current position it will then leak the plane->format_types array and fail to call

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-30 Thread Jani Nikula
On Mon, 30 May 2022, Arnd Bergmann wrote: > On Mon, May 30, 2022 at 3:10 PM Jani Nikula wrote: >> > >> > I think in general, most __packed annotations we have in the kernel are >> > completely pointless because they do not change the structure layout on >> > any architecture but instead just

[PATCH] drm/ssd130x: Only define a SPI device ID table when built as a module

2022-05-30 Thread Javier Martinez Canillas
The kernel test robot reports a compile warning due the ssd130x_spi_table variable being defined but not used. This happen when ssd130x-spi driver is built-in instead of being built as a module, i.e: CC drivers/gpu/drm/solomon/ssd130x-spi.o AR drivers/base/firmware_loader/built-in.a

[PATCH AUTOSEL 5.15 015/109] drm/komeda: return early if drm_universal_plane_init() fails.

2022-05-30 Thread Sasha Levin
From: Liviu Dudau [ Upstream commit c8f76c37cc3668ee45e081e76a15f24a352ebbdd ] If drm_universal_plane_init() fails early we jump to the common cleanup code that calls komeda_plane_destroy() which in turn could access the uninitalised drm_plane and crash. Return early if an error is detected

[PATCH AUTOSEL 4.19 10/38] drm/amd/pm: fix double free in si_parse_power_table()

2022-05-30 Thread Sasha Levin
From: Keita Suzuki [ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ] In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later

Re: [PATCH v6 14/22] dma-buf: Introduce new locking convention

2022-05-30 Thread Dmitry Osipenko
On 5/30/22 16:41, Christian König wrote: > Hi Dmitry, > > Am 30.05.22 um 15:26 schrieb Dmitry Osipenko: >> Hello Christian, >> >> On 5/30/22 09:50, Christian König wrote: >>> Hi Dmitry, >>> >>> First of all please separate out this patch from the rest of the series, >>> since this is a complex

[PATCH AUTOSEL 4.19 19/38] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

Re: [PATCH v6 14/22] dma-buf: Introduce new locking convention

2022-05-30 Thread Christian König
Hi Dmitry, Am 30.05.22 um 15:26 schrieb Dmitry Osipenko: Hello Christian, On 5/30/22 09:50, Christian König wrote: Hi Dmitry, First of all please separate out this patch from the rest of the series, since this is a complex separate structural change. I assume all the patches will go via the

[PATCH AUTOSEL 4.19 07/38] fbcon: Consistently protect deferred_takeover with console_lock()

2022-05-30 Thread Sasha Levin
From: Daniel Vetter [ Upstream commit 43553559121ca90965b572cf8a1d6d0fd618b449 ] This shouldn't be a problem in practice since until we've actually taken over the console there's nothing we've registered with the console/vt subsystem, so the exit/unbind path that check this can't do the wrong

[PATCH AUTOSEL 4.19 01/38] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: > > Hi > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > From: Rob Clark > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > mmap'd before or without the GEM buffer being directly mmap'd, the > > vma_node

[PATCH AUTOSEL 4.9 12/24] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

[PATCH AUTOSEL 4.9 08/24] drm/amd/pm: fix double free in si_parse_power_table()

2022-05-30 Thread Sasha Levin
From: Keita Suzuki [ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ] In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later

[PATCH AUTOSEL 4.9 01/24] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

[PATCH AUTOSEL 4.14 14/29] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

Re: [PATCH] drm/sun4i: Fix blend route/enable register corruption for DE2.0/DE3.0

2022-05-30 Thread Roman Stratiienko
Hi Maxime, пн, 30 мая 2022 г. в 16:22, Maxime Ripard : > > Hi Roman, > > On Wed, May 25, 2022 at 11:54:45AM +, Roman Stratiienko wrote: > > By this commit 2 related issues are solved: > > > > Issue #1. Corruption in blend route/enable register: > > > > Register corruption happens after

[PATCH AUTOSEL 4.14 08/29] drm/amd/pm: fix double free in si_parse_power_table()

2022-05-30 Thread Sasha Levin
From: Keita Suzuki [ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ] In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later

[PATCH AUTOSEL 4.14 01/29] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

[PATCH AUTOSEL 5.18 129/159] drm/amd/pm: update smartshift powerboost calc for smu12

2022-05-30 Thread Sasha Levin
From: Sathishkumar S [ Upstream commit 138292f1dc00e7e0724f44769f9da39cf2f3bf0b ] smartshift apu and dgpu power boost are reported as percentage with respect to their power limits. This value[0-100] reflects the boost for the respective device. Signed-off-by: Sathishkumar S Reviewed-by: Lijo

[PATCH AUTOSEL 5.15 011/109] fbcon: Consistently protect deferred_takeover with console_lock()

2022-05-30 Thread Sasha Levin
From: Daniel Vetter [ Upstream commit 43553559121ca90965b572cf8a1d6d0fd618b449 ] This shouldn't be a problem in practice since until we've actually taken over the console there's nothing we've registered with the console/vt subsystem, so the exit/unbind path that check this can't do the wrong

[PATCH AUTOSEL 5.15 003/109] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

[PATCH AUTOSEL 5.15 002/109] drm/vmwgfx: validate the screen formats

2022-05-30 Thread Sasha Levin
From: Zack Rusin [ Upstream commit 8bb75aeb58bd688d70827ae179bd3da57b6d975b ] The kms code wasn't validating the modifiers and was letting through unsupported formats. rgb8 was never properly supported and has no matching svga screen target format so remove it. This fixes format/modifier

[PATCH AUTOSEL 5.4 31/55] drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo

2022-05-30 Thread Sasha Levin
From: Alice Wong [ Upstream commit ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f ] When psp_hw_init failed, it will set the load_type to AMDGPU_FW_LOAD_DIRECT. During amdgpu_device_ip_fini, amdgpu_ucode_free_bo checks that load_type is AMDGPU_FW_LOAD_DIRECT and skips deallocating fw_buf causing

[PATCH AUTOSEL 5.4 26/55] drm: msm: fix error check return value of irq_of_parse_and_map()

2022-05-30 Thread Sasha Levin
From: Lv Ruyi [ Upstream commit b9e4f1d2b505df8e2439b63e67afaa287c1c43e2 ] The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Reviewed-by: Dmitry Baryshkov Patchwork:

[PATCH AUTOSEL 5.4 24/55] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

[PATCH AUTOSEL 5.4 23/55] drm/plane: Move range check for format_count earlier

2022-05-30 Thread Sasha Levin
From: Steven Price [ Upstream commit 4b674dd69701c2e22e8e7770c1706a69f3b17269 ] While the check for format_count > 64 in __drm_universal_plane_init() shouldn't be hit (it's a WARN_ON), in its current position it will then leak the plane->format_types array and fail to call

[PATCH AUTOSEL 5.4 20/55] drm/sun4i: Add support for D1 TCONs

2022-05-30 Thread Sasha Levin
From: Samuel Holland [ Upstream commit b9b52d2f4aafa2bd637ace0f24615bdad8e49f01 ] D1 has a TCON TOP, so its quirks are similar to those for the R40 TCONs. While there are some register changes, the part of the TCON TV supported by the driver matches the R40 quirks, so that quirks structure can

[PATCH AUTOSEL 5.4 13/55] drm/amd/pm: fix double free in si_parse_power_table()

2022-05-30 Thread Sasha Levin
From: Keita Suzuki [ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ] In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later

[PATCH AUTOSEL 5.4 09/55] drm/komeda: return early if drm_universal_plane_init() fails.

2022-05-30 Thread Sasha Levin
From: Liviu Dudau [ Upstream commit c8f76c37cc3668ee45e081e76a15f24a352ebbdd ] If drm_universal_plane_init() fails early we jump to the common cleanup code that calls komeda_plane_destroy() which in turn could access the uninitalised drm_plane and crash. Return early if an error is detected

[PATCH AUTOSEL 5.4 07/55] fbcon: Consistently protect deferred_takeover with console_lock()

2022-05-30 Thread Sasha Levin
From: Daniel Vetter [ Upstream commit 43553559121ca90965b572cf8a1d6d0fd618b449 ] This shouldn't be a problem in practice since until we've actually taken over the console there's nothing we've registered with the console/vt subsystem, so the exit/unbind path that check this can't do the wrong

[PATCH AUTOSEL 5.4 01/55] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

[PATCH AUTOSEL 5.10 34/76] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

[PATCH AUTOSEL 5.10 33/76] drm/plane: Move range check for format_count earlier

2022-05-30 Thread Sasha Levin
From: Steven Price [ Upstream commit 4b674dd69701c2e22e8e7770c1706a69f3b17269 ] While the check for format_count > 64 in __drm_universal_plane_init() shouldn't be hit (it's a WARN_ON), in its current position it will then leak the plane->format_types array and fail to call

[PATCH AUTOSEL 5.10 27/76] drm/sun4i: Add support for D1 TCONs

2022-05-30 Thread Sasha Levin
From: Samuel Holland [ Upstream commit b9b52d2f4aafa2bd637ace0f24615bdad8e49f01 ] D1 has a TCON TOP, so its quirks are similar to those for the R40 TCONs. While there are some register changes, the part of the TCON TV supported by the driver matches the R40 quirks, so that quirks structure can

[PATCH AUTOSEL 5.10 19/76] drm/amd/pm: fix double free in si_parse_power_table()

2022-05-30 Thread Sasha Levin
From: Keita Suzuki [ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ] In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later

[PATCH AUTOSEL 5.10 12/76] drm/komeda: return early if drm_universal_plane_init() fails.

2022-05-30 Thread Sasha Levin
From: Liviu Dudau [ Upstream commit c8f76c37cc3668ee45e081e76a15f24a352ebbdd ] If drm_universal_plane_init() fails early we jump to the common cleanup code that calls komeda_plane_destroy() which in turn could access the uninitalised drm_plane and crash. Return early if an error is detected

[PATCH AUTOSEL 5.10 09/76] fbcon: Consistently protect deferred_takeover with console_lock()

2022-05-30 Thread Sasha Levin
From: Daniel Vetter [ Upstream commit 43553559121ca90965b572cf8a1d6d0fd618b449 ] This shouldn't be a problem in practice since until we've actually taken over the console there's nothing we've registered with the console/vt subsystem, so the exit/unbind path that check this can't do the wrong

[PATCH AUTOSEL 5.10 02/76] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

[PATCH AUTOSEL 5.15 089/109] drm/amd/pm: update smartshift powerboost calc for smu13

2022-05-30 Thread Sasha Levin
From: Sathishkumar S [ Upstream commit cdf4c8ec39872a61a58d62f19b4db80f0f7bc586 ] smartshift apu and dgpu power boost are reported as percentage with respect to their power limits. adjust the units of power before calculating the percentage of boost. Signed-off-by: Sathishkumar S Reviewed-by:

[PATCH AUTOSEL 5.15 088/109] drm/amd/pm: update smartshift powerboost calc for smu12

2022-05-30 Thread Sasha Levin
From: Sathishkumar S [ Upstream commit 138292f1dc00e7e0724f44769f9da39cf2f3bf0b ] smartshift apu and dgpu power boost are reported as percentage with respect to their power limits. This value[0-100] reflects the boost for the respective device. Signed-off-by: Sathishkumar S Reviewed-by: Lijo

[PATCH AUTOSEL 5.15 058/109] drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo

2022-05-30 Thread Sasha Levin
From: Alice Wong [ Upstream commit ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f ] When psp_hw_init failed, it will set the load_type to AMDGPU_FW_LOAD_DIRECT. During amdgpu_device_ip_fini, amdgpu_ucode_free_bo checks that load_type is AMDGPU_FW_LOAD_DIRECT and skips deallocating fw_buf causing

[PATCH AUTOSEL 5.15 057/109] drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init

2022-05-30 Thread Sasha Levin
From: Alex Deucher [ Upstream commit b95b5391684b39695887afb4a13cccee7820f5d6 ] Memory allocations should be done in sw_init. hw_init should just be hardware programming needed to initialize the IP block. This is how most other IP blocks work. Move the GPU memory allocations from psp hw_init

[PATCH AUTOSEL 5.15 050/109] drm: msm: fix error check return value of irq_of_parse_and_map()

2022-05-30 Thread Sasha Levin
From: Lv Ruyi [ Upstream commit b9e4f1d2b505df8e2439b63e67afaa287c1c43e2 ] The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Reviewed-by: Dmitry Baryshkov Patchwork:

[PATCH AUTOSEL 5.15 047/109] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

[PATCH AUTOSEL 5.17 004/135] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes

2022-05-30 Thread Sasha Levin
From: Liu Zixian [ Upstream commit 194d250cdc4a40ccbd179afd522a9e9846957402 ] drm_cvt_mode may return NULL and we should check it. This bug is found by syzkaller: FAULT_INJECTION stacktrace: [ 168.567394] FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0,

[PATCH AUTOSEL 5.18 131/159] drm/amdgpu: Move mutex_init(>message_lock) to smu_early_init()

2022-05-30 Thread Sasha Levin
From: Hans de Goede [ Upstream commit 4b9caaa0281972ca5ea4e1cdac2e12b9df1ae00b ] Lockdep complains about the smu->message_lock mutex being used before it is initialized through the following call path: amdgpu_device_init() amdgpu_dpm_mode2_reset() smu_mode2_reset()

[PATCH AUTOSEL 5.17 109/135] drm/amd/pm: update smartshift powerboost calc for smu13

2022-05-30 Thread Sasha Levin
From: Sathishkumar S [ Upstream commit cdf4c8ec39872a61a58d62f19b4db80f0f7bc586 ] smartshift apu and dgpu power boost are reported as percentage with respect to their power limits. adjust the units of power before calculating the percentage of boost. Signed-off-by: Sathishkumar S Reviewed-by:

[PATCH AUTOSEL 5.17 108/135] drm/amd/pm: update smartshift powerboost calc for smu12

2022-05-30 Thread Sasha Levin
From: Sathishkumar S [ Upstream commit 138292f1dc00e7e0724f44769f9da39cf2f3bf0b ] smartshift apu and dgpu power boost are reported as percentage with respect to their power limits. This value[0-100] reflects the boost for the respective device. Signed-off-by: Sathishkumar S Reviewed-by: Lijo

[PATCH AUTOSEL 5.17 072/135] drm/tegra: gem: Do not try to dereference ERR_PTR()

2022-05-30 Thread Sasha Levin
From: Thierry Reding [ Upstream commit cb7e1abc2c73633e1eefa168ab2dad6e838899c9 ] When mapping the DMA-BUF attachment fails, map->sgt will be an ERR_PTR- encoded error code and the cleanup code would try to free that memory, which obviously would fail. Zero out that pointer after extracting

[PATCH AUTOSEL 5.17 054/135] drm/plane: Move range check for format_count earlier

2022-05-30 Thread Sasha Levin
From: Steven Price [ Upstream commit 4b674dd69701c2e22e8e7770c1706a69f3b17269 ] While the check for format_count > 64 in __drm_universal_plane_init() shouldn't be hit (it's a WARN_ON), in its current position it will then leak the plane->format_types array and fail to call

[PATCH AUTOSEL 5.17 049/135] drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells

2022-05-30 Thread Sasha Levin
From: Haohui Mai [ Upstream commit 7dba6e838e741caadcf27ef717b6dcb561e77f89 ] This patch fixes the issue where the driver miscomputes the 64-bit values of the wptr of the SDMA doorbell when initializing the hardware. SDMA engines v4 and later on have full 64-bit registers for wptr thus they

[PATCH AUTOSEL 5.17 047/135] drm/sun4i: Add support for D1 TCONs

2022-05-30 Thread Sasha Levin
From: Samuel Holland [ Upstream commit b9b52d2f4aafa2bd637ace0f24615bdad8e49f01 ] D1 has a TCON TOP, so its quirks are similar to those for the R40 TCONs. While there are some register changes, the part of the TCON TV supported by the driver matches the R40 quirks, so that quirks structure can

[PATCH AUTOSEL 5.17 035/135] drm/amd/pm: fix double free in si_parse_power_table()

2022-05-30 Thread Sasha Levin
From: Keita Suzuki [ Upstream commit f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd ] In function si_parse_power_table(), array adev->pm.dpm.ps and its member is allocated. If the allocation of each member fails, the array itself is freed and returned with an error code. However, the array is later

[PATCH AUTOSEL 5.17 019/135] drm/amd/display: Disabling Z10 on DCN31

2022-05-30 Thread Sasha Levin
From: Saaem Rizvi [ Upstream commit 5d5af34072c8b11f60960c3bea57ff9de5877791 ] [WHY] Z10 is should not be enabled by default on DCN31. [HOW] Using DC debug flags to disable Z10 by default on DCN31. Reviewed-by: Eric Yang Acked-by: Pavle Kotarac Signed-off-by: Saaem Rizvi Signed-off-by:

[PATCH AUTOSEL 5.17 018/135] drm/komeda: return early if drm_universal_plane_init() fails.

2022-05-30 Thread Sasha Levin
From: Liviu Dudau [ Upstream commit c8f76c37cc3668ee45e081e76a15f24a352ebbdd ] If drm_universal_plane_init() fails early we jump to the common cleanup code that calls komeda_plane_destroy() which in turn could access the uninitalised drm_plane and crash. Return early if an error is detected

[PATCH AUTOSEL 5.17 013/135] fbcon: Consistently protect deferred_takeover with console_lock()

2022-05-30 Thread Sasha Levin
From: Daniel Vetter [ Upstream commit 43553559121ca90965b572cf8a1d6d0fd618b449 ] This shouldn't be a problem in practice since until we've actually taken over the console there's nothing we've registered with the console/vt subsystem, so the exit/unbind path that check this can't do the wrong

[PATCH AUTOSEL 5.18 083/159] drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo

2022-05-30 Thread Sasha Levin
From: Alice Wong [ Upstream commit ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f ] When psp_hw_init failed, it will set the load_type to AMDGPU_FW_LOAD_DIRECT. During amdgpu_device_ip_fini, amdgpu_ucode_free_bo checks that load_type is AMDGPU_FW_LOAD_DIRECT and skips deallocating fw_buf causing

[PATCH AUTOSEL 5.18 082/159] drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init

2022-05-30 Thread Sasha Levin
From: Alex Deucher [ Upstream commit b95b5391684b39695887afb4a13cccee7820f5d6 ] Memory allocations should be done in sw_init. hw_init should just be hardware programming needed to initialize the IP block. This is how most other IP blocks work. Move the GPU memory allocations from psp hw_init

[PATCH AUTOSEL 5.18 087/159] drm/tegra: gem: Do not try to dereference ERR_PTR()

2022-05-30 Thread Sasha Levin
From: Thierry Reding [ Upstream commit cb7e1abc2c73633e1eefa168ab2dad6e838899c9 ] When mapping the DMA-BUF attachment fails, map->sgt will be an ERR_PTR- encoded error code and the cleanup code would try to free that memory, which obviously would fail. Zero out that pointer after extracting

[PATCH AUTOSEL 5.18 070/159] drm: msm: fix error check return value of irq_of_parse_and_map()

2022-05-30 Thread Sasha Levin
From: Lv Ruyi [ Upstream commit b9e4f1d2b505df8e2439b63e67afaa287c1c43e2 ] The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Reviewed-by: Dmitry Baryshkov Patchwork:

[PATCH AUTOSEL 5.18 067/159] drm/amd/pm: fix the compile warning

2022-05-30 Thread Sasha Levin
From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test

[PATCH AUTOSEL 5.18 066/159] drm/amdkfd: Fix circular lock dependency warning

2022-05-30 Thread Sasha Levin
From: Mukul Joshi [ Upstream commit b179fc28d521379ba7e0a38eec1a4c722e7ea634 ] [ 168.544078] == [ 168.550309] WARNING: possible circular locking dependency detected [ 168.556523] 5.16.0-kfd-fkuehlin #148 Tainted: GE [

  1   2   >