Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection

2023-09-14 Thread Chen-Yu Tsai
On Thu, Sep 14, 2023 at 11:53 PM Jani Nikula wrote: > > The sads returned by drm_edid_to_sad() needs to be freed. > > Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195") > Cc: Guillaume Ranquet > Cc: Bo-Chen Chen > Cc: AngeloGioacchino Del Regno > Cc: Dmitry Osipenko > Cc:

Re: [PATCH] drm/nouveau/pm: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Thu, Sep 14, 2023 at 10:17:08PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it guarantees >

Re: [PATCH] drm/nouveau/core: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
ile (i) { > --i; Yup, consumed by strlen() and snprintf(). Looks like a standard conversion. :) Reviewed-by: Kees Cook -Kees > > --- > base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec > change-id: > 20230914-strncpy-drivers-gpu-drm-nouveau-nvkm-core-firmware-c-791223838b72 > > Best regards, > -- > Justin Stitt > -- Kees Cook

Re: [PATCH] drm/nouveau/nvif: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
t_ctor(>master.base, cli->name, device, >base); So we'll always be %NUL terminated. Therefore, yes, conversion looks good: Reviewed-by: Kees Cook Thanks! -Kees > > --- > base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec > change-id: 20230914-strncpy-drivers-gpu-drm-nouveau-nvif-client-c-82b023c36953 > > Best regards, > -- > Justin Stitt > -- Kees Cook

Re: [PATCH] drm/i915: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
tt = mock_ppgtt(i915, name); > if (!ppgtt) > > --- > base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec > change-id: > 20230914-strncpy-drivers-gpu-drm-i915-gem-selftests-mock_context-c-980c8ecc9142 > > Best regards, > -- > Justin Stitt > -- Kees Cook

Re: [PATCH] drm/gma500: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
8 bytes. I2C_NAME_SIZE is 20. Ultimately it doesn't matter since the source is a const char string, but it's still weird. Therefore: Reviewed-by: Kees Cook -Kees > chan->base.owner = THIS_MODULE; > chan->base.algo_data = >algo; > chan->base.dev.parent

Re: [PATCH] drm/etnaviv: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
mains) > @@ -540,7 +540,7 @@ int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu, > sig = >signal[signal->iter]; > > signal->id = signal->iter; > - strncpy(signal->name, sig->name, sizeof(signal->name)); > + strscpy(signal->name, sig->n

Re: [PATCH] drm/modes: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Thu, Sep 14, 2023 at 06:08:44PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it guarantees >

[git pull] drm fixes for 6.6-rc2

2023-09-14 Thread Dave Airlie
Hey Linus, Regular rc2 fixes pull, mostly made up of amdgpu stuff, one i915, and a bunch of others, one vkms locking violation is reverted. Thanks, Dave. drm-fixes-2023-09-15: drm fixes for 6.6-rc2 connector: - doc fix exec: - workaround lockdep issue tests: - fix a UAF vkms: - revert

Re: [PATCH 07/10] drm/tests: Add test for drm_framebuffer_init()

2023-09-14 Thread Carlos
Hi Maíra, On 9/8/23 5:22 PM, Maira Canal wrote: Hi Carlos, On 9/4/23 14:41, Carlos wrote: Hi Maíra, On 8/26/23 11:16, Maíra Canal wrote: Hi Carlos, On 8/25/23 13:11, Carlos Eduardo Gallo Filho wrote: Add a single KUnit test case for the drm_framebuffer_init function. Signed-off-by:

Re: [PATCH v4 11/11] arm64: dts: qcom: sc7180: Link trogdor touchscreens to the panels

2023-09-14 Thread Doug Anderson
Hi, On Thu, Jul 27, 2023 at 10:19 AM Douglas Anderson wrote: > > Let's provide the proper link from the touchscreen to the panel on > trogdor devices where the touchscreen support it. This allows the OS > to power sequence the touchscreen more properly. > > For the most part, this is just

[PATCH v17 17/18] drm/virtio: Support memory shrinking

2023-09-14 Thread Dmitry Osipenko
Support generic drm-shmem memory shrinker and add new madvise IOCTL to the VirtIO-GPU driver. BO cache manager of Mesa driver will mark BOs as "don't need" using the new IOCTL to let shrinker purge the marked BOs on OOM, the shrinker will also evict unpurgeable shmem BOs from memory if guest

[PATCH v17 16/18] drm/virtio: Attach shmem BOs dynamically

2023-09-14 Thread Dmitry Osipenko
Prepare for addition of memory shrinker support by attaching shmem pages to host dynamically on first use. The attachment vq command wasn't fenced and there was no vq kick made in the BO creation code path, hence the the attachment already was happening dynamically, but implicitly. Making

[PATCH v17 15/18] drm/virtio: Pin display framebuffer BO

2023-09-14 Thread Dmitry Osipenko
Prepare to addition of memory shrinker support by pinning display framebuffer BO pages in memory while they are in use by display on host. Shrinker is free to relocate framebuffer BO pages if it doesn't know that pages are in use, thus pin the pages to disallow shrinker to move them. Acked-by:

[PATCH v17 18/18] drm/panfrost: Switch to generic memory shrinker

2023-09-14 Thread Dmitry Osipenko
Replace Panfrost's custom memory shrinker with a common drm-shmem memory shrinker. Tested-by: Steven Price # Firefly-RK3288 Reviewed-by: Steven Price Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/panfrost/Makefile | 1 - drivers/gpu/drm/panfrost/panfrost_device.h| 4 -

[PATCH v17 14/18] drm/shmem-helper: Export drm_gem_shmem_get_pages_sgt_locked()

2023-09-14 Thread Dmitry Osipenko
Export drm_gem_shmem_get_pages_sgt_locked() that will be used by virtio-gpu shrinker during GEM swap-in operation done under the held reservation lock. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++- include/drm/drm_gem_shmem_helper.h | 1 + 2 files

[PATCH v17 13/18] drm/shmem-helper: Add memory shrinker

2023-09-14 Thread Dmitry Osipenko
Introduce common drm-shmem shrinker for DRM drivers. To start using drm-shmem shrinker drivers should do the following: 1. Implement evict() callback of GEM object where driver should check whether object is purgeable or evictable using drm-shmem helpers and perform the shrinking action

[PATCH v17 11/18] drm/shmem-helper: Improve drm_gem_shmem_vmap_locked() error handling

2023-09-14 Thread Dmitry Osipenko
Remove error unwinding from drm_gem_shmem_vmap_locked() making error paths consistent for both dmabuf and non-dmabuf cases and improving readability of the code. Often it's preferred to do the explicit error unwinding, but this multi-path function is an exception. Suggested-by: Boris Brezillon

[PATCH v17 10/18] drm/shmem-helper: Use refcount_t for vmap_use_count

2023-09-14 Thread Dmitry Osipenko
Use refcount_t helper for vmap_use_count to make refcounting consistent with pages_use_count and pages_pin_count that use refcount_t. This also makes vmapping to benefit from the refcount_t's overflow checks. Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Signed-off-by: Dmitry

[PATCH v17 09/18] drm/shmem-helper: Switch drm_gem_shmem_vmap/vunmap to use pin/unpin

2023-09-14 Thread Dmitry Osipenko
The vmapped pages shall be pinned in memory and previously get/put_pages() were implicitly hard-pinning/unpinning the pages. This will no longer be the case with addition of memory shrinker because pages_use_count > 0 won't determine anymore whether pages are hard-pinned (they will be

[PATCH v17 12/18] drm/shmem-helper: Prepare drm_gem_shmem_free() to shrinker addition

2023-09-14 Thread Dmitry Osipenko
Prepare drm_gem_shmem_free() to addition of memory shrinker support to drm-shmem by adding and using variant of put_pages() that doesn't touch reservation lock. Reservation shouldn't be touched because lockdep will trigger a bogus warning about locking contention with fs_reclaim code paths that

[PATCH v17 07/18] drm/shmem-helper: Use refcount_t for pages_use_count

2023-09-14 Thread Dmitry Osipenko
Use atomic refcount_t helper for pages_use_count to optimize pin/unpin functions by skipping reservation locking while GEM's pin refcount > 1. Suggested-by: Boris Brezillon Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 33 +++--

[PATCH v17 08/18] drm/shmem-helper: Add and use lockless drm_gem_shmem_get_pages()

2023-09-14 Thread Dmitry Osipenko
Add lockless drm_gem_shmem_get_pages() helper that skips taking reservation lock if pages_use_count is non-zero, leveraging from atomicity of the refcount_t. Make drm_gem_shmem_mmap() to utilize the new helper. Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Signed-off-by: Dmitry

[PATCH v17 06/18] drm/shmem-helper: Add and use pages_pin_count

2023-09-14 Thread Dmitry Osipenko
Add separate pages_pin_count for tracking of whether drm-shmem pages are moveable or not. With the addition of memory shrinker support to drm-shmem, the pages_use_count will no longer determine whether pages are hard-pinned in memory, but whether pages exist and are soft-pinned (and could be

[PATCH v17 03/18] drm/shmem-helper: Make all exported symbols GPL

2023-09-14 Thread Dmitry Osipenko
Make all drm-shmem exported symbols GPL to make them consistent with the rest of drm-shmem symbols. Reviewed-by: Boris Brezillon Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH v17 04/18] drm/shmem-helper: Refactor locked/unlocked functions

2023-09-14 Thread Dmitry Osipenko
Add locked and remove unlocked postfixes from drm-shmem function names, making names consistent with the drm/gem core code. Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c| 64 +--

[PATCH v17 05/18] drm/shmem-helper: Remove obsoleted is_iomem test

2023-09-14 Thread Dmitry Osipenko
Everything that uses the mapped buffer should be agnostic to is_iomem. The only reason for the is_iomem test is that we're setting shmem->vaddr to the returned map->vaddr. Now that the shmem->vaddr code is gone, remove the obsoleted is_iomem test to clean up the code. Suggested-by: Thomas

[PATCH v17 01/18] drm/gem: Change locked/unlocked postfix of drm_gem_v/unmap() function names

2023-09-14 Thread Dmitry Osipenko
Make drm/gem API function names consistent by having locked function use the _locked postfix in the name, while the unlocked variants don't use the _unlocked postfix. Rename drm_gem_v/unmap() function names to make them consistent with the rest of the API functions. Reviewed-by: Boris Brezillon

[PATCH v17 02/18] drm/gem: Add _locked postfix to functions that have unlocked counterpart

2023-09-14 Thread Dmitry Osipenko
Add _locked postfix to drm_gem functions that have unlocked counterpart functions to make GEM functions naming more consistent and intuitive in regards to the locking requirements. Reviewed-by: Boris Brezillon Suggested-by: Boris Brezillon Signed-off-by: Dmitry Osipenko ---

[PATCH v17 00/18] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2023-09-14 Thread Dmitry Osipenko
This series: 1. Adds common drm-shmem memory shrinker 2. Enables shrinker for VirtIO-GPU driver 3. Switches Panfrost driver to the common shrinker 4. Fixes bugs and improves drm-shmem code Mesa: https://gitlab.freedesktop.org/digetx/mesa/-/commits/virgl-madvise IGT:

Re: [PATCH v5 3/3] drm/i915/lrc: User PXP contexts requires runalone bit in lrc

2023-09-14 Thread Balasubrawmanian, Vivaik
On 9/9/2023 3:38 PM, Alan Previn wrote: On Meteorlake onwards, HW specs require that all user contexts that run on render or compute engines and require PXP must enforce run-alone bit in lrc. Add this enforcement for protected contexts. Signed-off-by: Alan Previn ---

[PATCH v5 5/6] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-14 Thread Adrián Larumbe
BO's RSS is updated every time new pages are allocated on demand and mapped for the object at GPU page fault's IRQ handler, but only for heap buffers. The reason this is unnecessary for non-heap buffers is that they are mapped onto the GPU's VA space and backed by physical memory in their entirety

[PATCH v5 6/6] drm/drm-file: Show finer-grained BO sizes in drm_show_memory_stats

2023-09-14 Thread Adrián Larumbe
The current implementation will try to pick the highest available size display unit as soon as the BO size exceeds that of the previous multiplier. That can lead to loss of precision in contexts of low memory usage. The new selection criteria try to preserve precision, whilst also increasing the

[PATCH v5 4/6] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-14 Thread Adrián Larumbe
Some BO's might be mapped onto physical memory chunkwise and on demand, like Panfrost's tiler heap. In this case, even though the drm_gem_shmem_object page array might already be allocated, only a very small fraction of the BO is currently backed by system memory, but drm_show_memory_stats will

[PATCH v5 1/6] drm/panfrost: Add cycle count GPU register definitions

2023-09-14 Thread Adrián Larumbe
These GPU registers will be used when programming the cycle counter, which we need for providing accurate fdinfo drm-cycles values to user space. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_regs.h | 5 + 1 file

[PATCH v5 3/6] drm/panfrost: Add fdinfo support for memory stats

2023-09-14 Thread Adrián Larumbe
A new DRM GEM object function is added so that drm_show_memory_stats can provide more accurate memory usage numbers. Ideally, in panfrost_gem_status, the BO's purgeable flag would be checked after locking the driver's shrinker mutex, but drm_show_memory_stats takes over the drm file's object

[PATCH v5 2/6] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-14 Thread Adrián Larumbe
The drm-stats fdinfo tags made available to user space are drm-engine, drm-cycles, drm-max-freq and drm-curfreq, one per job slot. This deviates from standard practice in other DRM drivers, where a single set of key:value pairs is provided for the whole render engine. However, Panfrost has

[PATCH v5 0/6] Add fdinfo support to Panfrost

2023-09-14 Thread Adrián Larumbe
This patch series adds fdinfo support to the Panfrost DRM driver. It will display a series of key:value pairs under /proc/pid/fdinfo/fd for render processes that open the Panfrost DRM file. The pairs contain basic drm gpu engine and memory region information that can either be cat by a privileged

Re: [PATCH v11] drm: Add initial ci/ subdirectory

2023-09-14 Thread Rob Clark
On Thu, Sep 14, 2023 at 2:54 AM Maxime Ripard wrote: > > Hi, > > On Tue, Sep 12, 2023 at 02:16:41PM +0100, Daniel Stone wrote: > > Hopefully less mangled formatting this time: turns out Thunderbird + > > plain text is utterly unreadable, so that's one less MUA that is > > actually usable to send

[PATCH 1/2] drm/i915/guc: Update 'recommended' version to 70.11.0 for DG2/ADL-P/MTL

2023-09-14 Thread John . C . Harrison
From: John Harrison The latest GuC has new features and new workarounds that we wish to enable. So let the universe know that it is useful to update their firmware. Signed-off-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 2/2] drm/i915/guc: Enable WA 14018913170

2023-09-14 Thread John . C . Harrison
From: Daniele Ceraolo Spurio The GuC handles the WA, the KMD just needs to set the flag to enable it on the appropriate platforms. Signed-off-by: John Harrison Signed-off-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 6 ++

[PATCH 0/2] Enable Wa_14018913170 on DG2/MTL/PVD

2023-09-14 Thread John . C . Harrison
From: John Harrison Enable a WA on the latest platforms. Also update the recommended GuC version for those platforms to the latest available. Further patches will follow to make use of other features in the latest GuC firmware, but the w/a at least requires something newer than what was

Re: [RFT PATCH 03/15] drm/ingenic: Call drm_atomic_helper_shutdown() at shutdown time

2023-09-14 Thread Doug Anderson
Hi, On Thu, Sep 14, 2023 at 1:14 AM Maxime Ripard wrote: > > > > So it doesn't have any relationship with the unbind/remove timing, and > > > for all we know it can be there indefinitely, while the application > > > continues to interact with the driver. > > > > I spent some time thinking about

Re: [PATCH v4 2/3] drm/i915/pxp/mtl: Update pxp-firmware packet size

2023-09-14 Thread Balasubrawmanian, Vivaik
On 9/6/2023 5:15 PM, Alan Previn wrote: Update the GSC-fw input/output HECI packet size to match updated internal fw specs. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_43.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v5 1/3] drm/i915/pxp/mtl: Update pxp-firmware response timeout

2023-09-14 Thread Balasubrawmanian, Vivaik
On 9/9/2023 3:38 PM, Alan Previn wrote: Update the max GSC-fw response time to match updated internal fw specs. Because this response time is an SLA on the firmware, not inclusive of i915->GuC->HW handoff latency, when submitting requests to the GSC fw via intel_gsc_uc_heci_cmd_submit helpers,

[PATCH] drm/nouveau/pm: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
} if (++si < source_nr) { --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-gpu-drm-nouveau-nvkm-engine-pm-base-c-38bf9c78bc0f Best regards, -- Justin Stitt

Re: [PATCH v4 0/3] drm: simplify support for transparent DRM bridges

2023-09-14 Thread Dmitry Baryshkov
On Fri, 15 Sept 2023 at 00:23, Laurent Pinchart wrote: > > Hi Neil, > > Sorry about the delay, the series got burried in my inbox. > > On Tue, Aug 22, 2023 at 04:27:37PM +0200, Neil Armstrong wrote: > > On 22/08/2023 16:19, Laurent Pinchart wrote: > > > On Tue, Aug 22, 2023 at 05:17:37PM +0300,

Re: [PATCH v2 1/1] drm/i915/pxp: Add drm_dbgs for critical PXP events.

2023-09-14 Thread Balasubrawmanian, Vivaik
On 9/13/2023 3:57 PM, Alan Previn wrote: Debugging PXP issues can't even begin without understanding precedding sequence of events. Add drm_dbg into the most important PXP events. v2 : - remove __func__ since drm_dbg covers that (Jani). - add timeout of the restart from front-end

Re: [PATCH v4 0/3] drm: simplify support for transparent DRM bridges

2023-09-14 Thread Dmitry Baryshkov
On Fri, 15 Sept 2023 at 00:44, Laurent Pinchart wrote: > > Hi Dmitry, > > On Mon, Sep 04, 2023 at 12:02:18AM +0300, Dmitry Baryshkov wrote: > > On Tue, 22 Aug 2023 at 17:17, Laurent Pinchart wrote: > > > On Thu, Aug 17, 2023 at 05:55:13PM +0300, Dmitry Baryshkov wrote: > > > > Supporting DP/USB-C

Re: [PATCH v4 0/3] drm: simplify support for transparent DRM bridges

2023-09-14 Thread Laurent Pinchart
Hi Dmitry, On Mon, Sep 04, 2023 at 12:02:18AM +0300, Dmitry Baryshkov wrote: > On Tue, 22 Aug 2023 at 17:17, Laurent Pinchart wrote: > > On Thu, Aug 17, 2023 at 05:55:13PM +0300, Dmitry Baryshkov wrote: > > > Supporting DP/USB-C can result in a chain of several transparent > > > bridges (PHY,

[PATCH] drm/nouveau/core: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
name, sizeof(cname)); i = strlen(cname); while (i) { --i; --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-gpu-drm-nouveau-nvkm-core-firmware-c-791223838b72 Best regards, -- Justin Stitt

[PATCH] drm/nouveau/nvif: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-gpu-drm-nouveau-nvif-client-c-82b023c36953 Best regards, -- Justin Stitt

Re: [PATCH v4 0/3] drm: simplify support for transparent DRM bridges

2023-09-14 Thread Laurent Pinchart
Hi Neil, Sorry about the delay, the series got burried in my inbox. On Tue, Aug 22, 2023 at 04:27:37PM +0200, Neil Armstrong wrote: > On 22/08/2023 16:19, Laurent Pinchart wrote: > > On Tue, Aug 22, 2023 at 05:17:37PM +0300, Laurent Pinchart wrote: > >> On Thu, Aug 17, 2023 at 05:55:13PM +0300,

[PATCH] drm/i915: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
ppgtt = mock_ppgtt(i915, name); if (!ppgtt) --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-gpu-drm-i915-gem-selftests-mock_context-c-980c8ecc9142 Best regards, -- Justin Stitt

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On 9/14/23 17:04, Hamza Mahfooz wrote: On 9/14/23 16:40, Harry Wentland wrote: On 2023-09-14 13:53, Hamza Mahfooz wrote: On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On 9/14/23 16:40, Harry Wentland wrote: On 2023-09-14 13:53, Hamza Mahfooz wrote: On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling drm_mode_set_crtcinfo() from within

[PATCH] drm/gma500: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
n->base.dev.parent = dev->dev; --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-drivers-gpu-drm-gma500-oaktrail_lvds_i2c-c-a53c6d8bd62f Best regards, -- Justin Stitt

Re: [PATCH] fix a memory leak in amdgpu_ras_feature_enable

2023-09-14 Thread Alex Deucher
Applied. Thanks! On Thu, Sep 14, 2023 at 5:53 AM Zhang, Hawking wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Hawking Zhang > > Regards, > Hawking > -Original Message- > From: Cong Liu > Sent: Thursday, September 14, 2023 17:46 > To: Deucher, Alexander ; Koenig,

Re: [PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Harry Wentland
On 2023-09-14 13:53, Hamza Mahfooz wrote: > On eDP we can receive invalid modes from dm_update_crtc_state() for > entirely new streams for which drm_mode_set_crtcinfo() shouldn't be > called on. So, instead of calling drm_mode_set_crtcinfo() from within > create_stream_for_sink() we can instead

Re: [RFC PATCH 1/8] drm/panel: nv3052c: Document known register names

2023-09-14 Thread Jessica Zhang
On 9/13/2023 9:12 PM, John Watts wrote: On Wed, Sep 13, 2023 at 02:43:43PM -0700, Jessica Zhang wrote: Hi John, Just curious, what do you mean by these registers being mostly unknown? I do see them specified in the online specs -- some even seem to map to existing MIPI_DCS_* enums (ex.

Re: [RFC PATCH 5/8] drm/panel: nv3052c: Allow specifying registers per panel

2023-09-14 Thread Jessica Zhang
On 9/13/2023 9:09 PM, John Watts wrote: On Wed, Sep 13, 2023 at 02:34:38PM -0700, Jessica Zhang wrote: Hi John, Having a separate panel_regs_len field seems a bit unnecessary to me. Looks like it's only being called in the panel prepare() and I don't seen any reason why we shouldn't just

[PATCH] drm/ssd130x: Drop _helper prefix from struct drm_*_helper_funcs callbacks

2023-09-14 Thread Javier Martinez Canillas
The driver uses a naming convention where functions for struct drm_*_funcs callbacks are named ssd130x_$object_$operation, while the callbacks for struct drm_*_helper_funcs are named ssd130x_$object_helper_$operation. The idea is that this helper_ prefix in the function names denote that are for

[PATCH v3 16/25] drm/dp_mst: Swap the order of checking root vs. non-root port BW limitations

2023-09-14 Thread Imre Deak
drm_dp_mst_atomic_check_mgr() should check for BW limitation starting from sink ports continuing towards the root port, so that drivers can use the @failing_port returned to resolve a BW overallocation in an ideal way. For instance from streams A,B,C in a topology A,B going through @failing_port

[PATCH v3 15/25] drm/dp_mst: Factor out a helper to check the atomic state of a topology manager

2023-09-14 Thread Imre Deak
Factor out a helper to check the atomic state for one MST topology manager, returning the MST port where the BW limit check has failed. This will be used in a follow-up patch by the i915 driver to improve the BW sharing between MST streams. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org

[PATCH v3 14/25] drm/dp_mst: Add helper to determine if an MST port is downstream of another port

2023-09-14 Thread Imre Deak
Add drm_dp_mst_port_downstream_of_parent() required by the i915 driver in a follow-up patch to resolve a BW overallocation of MST streams going through a given MST port. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Lyude Paul Signed-off-by: Imre Deak ---

[PATCH v3 13/25] drm/dp_mst: Add a way to calculate PBN values with FEC overhead

2023-09-14 Thread Imre Deak
Add a way for drivers to calculate the MST PBN values with FEC overhead. This is required by 8b/10b links both for DSC and non-DSC (the latter needed if there are both DSC and non-DSC streams on the same MST link). Also add a kunit test case for PBN values calculated with FEC overhead. v2: -

[Bug 217910] AMD Radeon RX 6600 XT: redraw artifacts around gui elements on primary monitor if TearFree disabled

2023-09-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217910 Artem S. Tashkinov (a...@gmx.com) changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Thomas Hellström
On Thu, 2023-09-14 at 19:25 +0200, Danilo Krummrich wrote: > On 9/14/23 19:21, Thomas Hellström wrote: > > On Thu, 2023-09-14 at 18:36 +0200, Danilo Krummrich wrote: > > > On 9/14/23 15:48, Thomas Hellström wrote: > > > > Hi, Danilo > > > > > > > > Some additional minor comments as xe conversion

[PATCH] drm/etnaviv: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
iter++; if (signal->iter == dom->nr_signals) --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-gpu-drm-etnaviv-etnaviv_perfmon-c-dd095491dfde Best regards, -- Justin Stitt

Re: [PATCH v4] drm/ssd130x: Store the HW buffer in the driver-private CRTC state

2023-09-14 Thread Javier Martinez Canillas
Maxime Ripard writes: [...] > > Acked-by: Maxime Ripard > Pushed to drm-misc (drm-misc-next). Thanks! -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

[PATCH] drm/modes: refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
RM_DISPLAY_MODE_LEN-1] = 0; + strscpy(out->name, in->name, DRM_DISPLAY_MODE_LEN); /* Clearing picture aspect ratio bits from out flags, * as the aspect-ratio information is not stored in --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-s

[PATCH] drm/amd/display: fix the ability to use lower resolution modes on eDP

2023-09-14 Thread Hamza Mahfooz
On eDP we can receive invalid modes from dm_update_crtc_state() for entirely new streams for which drm_mode_set_crtcinfo() shouldn't be called on. So, instead of calling drm_mode_set_crtcinfo() from within create_stream_for_sink() we can instead call it from amdgpu_dm_connector_mode_valid().

Re: [PATCH v3 09/13] drm/sched: Submit job before starting TDR

2023-09-14 Thread Matthew Brost
On Wed, Sep 13, 2023 at 10:56:10PM -0400, Luben Tuikov wrote: > On 2023-09-11 22:16, Matthew Brost wrote: > > If the TDR is set to a value, it can fire before a job is submitted in > > drm_sched_main. The job should be always be submitted before the TDR > > fires, fix this ordering. > > > > v2: >

Re: [PATCH v3 10/13] drm/sched: Add helper to set TDR timeout

2023-09-14 Thread Matthew Brost
On Wed, Sep 13, 2023 at 10:38:24PM -0400, Luben Tuikov wrote: > On 2023-09-11 22:16, Matthew Brost wrote: > > Add helper to set TDR timeout and restart the TDR with new timeout > > value. This will be used in XE, new Intel GPU driver, to trigger the TDR > > to cleanup drm_sched_entity that

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Danilo Krummrich
On 9/14/23 19:21, Thomas Hellström wrote: On Thu, 2023-09-14 at 18:36 +0200, Danilo Krummrich wrote: On 9/14/23 15:48, Thomas Hellström wrote: Hi, Danilo Some additional minor comments as xe conversion progresses. On 9/9/23 17:31, Danilo Krummrich wrote: So far the DRM GPUVA manager offers

[RFC] drm/msm/rd: Check PT_PTRACED for cmdstream dumping

2023-09-14 Thread Rob Clark
From: Rob Clark So, when you want to get a cmdstream trace of some deqp or piglit test, but you happen to be running it on the same laptop with full desktop env, the current dump-everything firehose of `cat $debugfs/dri/n/rd` is quite a bit too much. Ptrace seemed kind of a natural way to

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Thomas Hellström
On Thu, 2023-09-14 at 18:36 +0200, Danilo Krummrich wrote: > On 9/14/23 15:48, Thomas Hellström wrote: > > Hi, Danilo > > > > Some additional minor comments as xe conversion progresses. > > > > On 9/9/23 17:31, Danilo Krummrich wrote: > > > So far the DRM GPUVA manager offers common

Re: [Nouveau] [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Danilo Krummrich
On 9/14/23 19:13, Thomas Hellström wrote: On Thu, 2023-09-14 at 17:27 +0200, Danilo Krummrich wrote: On 9/14/23 13:32, Thomas Hellström wrote: On 9/14/23 12:57, Danilo Krummrich wrote: On 9/13/23 14:16, Danilo Krummrich wrote: And validate() can remove it while still holding all dma-

Re: [Nouveau] [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Thomas Hellström
On Thu, 2023-09-14 at 17:27 +0200, Danilo Krummrich wrote: > On 9/14/23 13:32, Thomas Hellström wrote: > > > > On 9/14/23 12:57, Danilo Krummrich wrote: > > > On 9/13/23 14:16, Danilo Krummrich wrote: > > > > > > > > > > > > > > > And validate() can remove it while still holding all dma- > > >

Re: [PATCH v4] drm/ssd130x: Store the HW buffer in the driver-private CRTC state

2023-09-14 Thread Javier Martinez Canillas
Maxime Ripard writes: > On Thu, Sep 14, 2023 at 03:23:53PM +0200, Javier Martinez Canillas wrote: >> Maxime Ripard writes: >> >> Hello Maxime, >> >> > Hi, >> > >> > On Wed, Sep 13, 2023 at 07:29:25AM +0200, Javier Martinez Canillas wrote: >> >> static const struct drm_crtc_helper_funcs

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Danilo Krummrich
On 9/14/23 15:48, Thomas Hellström wrote: Hi, Danilo Some additional minor comments as xe conversion progresses. On 9/9/23 17:31, Danilo Krummrich wrote: So far the DRM GPUVA manager offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to

[PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection

2023-09-14 Thread Jani Nikula
The sads returned by drm_edid_to_sad() needs to be freed. Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195") Cc: Guillaume Ranquet Cc: Bo-Chen Chen Cc: AngeloGioacchino Del Regno Cc: Dmitry Osipenko Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc:

Re: [PATCH v3 03/13] drm/sched: Move schedule policy to scheduler / entity

2023-09-14 Thread Matthew Brost
On Thu, Sep 14, 2023 at 12:18:11AM -0400, Luben Tuikov wrote: > On 2023-09-11 22:16, Matthew Brost wrote: > > Rather than a global modparam for scheduling policy, move the scheduling > > policy to scheduler / entity so user can control each scheduler / entity > > policy. > > > > v2: > > -

Re: [PATCH v3 03/13] drm/sched: Move schedule policy to scheduler / entity

2023-09-14 Thread Matthew Brost
On Thu, Sep 14, 2023 at 12:23:35AM -0400, Luben Tuikov wrote: > On 2023-09-14 00:18, Luben Tuikov wrote: > > On 2023-09-11 22:16, Matthew Brost wrote: > >> Rather than a global modparam for scheduling policy, move the scheduling > >> policy to scheduler / entity so user can control each scheduler

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Boris Brezillon
On Thu, 14 Sep 2023 15:33:50 +0200 Thomas Hellström wrote: > Hi, > > On 9/14/23 13:54, Boris Brezillon wrote: > > On Thu, 14 Sep 2023 12:45:44 +0200 > > Thomas Hellström wrote: > > > >> On 9/14/23 10:20, Boris Brezillon wrote: > >>> On Wed, 13 Sep 2023 15:22:56 +0200 > >>> Thomas Hellström

Re: [Nouveau] [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Danilo Krummrich
On 9/14/23 13:32, Thomas Hellström wrote: On 9/14/23 12:57, Danilo Krummrich wrote: On 9/13/23 14:16, Danilo Krummrich wrote: And validate() can remove it while still holding all dma-resv locks, neat! However, what if two tasks are trying to lock the VA space concurrently? What do we do

[Bug 217910] New: AMD Radeon RX 6600 XT: redraw artifacts around gui elements on primary monitor if TearFree disabled

2023-09-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217910 Bug ID: 217910 Summary: AMD Radeon RX 6600 XT: redraw artifacts around gui elements on primary monitor if TearFree disabled Product: Drivers Version: 2.5 Hardware: AMD

Re: [RFC PATCH v1 01/12] Revert "drm/sysfs: Link DRM connectors to corresponding Type-C connectors"

2023-09-14 Thread Heikki Krogerus
Hi guys, On Thu, Sep 14, 2023 at 01:40:49PM +0300, Dmitry Baryshkov wrote: > On Thu, 14 Sept 2023 at 12:26, Heikki Krogerus > wrote: > > > > Hi Dmitry, > > > > On Wed, Sep 13, 2023 at 04:47:12PM +0300, Dmitry Baryshkov wrote: > > > On Wed, 13 Sept 2023 at 16:15, Heikki Krogerus > > > wrote: > >

Re: [PATCH 00/19] drm/i915: prepare for xe driver display integration

2023-09-14 Thread Rodrigo Vivi
On Tue, Sep 12, 2023 at 02:06:27PM +0300, Jani Nikula wrote: > The upcoming drm/xe driver [1][2] will reuse the drm/i915 display code, > initially by compiling the relevant compilation units separately as part > of the xe driver. This series prepares for that in i915 side. > > The first patch

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Thomas Hellström
Hi, On 9/14/23 13:54, Boris Brezillon wrote: On Thu, 14 Sep 2023 12:45:44 +0200 Thomas Hellström wrote: On 9/14/23 10:20, Boris Brezillon wrote: On Wed, 13 Sep 2023 15:22:56 +0200 Thomas Hellström wrote: On 9/13/23 13:33, Boris Brezillon wrote: On Wed, 13 Sep 2023 12:39:01 +0200

Re: [PATCH v4] drm/ssd130x: Store the HW buffer in the driver-private CRTC state

2023-09-14 Thread Maxime Ripard
On Thu, Sep 14, 2023 at 03:23:53PM +0200, Javier Martinez Canillas wrote: > Maxime Ripard writes: > > Hello Maxime, > > > Hi, > > > > On Wed, Sep 13, 2023 at 07:29:25AM +0200, Javier Martinez Canillas wrote: > >> static const struct drm_crtc_helper_funcs ssd130x_crtc_helper_funcs = { > >>

Re: [PATCH v16 15/20] drm/shmem-helper: Add memory shrinker

2023-09-14 Thread Dmitry Osipenko
On 9/14/23 16:27, Boris Brezillon wrote: ... > If you added this pages_use_count > 0 check to deal with the > 'free-partially-imported-GEM' case, I keep thinking this is not > the right fix. You should just assume that obj->import_attach == NULL > means not-a-prime-buffer, and then make sure >

Re: [PATCH drm-misc-next v3 6/7] drm/gpuvm: generalize dma_resv/extobj handling and GEM validation

2023-09-14 Thread Thomas Hellström
Hi, Danilo Some additional minor comments as xe conversion progresses. On 9/9/23 17:31, Danilo Krummrich wrote: So far the DRM GPUVA manager offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to their backing buffers and perform more

Re: [PATCH v1 0/3] udmabuf: Add support for page migration out of movable zone or CMA

2023-09-14 Thread David Hildenbrand
I think it makes sense to have a generic (non-GUP) version of check_and_migrate_movable_pages() available in migration.h that drivers can use to ensure that they don't break memory hotunplug accidentally. Definately not. Either use the VMA and pin_user_pages(), or implement pin_user_pages_fd()

Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback error path

2023-09-14 Thread Guillaume Ranquet
On Thu, 14 Sep 2023 15:10, Jani Nikula wrote: >Setting new_edid to NULL leaks the buffer. > >Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") >Cc: Markus Schneider-Pargmann >Cc: Guillaume Ranquet >Cc: Bo-Chen Chen >Cc: CK Hu >Cc: AngeloGioacchino Del Regno >Cc:

Re: [PATCH v16 15/20] drm/shmem-helper: Add memory shrinker

2023-09-14 Thread Boris Brezillon
On Thu, 14 Sep 2023 15:27:03 +0200 Boris Brezillon wrote: > You should drop the '&& refcount_read(>pages_use_count)', > otherwise you'll never enter this branch (sgt allocation retained > a ref, so pages_use_count > 0 when ->sgt != NULL). Sorry for the brain fart. You can drop this extra test

Re: [PATCH v16 15/20] drm/shmem-helper: Add memory shrinker

2023-09-14 Thread Boris Brezillon
On Thu, 14 Sep 2023 16:01:37 +0300 Dmitry Osipenko wrote: > On 9/14/23 14:58, Boris Brezillon wrote: > > On Thu, 14 Sep 2023 14:36:23 +0300 > > Dmitry Osipenko wrote: > > > >> On 9/14/23 11:27, Boris Brezillon wrote: > >>> On Thu, 14 Sep 2023 10:50:32 +0300 > >>> Dmitry Osipenko wrote: >

[PATCH 2/2] drm/bridge: lt9611uxc: use drm_bridge_get_edid() instead of using ->get_edid directly

2023-09-14 Thread Jani Nikula
Make drm_bridge_get_edid() the one place to call the hook. Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Jani Nikula --- UNTESTED --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1

[PATCH 1/2] drm/bridge: use drm_bridge_get_edid() instead of using ->get_edid directly

2023-09-14 Thread Jani Nikula
Make drm_bridge_get_edid() the one place to call the hook. Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_bridge_connector.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 2/2] drm/tests: Flag slow tests as such

2023-09-14 Thread Maxime Ripard
Hi Sima, (For some reason, it looks like your mailer sets up the headers to reply to every recipient but you) On Tue, Sep 12, 2023 at 09:36:12AM +0200, Daniel Vetter wrote: > On Mon, Sep 11, 2023 at 11:51:06AM +0200, Maxime Ripard wrote: > > Kunit recently gained a speed attribute that allows to

  1   2   >