Re: [RFC PATCH v3 04/12] netdev: support binding dma-buf to netdevice

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, Mina Almasry wrote: > + > +void __netdev_devmem_binding_free(struct netdev_dmabuf_binding *binding) > +{ > + size_t size, avail; > + > + gen_pool_for_each_chunk(binding->chunk_pool, > + netdev_devmem_free_chunk_owner, NULL); > + > + size =

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, Mina Almasry wrote: > + > +void netdev_free_devmem(struct page_pool_iov *ppiov) > +{ > + struct netdev_dmabuf_binding *binding = page_pool_iov_binding(ppiov); > + > + refcount_set(&ppiov->refcount, 1); > + > + if (gen_pool_has_addr(binding->chunk_pool, > +

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, Mina Almasry wrote: > Overload the LSB of struct page* to indicate that it's a page_pool_iov. > > Refactor mm calls on struct page* into helpers, and add page_pool_iov > handling on those helpers. Modify callers of these mm APIs with calls to > these helpers instead. > > In ar

Re: [RFC PATCH v3 02/12] net: page_pool: create hooks for custom page providers

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, Mina Almasry wrote: > > diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h > index 6fc5134095ed..d4bea053bb7e 100644 > --- a/include/net/page_pool/types.h > +++ b/include/net/page_pool/types.h > @@ -60,6 +60,8 @@ struct page_pool_params { > int

AW: drm/panel: panel-simple power-off sequencing

2023-11-07 Thread Jonas Mark (BT-FS/ENG1-GRB)
Hi Doug, > > I guess, in summary, I'm hoping you'll look again and find that this > > really is a backlight enable. If not, I'd probably advocate for a > > per-panel boolean. > > Circling back, I'm curious what ended up happening here. Did you > decide that it actually was a backlight enable GPIO

Re: [PATCH] accel/ivpu: Fix compilation with CONFIG_PM=n

2023-11-07 Thread Jacek Lawrynowicz
Applied to drm-misc-next On 06.11.2023 14:08, Jacek Lawrynowicz wrote: > Use pm_runtime_status_suspended() instead of dev->power.runtime_status > field that is not available without PM. > > Signed-off-by: Jacek Lawrynowicz > --- > drivers/accel/ivpu/ivpu_ipc.c | 4 ++-- > 1 file changed, 2 inse

[PATCH] drm/amd/pm: clean up redundant comparisons with 0

2023-11-07 Thread José Pekkarinen
There is a couple of function return checks of functions that return unsigned values, and local variables to hold them are also unsigned, so checking if they are negative will always return false. This patch will remove them, as well as the never reached code. drivers/gpu/drm/amd/pm/amdgpu_pm.c:28

Re: Fbdev issue after the drm updates 'drm-next-2023-10-31-1'

2023-11-07 Thread Christian Zigotzky
Hello, I have found out that fbdev no longer works with virtio-gpu-pci and virtio-vga. It is not a problem with the penguin logos. Could you please check fbdev in QEMU virtual machines with virtio-gpu-pci and virtio-vga graphics? Many thanks in advance, Christian On 02 November 2023 at 0

Re: [PATCH drm-misc-next v3] drm/sched: implement dynamic job-flow control

2023-11-07 Thread Christian König
Am 06.11.23 um 17:46 schrieb Danilo Krummrich: On Fri, Nov 03, 2023 at 09:15:25AM +0100, Christian König wrote: Am 02.11.23 um 19:03 schrieb Danilo Krummrich: > On Thu, Nov 02, 2023 at 11:07:32AM +0100, Christian König wrote: > > Hi Danilo, > > > > Am 31.10.23 um 16:01 schrieb Danilo Krummrich:

Re: [PATCH v2 6/6] drm/vs: Add hdmi driver

2023-11-07 Thread Maxime Ripard
Hi, On Sun, Oct 29, 2023 at 06:52:24PM +0200, Dmitry Baryshkov wrote: > On Thu, 26 Oct 2023 at 14:53, Maxime Ripard wrote: > > > > On Thu, Oct 26, 2023 at 11:57:22AM +0300, Dmitry Baryshkov wrote: > > > On Thu, 26 Oct 2023 at 11:07, Maxime Ripard wrote: > > > > > > > > On Thu, Oct 26, 2023 at 01

[PATCH 00/22] fb: handle remove callbacks in .exit.text and convert to .remove_new

2023-11-07 Thread Uwe Kleine-König
Hello, there are currently several platform drivers that have their .remove callback defined in .exit.text. While this works fine, it comes with a few downsides: Since commit f177cd0c15fc ("modpost: Don't let "driver"s reference .exit.*") it triggers a modpost warning unless the driver struct is m

[PATCH 04/22] fb: omapfb/dpi: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 03/22] fb: omapfb/analog-tv: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 01/22] fb: amifb: Stop using platform_driver_probe()

2023-11-07 Thread Uwe Kleine-König
On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_dr

[PATCH 12/22] fb: amifb: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 07/22] fb: omapfb/hdmi: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 13/22] fb: atmel_lcdfb: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 09/22] fb: omapfb/sharp-ls037v7dw01: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 19/22] fb: omapfb/opa362: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 08/22] fb: omapfb/opa362: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 10/22] fb: omapfb/tfp410: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 17/22] fb: omapfb/dvi: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 11/22] fb: omapfb/tpd12s015: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 18/22] fb: omapfb/hdmi: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 06/22] fb: omapfb/dvi: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

[PATCH 20/22] fb: omapfb/sharp-ls037v7dw01: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 21/22] fb: omapfb/tfp410: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 16/22] fb: omapfb/dsi-cm: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 22/22] fb: omapfb/tpd12s015: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 15/22] fb: omapfb/dpi: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 02/22] fb: atmel_lcdfb: Stop using platform_driver_probe()

2023-11-07 Thread Uwe Kleine-König
On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_dr

[PATCH 14/22] fb: omapfb/analog-tv: Convert to platform remove callback returning void

2023-11-07 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve h

[PATCH 05/22] fb: omapfb/dsi-cm: Don't put .remove() in .exit.text and drop suppress_bind_attrs

2023-11-07 Thread Uwe Kleine-König
On today's platforms the memory savings of putting the remove function in .exit isn't that relevant any more. It only matters for built-in drivers and typically saves a few 100k. The downside is that the driver cannot be unbound at runtime which is ancient and also slightly complicates testing. Al

Re: [PATCH v5 1/4] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-11-07 Thread Christian König
Am 16.10.23 um 10:52 schrieb Karolina Stolarek: Test initialization of ttm_resource using different memory domains. Add tests for a system memory manager and functions that can be tested without a fully-featured resource manager. Update ttm_bo_kunit_init() to initialize BO's kref and a genuine GE

Re: [RFC PATCH 01/10] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2023-11-07 Thread Pekka Paalanen
On Mon, 6 Nov 2023 11:24:50 -0500 Harry Wentland wrote: > On 2023-10-20 06:17, Pekka Paalanen wrote: > > On Thu, 19 Oct 2023 10:56:29 -0400 > > Harry Wentland wrote: > > > >> On 2023-09-13 07:29, Pekka Paalanen wrote: > >>> On Fri, 8 Sep 2023 11:02:26 -0400 > >>> Harry Wentland wrote: > >>

Re: [PATCH v5 1/4] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-11-07 Thread Karolina Stolarek
On 7.11.2023 10:34, Christian König wrote: Am 16.10.23 um 10:52 schrieb Karolina Stolarek: diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c index 81661d8827aa..c605f010ea08 100644 --- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c +++ b

[PATCH] drm/amd/display: clean up redundant conversions to bool

2023-11-07 Thread José Pekkarinen
This patch will address the following couple of warnings retrieved by using coccinelle, where there is an explicit conversion to bool that are redundant. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c:94:102-107: WARNING: conversion to bool not needed here drivers/gpu/drm/amd/display/am

Re: [RFC PATCH 01/10] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2023-11-07 Thread Pekka Paalanen
On Mon, 6 Nov 2023 11:19:27 -0500 Harry Wentland wrote: > On 2023-10-20 06:36, Pekka Paalanen wrote: > > On Thu, 19 Oct 2023 10:56:40 -0400 > > Harry Wentland wrote: > > > >> On 2023-10-10 12:13, Melissa Wen wrote: > >>> O 09/08, Harry Wentland wrote: > Signed-off-by: Harry Wentlan

Re: [PATCH v5 2/4] drm/ttm/tests: Add tests for ttm_tt

2023-11-07 Thread Christian König
Am 16.10.23 um 10:52 schrieb Karolina Stolarek: Test initialization, creation and destruction of ttm_tt instances. Export ttm_tt_destroy and ttm_tt_create symbols for testing purposes. Signed-off-by: Karolina Stolarek At least of hand I can't see anything obviously wrong, but I also haven't

[PATCH] dt-bindings: display/msm: qcom, sm8250-mdss: add DisplayPort controller node

2023-11-07 Thread Krzysztof Kozlowski
Document the DisplayPort controller node in MDSS binding, already used in DTS: sm8250-xiaomi-elish-boe.dtb: display-subsystem@ae0: Unevaluated properties are not allowed ('displayport-controller@ae9' was unexpected) Signed-off-by: Krzysztof Kozlowski --- .../bindings/display/msm/qcom

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-07 Thread Yunsheng Lin
On 2023/11/6 10:44, Mina Almasry wrote: > Make skb_frag_page() fail in the case where the frag is not backed > by a page, and fix its relevent callers to handle this case. > > Correctly handle skb_frag refcounting in the page_pool_iovs case. > > Signed-off-by: Mina Almasry > ... > /** > *

Re: [RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state

2023-11-07 Thread Maxime Ripard
+GKH On Thu, Oct 26, 2023 at 11:41:34AM +0300, Dmitry Baryshkov wrote: > > > > Also, we would still need to update every single panel driver, which is > > > > going to create a lot of boilerplate that people might get wrong. > > > > > > Yes, quite unfortunately. Another approach that I have in min

[PATCH] drm/msm: remove exra drm_kms_helper_poll_init() call

2023-11-07 Thread Dmitry Baryshkov
It seems during rebases I have left a call to drm_kms_helper_poll_init() which is not guarded by the (priv->kms_init) check. This leads to the crash for the boards which don't have KMS output. Drop this call, as there is a correctly guarded one next to the one being removed. Fixes: 506efcba3129 ("

Re: [RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state

2023-11-07 Thread Greg Kroah-Hartman
On Tue, Nov 07, 2023 at 11:57:49AM +0100, Maxime Ripard wrote: > +GKH Why? I don't see a question for me here, sorry. greg k-h

Re: [RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state

2023-11-07 Thread Maxime Ripard
On Tue, Nov 07, 2023 at 12:22:21PM +0100, Greg Kroah-Hartman wrote: > On Tue, Nov 07, 2023 at 11:57:49AM +0100, Maxime Ripard wrote: > > +GKH > > Why? I don't see a question for me here, sorry. I guess the question is: we have a bus with various power states (powered off, low power, high speed)

[PATCH AUTOSEL 6.6 01/40] drm/gma500: Fix call trace when psb_gem_mm_init() fails

2023-11-07 Thread Sasha Levin
From: Sui Jingfeng [ Upstream commit da596080b2b400c50fe9f8f237bcaf09fed06af8 ] Because the gma_irq_install() is call after psb_gem_mm_init() function, when psb_gem_mm_init() fails, the interrupt line haven't been allocated. Yet the gma_irq_uninstall() is called in the psb_driver_unload() functi

[PATCH AUTOSEL 6.6 02/40] drm/amdkfd: ratelimited SQ interrupt messages

2023-11-07 Thread Sasha Levin
From: Harish Kasiviswanathan [ Upstream commit 37fb87910724f21a1f27a75743d4f9accdee77fb ] No functional change. Use ratelimited version of pr_ to avoid overflowing of dmesg buffer Signed-off-by: Harish Kasiviswanathan Reviewed-by: Philip Yang Signed-off-by: Alex Deucher Signed-off-by: Sasha

[PATCH AUTOSEL 6.6 03/40] drm/komeda: drop all currently held locks if deadlock happens

2023-11-07 Thread Sasha Levin
From: "baozhu.liu" [ Upstream commit 19ecbe8325a2a7ffda5ff4790955b84eaccba49f ] If komeda_pipeline_unbound_components() returns -EDEADLK, it means that a deadlock happened in the locking context. Currently, komeda is not dealing with the deadlock properly,producing the following output when CONF

[PATCH AUTOSEL 6.6 04/40] drm/amd/display: Blank phantom OTG before enabling

2023-11-07 Thread Sasha Levin
From: Alvin Lee [ Upstream commit e87a6c5b7780b5f423797351eb586ed96cc6d151 ] [Description] Before enabling the phantom OTG for an update we must enable DPG to avoid underflow. Reviewed-by: Samson Tam Acked-by: Stylon Wang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Ale

[PATCH AUTOSEL 6.6 05/40] drm/amd/display: Don't lock phantom pipe on disabling

2023-11-07 Thread Sasha Levin
From: Alvin Lee [ Upstream commit cbb4c9bc55427774ca4d819933e1b5fa38a6fb44 ] [Description] - When disabling a phantom pipe, we first enable the phantom OTG so the double buffer update can successfully take place - However, want to avoid locking the phantom otherwise setting DPG_EN=1 for the

[PATCH AUTOSEL 6.6 06/40] drm/amd/display: add seamless pipe topology transition check

2023-11-07 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit 15c6798ae26d5c7a7776f4f7d0c1fa8c462688a2 ] [why] We have a few cases where we need to perform update topology update in dc update interface. However some of the updates are not seamless This could cause user noticible glitches. To enforce seamless transition w

[PATCH AUTOSEL 6.6 07/40] drm/edid: Fixup h/vsync_end instead of h/vtotal

2023-11-07 Thread Sasha Levin
From: Ville Syrjälä [ Upstream commit 2682768bde745b10ae126a322cdcaf532cf88851 ] There are some weird EDIDs floating around that have the sync pulse extending beyond the end of the blanking period. On the currently problemtic machine (HP Omni 120) EDID reports the following mode: "1600x900": 60

[PATCH AUTOSEL 6.6 09/40] drm/amdgpu: not to save bo in the case of RAS err_event_athub

2023-11-07 Thread Sasha Levin
From: "David (Ming Qiang) Wu" [ Upstream commit fa1f1cc09d588a90c8ce3f507c47df257461d148 ] err_event_athub will corrupt VCPU buffer and not good to be restored in amdgpu_vcn_resume() and in this case the VCPU buffer needs to be cleared for VCN firmware to work properly. Acked-by: Leo Liu Signe

[PATCH AUTOSEL 6.6 11/40] drm/amdgpu: update retry times for psp vmbx wait

2023-11-07 Thread Sasha Levin
From: Tao Zhou [ Upstream commit fc598890715669ff794b253fdf387cd02b9396f8 ] Increase the retry loops and replace the constant number with macro. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/psp_v13_

[PATCH AUTOSEL 6.6 10/40] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-11-07 Thread Sasha Levin
From: Xiaogang Chen [ Upstream commit 709c348261618da7ed89d6c303e2ceb9e453ba74 ] prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random "use-after-free". Signed-off-by:

[PATCH AUTOSEL 6.6 12/40] drm/amd: Update `update_pcie_parameters` functions to use uint8_t arguments

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 7752ccf85b929a22e658ec145283e8f31232f4bb ] The matching values for `pcie_gen_cap` and `pcie_width_cap` when fetched from powerplay tables are 1 byte, so narrow the arguments to match to ensure min() and max() comparisons without casts. Signed-off-by: Ma

[PATCH AUTOSEL 6.6 13/40] drm/amd/display: use full update for clip size increase of large plane source

2023-11-07 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit 05b78277ef0efc1deebc8a22384fffec29a3676e ] [why] Clip size increase will increase viewport, which could cause us to switch to MPC combine. If we skip full update, we are not able to change to MPC combine in fast update. This will cause corruption showing on t

[PATCH AUTOSEL 6.6 17/40] drm_lease.c: copy user-array safely

2023-11-07 Thread Sasha Levin
From: Philipp Stanner [ Upstream commit f37d63e219c39199a59b8b8a211412ff27192830 ] Currently, there is no overflow-check with memdup_user(). Use the new function memdup_array_user() instead of memdup_user() for duplicating the user-space array safely. Suggested-by: David Airlie Signed-off-by:

[PATCH AUTOSEL 6.6 18/40] drm: vmwgfx_surface.c: copy user-array safely

2023-11-07 Thread Sasha Levin
From: Philipp Stanner [ Upstream commit 06ab64a0d836ac430c5f94669710a78aa43942cb ] Currently, there is no overflow-check with memdup_user(). Use the new function memdup_array_user() instead of memdup_user() for duplicating the user-space array safely. Suggested-by: David Airlie Signed-off-by:

[PATCH AUTOSEL 6.6 19/40] drm/msm/dp: skip validity check for DP CTS EDID checksum

2023-11-07 Thread Sasha Levin
From: Jani Nikula [ Upstream commit a251c9d8e30833b260101edb9383b176ee2b7cb1 ] The DP CTS test for EDID last block checksum expects the checksum for the last block, invalid or not. Skip the validity check. For the most part (*), the EDIDs returned by drm_get_edid() will be valid anyway, and the

[PATCH AUTOSEL 6.6 20/40] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 6.6 21/40] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 6.6 22/40] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 6.6 23/40] drm/amdgpu: Fix potential null pointer derefernce

2023-11-07 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 80285ae1ec8717b597b20de38866c29d84d321a1 ] The amdgpu_ras_get_context may return NULL if device not support ras feature, so add check before using. Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH AUTOSEL 6.6 24/40] drm/panel: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit 924e5814d1f84e6fa5cb19c6eceb69f066225229 ] In versatile_panel_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Ma Ke

[PATCH AUTOSEL 6.6 25/40] drm/panel/panel-tpo-tpg110: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit f22def5970c423ea7f87d5247bd0ef91416b0658 ] In tpg110_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Ma Ke Reviewe

[PATCH AUTOSEL 6.6 26/40] drm/radeon: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit 2c1fe3c480f9e1deefd50d4b18be4a046011ee1f ] In radeon_tv_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null point dereference. Signed-off-by: Ma K

[PATCH AUTOSEL 6.6 27/40] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit cd90511557fdfb394bb4ac4c3b539b007383914c ] In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off

[PATCH AUTOSEL 6.6 28/40] drm/panel: st7703: Pick different reset sequence

2023-11-07 Thread Sasha Levin
From: Ondrej Jirman [ Upstream commit d12d635bb03c7cb4830acb641eb176ee9ff2aa89 ] Switching to a different reset sequence, enabling IOVCC before enabling VCC. There also needs to be a delay after enabling the supplies and before deasserting the reset. The datasheet specifies 1ms after the suppli

[PATCH AUTOSEL 6.6 29/40] drm/amdkfd: Fix shift out-of-bounds issue

2023-11-07 Thread Sasha Levin
From: Jesse Zhang [ Upstream commit 282c1d793076c2edac6c3db51b7e8ed2b41d60a5 ] [ 567.613292] shift exponent 255 is too large for 64-bit type 'long unsigned int' [ 567.614498] CPU: 5 PID: 238 Comm: kworker/5:1 Tainted: G OE 6.2.0-34-generic #34~22.04.1-Ubuntu [ 567.614502] Har

[PATCH AUTOSEL 6.6 30/40] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 6.6 31/40] drm/amd: Disable PP_PCIE_DPM_MASK when dynamic speed switching not supported

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit fbf1035b033a51eee48d5f42e781b02fff272ca0 ] Rather than individual ASICs checking for the quirk, set the quirk at the driver level. Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 6.6 32/40] drm/amd/display: fix num_ways overflow error

2023-11-07 Thread Sasha Levin
From: Samson Tam [ Upstream commit 79f3f1b66753b3a3a269d73676bf50987921f267 ] [Why] Helper function calculates num_ways using 32-bit. But is returned as 8-bit. If num_ways exceeds 8-bit, then it reports back the incorrect num_ways and erroneously uses MALL when it should not [How] Make ret

[PATCH AUTOSEL 6.6 33/40] drm/amd: check num of link levels when update pcie param

2023-11-07 Thread Sasha Levin
From: "Lin.Cao" [ Upstream commit 406e8845356d18bdf3d3a23b347faf67706472ec ] In SR-IOV environment, the value of pcie_table->num_of_link_levels will be 0, and num_of_levels - 1 will cause array index out of bounds Signed-off-by: Lin.Cao Acked-by: Jingwen Chen Signed-off-by: Alex Deucher Sign

[PATCH AUTOSEL 6.5 01/37] drm/gma500: Fix call trace when psb_gem_mm_init() fails

2023-11-07 Thread Sasha Levin
From: Sui Jingfeng [ Upstream commit da596080b2b400c50fe9f8f237bcaf09fed06af8 ] Because the gma_irq_install() is call after psb_gem_mm_init() function, when psb_gem_mm_init() fails, the interrupt line haven't been allocated. Yet the gma_irq_uninstall() is called in the psb_driver_unload() functi

[PATCH AUTOSEL 6.5 02/37] drm/amdkfd: ratelimited SQ interrupt messages

2023-11-07 Thread Sasha Levin
From: Harish Kasiviswanathan [ Upstream commit 37fb87910724f21a1f27a75743d4f9accdee77fb ] No functional change. Use ratelimited version of pr_ to avoid overflowing of dmesg buffer Signed-off-by: Harish Kasiviswanathan Reviewed-by: Philip Yang Signed-off-by: Alex Deucher Signed-off-by: Sasha

[PATCH AUTOSEL 6.5 03/37] drm/komeda: drop all currently held locks if deadlock happens

2023-11-07 Thread Sasha Levin
From: "baozhu.liu" [ Upstream commit 19ecbe8325a2a7ffda5ff4790955b84eaccba49f ] If komeda_pipeline_unbound_components() returns -EDEADLK, it means that a deadlock happened in the locking context. Currently, komeda is not dealing with the deadlock properly,producing the following output when CONF

[PATCH AUTOSEL 6.5 04/37] drm/amd/display: Blank phantom OTG before enabling

2023-11-07 Thread Sasha Levin
From: Alvin Lee [ Upstream commit e87a6c5b7780b5f423797351eb586ed96cc6d151 ] [Description] Before enabling the phantom OTG for an update we must enable DPG to avoid underflow. Reviewed-by: Samson Tam Acked-by: Stylon Wang Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Ale

[PATCH AUTOSEL 6.5 05/37] drm/amd/display: Don't lock phantom pipe on disabling

2023-11-07 Thread Sasha Levin
From: Alvin Lee [ Upstream commit cbb4c9bc55427774ca4d819933e1b5fa38a6fb44 ] [Description] - When disabling a phantom pipe, we first enable the phantom OTG so the double buffer update can successfully take place - However, want to avoid locking the phantom otherwise setting DPG_EN=1 for the

[PATCH AUTOSEL 6.5 06/37] drm/amd/display: add seamless pipe topology transition check

2023-11-07 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit 15c6798ae26d5c7a7776f4f7d0c1fa8c462688a2 ] [why] We have a few cases where we need to perform update topology update in dc update interface. However some of the updates are not seamless This could cause user noticible glitches. To enforce seamless transition w

[PATCH AUTOSEL 6.5 07/37] drm/edid: Fixup h/vsync_end instead of h/vtotal

2023-11-07 Thread Sasha Levin
From: Ville Syrjälä [ Upstream commit 2682768bde745b10ae126a322cdcaf532cf88851 ] There are some weird EDIDs floating around that have the sync pulse extending beyond the end of the blanking period. On the currently problemtic machine (HP Omni 120) EDID reports the following mode: "1600x900": 60

[PATCH AUTOSEL 6.5 09/37] drm/amdgpu: not to save bo in the case of RAS err_event_athub

2023-11-07 Thread Sasha Levin
From: "David (Ming Qiang) Wu" [ Upstream commit fa1f1cc09d588a90c8ce3f507c47df257461d148 ] err_event_athub will corrupt VCPU buffer and not good to be restored in amdgpu_vcn_resume() and in this case the VCPU buffer needs to be cleared for VCN firmware to work properly. Acked-by: Leo Liu Signe

[PATCH AUTOSEL 6.5 10/37] drm/amdkfd: Fix a race condition of vram buffer unref in svm code

2023-11-07 Thread Sasha Levin
From: Xiaogang Chen [ Upstream commit 709c348261618da7ed89d6c303e2ceb9e453ba74 ] prange->svm_bo unref can happen in both mmu callback and a callback after migrate to system ram. Both are async call in different tasks. Sync svm_bo unref operation to avoid random "use-after-free". Signed-off-by:

[PATCH AUTOSEL 6.5 11/37] drm/amd: Update `update_pcie_parameters` functions to use uint8_t arguments

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 7752ccf85b929a22e658ec145283e8f31232f4bb ] The matching values for `pcie_gen_cap` and `pcie_width_cap` when fetched from powerplay tables are 1 byte, so narrow the arguments to match to ensure min() and max() comparisons without casts. Signed-off-by: Ma

[PATCH AUTOSEL 6.5 12/37] drm/amd/display: use full update for clip size increase of large plane source

2023-11-07 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit 05b78277ef0efc1deebc8a22384fffec29a3676e ] [why] Clip size increase will increase viewport, which could cause us to switch to MPC combine. If we skip full update, we are not able to change to MPC combine in fast update. This will cause corruption showing on t

[PATCH AUTOSEL 6.5 16/37] drm_lease.c: copy user-array safely

2023-11-07 Thread Sasha Levin
From: Philipp Stanner [ Upstream commit f37d63e219c39199a59b8b8a211412ff27192830 ] Currently, there is no overflow-check with memdup_user(). Use the new function memdup_array_user() instead of memdup_user() for duplicating the user-space array safely. Suggested-by: David Airlie Signed-off-by:

[PATCH AUTOSEL 6.5 17/37] drm: vmwgfx_surface.c: copy user-array safely

2023-11-07 Thread Sasha Levin
From: Philipp Stanner [ Upstream commit 06ab64a0d836ac430c5f94669710a78aa43942cb ] Currently, there is no overflow-check with memdup_user(). Use the new function memdup_array_user() instead of memdup_user() for duplicating the user-space array safely. Suggested-by: David Airlie Signed-off-by:

[PATCH AUTOSEL 6.5 18/37] drm/msm/dp: skip validity check for DP CTS EDID checksum

2023-11-07 Thread Sasha Levin
From: Jani Nikula [ Upstream commit a251c9d8e30833b260101edb9383b176ee2b7cb1 ] The DP CTS test for EDID last block checksum expects the checksum for the last block, invalid or not. Skip the validity check. For the most part (*), the EDIDs returned by drm_get_edid() will be valid anyway, and the

[PATCH AUTOSEL 6.5 19/37] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 6.5 20/37] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c63079c61177ba1b17fa05c6875699a36924fe39 ] For pptable structs that use flexible array sizes, use flexible arrays. Suggested-by: Felix Held Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2894 Signed-off-by: Mario Limonciello Acked-by: Alex Deuc

[PATCH AUTOSEL 6.5 21/37] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit 0f0e59075b5c22f1e871fbd508d6e4f495048356 ] For pptable structs that use flexible array sizes, use flexible arrays. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by

[PATCH AUTOSEL 6.5 23/37] drm/panel: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit 924e5814d1f84e6fa5cb19c6eceb69f066225229 ] In versatile_panel_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Ma Ke

[PATCH AUTOSEL 6.5 22/37] drm/amdgpu: Fix potential null pointer derefernce

2023-11-07 Thread Sasha Levin
From: "Stanley.Yang" [ Upstream commit 80285ae1ec8717b597b20de38866c29d84d321a1 ] The amdgpu_ras_get_context may return NULL if device not support ras feature, so add check before using. Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH AUTOSEL 6.5 24/37] drm/panel/panel-tpo-tpg110: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit f22def5970c423ea7f87d5247bd0ef91416b0658 ] In tpg110_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Signed-off-by: Ma Ke Reviewe

[PATCH AUTOSEL 6.5 25/37] drm/radeon: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit 2c1fe3c480f9e1deefd50d4b18be4a046011ee1f ] In radeon_tv_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null point dereference. Signed-off-by: Ma K

[PATCH AUTOSEL 6.5 27/37] drm/panel: st7703: Pick different reset sequence

2023-11-07 Thread Sasha Levin
From: Ondrej Jirman [ Upstream commit d12d635bb03c7cb4830acb641eb176ee9ff2aa89 ] Switching to a different reset sequence, enabling IOVCC before enabling VCC. There also needs to be a delay after enabling the supplies and before deasserting the reset. The datasheet specifies 1ms after the suppli

[PATCH AUTOSEL 6.5 26/37] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-11-07 Thread Sasha Levin
From: Ma Ke [ Upstream commit cd90511557fdfb394bb4ac4c3b539b007383914c ] In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_cvt_mode(). Add a check to avoid null pointer dereference. Signed-off

[PATCH AUTOSEL 6.5 28/37] drm/amdkfd: Fix shift out-of-bounds issue

2023-11-07 Thread Sasha Levin
From: Jesse Zhang [ Upstream commit 282c1d793076c2edac6c3db51b7e8ed2b41d60a5 ] [ 567.613292] shift exponent 255 is too large for 64-bit type 'long unsigned int' [ 567.614498] CPU: 5 PID: 238 Comm: kworker/5:1 Tainted: G OE 6.2.0-34-generic #34~22.04.1-Ubuntu [ 567.614502] Har

[PATCH AUTOSEL 6.5 29/37] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL

2023-11-07 Thread Sasha Levin
From: Qu Huang [ Upstream commit 5104fdf50d326db2c1a994f8b35dcd46e63ae4ad ] In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresp

[PATCH AUTOSEL 6.5 30/37] drm/amd: Disable PP_PCIE_DPM_MASK when dynamic speed switching not supported

2023-11-07 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit fbf1035b033a51eee48d5f42e781b02fff272ca0 ] Rather than individual ASICs checking for the quirk, set the quirk at the driver level. Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

  1   2   3   >