Re: [PATCH] drm: rcar-du: Fix Kconfig dependency between RCAR_DU and RCAR_MIPI_DSI

2022-10-02 Thread Tomi Valkeinen
Hi, On 02/10/2022 01:03, Laurent Pinchart wrote: When the R-Car MIPI DSI driver was added, it was a standalone encoder driver without any dependency to or from the R-Car DU driver. Commit 957fe62d7d15 ("drm: rcar-du: Fix DSI enable & disable sequence") then added a direct call from the DU driver

[PATCH v2 17/17] drm/i915/vm_bind: Add uapi for user to enable vm_bind_mode

2022-10-02 Thread Niranjana Vishwanathapura
Add getparam support for VM_BIND capability version. Add VM creation time flag to enable vm_bind_mode for the VM. v2: update kernel-doc Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 9 - dri

[PATCH v2 12/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-10-02 Thread Niranjana Vishwanathapura
Implement new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any list of objects to validate bind as all required objects binding would have been requested by the userspace befor

[PATCH v2 13/17] drm/i915/vm_bind: Update i915_vma_verify_bind_complete()

2022-10-02 Thread Niranjana Vishwanathapura
Ensure i915_vma_verify_bind_complete() handles case where bind is not initiated. Also make it non static, add documentation and move it out of CONFIG_DRM_I915_DEBUG_GEM. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/i915_vma.c | 16 +++-

[PATCH v2 11/17] drm/i915/vm_bind: Use common execbuf functions in execbuf path

2022-10-02 Thread Niranjana Vishwanathapura
Update the execbuf path to use common execbuf functions to reduce code duplication with the newer execbuf3 path. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 507 ++ 1 file changed, 38 insertions(+), 469 dele

[PATCH v2 06/17] drm/i915/vm_bind: Support for VM private BOs

2022-10-02 Thread Niranjana Vishwanathapura
Each VM creates a root_obj and shares it with all of its private objects to use it as dma_resv object. This has a performance advantage as it requires a single dma_resv object update for all private BOs vs list of dma_resv objects update for shared BOs, in the execbuf path. VM private BOs can be o

[PATCH v2 14/17] drm/i915/vm_bind: Expose i915_request_await_bind()

2022-10-02 Thread Niranjana Vishwanathapura
Rename __i915_request_await_bind() as i915_request_await_bind() and make it non-static as it will be used in execbuf3 ioctl path. Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/i915_vma.c | 8 +--- drivers/gpu/drm/i915/i915_vma.h | 6 ++ 2 files changed, 7 insertions(+

[PATCH v2 15/17] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-02 Thread Niranjana Vishwanathapura
Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. v2: Ensure requests wait for bindings to complete. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- .../gpu/drm/i915/gem/i915_gem_execbuffer3.c | 214 +- 1 file chan

[PATCH v2 08/17] drm/i915/vm_bind: Support persistent vma activeness tracking

2022-10-02 Thread Niranjana Vishwanathapura
Do not use i915_vma activeness tracking for persistent vmas. As persistent vmas are part of working set for each execbuf submission on that address space (VM), a persistent vma is active if the VM active. As vm->root_obj->base.resv will be updated for each submission on that VM, it correctly repre

[PATCH v2 07/17] drm/i915/vm_bind: Add support to handle object evictions

2022-10-02 Thread Niranjana Vishwanathapura
Support eviction by maintaining a list of evicted persistent vmas for rebinding during next submission. Ensure the list do not include persistent vmas that are being purged. v2: Remove unused I915_VMA_PURGED definition. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-

[PATCH v2 09/17] drm/i915/vm_bind: Add out fence support

2022-10-02 Thread Niranjana Vishwanathapura
Add support for handling out fence for vm_bind call. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h | 4 + .../drm/i915/gem/i915_gem_vm_bind_object.c| 81 +++ drivers/gpu/drm/i915/i915_vma.c

[PATCH v2 10/17] drm/i915/vm_bind: Abstract out common execbuf functions

2022-10-02 Thread Niranjana Vishwanathapura
The new execbuf3 ioctl path and the legacy execbuf ioctl paths have many common functionalities. Abstract out the common execbuf functionalities into a separate file where possible, thus allowing code sharing. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i

[PATCH v2 16/17] drm/i915/vm_bind: userptr dma-resv changes

2022-10-02 Thread Niranjana Vishwanathapura
For persistent (vm_bind) vmas of userptr BOs, handle the user page pinning by using the i915_gem_object_userptr_submit_init() /done() functions Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- .../gpu/drm/i915/gem/i915_gem_execbuffer3.c | 80 +++ drivers/

[PATCH v2 04/17] drm/i915/vm_bind: Add support to create persistent vma

2022-10-02 Thread Niranjana Vishwanathapura
Add i915_vma_instance_persistent() to create persistent vmas. Persistent vmas will use i915_gtt_view to support partial binding. vma_lookup is tied to segment of the object instead of section of VA space. Hence, it do not support aliasing. ie., multiple mappings (at different VA) point to the same

[PATCH v2 05/17] drm/i915/vm_bind: Implement bind and unbind of object

2022-10-02 Thread Niranjana Vishwanathapura
Add uapi and implement support for bind and unbind of an object at the specified GPU virtual addresses. The vm_bind mode is not supported in legacy execbuf2 ioctl. It will be supported only in the newer execbuf3 ioctl. v2: On older platforms ctx->vm is not set, check for it. In vm_bind call,

[PATCH v2 03/17] drm/i915/vm_bind: Expose i915_gem_object_max_page_size()

2022-10-02 Thread Niranjana Vishwanathapura
Expose i915_gem_object_max_page_size() function non-static which will be used by the vm_bind feature. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_create.c | 18 +- drivers/gpu/drm/i915/gem/i915_

[PATCH v2 01/17] drm/i915/vm_bind: Expose vm lookup function

2022-10-02 Thread Niranjana Vishwanathapura
Make i915_gem_vm_lookup() function non-static as it will be used by the vm_bind feature. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 ++- drivers/gpu/drm/i915/gem/i915_gem_context.h | 3

[PATCH v2 00/17] drm/i915/vm_bind: Add VM_BIND functionality

2022-10-02 Thread Niranjana Vishwanathapura
DRM_I915_GEM_VM_BIND/UNBIND ioctls allows UMD to bind/unbind GEM buffer objects (BOs) or sections of a BOs at specified GPU virtual addresses on a specified address space (VM). Multiple mappings can map to the same physical pages of an object (aliasing). These mappings (also referred to as persiste

[PATCH v2 02/17] drm/i915/vm_bind: Add __i915_sw_fence_await_reservation()

2022-10-02 Thread Niranjana Vishwanathapura
Add function __i915_sw_fence_await_reservation() for asynchronous wait on a dma-resv object with specified dma_resv_usage. This is required for async vma unbind with vm_bind. Acked-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/i915_sw_fence.c | 28 ++

[PATCH v2 2/2] drm/bridge: it6505: Add pre_enable/post_disable callback

2022-10-02 Thread Pin-yen Lin
Add atomic_pre_enable and atomic_post_disable callback to make sure the bridge is not powered off until atomic_post_disable is called. This prevents a power leakage when it6505 is powered off, but the upstream DRM bridge is still sending display signals. Fixes: b5c84a9edcd4 ("drm/bridge: add it650

[PATCH v2 1/2] drm/bridge: it6505: Adapt runtime power management framework

2022-10-02 Thread Pin-yen Lin
Use pm_runtime_(get|put)_sync to control the bridge power, and add SET_SYSTEM_SLEEP_PM_OPS with pm_runtime_force_(suspend|resume) to it6505 driver. Without SET_SYSTEM_SLEEP_PM_OPS, the bridge will be powered on unnecessarily when no external display is connected. Fixes: b5c84a9edcd4 ("drm/bridge:

[PATCH v2 0/2] drm/bridge: it6505: Power management fixes for it6505 bridge

2022-10-02 Thread Pin-yen Lin
This series contains 2 fixes related to it6505 power management. Changes in v2: - Handle the error from pm_runtime_get_sync in it6505_extcon_work Pin-yen Lin (2): drm/bridge: it6505: Adapt runtime power management framework drm/bridge: it6505: Add pre_enable/post_disable callback drivers/gp

Re: [PATCH] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry

2022-10-02 Thread Zheng Hacker
> That is a horrible way to make an api (and it should be a bool too.) > Now every time you see this call in the code, you have to go look up > what the last parameter means. Just make 2 functions, one that does the > "is error" thing, and one that does not, and that will be much easier to > maint

Re: [PATCH v5 1/9] dt-bindings: usb: Add Type-C switch binding

2022-10-02 Thread Pin-yen Lin
Hi all, Are there any thoughts or comments about this proposal? On Sat, Sep 17, 2022 at 2:22 AM Prashant Malani wrote: > > Hi folks, > > On Fri, Sep 2, 2022 at 12:41 AM Prashant Malani wrote: > > > > Hi Rob, > > > > On Jul 12 11:45, Rob Herring wrote: > > > > > > That's not the right interpreta

Re: [PATCH v2 1/8] mm/memory.c: Fix race when faulting a device private page

2022-10-02 Thread Alistair Popple
Felix Kuehling writes: > On 2022-09-28 08:01, Alistair Popple wrote: >> When the CPU tries to access a device private page the migrate_to_ram() >> callback associated with the pgmap for the page is called. However no >> reference is taken on the faulting page. Therefore a concurrent >> migratio

[PATCH AUTOSEL 5.10 14/14] drm/amd/display: skip audio setup when audio stream is enabled

2022-10-02 Thread Sasha Levin
From: zhikzhai [ Upstream commit 65fbfb02c2734cacffec5e3f492e1b4f1dabcf98 ] [why] We have minimal pipe split transition method to avoid pipe allocation outage.However, this method will invoke audio setup which cause audio output stuck once pipe reallocate. [how] skip audio setup for pipelines w

[PATCH AUTOSEL 5.10 13/14] drm/amd/display: update gamut remap if plane has changed

2022-10-02 Thread Sasha Levin
From: Hugo Hu [ Upstream commit 52bb21499cf54fa65b56d97cd0d68579c90207dd ] [Why] The desktop plane and full-screen game plane may have different gamut remap coefficients, if switching between desktop and full-screen game without updating the gamut remap will cause incorrect color. [How] Update

[PATCH AUTOSEL 5.15 20/20] drm/amd/display: skip audio setup when audio stream is enabled

2022-10-02 Thread Sasha Levin
From: zhikzhai [ Upstream commit 65fbfb02c2734cacffec5e3f492e1b4f1dabcf98 ] [why] We have minimal pipe split transition method to avoid pipe allocation outage.However, this method will invoke audio setup which cause audio output stuck once pipe reallocate. [how] skip audio setup for pipelines w

[PATCH AUTOSEL 5.15 19/20] drm/amd/display: update gamut remap if plane has changed

2022-10-02 Thread Sasha Levin
From: Hugo Hu [ Upstream commit 52bb21499cf54fa65b56d97cd0d68579c90207dd ] [Why] The desktop plane and full-screen game plane may have different gamut remap coefficients, if switching between desktop and full-screen game without updating the gamut remap will cause incorrect color. [How] Update

[PATCH AUTOSEL 5.15 18/20] drm/amd/display: Assume an LTTPR is always present on fixed_vs links

2022-10-02 Thread Sasha Levin
From: Michael Strauss [ Upstream commit 29956d0fded036a570bd8e7d4ea4b1a1730307d2 ] [WHY] LTTPRs can in very rare instsances fail to increment DPCD LTTPR count. This results in aux-i LTTPR requests to be sent to the wrong DPCD address, which causes link training failure. [HOW] Override internal

[PATCH AUTOSEL 5.15 17/20] drm/amd/display: Fix double cursor on non-video RGB MPO

2022-10-02 Thread Sasha Levin
From: Leo Li [ Upstream commit b261509952bc19d1012cf732f853659be6ebc61e ] [Why] DC makes use of layer_index (zpos) when picking the HW plane to enable HW cursor on. However, some compositors will not attach zpos information to each DRM plane. Consequently, in amdgpu, we default layer_index to 0

[PATCH AUTOSEL 5.19 28/29] drm/amd/display: increase dcn315 pstate change latency

2022-10-02 Thread Sasha Levin
From: Dmytro Laktyushkin [ Upstream commit dcc2527df918edfe297c5074ccc1f05eae361ca6 ] [Why & How] Update after new measurment came in Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH AUTOSEL 5.19 27/29] drm/amd/display: Fix DP MST timeslot issue when fallback happened

2022-10-02 Thread Sasha Levin
From: Cruise Hung [ Upstream commit 20c6168b3c8aadef7d2853c925d99eb546bd5e1c ] [Why] When USB4 DP link training failed and fell back to lower link rate, the time slot calculation uses the verified_link_cap. And the verified_link_cap was not updated to the new one. It caused the wrong VC payload

[PATCH AUTOSEL 5.19 26/29] drm/amd/display: skip audio setup when audio stream is enabled

2022-10-02 Thread Sasha Levin
From: zhikzhai [ Upstream commit 65fbfb02c2734cacffec5e3f492e1b4f1dabcf98 ] [why] We have minimal pipe split transition method to avoid pipe allocation outage.However, this method will invoke audio setup which cause audio output stuck once pipe reallocate. [how] skip audio setup for pipelines w

[PATCH AUTOSEL 5.19 25/29] drm/amd/display: update gamut remap if plane has changed

2022-10-02 Thread Sasha Levin
From: Hugo Hu [ Upstream commit 52bb21499cf54fa65b56d97cd0d68579c90207dd ] [Why] The desktop plane and full-screen game plane may have different gamut remap coefficients, if switching between desktop and full-screen game without updating the gamut remap will cause incorrect color. [How] Update

[PATCH AUTOSEL 5.19 24/29] drm/amd/display: Assume an LTTPR is always present on fixed_vs links

2022-10-02 Thread Sasha Levin
From: Michael Strauss [ Upstream commit 29956d0fded036a570bd8e7d4ea4b1a1730307d2 ] [WHY] LTTPRs can in very rare instsances fail to increment DPCD LTTPR count. This results in aux-i LTTPR requests to be sent to the wrong DPCD address, which causes link training failure. [HOW] Override internal

[PATCH AUTOSEL 5.19 23/29] drm/amd/display: Fix double cursor on non-video RGB MPO

2022-10-02 Thread Sasha Levin
From: Leo Li [ Upstream commit b261509952bc19d1012cf732f853659be6ebc61e ] [Why] DC makes use of layer_index (zpos) when picking the HW plane to enable HW cursor on. However, some compositors will not attach zpos information to each DRM plane. Consequently, in amdgpu, we default layer_index to 0

[PATCH AUTOSEL 5.19 11/29] drm/amdgpu/mes: zero the sdma_hqd_mask of 2nd SDMA engine for SDMA 6.0.1

2022-10-02 Thread Sasha Levin
From: Yifan Zhang [ Upstream commit 0af4ed0c329ebb4cef95fda4fcdbfcdea0255442 ] there is only one SDMA engine in SDMA 6.0.1, the sdma_hqd_mask has to be zeroed for the 2nd engine, otherwise MES scheduler will consider 2nd engine exists and map/unmap SDMA queues to the non-existent engine. Signed

[Bug 216549] AMDGPU crash with kernel NULL pointer dereference, RIP: 0010:amdgpu_bo_get_memory

2022-10-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216549 Artem S. Tashkinov (a...@gmx.com) changed: What|Removed |Added Status|NEW |RESOLVED Reso

[Bug 213823] Broken power management for amdgpu

2022-10-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213823 Bruno Pagani (bruno.n.pag...@gmail.com) changed: What|Removed |Added Status|NEW |RESOLVED

[Bug 216549] New: AMDGPU crash with kernel NULL pointer dereference, RIP: 0010:amdgpu_bo_get_memory

2022-10-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216549 Bug ID: 216549 Summary: AMDGPU crash with kernel NULL pointer dereference, RIP: 0010:amdgpu_bo_get_memory Product: Drivers Version: 2.5 Kernel Version: 5.19.12 Hardware

Re: [PATCH] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry

2022-10-02 Thread Greg KH
On Wed, Sep 28, 2022 at 11:33:40AM +0800, Zheng Wang wrote: > If intel_gvt_dma_map_guest_page failed, it will call > ppgtt_invalidate_spt, which will finally free the spt. > But the caller does not notice that, it will free spt again in error path. > > Fix this by only freeing spt in ppgtt_invalid

Re: [PATCH v3 1/2] dt-bindings: display/panel: Add Sony Tama TD4353 JDI display panel

2022-10-02 Thread Krzysztof Kozlowski
On 30/09/2022 20:08, Konrad Dybcio wrote: > Add bindings for the display panel used on some Sony Xperia XZ2 and XZ2 > Compact smartphones. > > Signed-off-by: Konrad Dybcio > --- Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof