Re: [PATCH 06/10] vfio-iommufd: Allow iommufd to be used in place of a container fd

2022-11-02 Thread Yi Liu
On 2022/10/26 02:50, Jason Gunthorpe wrote: This makes VFIO_GROUP_SET_CONTAINER accept both a vfio container FD and an iommufd. In iommufd mode an IOAS will exist after the SET_CONTAINER, but it will not be attached to any groups. is there any special reason that we cannot attach the IOAS in t

Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Don't deadlock busyness stats vs reset

2022-11-02 Thread Tvrtko Ursulin
On 01/11/2022 16:56, John Harrison wrote: On 11/1/2022 02:58, Tvrtko Ursulin wrote: On 31/10/2022 18:30, John Harrison wrote: On 10/31/2022 05:51, Tvrtko Ursulin wrote: On 31/10/2022 10:09, Tvrtko Ursulin wrote: On 28/10/2022 20:46, john.c.harri...@intel.com wrote: From: John Harrison Th

Re: [PATCH] drm/vc4: hdmi: Fix pointer dereference before check

2022-11-02 Thread Maxime Ripard
Hi, On Sat, Oct 29, 2022 at 11:34:13AM +0200, José Expósito wrote: > Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced > the vc4_hdmi_reset_link() function. This function dereferences the > "connector" pointer before checking whether it is NULL or not. > > Rework variable as

Re: [PATCH v2 15/21] drm/fb-helper: Disconnect damage worker from update logic

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > The fbdev helpers implement a damage worker that forwards fbdev > updates to the DRM driver. The worker's update logic depends on > the generic fbdev emulation. Separate the two via function pointer. > > The generic fbdev emulation sets struct drm_fb_h

Re: [PATCH v2 16/21] drm/fb-helper: Call fb_sync in I/O functions

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Call struct fb_ops.fb_sync in drm_fbdev_{read,write}() to mimic the > behavior of fbdev. Fbdev implementations of fb_read and fb_write in > struct fb_ops invoke fb_sync to synchronize with outstanding operations > before I/O. Doing the same in DRM imple

Re: [PATCH v2 2/2] drm/client: Prevent NULL dereference in drm_client_buffer_delete()

2022-11-02 Thread Christian König
Am 30.10.22 um 16:44 schrieb Dmitry Osipenko: The drm_gem_vunmap() will crash with a NULL dereference if the passed object pointer is NULL. It wasn't a problem before we added the locking support to drm_gem_vunmap function because the mapping argument was always NULL together with the object. Mak

Re: [PATCH] drm/ttm: fix undefined behavior in bit shift for TTM_TT_FLAG_PRIV_POPULATED

2022-11-02 Thread Christian König
Am 31.10.22 um 12:33 schrieb Gaosheng Cui: Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below: UBSAN: shift-out-of-bounds in ./include/drm/ttm/ttm_tt.h:122:26 left shift of 1 by 31 places cannot be represented in

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Implement the fbdev's read/write helpers with the same functions. Use > the generic fbdev's code as template. Convert all drivers. > > DRM's fb helpers must implement regular I/O functionality in struct > fb_ops and possibly perform a damage update. Ha

Re: [PATCH v2 18/21] drm/fb_helper: Minimize damage-helper overhead

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Pull the test for fb_dirty into the caller to avoid extra work > if no callback has been set. In this case no damage handling is > required and no damage area needs to be computed. Print a warning > if the damage worker runs without getting an fb_dirty

Re: [PATCH v2 19/21] drm/fb-helper: Always initialize generic fbdev emulation

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Initialize the generic fbdev emulation even if it has been disabled > on the kernel command line. The hotplug and mode initialization will > fail accordingly. > > The kernel parameter can still be changed at runtime and the emulation > will initialize

Re: [PATCH v2 10/12] phy: mediatek: add support for phy-mtk-hdmi-mt8195

2022-11-02 Thread Guillaume Ranquet
On Fri, 21 Oct 2022 09:44, Chunfeng Yun wrote: >On Fri, 2022-10-14 at 17:16 +0200, Guillaume Ranquet wrote: >> Add basic support for the mediatek hdmi phy on MT8195 SoC >> >> Signed-off-by: Guillaume Ranquet >> --- >> drivers/phy/mediatek/Makefile | 1 + >> drivers/phy/mediatek/ph

Re: [PATCH v2 20/21] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Move the generic fbdev implementation into its own source and header > file. Adapt drivers. No functonal changes, but some of the internal > helpers have been renamed to fit into the drm_fbdev_ naming scheme. > > Signed-off-by: Thomas Zimmermann > ---

Re: [PATCH v2 21/21] drm/fb-helper: Remove unnecessary include statements

2022-11-02 Thread Javier Martinez Canillas
On 10/24/22 13:19, Thomas Zimmermann wrote: > Remove include statements for where it is not > required (i.e., most of them). In a few places include other header > files that are required by the source code. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas --

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Thomas Zimmermann
Hi Am 02.11.22 um 10:32 schrieb Javier Martinez Canillas: On 10/24/22 13:19, Thomas Zimmermann wrote: Implement the fbdev's read/write helpers with the same functions. Use the generic fbdev's code as template. Convert all drivers. DRM's fb helpers must implement regular I/O functionality in st

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Javier Martinez Canillas
On 11/2/22 11:33, Thomas Zimmermann wrote: [...] >> >>> +static ssize_t __drm_fb_helper_write(struct fb_info *info, const char >>> __user *buf, size_t count, >>> +loff_t *ppos, drm_fb_helper_write_screen >>> write_screen) >>> +{ >> >> [...] >> >>> + /* >>> +

Re: [PATCH] drm/msm: Remove exclusive-fence hack

2022-11-02 Thread Christian König
Am 01.11.22 um 22:40 schrieb Rob Clark: From: Rob Clark The workaround was initially necessary due to dma_resv having only a single exclusive fence slot, yet whe don't necessarily know what order the gpu scheduler will schedule jobs. Unfortunately this workaround also has the result of forcing

Re: [PATCH v2 2/2] drm/client: Prevent NULL dereference in drm_client_buffer_delete()

2022-11-02 Thread Dmitry Osipenko
On 11/2/22 12:15, Christian König wrote: > Am 30.10.22 um 16:44 schrieb Dmitry Osipenko: >> The drm_gem_vunmap() will crash with a NULL dereference if the passed >> object pointer is NULL. It wasn't a problem before we added the locking >> support to drm_gem_vunmap function because the mapping argu

Re: [PATCH] drm/vc4: hdmi: Fix pointer dereference before check

2022-11-02 Thread José Expósito
Hi Maxime, Thanks a lot for looking into the patch. On Wed, Nov 02, 2022 at 10:01:53AM +0100, Maxime Ripard wrote: > Hi, > > On Sat, Oct 29, 2022 at 11:34:13AM +0200, José Expósito wrote: > > Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced > > the vc4_hdmi_reset_link() fu

[PATCH v3 1/2] drm_bridge: register content protect property

2022-11-02 Thread Hsin-Yi Wang
Some bridges are able to update HDCP status from userspace request if they support HDCP. HDCP property is the same as other connector properties that needs to be created after the connecter is initialized and before the connector is registered. If there exists a bridge that supports HDCP, add the

[PATCH v3 2/2] drm/bridge: anx7625: register content protect property

2022-11-02 Thread Hsin-Yi Wang
Set support_hdcp so the connector can register content protect proterty when it's initializing. Signed-off-by: Hsin-Yi Wang --- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analog

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Christian König
Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: [SNIP] But the client is just a video player. It doesn't understand how to allocate BOs for Panfrost or AMD or etnaviv. So without a universal allocator (again ...), 'just allocate on the GPU' isn't a useful response to the client. Well exactly tha

Re: [PATCH v2] drm_bridge: register content protect property

2022-11-02 Thread Hsin-Yi Wang
On Wed, Oct 19, 2022 at 2:26 AM Sean Paul wrote: > > On Mon, Oct 17, 2022 at 9:49 AM Hsin-Yi Wang wrote: > > > > On Wed, Oct 12, 2022 at 12:20 PM Hsin-Yi Wang wrote: > > > > > > Some bridges are able to update HDCP status from userspace request if > > > they support HDCP. > > > > > > HDCP proper

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-02 Thread Gwan-gyeong Mun
On 11/2/22 1:06 AM, Kees Cook wrote: On Sat, Oct 29, 2022 at 11:01:38AM +0300, Gwan-gyeong Mun wrote: On 10/29/22 10:32 AM, Kees Cook wrote: On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: Hi Kees, Hi! :) I've updated to v5 with the last comment of Nathan. Could you p

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Lucas Stach
Hi Christian, going to reply in more detail when I have some more time, so just some quick thoughts for now. Am Mittwoch, dem 02.11.2022 um 12:18 +0100 schrieb Christian König: > Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: > > [SNIP] > > > > But the client is just a video player. It doesn't un

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-02 Thread Rasmus Villemoes
On 24/10/2022 22.11, Gwan-gyeong Mun wrote: > From: Kees Cook > > Implement a robust overflows_type() macro to test if a variable or > constant value would overflow another variable or type. This can be > used as a constant expression for static_assert() (which requires a > constant expression[1]

Re: [PATCH] drm/i915: Don't wait forever in drop_caches

2022-11-02 Thread Jani Nikula
On Tue, 01 Nov 2022, john.c.harri...@intel.com wrote: > From: John Harrison > > At the end of each test, IGT does a drop caches call via sysfs with sysfs? > special flags set. One of the possible paths waits for idle with an > infinite timeout. That causes problems for debugging issues when CI >

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Pekka Paalanen
On Wed, 2 Nov 2022 12:18:01 +0100 Christian König wrote: > Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: > > [SNIP] > >>> But the client is just a video player. It doesn't understand how to > >>> allocate BOs for Panfrost or AMD or etnaviv. So without a universal > >>> allocator (again ...), '

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Christian König
Hi Lucas, Am 02.11.22 um 12:39 schrieb Lucas Stach: Hi Christian, going to reply in more detail when I have some more time, so just some quick thoughts for now. Am Mittwoch, dem 02.11.2022 um 12:18 +0100 schrieb Christian König: Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: [SNIP] As far a

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Christian König
Am 02.11.22 um 13:19 schrieb Pekka Paalanen: On Wed, 2 Nov 2022 12:18:01 +0100 Christian König wrote: Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: [SNIP] But the client is just a video player. It doesn't understand how to allocate BOs for Panfrost or AMD or etnaviv. So without a universal

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Pekka Paalanen
On Wed, 2 Nov 2022 13:27:18 +0100 Christian König wrote: > Am 02.11.22 um 13:19 schrieb Pekka Paalanen: > > On Wed, 2 Nov 2022 12:18:01 +0100 > > Christian König wrote: > > > >> Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: > >>> [SNIP] > > But the client is just a video player. It do

Re: [PATCH v5] drm/tests: Add back seed value information

2022-11-02 Thread Maíra Canal
Hi Arthur, Thanks for the patch! Pushed to drm-misc-next. Best Regards, - Maíra Canal On 10/28/22 19:17, Arthur Grillo wrote: > As reported by Michał the drm_mm and drm_buddy unit tests lost the > printk with seed value after they were refactored into KUnit. > > Add kunit_info with seed value i

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Christian König
Am 02.11.22 um 13:50 schrieb Pekka Paalanen: On Wed, 2 Nov 2022 13:27:18 +0100 Christian König wrote: Am 02.11.22 um 13:19 schrieb Pekka Paalanen: On Wed, 2 Nov 2022 12:18:01 +0100 Christian König wrote: Am 01.11.22 um 22:09 schrieb Nicolas Dufresne: [SNIP] But the client is just a vid

Re: [RESEND PATCH] drm/amd/amdgpu: Replace kmap() with kmap_local_page()

2022-11-02 Thread Alex Deucher
On Tue, Nov 1, 2022 at 7:21 PM Fabio M. De Francesco wrote: > > On lunedì 17 ottobre 2022 18:53:24 CET Alex Deucher wrote: > > Applied. Thanks! > > > > The same report about which I just wrote in my previous email to you is also > referring to this patch which later changed status to "Not Applica

Re: [PATCH] drm/ofdrm: Depend on CONFIG_MMU

2022-11-02 Thread Javier Martinez Canillas
On 11/1/22 11:40, Thomas Zimmermann wrote: > Add a dependency on CONFIG_MMU to ofdrm. The driver uses GEM SHMEM > helpers, which require MMU support. A reported error message [1] is > shown below. > >arm-linux-gnueabi-ld: drivers/gpu/drm/drm_gem_shmem_helper.o: in function > `drm_gem_shmem_fa

Re: [PATCH v2 1/2] drm/ofdrm: Convert PCI IDs to CPU endianness for comparing

2022-11-02 Thread Javier Martinez Canillas
On 10/28/22 14:22, Thomas Zimmermann wrote: > Properties of 32-bit integers are returned from the OF device tree > as type __be32. Convert PCI vendor and device IDs from __be32 to host > endianness before comparing them to constants. All relevant machines > are old, big-endian Macintosh systems; he

Re: [PATCH v2 02/12] dt-bindings: display: mediatek: add MT8195 hdmi bindings

2022-11-02 Thread Guillaume Ranquet
On Fri, 14 Oct 2022 18:08, Krzysztof Kozlowski wrote: >On 14/10/2022 11:15, Guillaume Ranquet wrote: >> Add mt8195 SoC bindings for hdmi and hdmi-ddc >> >> Signed-off-by: Guillaume Ranquet >> --- >> .../bindings/display/mediatek/mediatek,hdmi.yaml | 67 >> +- >> .../displa

Re: [6.1][regression] after commit dd80d9c8eecac8c516da5b240d01a35660ba6cb6 some games (Cyberpunk 2077, Forza Horizon 4/5) hang at start

2022-11-02 Thread Mikhail Gavrilov
On Tue, Nov 1, 2022 at 10:52 PM Christian König wrote: > > Let's focus on one problem at a time. > > The issue here is that somehow userptr handling became racy after we > removed the lock, but I don't see why. > > We need to fix this ASAP since it is probably a much wider problem and > the additi

Re: [PATCH v2 2/2] drm/ofdrm: Cast error pointers to void __iomem *

2022-11-02 Thread Javier Martinez Canillas
Hello Thomas, On 10/28/22 14:22, Thomas Zimmermann wrote: > Cast error pointers when returning them as void __iomem *. Fixes > a number of Sparse warnings, such as the ones shown below. > > ../drivers/gpu/drm/tiny/ofdrm.c:439:31: warning: incorrect type in return > expression (different address

Re: [6.1][regression] after commit dd80d9c8eecac8c516da5b240d01a35660ba6cb6 some games (Cyberpunk 2077, Forza Horizon 4/5) hang at start

2022-11-02 Thread Christian König
Am 02.11.22 um 14:36 schrieb Mikhail Gavrilov: On Tue, Nov 1, 2022 at 10:52 PM Christian König wrote: Let's focus on one problem at a time. The issue here is that somehow userptr handling became racy after we removed the lock, but I don't see why. We need to fix this ASAP since it is probably

Re: [PATCH v2 2/2] drm/ofdrm: Cast error pointers to void __iomem *

2022-11-02 Thread Thomas Zimmermann
Hi Am 02.11.22 um 14:36 schrieb Javier Martinez Canillas: Hello Thomas, On 10/28/22 14:22, Thomas Zimmermann wrote: Cast error pointers when returning them as void __iomem *. Fixes a number of Sparse warnings, such as the ones shown below. ../drivers/gpu/drm/tiny/ofdrm.c:439:31: warning: inco

Re: [PATCH v3 1/2] dt-bindings: backlight: qcom-wled: Add PMI8950 compatible

2022-11-02 Thread Daniel Thompson
On Tue, Nov 01, 2022 at 05:17:59PM +0100, Luca Weiss wrote: > Document the compatible for the wled block found in PMI8950. > > Signed-off-by: Luca Weiss FWIW: Reviewed-by: Daniel Thompson > --- > Changes since v2: > * New patch > > Documentation/devicetree/bindings/leds/backlight/qcom-wled.ya

Re: [PATCH v5 1/3] drm: Use XArray instead of IDR for minors

2022-11-02 Thread Oded Gabbay
On Mon, Sep 12, 2022 at 12:17 AM Michał Winiarski wrote: > > IDR is deprecated, and since XArray manages its own state with internal > locking, it simplifies the locking on DRM side. > Additionally, don't use the IRQ-safe variant, since operating on drm > minor is not done in IRQ context. > > Sign

Re: [Intel-gfx] [PATCH] drm/i915: Don't wait forever in drop_caches

2022-11-02 Thread Tvrtko Ursulin
On 02/11/2022 12:12, Jani Nikula wrote: On Tue, 01 Nov 2022, john.c.harri...@intel.com wrote: From: John Harrison At the end of each test, IGT does a drop caches call via sysfs with sysfs? special flags set. One of the possible paths waits for idle with an infinite timeout. That causes p

Re: [PATCH] drm/amd/display: add parameter backlight_min

2022-11-02 Thread Harry Wentland
On 2022-11-01 11:33, Filip Moc wrote: > Hello Harry, > > thank you for your response. > >> amdgpu.backlight_min=2:-1 > > almost :-) > > Array elements in module parameters are separated by commas not colons. > So for cmdline it should look like this: > amdgpu.backlight_min=2,-1 > > Though y

[PATCH v2 3/7] vfio/ccw: move private initialization to callback

2022-11-02 Thread Eric Farman
There's already a device initialization callback that is used to initialize the release completion workaround that was introduced by commit ebb72b765fb49 ("vfio/ccw: Use the new device life cycle helpers"). Move the other elements of the vfio_ccw_private struct that require distinct initialization

[PATCH v2 2/7] vfio/ccw: remove private->sch

2022-11-02 Thread Eric Farman
These places all rely on the ability to jump from a private struct back to the subchannel struct. Rather than keeping a copy in our back pocket, let's use the relationship provided by the vfio_device embedded within the private. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato --- drivers

[PATCH v2 1/7] vfio/ccw: create a parent struct

2022-11-02 Thread Eric Farman
Move the stuff associated with the mdev parent (and thus the subchannel struct) into its own struct, and leave the rest in the existing private structure. The subchannel will point to the parent, and the parent will point to the private, for the areas where one or both are needed. Further separati

[PATCH v2 7/7] vfio: Remove vfio_free_device

2022-11-02 Thread Eric Farman
With the "mess" sorted out, we should be able to inline the vfio_free_device call introduced by commit cb9ff3f3b84c ("vfio: Add helpers for unifying vfio_device life cycle") and remove them from driver release callbacks. Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin

[PATCH v2 0/7] vfio-ccw parent rework

2022-11-02 Thread Eric Farman
Hi all, Here is an update to the vfio-ccw lifecycle changes that have been discussed in various forms over the past year [1][2] or so, and which I dusted off recently. Patches 1-5 rework the behavior of the vfio-ccw driver's private struct. In summary, the mdev pieces are split out of vfio_ccw_pr

[PATCH v2 4/7] vfio/ccw: move private to mdev lifecycle

2022-11-02 Thread Eric Farman
Now that the mdev parent data is split out into its own struct, it is safe to move the remaining private data to follow the mdev probe/remove lifecycle. The mdev parent data will remain where it is, and follow the subchannel and the css driver interfaces. Signed-off-by: Eric Farman --- drivers/s

[PATCH v2 6/7] vfio/ccw: replace vfio_init_device with _alloc_

2022-11-02 Thread Eric Farman
Now that we have a reasonable separation of structs that follow the subchannel and mdev lifecycles, there's no reason we can't call the official vfio_alloc_device routine for our private data, and behave like everyone else. Signed-off-by: Eric Farman Reviewed-by: Kevin Tian --- drivers/s390/cio

[PATCH v2 5/7] vfio/ccw: remove release completion

2022-11-02 Thread Eric Farman
There's enough separation between the parent and private structs now, that it is fine to remove the release completion hack. Signed-off-by: Eric Farman Reviewed-by: Kevin Tian --- drivers/s390/cio/vfio_ccw_ops.c | 14 +- drivers/s390/cio/vfio_ccw_private.h | 3 --- 2 files chan

[PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

[PATCH 1/2] drm/amdgpu: Fix type of second parameter in trans_msg() callback

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

Re: [PATCH v2 7/7] vfio: Remove vfio_free_device

2022-11-02 Thread Cornelia Huck
On Wed, Nov 02 2022, Eric Farman wrote: > With the "mess" sorted out, we should be able to inline the > vfio_free_device call introduced by commit cb9ff3f3b84c > ("vfio: Add helpers for unifying vfio_device life cycle") > and remove them from driver release callbacks. > > Signed-off-by: Eric Farm

[PATCH] drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

Re: [PATCH 1/2] drm/amdgpu: Fix type of second parameter in trans_msg() callback

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 08:25:39AM -0700, Nathan Chancellor wrote: > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > indirect call targets are validated against the expected function > pointer prototype to make sure the call target is valid to help mitigate > ROP attacks. If

Re: [PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 08:25:40AM -0700, Nathan Chancellor wrote: > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > indirect call targets are validated against the expected function > pointer prototype to make sure the call target is valid to help mitigate > ROP attacks. If

Re: [PATCH] drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()

2022-11-02 Thread Kees Cook
On Wed, Nov 02, 2022 at 08:42:15AM -0700, Nathan Chancellor wrote: > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > indirect call targets are validated against the expected function > pointer prototype to make sure the call target is valid to help mitigate > ROP attacks. If

[PATCH] drm/mediatek: Fix return type of mtk_hdmi_bridge_mode_valid()

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Doug Anderson
Hi, On Tue, Nov 1, 2022 at 7:37 AM Doug Anderson wrote: > > Hi, > > On Mon, Oct 31, 2022 at 5:15 PM Dmitry Baryshkov > wrote: > > > > On 01/11/2022 03:08, Doug Anderson wrote: > > > Hi, > > > > > > On Mon, Oct 31, 2022 at 2:11 PM Kuogee Hsieh > > > wrote: > > >> > > >> Hi Dmitry, > > >> > > >>

Re: [PATCH v5 3/3] drm/msm/dp: retry 3 times if set sink to D0 poweer state failed

2022-11-02 Thread Dmitry Baryshkov
On 12/09/2022 22:26, Kuogee Hsieh wrote: On 9/12/2022 11:37 AM, Dmitry Baryshkov wrote: On 12/09/2022 19:23, Kuogee Hsieh wrote: Bring sink out of D3 (power down) mode into D0 (normal operation) mode by setting DP_SET_POWER_D0 bit to DP_SET_POWER dpcd register. This patch will retry 3 times if

[PATCH] drm/meson: Fix return type of meson_encoder_cvbs_mode_valid()

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

[PATCH] drm/sti: Fix return type of sti_{dvo, hda, hdmi}_connector_mode_valid()

2022-11-02 Thread Nathan Chancellor
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as

[PATCH v3] dma-buf: fix racing conflict of dma_heap_add()

2022-11-02 Thread Dawei Li
Racing conflict could be: task A task B list_for_each_entry strcmp(h->name)) list_for_each_entry strcmp(h->name) kzallockzalloc .. . device_create device_create list_add

Re: [PATCH] drm/msm: Remove exclusive-fence hack

2022-11-02 Thread Rob Clark
On Wed, Nov 2, 2022 at 3:46 AM Christian König wrote: > > Am 01.11.22 um 22:40 schrieb Rob Clark: > > From: Rob Clark > > > > The workaround was initially necessary due to dma_resv having only a > > single exclusive fence slot, yet whe don't necessarily know what order > > the gpu scheduler will

Re: [PATCH] drm/msm: Add MSM_INFO_GET_FLAGS

2022-11-02 Thread Dmitry Baryshkov
On 23/09/2022 20:33, Rob Clark wrote: From: Rob Clark In some cases crosvm needs a way to query the cache flags to communicate them to the guest kernel for guest userspace mapping. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 10 ++ include/uapi/drm/msm_drm.h|

Re: [PATCH v2] [next] drm/radeon: Replace one-element array with flexible-array member

2022-11-02 Thread Alex Deucher
On Tue, Nov 1, 2022 at 6:41 PM Kees Cook wrote: > > On Tue, Nov 01, 2022 at 06:09:16PM -0400, Alex Deucher wrote: > > On Tue, Nov 1, 2022 at 5:54 PM Kees Cook wrote: > > > Does the ROM always only have a single byte there? This seems unlikely > > > given the member "ucFakeEDIDLength" (and the cod

Re: [PATCH v2] [next] drm/amdgpu: Replace one-element array with flexible-array member

2022-11-02 Thread Alex Deucher
Applied. Thanks! Alex On Fri, Oct 28, 2022 at 9:31 PM Paulo Miguel Almeida wrote: > > One-element arrays are deprecated, and we are replacing them with > flexible array members instead. So, replace one-element array with > flexible-array member in struct _ATOM_FAKE_EDID_PATCH_RECORD and > refac

Re: [PATCH 2/2] drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback

2022-11-02 Thread Alex Deucher
Applied the series. Thanks! Alex On Wed, Nov 2, 2022 at 11:43 AM Kees Cook wrote: > > On Wed, Nov 02, 2022 at 08:25:40AM -0700, Nathan Chancellor wrote: > > With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), > > indirect call targets are validated against the expected function

Re: [PATCH v6 1/2] dt-bindings: it6505: add properties to restrict output bandwidth

2022-11-02 Thread Krzysztof Kozlowski
On 02/11/2022 02:54, allen.c...@ite.com.tw wrote: > On 26/10/2022 23:01, allen wrote: >> From: allen chen >> >> Add properties to restrict dp output data-lanes and clock. > > This is a friendly reminder during the review process. > > It seems my previous comments were not fully addressed. Maybe

Re: [PATCH v3] dma-buf: fix racing conflict of dma_heap_add()

2022-11-02 Thread T.J. Mercier
On Wed, Nov 2, 2022 at 8:59 AM Dawei Li wrote: > > Racing conflict could be: > task A task B > list_for_each_entry > strcmp(h->name)) >list_for_each_entry >strcmp(h->name) > kzallockzalloc > ..

Re: [PATCH] drm/msm/disp/dpu1: register crtc color management to first crtc in the list

2022-11-02 Thread Dmitry Baryshkov
On 01/11/2022 13:59, Kalyan Thota wrote: This patch does the following: 1) Registers crtc color management to the first crtc in the list and attach to an encoder which is neither pluggable nor virtual 2) Pin 1 crtc to 1 encoder 3) Assign dspp block if crtc supports color processing. A clear id

[PATCH v2 3/5] drm/i915/mtl: add GSC CS interrupt support

2022-11-02 Thread Daniele Ceraolo Spurio
The GSC CS re-uses the same interrupt bits that the GSC used in older platforms. This means that we can now have an engine interrupt coming out of OTHER_CLASS, so we need to handle that appropriately. v2: clean up the if statement for the engine irq (Tvrtko) Signed-off-by: Daniele Ceraolo Spurio

[PATCH v2 4/5] drm/i915/mtl: add GSC CS reset support

2022-11-02 Thread Daniele Ceraolo Spurio
The GSC CS has its own dedicated bit in the GDRST register. Bspec: 52549 Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 + drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + 2 files changed, 2 insertions(+) diff --g

[PATCH v2 5/5] drm/i915/mtl: don't expose GSC command streamer to the user

2022-11-02 Thread Daniele Ceraolo Spurio
There is no userspace user for this CS yet, we only need it for internal kernel ops (e.g. HuC, PXP), so don't expose it. v2: even if it's not exposed, rename the engine so it is easier to identify in the debug logs (Matt) Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper --- drivers/gpu/drm

[PATCH v2 2/5] drm/i915/mtl: pass the GSC CS info to the GuC

2022-11-02 Thread Daniele Ceraolo Spurio
We need to tell the GuC that the GSC CS is there. Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 11 +-- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 7 +-- 2 files changed, 10 insertions(+), 8 deleti

[PATCH v2 0/5] drm/i915: Introduce the GSC CS

2022-11-02 Thread Daniele Ceraolo Spurio
Starting on MTL, the GSC microcontroller resides inside the media GT and the driver can communicate with it via a new Command Streamer, the GSC CS. As a first step in supporting the GSC integration within the media GT, this series adds the required defines and basic support for this CS. Note that,

[PATCH v2 1/5] drm/i915/mtl: add initial definitions for GSC CS

2022-11-02 Thread Daniele Ceraolo Spurio
Starting on MTL, the GSC is no longer managed with direct MMIO access, but we instead have a dedicated command streamer for it. As a first step for adding support for this CS, add the required definitions. Note that, although it is now a CS, the GSC retains its old class:instance value (OTHER_CLASS

Re: Try to address the DMA-buf coherency problem

2022-11-02 Thread Lucas Stach
Am Mittwoch, dem 02.11.2022 um 13:21 +0100 schrieb Christian König: > Hi Lucas, > > Am 02.11.22 um 12:39 schrieb Lucas Stach: > > Hi Christian, > > > > going to reply in more detail when I have some more time, so just some > > quick thoughts for now. > > > > Am Mittwoch, dem 02.11.2022 um 12:18

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Dmitry Baryshkov
On 01/11/2022 17:37, Doug Anderson wrote: Hi, On Mon, Oct 31, 2022 at 5:15 PM Dmitry Baryshkov wrote: On 01/11/2022 03:08, Doug Anderson wrote: Hi, On Mon, Oct 31, 2022 at 2:11 PM Kuogee Hsieh wrote: Hi Dmitry, Link rate is advertised by sink, but adjusted (reduced the link rate) by ho

Re: [PATCH v3] dma-buf: fix racing conflict of dma_heap_add()

2022-11-02 Thread Andrew Davis
On 11/2/22 10:58 AM, Dawei Li wrote: Racing conflict could be: task A task B list_for_each_entry strcmp(h->name)) list_for_each_entry strcmp(h->name) kzallockzalloc .. . device_create

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Dmitry Baryshkov
On 02/11/2022 18:47, Doug Anderson wrote: Hi, On Tue, Nov 1, 2022 at 7:37 AM Doug Anderson wrote: Hi, On Mon, Oct 31, 2022 at 5:15 PM Dmitry Baryshkov wrote: On 01/11/2022 03:08, Doug Anderson wrote: Hi, On Mon, Oct 31, 2022 at 2:11 PM Kuogee Hsieh wrote: Hi Dmitry, Link rate is ad

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Doug Anderson
Hi, On Wed, Nov 2, 2022 at 10:15 AM Dmitry Baryshkov wrote: > > On 01/11/2022 17:37, Doug Anderson wrote: > > Hi, > > > > On Mon, Oct 31, 2022 at 5:15 PM Dmitry Baryshkov > > wrote: > >> > >> On 01/11/2022 03:08, Doug Anderson wrote: > >>> Hi, > >>> > >>> On Mon, Oct 31, 2022 at 2:11 PM Kuogee H

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Doug Anderson
Hi, On Wed, Nov 2, 2022 at 10:23 AM Dmitry Baryshkov wrote: > > > 1. Someone figures out how to model this with the bridge chain and > > then we only allow HBR3 if we detect we've got a TCPC that supports > > it. This seems like the cleanest / best but feels like a long pole. > > Not only have we

Re: [PATCH v3 1/2] dt-bindings: backlight: qcom-wled: Add PMI8950 compatible

2022-11-02 Thread Rob Herring
On Tue, 01 Nov 2022 17:17:59 +0100, Luca Weiss wrote: > Document the compatible for the wled block found in PMI8950. > > Signed-off-by: Luca Weiss > --- > Changes since v2: > * New patch > > Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 1 + > 1 file changed, 1 insertion(+

Re: [PATCH v2 7/7] vfio: Remove vfio_free_device

2022-11-02 Thread Anthony Krowiak
Reviewed-by: Tony Krowiak : vfio_ap part On 11/2/22 11:01 AM, Eric Farman wrote: With the "mess" sorted out, we should be able to inline the vfio_free_device call introduced by commit cb9ff3f3b84c ("vfio: Add helpers for unifying vfio_device life cycle") and remove them from driver release call

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Dmitry Baryshkov
On 02/11/2022 20:25, Doug Anderson wrote: Hi, On Wed, Nov 2, 2022 at 10:15 AM Dmitry Baryshkov wrote: On 01/11/2022 17:37, Doug Anderson wrote: Hi, On Mon, Oct 31, 2022 at 5:15 PM Dmitry Baryshkov wrote: On 01/11/2022 03:08, Doug Anderson wrote: Hi, On Mon, Oct 31, 2022 at 2:11 PM Kuog

[PATCH v4 0/2] drm/msm: rework msm_iommu_new() and .create_address_space cb

2022-11-02 Thread Dmitry Baryshkov
Simplify the MSM IOMMU code a bit. This moves iommu_domain_alloc() and iommu_set_pgtable_quirks() calls to msm_iommu_new() to get rid of the disbalance, when the iommu domain is allocated by the caller of msm_iommu_new() and then it is freed by the msm_iommu code itself. Changes since v3: - Restor

[PATCH v4 1/2] drm/msm: move domain allocation into msm_iommu_new()

2022-11-02 Thread Dmitry Baryshkov
After the msm_iommu instance is created, the IOMMU domain is completely handled inside the msm_iommu code. Move the iommu_domain_alloc() call into the msm_iommu_new() to simplify callers code. Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gmu

[PATCH v4 2/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-11-02 Thread Dmitry Baryshkov
The function a6xx_create_address_space() is mostly a copy of adreno_iommu_create_address_space() with added quirk setting. Rework these two functions to be a thin wrappers around a common helper. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 2 +- drivers/gpu/drm

Re: [PATCH] drm/msm/dp: remove limitation of link rate at 5.4G to support HBR3

2022-11-02 Thread Dmitry Baryshkov
On 02/11/2022 20:28, Doug Anderson wrote: Hi, On Wed, Nov 2, 2022 at 10:23 AM Dmitry Baryshkov wrote: 1. Someone figures out how to model this with the bridge chain and then we only allow HBR3 if we detect we've got a TCPC that supports it. This seems like the cleanest / best but feels like

[PATCH v3 0/7] drm/bridge_connector: perform HPD enablement automatically

2022-11-02 Thread Dmitry Baryshkov
>From all the drivers using drm_bridge_connector only iMX/dcss and OMAP DRM driver do a proper work of calling drm_bridge_connector_en/disable_hpd() in right places. Rather than teaching each and every driver how to properly handle drm_bridge_connector's HPD, make that automatic. Add two additiona

[PATCH v3 3/7] drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement

2022-11-02 Thread Dmitry Baryshkov
Use drm_connector's helpers enable_hpd and disable_hpd to enable and disable HPD automatically by the means of drm_kms_helper_poll_* functions. As the drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() functions are now unused, replace them with stubs to ease driver migration.

[PATCH v3 1/7] drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini()

2022-11-02 Thread Dmitry Baryshkov
Merge drm_kms_helper_poll_disable() and drm_kms_helper_poll_fini() code into a common helper function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_probe_helper.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helpe

[PATCH v3 2/7] drm/probe-helper: enable and disable HPD on connectors

2022-11-02 Thread Dmitry Baryshkov
Introduce two drm_connector_helper_funcs: enable_hpd() and disable_hpd(). They are called by drm_kms_helper_poll_enable() and drm_kms_helper_poll_disable() (and thus drm_kms_helper_poll_init() and drm_kms_helper_poll_fini()) respectively. This allows DRM drivers to rely on drm_kms_helper_poll for

[PATCH v3 4/7] drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd()

2022-11-02 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/dcss/dcss-dev.c | 4 drivers/gpu/drm/imx/dcss/d

[PATCH v3 5/7] drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd()

2022-11-02 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH v3 7/7] drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd()

2022-11-02 Thread Dmitry Baryshkov
Now as all drivers stopped calling drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() it is safe to remove them complelely. Rename our internal helpers to remove the underscore prefix. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 33 -

[PATCH v3 6/7] drm/omap: stop using drm_bridge_connector_en/disable_hpd()

2022-11-02 Thread Dmitry Baryshkov
The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/omapdrm/omap_drv.c | 41 --

  1   2   >