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

2022-09-26 Thread Arnd Bergmann
On Mon, Sep 26, 2022, at 11:07 PM, Kees Cook wrote: > On Mon, Sep 26, 2022 at 01:17:18PM -0700, Nick Desaulniers wrote: >> + Arnd >> >> On Mon, Sep 26, 2022 at 12:11 PM Kees Cook wrote: >> > --- >> > v2: >> > - fix comment typo >> > - wrap clang pragma to avoid GCC warnings >> > - style nit cl

[PATCH] drm/panel-edp: Add BOE NT116WHM-N4C (HW: V8.1)

2022-09-26 Thread Sean Hong
Add support for the BOE - NT116WHM-N4C (HW: V8.1) panel. Signed-off-by: Sean Hong --- drivers/gpu/drm/panel/panel-edp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index 102ab9f5d40a..03a4a49e4ecb 100644 --- a/drivers

Re: [PATCH] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8188

2022-09-26 Thread liangxu . xu
On Mon, 2022-09-26 at 14:53 +0200, Krzysztof Kozlowski wrote: > On 26/09/2022 14:12, liangxu.xu wrote: > > > > Can I modify it to the following form: > > properties: > > compatible: > > oneOf: > > - enum: > > - mediatek,mt2701-dpi > > - mediatek,mt7623-dpi > > -

[PATCH 5/7] drm/i915/hwmon: Expose card reactive critical power

2022-09-26 Thread Badal Nilawar
From: Ashutosh Dixit Expose the card reactive critical (I1) power. I1 is exposed as power1_crit in microwatts (typically for client products) or as curr1_crit in milliamperes (typically for server). v2: Add curr1_crit functionality (Ashutosh) v3: Use HWMON_CHANNEL_INFO to define power1_crit, cur

[PATCH 6/7] drm/i915/hwmon: Expose power1_max_interval

2022-09-26 Thread Badal Nilawar
From: Ashutosh Dixit Expose power1_max_interval, that is the tau corresponding to PL1, as a custom hwmon attribute. Some bit manipulation is needed because of the format of PKG_PWR_LIM_1_TIME in GT0_PACKAGE_RAPL_LIMIT register (1.x * power(2,y)). v2: Update date and kernel version in Documentati

[PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson Extend hwmon power/energy for XEHPSDV especially per gt level energy usage. v2: Update to latest HWMON spec (Ashutosh) v3: Fix review comments (Ashutosh) v4: Fix review comments (Anshuman) v5: s/hwmon_device_register_with_info/ devm_hwmon_device_register_with_info/ (Ashu

[PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson Use i915 HWMON to display/modify dGfx power PL1 limit and TDP setting. v2: - Fix review comments (Ashutosh) - Do not restore power1_max upon module unload/load sequence because on production systems modules are always loaded and not unloaded/reloaded (Ashutosh)

[PATCH 4/7] drm/i915/hwmon: Show device level energy usage

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson Use i915 HWMON to display device level energy input. v2: Updated the date and kernel version in feature description v3: - Cleaned up hwm_energy function and removed unused function i915_hwmon_energy_status_get (Ashutosh) v4: KernelVersion: 6.2, Date: February 2023 in d

[PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support

2022-09-26 Thread Badal Nilawar
From: Riana Tauro Use i915 HWMON subsystem to display current input voltage. v2: - Updated date and kernel version in feature description - Fixed review comments (Ashutosh) v3: Use macro HWMON_CHANNEL_INFO to define hwmon channel (Guenter) v4: - Fixed review comments (Ashutosh) - Use hwm

[PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson The i915 HWMON module will be used to expose voltage, power and energy values for dGfx. Here we set up i915 hwmon infrastructure including i915 hwmon registration, basic data structures and functions. v2: - Create HWMON infra patch (Ashutosh) - Fixed review comments (Jan

[PATCH 0/7] drm/i915: Add HWMON support

2022-09-26 Thread Badal Nilawar
This series adds the HWMON support for DGFX Test-with: 20220919144408.251981-1-riana.ta...@intel.com v2: - Reorganized series. Created first patch as infrastructure patch followed by feature patches. (Ashutosh) - Fixed review comments (Jani) - Fixed review comments (Ashutosh) v3: - F

Re: [Intel-gfx] [RFC v4 06/14] drm/i915/vm_bind: Handle persistent vmas

2022-09-26 Thread Niranjana Vishwanathapura
On Mon, Sep 26, 2022 at 07:36:24PM -0700, Zeng, Oak wrote: Regards, Oak -Original Message- From: Intel-gfx On Behalf Of Niranjana Vishwanathapura Sent: September 21, 2022 3:10 AM To: intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: Zanoni, Paulo R ; Hellstrom, Tho

Re: [PATCH 0/7] Add HWMON support

2022-09-26 Thread Nilawar, Badal
On 27-09-2022 02:39, Guenter Roeck wrote: On 9/26/22 10:52, Badal Nilawar wrote: This series adds the HWMON support for DGFX Test-with: 20220919144408.251981-1-riana.ta...@intel.com v2:    - Reorganized series. Created first patch as infrastructure patch followed by feature patches. (A

[PATCH -next v3] backlight: gpio_backlight: Switch to use dev_err_probe() helper

2022-09-26 Thread Yang Yingliang
In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. It's more simple in error path. Signed-off-by: Yang Yingliang --- v1 -> v3:

RE: [Intel-gfx] [RFC v4 06/14] drm/i915/vm_bind: Handle persistent vmas

2022-09-26 Thread Zeng, Oak
Regards, Oak > -Original Message- > From: Intel-gfx On Behalf Of > Niranjana > Vishwanathapura > Sent: September 21, 2022 3:10 AM > To: intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org > Cc: Zanoni, Paulo R ; Hellstrom, Thomas > ; Auld, Matthew ; Vetter, > Daniel ; chr

Re: [PATCH 2/7] mm: Free device private pages have zero refcount

2022-09-26 Thread Alistair Popple
Jason Gunthorpe writes: > On Mon, Sep 26, 2022 at 04:03:06PM +1000, Alistair Popple wrote: >> Since 27674ef6c73f ("mm: remove the extra ZONE_DEVICE struct page >> refcount") device private pages have no longer had an extra reference >> count when the page is in use. However before handing them

[PATCH] drm/panel-edp: Fix delays for INX N116BCA-EA2 (HW: C1)

2022-09-26 Thread Sean Hong
This panel has the same delay timing as N116BCA-EA1. So, fix the delay timing from delay_200_500_p2e80 to delay_200_500_e80_d50. Signed-off-by: Sean Hong --- drivers/gpu/drm/panel/panel-edp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b

Re: [PATCH -next v2] backlight: gpio_backlight: Switch to use dev_err_probe() helper

2022-09-26 Thread Yang Yingliang
Hi On 2022/9/26 23:32, Daniel Thompson wrote: On Mon, Sep 26, 2022 at 10:24:47PM +0800, Yang Yingliang wrote: In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which ca

[PATCH] drm/amd/display: Add check for memory allocation

2022-09-26 Thread Jiasheng Jiang
As kzalloc and dm_helpers_allocate_gpu_mem can return NULL pointer, it should be better to check the return value and return error. Moreover, the return value of dcn32_clk_mgr_construct should be checked by cascade. Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Signed-o

[PATCH] drm/panel-edp: Fix delays for INX N116BCN-EA1 (HW: C4)

2022-09-26 Thread Sean Hong
This panel has the same delay timing as N116BCA-EA1. So, fix the delay timing from delay_200_500_p2e80 to delay_200_500_e80_d50. Signed-off-by: Sean Hong --- drivers/gpu/drm/panel/panel-edp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Alistair Popple
Felix Kuehling writes: > On 2022-09-26 17:35, Lyude Paul wrote: >> On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: >>> When the module is unloaded or a GPU is unbound from the module it is >>> possible for device private pages to be left mapped in currently running >>> processes. This

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Alistair Popple
John Hubbard writes: > On 9/26/22 14:35, Lyude Paul wrote: >>> + for (i = 0; i < npages; i++) { >>> + if (src_pfns[i] & MIGRATE_PFN_MIGRATE) { >>> + struct page *dpage; >>> + >>> + /* >>> +* _GFP_NOFAIL because the GPU is going

[PATCH] dt-bindings: display: st, stm32-dsi: Handle data-lanes in DSI port node

2022-09-26 Thread Marek Vasut
Handle 'data-lanes' property of the DSI output endpoint, it is possible to describe DSI link with 1 or 2 data lanes this way. Signed-off-by: Marek Vasut --- Cc: Alexandre Torgue Cc: Krzysztof Kozlowski Cc: Maxime Coquelin Cc: Philippe Cornu Cc: Rob Herring Cc: Yannick Fertre Cc: devicet...@

Re: [PATCH v3 1/2] dt-bindings: display/msm: Add QCM2290 DSI phy

2022-09-26 Thread Rob Herring
On Sat, 24 Sep 2022 15:18:59 +0300, Dmitry Baryshkov wrote: > From: Loic Poulain > > QCM2290 platform uses the 14nm DSI PHY driver. > > Signed-off-by: Loic Poulain > Signed-off-by: Dmitry Baryshkov > --- > Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml | 1 + > 1 file changed

[RFC PATCH 3/3] drm/virtio: drm_gem_plane_helper_prepare_fb for obj synchronization

2022-09-26 Thread Dongwon Kim
This helper is needed for framebuffer synchronization. Old framebuffer data is often displayed on the guest display without this helper. Cc: Gurchetan Singh Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- drivers/gpu/drm/virtio/virtgpu_plane.c | 4 1 file changed, 4

[RFC PATCH 2/3] drm/virtio: new fence for every plane update

2022-09-26 Thread Dongwon Kim
Having a fence linked to a virtio_gpu_framebuffer in plane update sequence would cause conflict when several planes referencing the same framebuffer especially when those planes are updated concurrently (e.g. Xorg screen covering multi-displays configured for an extended mode). So it is better for

[RFC PATCH 1/3] drm/virtio: .release ops for virtgpu fence release

2022-09-26 Thread Dongwon Kim
virtio_gpu_fence_release is added to free virtio-gpu-fence upon release of dma_fence. Cc: Gurchetan Singh Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- drivers/gpu/drm/virtio/virtgpu_fence.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/vir

[PFC PATCH 0/3] drm/virtio: synchronous guest framebuffer update

2022-09-26 Thread Dongwon Kim
This series is for fixing some issues regarding scanout synchronization with host (e.g. QEMU/KVM) that uses virtio-gpu. This series replaces the previously submitted one, "[PATCH v2 0/2] drm/virtio: fence handling in case of multi scanouts". Dongwon Kim (3): drm/virtio: .release ops for virtgpu

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Felix Kuehling
On 2022-09-26 17:35, Lyude Paul wrote: On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: When the module is unloaded or a GPU is unbound from the module it is possible for device private pages to be left mapped in currently running processes. This leads to a kernel crash when the pages

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread John Hubbard
On 9/26/22 14:35, Lyude Paul wrote: >> +for (i = 0; i < npages; i++) { >> +if (src_pfns[i] & MIGRATE_PFN_MIGRATE) { >> +struct page *dpage; >> + >> +/* >> + * _GFP_NOFAIL because the GPU is going away and there >> +

Re: [PATCH] dt-bindings: display: mediatek: dp: Add compatible for MediaTek MT8188

2022-09-26 Thread Rob Herring
On Mon, Sep 26, 2022 at 10:52:04AM +0800, liangxu.xu wrote: > On Fri, 2022-09-23 at 13:16 +0200, Krzysztof Kozlowski wrote: > > On 23/09/2022 03:39, liangxu...@mediatek.com wrote: > > > From: liangxu xu > > > > > > Add dt-binding documentation of dp for MediaTek MT8188 SoC. > > > > > > Signed-of

[PATCH v4.1] drm/i915/mtl: Define engine context layouts

2022-09-26 Thread Radhakrishna Sripada
From: Matt Roper The part of the media and blitter engine contexts that we care about for setting up an initial state on MTL are nearly similar to DG2 (and PVC). The difference being PRT_BB_STATE being replaced with NOP. For render/compute engines, the part of the context images are nearly the s

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Lyude Paul
On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: > When the module is unloaded or a GPU is unbound from the module it is > possible for device private pages to be left mapped in currently running > processes. This leads to a kernel crash when the pages are either freed > or accessed from t

Re: [PATCH 5/7] nouveau/dmem: Refactor nouveau_dmem_fault_copy_one()

2022-09-26 Thread Lyude Paul
On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: > nouveau_dmem_fault_copy_one() is used during handling of CPU faults via > the migrate_to_ram() callback and is used to copy data from GPU to CPU > memory. It is currently specific to fault handling, however a future > patch implementing ev

Re: [PATCH 0/7] Add HWMON support

2022-09-26 Thread Guenter Roeck
On 9/26/22 10:52, Badal Nilawar wrote: This series adds the HWMON support for DGFX Test-with: 20220919144408.251981-1-riana.ta...@intel.com v2: - Reorganized series. Created first patch as infrastructure patch followed by feature patches. (Ashutosh) - Fixed review comments (Jani)

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

2022-09-26 Thread Kees Cook
On Mon, Sep 26, 2022 at 01:17:18PM -0700, Nick Desaulniers wrote: > + Arnd > > On Mon, Sep 26, 2022 at 12:11 PM Kees Cook wrote: > > --- > > v2: > > - fix comment typo > > - wrap clang pragma to avoid GCC warnings > > - style nit cleanups > > - rename __castable_to_type() to castable_to_type(

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

2022-09-26 Thread Nick Desaulniers
+ Arnd On Mon, Sep 26, 2022 at 12:11 PM Kees Cook wrote: > --- > v2: > - fix comment typo > - wrap clang pragma to avoid GCC warnings > - style nit cleanups > - rename __castable_to_type() to castable_to_type() > - remove prior overflows_type() definition > v1: https://lore.kernel.org/lkml/2

[PATCH V3 3/3] drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel

2022-09-26 Thread Chris Morgan
From: Chris Morgan Support NewVision NV3051D panels as found on the Anbernic RG353P and RG353V. The underlying LCD part number for the RG353x devices is unknown, so the device name and a fallback for the driver IC is used instead. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/Kconfig

[PATCH V3 1/3] dt-bindings: vendor-prefixes: add NewVision vendor prefix

2022-09-26 Thread Chris Morgan
From: Chris Morgan NewVision (also sometimes written as New Vision) is a company based in Shenzen that manufactures ICs for controlling LCD panels. https://www.newvisiondisplay.com/ Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/vendor-prefixe

[PATCH V3 2/3] dt-bindings: display: panel: Add NewVision NV3051D bindings

2022-09-26 Thread Chris Morgan
From: Chris Morgan Add documentation for the NewVision NV3051D panel bindings. Note that for the two expected consumers of this panel binding the underlying LCD model is unknown. Name "anbernic,rg353p-panel" is used because the hardware itself is known as "anbernic,rg353p". Signed-off-by: Chris

[PATCH V3 0/3] drm/panel: Add NewVision NV3051D Panels

2022-09-26 Thread Chris Morgan
From: Chris Morgan Add the NewVision NV3051D panel as found on the Anbernic RG353P and RG353V. The underlying LCD panel itself is unknown (the NV3051D is the controller), so the device name is used for the panel with a fallback to the driver IC. Changes from V2: - Ensured dt_binding_check and d

[PATCH v2] overflow: Introduce overflows_type() and castable_to_type()

2022-09-26 Thread 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][2]) when used on constant values. This must be constructed manually, sinc

Re: Raspberry Pi 3 Model B+ hangs in vc4_hdmi_runtime_resume()

2022-09-26 Thread Stefan Wahren
Hi Maxime, Am 26.09.22 um 14:47 schrieb Maxime Ripard: On Mon, Sep 26, 2022 at 02:40:48PM +0200, Marc Kleine-Budde wrote: On 26.09.2022 14:08:04, Stefan Wahren wrote: Hi Marc, Am 26.09.22 um 12:21 schrieb Marc Kleine-Budde: On 22.09.2022 17:06:00, Maxime Ripard wrote: I'm on a Raspberry Pi

Re: [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf()

2022-09-26 Thread Han Jingoo
On Mon, Sep 26, 2022 Daniel Thompson wrote: > > On Fri, Sep 23, 2022 at 06:35:33AM +, cgel@gmail.com wrote: > > From: ye xingchen > > > > Replace the open-code with sysfs_emit() to simplify the code. > > > > Signed-off-by: ye xingchen > > --- > > drivers/video/backlight/lp8788_bl.c | 2

[Bug 216516] s2ram freezes screen (Ryzen-5650U incl. Radeon GPU)

2022-09-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216516 Mario Limonciello (AMD) (mario.limoncie...@amd.com) changed: What|Removed |Added Component|Video(DRI - non Intel) |Plat

[Bug 216516] s2ram freezes screen (Ryzen-5650U incl. Radeon GPU)

2022-09-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216516 --- Comment #14 from Mario Limonciello (AMD) (mario.limoncie...@amd.com) --- > Here's the requested log. OK let me pull out a few pieces and explain what they mean. > 2022-09-26T19:01:47.104247+02:00 myhost kernel: [ 2218.148069][T0] > Timek

[PATCH v3] drm/i915/mtl: enable local stolen memory

2022-09-26 Thread Aravind Iddamsetty
As an integrated GPU, MTL does not have local memory and HAS_LMEM() returns false. However the platform's stolen memory is presented via BAR2 (i.e., the BAR we traditionally consider to be the LMEM BAR) and should be managed by the driver the same way that local memory is on dgpu platforms (which

Re: [PATCH] drm/msm/dpu: use DEFINE_SHOW_ATTRIBUTE to simplify dpu_regset32

2022-09-26 Thread Abhinav Kumar
On 9/22/2022 7:21 AM, Liu Shixin wrote: Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin Looks reasonable to me Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 18 +++--- 1 file changed,

[Bug 216516] s2ram freezes screen (Ryzen-5650U incl. Radeon GPU)

2022-09-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216516 --- Comment #13 from kolAflash (kolafl...@kolahilft.de) --- Created attachment 301872 --> https://bugzilla.kernel.org/attachment.cgi?id=301872&action=edit kernel log for s2idle: v6.0-rc6 with debug options @Mario (In reply to Mario Limonciello

Re: [PATCH v2 13/16] mempool: Use kmalloc_size_roundup() to match ksize() usage

2022-09-26 Thread Kees Cook
On Mon, Sep 26, 2022 at 03:50:43PM +0200, Vlastimil Babka wrote: > On 9/23/22 22:28, Kees Cook wrote: > > Round up allocations with kmalloc_size_roundup() so that mempool's use > > of ksize() is always accurate and no special handling of the memory is > > needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_

Re: [Freedreno] [PATCH v2 10/10] drm/msm/dsi: drop modeset sanity checks

2022-09-26 Thread Abhinav Kumar
On 9/13/2022 1:53 AM, Johan Hovold wrote: Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold The change LGTM, hence Reviewed-by: Abhinav Kumar I think w

Re: [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks

2022-09-26 Thread Abhinav Kumar
On 9/13/2022 1:53 AM, Johan Hovold wrote: Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold The change LGTM, hence Reviewed-by: Abhinav Kumar I think w

Re: [PATCH] drm/fourcc: add Vivante tile status modifiers

2022-09-26 Thread Guido Günther
Hi, On Fri, Sep 09, 2022 at 11:30:00AM +0200, Lucas Stach wrote: > The tile status modifiers can be combined with all of the usual > color buffer modifiers. When they are present an additional plane > is added to the surfaces to share the tile status buffer. The > TS modifiers describe the interpre

Re: [PATCH 0/4] RDMA/mlx5: Support DMABUF in umems and enable ATS

2022-09-26 Thread Jason Gunthorpe
On Thu, Sep 01, 2022 at 11:20:52AM -0300, Jason Gunthorpe wrote: > This series adds support for DMABUF when creating a devx umem. devx umems > are quite similar to MR's execpt they cannot be revoked, so this uses the > dmabuf pinned memory flow. Several mlx5dv flows require umem and cannot > work w

Re: [PATCH v2 02/16] slab: Introduce kmalloc_size_roundup()

2022-09-26 Thread Kees Cook
On Mon, Sep 26, 2022 at 03:15:22PM +0200, Vlastimil Babka wrote: > On 9/23/22 22:28, Kees Cook wrote: > > In the effort to help the compiler reason about buffer sizes, the > > __alloc_size attribute was added to allocators. This improves the scope > > of the compiler's ability to apply CONFIG_UBSAN

[PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson Extend hwmon power/energy for XEHPSDV especially per gt level energy usage. v2: Update to latest HWMON spec (Ashutosh) v3: Fix review comments (Ashutosh) v4: Fix review comments (Anshuman) v5: s/hwmon_device_register_with_info/ devm_hwmon_device_register_with_info/ (Ashu

linux-next: manual merge of the drm tree with the drm-fixes tree

2022-09-26 Thread broonie
Hi all, Today's linux-next merge of the drm tree got a conflict in: drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c between commit: 58d97c99c99f4 ("drm/amd/display: Update MBLK calculation for SubVP") from the drm-fixes tree and commits: 41c81dcf59991 ("drm/amd/display: Up

[PATCH 5/7] drm/i915/hwmon: Expose card reactive critical power

2022-09-26 Thread Badal Nilawar
From: Ashutosh Dixit Expose the card reactive critical (I1) power. I1 is exposed as power1_crit in microwatts (typically for client products) or as curr1_crit in milliamperes (typically for server). v2: Add curr1_crit functionality (Ashutosh) v3: Use HWMON_CHANNEL_INFO to define power1_crit, cur

[PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson Use i915 HWMON to display/modify dGfx power PL1 limit and TDP setting. v2: - Fix review comments (Ashutosh) - Do not restore power1_max upon module unload/load sequence because on production systems modules are always loaded and not unloaded/reloaded (Ashutosh)

[PATCH 6/7] drm/i915/hwmon: Expose power1_max_interval

2022-09-26 Thread Badal Nilawar
From: Ashutosh Dixit Expose power1_max_interval, that is the tau corresponding to PL1, as a custom hwmon attribute. Some bit manipulation is needed because of the format of PKG_PWR_LIM_1_TIME in GT0_PACKAGE_RAPL_LIMIT register (1.x * power(2,y)). v2: Update date and kernel version in Documentati

[PATCH 4/7] drm/i915/hwmon: Show device level energy usage

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson Use i915 HWMON to display device level energy input. v2: Updated the date and kernel version in feature description v3: - Cleaned up hwm_energy function and removed unused function i915_hwmon_energy_status_get (Ashutosh) v4: KernelVersion: 6.2, Date: February 2023 in d

[PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support

2022-09-26 Thread Badal Nilawar
From: Riana Tauro Use i915 HWMON subsystem to display current input voltage. v2: - Updated date and kernel version in feature description - Fixed review comments (Ashutosh) v3: Use macro HWMON_CHANNEL_INFO to define hwmon channel (Guenter) v4: - Fixed review comments (Ashutosh) - Use hwm

[PATCH 0/7] Add HWMON support

2022-09-26 Thread Badal Nilawar
This series adds the HWMON support for DGFX Test-with: 20220919144408.251981-1-riana.ta...@intel.com v2: - Reorganized series. Created first patch as infrastructure patch followed by feature patches. (Ashutosh) - Fixed review comments (Jani) - Fixed review comments (Ashutosh) v3: - F

[PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure

2022-09-26 Thread Badal Nilawar
From: Dale B Stimson The i915 HWMON module will be used to expose voltage, power and energy values for dGfx. Here we set up i915 hwmon infrastructure including i915 hwmon registration, basic data structures and functions. v2: - Create HWMON infra patch (Ashutosh) - Fixed review comments (Jan

Re: [PATCH v11.5] overflow: Introduce overflows_type() and __castable_to_type()

2022-09-26 Thread Kees Cook
On Mon, Sep 26, 2022 at 06:57:53PM +0300, Gwan-gyeong Mun wrote: > > > On 9/26/22 3:37 AM, Kees Cook wrote: > > Add overflows_type() 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 requir

Re: [Intel-gfx] [RFC v4 13/14] drm/i915/vm_bind: Skip vma_lookup for persistent vmas

2022-09-26 Thread Niranjana Vishwanathapura
On Mon, Sep 26, 2022 at 05:26:12PM +0100, Tvrtko Ursulin wrote: On 24/09/2022 05:30, Niranjana Vishwanathapura wrote: On Fri, Sep 23, 2022 at 09:40:20AM +0100, Tvrtko Ursulin wrote: On 21/09/2022 08:09, Niranjana Vishwanathapura wrote: vma_lookup is tied to segment of the object instead of s

Re: [PATCH v2] drm/i915/mtl: enable local stolen memory

2022-09-26 Thread Jani Nikula
On Mon, 26 Sep 2022, Aravind Iddamsetty wrote: > As an integrated GPU, MTL does not have local memory and > HAS_LMEM() returns false. However the platform's stolen memory > is presented via BAR2 (i.e., the BAR we traditionally consider > to be the LMEM BAR) and should be managed by the driver the

[PATCH V3 2/2] drm/panel: Add Samsung AMS495QA01 MIPI-DSI LCD panel

2022-09-26 Thread Chris Morgan
From: Chris Morgan Support Samsung AMS495QA01 panel as found on the Anbernic RG503. Note This panel receives video signals via DSI, however it receives commands via 3-wire SPI. Signed-off-by: Chris Morgan Signed-off-by: Maya Matuszczyk --- drivers/gpu/drm/panel/Kconfig | 10 +

[PATCH V3 1/2] dt-bindings: display: panel: Add Samsung AMS495QA01 bindings

2022-09-26 Thread Chris Morgan
From: Chris Morgan Add documentation for the Samsung AMS495QA01 panel. Signed-off-by: Chris Morgan Signed-off-by: Maya Matuszczyk --- .../display/panel/samsung,ams495qa01.yaml | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH V3 0/2] drm/panel: Add Samsung AMS495QA01 Panel

2022-09-26 Thread Chris Morgan
From: Chris Morgan Add the Samsung AMS495QA01 panel as found on the Anbernic RG503. This panel uses DSI to receive video signals, but 3-wire SPI to receive command signals. Changes since V2: - Added 50hz mode at request of userspace devs. - Renamed "dupa" to panel name. Good catch Maya. - Add

[PATCH v2] drm/i915/mtl: enable local stolen memory

2022-09-26 Thread Aravind Iddamsetty
As an integrated GPU, MTL does not have local memory and HAS_LMEM() returns false. However the platform's stolen memory is presented via BAR2 (i.e., the BAR we traditionally consider to be the LMEM BAR) and should be managed by the driver the same way that local memory is on dgpu platforms (which

[PATCH] MAINTAINERS: Add Sumit Semwal and Yongqin Liu as reviwers for kirin DRM driver

2022-09-26 Thread John Stultz
I no longer have access to the HiKey boards, so while I'm happy to review code, I wanted to add Sumit and Yongqin to the reviewers list so they would get CC'ed on future changes and would be able to have a chance to validate and provide Tested-by: tags Cc: Xinliang Liu Cc: Tian Tao Cc: Yongqin

Re: [PATCH] drm/i915: Stop using flush_scheduled_work on driver remove

2022-09-26 Thread Tvrtko Ursulin
On 23/09/2022 17:16, Ville Syrjälä wrote: On Fri, Sep 23, 2022 at 03:29:34PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Kernel is trying to eliminate callers of flush_scheduled_work so lets try to accommodate. We currently call it from intel_modeset_driver_remove_noirq on the driver

Re: [Intel-gfx] [PATCH 1/7] drm/i915/huc: only load HuC on GTs that have VCS engines

2022-09-26 Thread Ceraolo Spurio, Daniele
On 9/26/2022 9:15 AM, Tvrtko Ursulin wrote: On 23/09/2022 16:41, Ceraolo Spurio, Daniele wrote: On 9/23/2022 3:53 AM, Tvrtko Ursulin wrote: On 22/09/2022 23:11, Daniele Ceraolo Spurio wrote: On MTL the primary GT doesn't have any media capabilities, so no video engines and no HuC. We must

Re: [Intel-gfx] [RFC v4 13/14] drm/i915/vm_bind: Skip vma_lookup for persistent vmas

2022-09-26 Thread Tvrtko Ursulin
On 24/09/2022 05:30, Niranjana Vishwanathapura wrote: On Fri, Sep 23, 2022 at 09:40:20AM +0100, Tvrtko Ursulin wrote: On 21/09/2022 08:09, Niranjana Vishwanathapura wrote: vma_lookup is tied to segment of the object instead of section Can be, but not only that. It would be more accurate to

Re: [Intel-gfx] [PATCH 1/7] drm/i915/huc: only load HuC on GTs that have VCS engines

2022-09-26 Thread Tvrtko Ursulin
On 23/09/2022 16:41, Ceraolo Spurio, Daniele wrote: On 9/23/2022 3:53 AM, Tvrtko Ursulin wrote: On 22/09/2022 23:11, Daniele Ceraolo Spurio wrote: On MTL the primary GT doesn't have any media capabilities, so no video engines and no HuC. We must therefore skip the HuC fetch and load on that

Re: [PATCH v11.5] overflow: Introduce overflows_type() and __castable_to_type()

2022-09-26 Thread Gwan-gyeong Mun
On 9/26/22 3:37 AM, Kees Cook wrote: Add overflows_type() 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][2]) when used on constant values. This must be const

RE: [PATCH v2 06/16] igb: Proactively round up to kmalloc bucket size

2022-09-26 Thread Ruhl, Michael J
>-Original Message- >From: Kees Cook >Sent: Friday, September 23, 2022 4:28 PM >To: Vlastimil Babka >Cc: Kees Cook ; Brandeburg, Jesse >; Nguyen, Anthony L >; David S. Miller ; >Eric Dumazet ; Jakub Kicinski ; >Paolo Abeni ; intel-wired-...@lists.osuosl.org; >net...@vger.kernel.org; Ruhl,

[PATCH v12 9/9] drm/i915: Remove truncation warning for large objects

2022-09-26 Thread Gwan-gyeong Mun
From: Chris Wilson Having addressed the issues surrounding incorrect types for local variables and potential integer truncation in using the scatterlist API, we have closed all the loop holes we had previously identified with dangerously large object creation. As such, we can eliminate the warnin

[PATCH v12 6/9] drm/i915: Check for integer truncation on the configuration of ttm place

2022-09-26 Thread Gwan-gyeong Mun
There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation as we

[PATCH v12 7/9] drm/i915: Check if the size is too big while creating shmem file

2022-09-26 Thread Gwan-gyeong Mun
The __shmem_file_setup() function returns -EINVAL if size is greater than MAX_LFS_FILESIZE. To handle the same error as other code that returns -E2BIG when the size is too large, it add a code that returns -E2BIG when the size is larger than the size that can be handled. v4: If BITS_PER_LONG is 32

[PATCH v12 8/9] drm/i915: Use error code as -E2BIG when the size of gem ttm object is too large

2022-09-26 Thread Gwan-gyeong Mun
The ttm_bo_init_reserved() functions returns -ENOSPC if the size is too big to add vma. The direct function that returns -ENOSPC is drm_mm_insert_node_in_range(). To handle the same error as other code returning -E2BIG when the size is too large, it converts return value to -E2BIG. Signed-off-by:

[PATCH v12 5/9] drm/i915: Check for integer truncation on scatterlist creation

2022-09-26 Thread Gwan-gyeong Mun
From: Chris Wilson There is an impedance mismatch between the scatterlist API using unsigned int and our memory/page accounting in unsigned long. That is we may try to create a scatterlist for a large object that overflows returning a small table into which we try to fit very many pages. As the o

[PATCH v12 4/9] drm/i915/gem: Typecheck page lookups

2022-09-26 Thread Gwan-gyeong Mun
From: Chris Wilson We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead of a more suitable long. Be pedantic and add integer typechecking to the lookup so that we can be sure that we are safe. A

[PATCH v12 3/9] overflow: Introduce overflows_type() and __castable_to_type()

2022-09-26 Thread Gwan-gyeong Mun
From: Kees Cook Add overflows_type() 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][2]) when used on constant values. This must be constructed manually, since _

[PATCH v12 2/9] overflow: Introduce check_assign() and check_assign_user_ptr()

2022-09-26 Thread Gwan-gyeong Mun
Add check_assign() macro which performs an assigning source value into destination pointer along with an overflow check and check_assign_user_ptr() macro which performs an assigning source value into destination pointer type variable along with an overflow check. If an explicit overflow check is re

[PATCH v12 1/9] overflow: Allow mixed type arguments

2022-09-26 Thread Gwan-gyeong Mun
From: Kees Cook When the check_[op]_overflow() helpers were introduced, all arguments were required to be the same type to make the fallback macros simpler. However, now that the fallback macros have been removed[1], it is fine to allow mixed types, which makes using the helpers much more useful,

[PATCH v12 0/9] Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation

2022-09-26 Thread Gwan-gyeong Mun
This patch series fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation, etc. We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead o

Re: [PATCH 0/4] drm/atomic: Lockless blocking commits

2022-09-26 Thread Ville Syrjälä
On Tue, Sep 20, 2022 at 10:34:15AM +0300, Pekka Paalanen wrote: > On Fri, 16 Sep 2022 19:33:27 +0300 > Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > I've talked about making blocking commits lockless a few > > times in the past, so here's finally an attempt at it. > > The main benefit

Re: [PATCH -next v2] backlight: gpio_backlight: Switch to use dev_err_probe() helper

2022-09-26 Thread Daniel Thompson
On Mon, Sep 26, 2022 at 10:24:47PM +0800, Yang Yingliang wrote: > In the probe path, dev_err() can be replaced with dev_err_probe() > which will check if error code is -EPROBE_DEFER and prints the > error name. It also sets the defer probe reason which can be > checked later through debugfs. It's m

Re: [PATCH RESEND] drm/display: Don't assume dual mode adaptors support i2c sub-addressing

2022-09-26 Thread Simon Rettberg
Am Mon, 26 Sep 2022 17:57:47 +0300 schrieb Ville Syrjälä : > On Mon, Sep 26, 2022 at 04:34:08PM +0200, Simon Rettberg wrote: > > On Mon, 26 Sep 2022 15:38:43 +0300 > > Ville Syrjälä wrote: > > > > > On Mon, Sep 26, 2022 at 12:40:17PM +0200, Simon Rettberg wrote: > > > > Current dual mode ad

Re: [PATCH] drm/fourcc: Fix vsub/hsub for Q410 and Q401

2022-09-26 Thread Liviu Dudau
On Mon, Sep 26, 2022 at 04:21:19PM +0100, Brian Starkey wrote: > On Tue, Sep 13, 2022 at 04:36:57PM +0100, Liviu Dudau wrote: > > On Tue, Sep 13, 2022 at 03:43:06PM +0100, Brian Starkey wrote: > > > These formats are not subsampled, but that means hsub and vsub should be > > > 1, not 0. > > > > >

Re: [PATCH] drm/fourcc: Fix vsub/hsub for Q410 and Q401

2022-09-26 Thread Brian Starkey
On Tue, Sep 13, 2022 at 04:36:57PM +0100, Liviu Dudau wrote: > On Tue, Sep 13, 2022 at 03:43:06PM +0100, Brian Starkey wrote: > > These formats are not subsampled, but that means hsub and vsub should be > > 1, not 0. > > > > Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats")

Re: [PATCH v2 1/7] dt-bindings: msm/dp: Add SDM845 and SC8280XP compatibles

2022-09-26 Thread Krzysztof Kozlowski
On 26/09/2022 17:13, Rob Herring wrote: > On Thu, Sep 22, 2022 at 05:37:39PM +0200, Krzysztof Kozlowski wrote: >> On 22/09/2022 02:14, Bjorn Andersson wrote: >>> On Tue, Sep 20, 2022 at 09:09:13AM +0200, Krzysztof Kozlowski wrote: On 19/09/2022 23:18, Bjorn Andersson wrote: > On Sat, Sep 1

Re: [PATCH v2 1/7] dt-bindings: msm/dp: Add SDM845 and SC8280XP compatibles

2022-09-26 Thread Rob Herring
On Thu, Sep 22, 2022 at 05:37:39PM +0200, Krzysztof Kozlowski wrote: > On 22/09/2022 02:14, Bjorn Andersson wrote: > > On Tue, Sep 20, 2022 at 09:09:13AM +0200, Krzysztof Kozlowski wrote: > >> On 19/09/2022 23:18, Bjorn Andersson wrote: > >>> On Sat, Sep 17, 2022 at 06:03:27PM +0100, Krzysztof Kozl

Re: [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2022-09-26 Thread Melissa Wen
On 04/13, Daniel Vetter wrote: On Wed, 13 Apr 2022 at 01:36, Abhinav Kumar wrote: > > Hi Daniel > > On 4/8/2022 9:04 PM, Abhinav Kumar wrote: > > > > > > On 4/7/2022 4:12 PM, Rob Clark wrote: > >> On Thu, Apr 7, 2022 at 3:59 PM Abhinav Kumar > >> wrote: > >>> > >>> Hi Rob and Daniel > >>> > >>>

Re: [PATCH RESEND] drm/display: Don't assume dual mode adaptors support i2c sub-addressing

2022-09-26 Thread Ville Syrjälä
On Mon, Sep 26, 2022 at 04:34:08PM +0200, Simon Rettberg wrote: > On Mon, 26 Sep 2022 15:38:43 +0300 > Ville Syrjälä wrote: > > > On Mon, Sep 26, 2022 at 12:40:17PM +0200, Simon Rettberg wrote: > > > Current dual mode adaptor ("DP++") detection code assumes that all > > > adaptors support i2c su

Re: [PATCH] drm/panel-edp: Add INX N116BCA-EA2

2022-09-26 Thread Doug Anderson
Hi, On Mon, Sep 26, 2022 at 7:39 AM Doug Anderson wrote: > > Hi, > > On Mon, Sep 26, 2022 at 3:08 AM Sean Hong > wrote: > > > > Add support for the INX - N116BCA-EA2 (HW: C1) panel > > > > Signed-off-by: Sean Hong > > --- > > drivers/gpu/drm/panel/panel-edp.c | 1 + > > 1 file changed, 1 inser

Re: [PATCH] drm/panel-edp: Add INX N116BCA-EA2

2022-09-26 Thread Doug Anderson
Hi, On Mon, Sep 26, 2022 at 3:08 AM Sean Hong wrote: > > Add support for the INX - N116BCA-EA2 (HW: C1) panel > > Signed-off-by: Sean Hong > --- > drivers/gpu/drm/panel/panel-edp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/panel/panel-edp.c > b/drivers/gpu/drm/pa

Re: [PATCH 2/7] mm: Free device private pages have zero refcount

2022-09-26 Thread Jason Gunthorpe
On Mon, Sep 26, 2022 at 04:03:06PM +1000, Alistair Popple wrote: > Since 27674ef6c73f ("mm: remove the extra ZONE_DEVICE struct page > refcount") device private pages have no longer had an extra reference > count when the page is in use. However before handing them back to the > owning device drive

  1   2   >