Re: [Intel-gfx] [PATCH] drm/i915/gt: Reset twice

2022-12-22 Thread Gwan-gyeong Mun
On 12/22/22 3:47 PM, Andi Shyti wrote: Hi GG,  drivers/gpu/drm/i915/gt/intel_reset.c | 34 ++-  1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index ffde89c5835a4..88dfc0c

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Flush power delayed put when connector init failed

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: Flush power delayed put when connector init failed URL : https://patchwork.freedesktop.org/series/112182/ State : success == Summary == CI Bug Log - changes from CI_DRM_12523_full -> Patchwork_112182v1_full

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v2,1/2] drm/i915/display/core: use intel_de_rmw if possible

2022-12-22 Thread Patchwork
== Series Details == Series: series starting with [v2,1/2] drm/i915/display/core: use intel_de_rmw if possible URL : https://patchwork.freedesktop.org/series/112171/ State : success == Summary == CI Bug Log - changes from CI_DRM_12523_full -> Patchwork_112171v1_full ==

[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups URL : https://patchwork.freedesktop.org/series/112196/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/1.0/series/112196/revisions/1/mbox/ not applied Applying: drm/i915/gvt:

[Intel-gfx] [PATCH 27/27] drm/i915/gvt: Drop final dependencies on KVM internal details

2022-12-22 Thread Sean Christopherson
Open code gpa_to_gfn() in kvmgt_page_track_write() and drop KVMGT's dependency on kvm_host.h, i.e. include only on kvm_page_track.h. KVMGT assumes "gfn == gpa >> PAGE_SHIFT" all over the place, including a few lines below in the same function with the same gpa, i.e. there's no reason to use KVM's h

[Intel-gfx] [PATCH 14/27] drm/i915/gvt: Don't bother removing write-protection on to-be-deleted slot

2022-12-22 Thread Sean Christopherson
When handling a slot "flush", don't call back into KVM to drop write protection for gfns in the slot. Now that KVM rejects attempts to move memory slots while KVMGT is attached, the only time a slot is "flushed" is when it's being removed, i.e. the memslot and all its write-tracking metadata is ab

[Intel-gfx] [PATCH 26/27] KVM: x86/mmu: Add page-track API to query if a gfn is valid

2022-12-22 Thread Sean Christopherson
Add a page-track API to query if a gfn is "valid", i.e. is backed by a memslot and is visible to the guest. This is one more step toward removing KVM internal details from the page-track APIs. Add a FIXME to call out that intel_gvt_is_valid_gfn() is broken with respect to 2MiB (or larger) guest e

[Intel-gfx] [PATCH 22/27] KVM: x86/mmu: Assert that correct locks are held for page write-tracking

2022-12-22 Thread Sean Christopherson
When adding/removing gfns to/from write-tracking, assert that mmu_lock is held for write, and that either slots_lock or kvm->srcu is held. mmu_lock must be held for write to protect gfn_write_track's refcount, and SRCU or slots_lock must be held to protect the memslot itself. Signed-off-by: Sean C

[Intel-gfx] [PATCH 25/27] KVM: x86/mmu: Handle KVM bookkeeping in page-track APIs, not callers

2022-12-22 Thread Sean Christopherson
Get/put references to KVM when a page-track notifier is (un)registered instead of relying on the caller to do so. Forcing the caller to do the bookkeeping is unnecessary and adds one more thing for users to get wrong, e.g. see commit 9ed1fdee9ee3 ("drm/i915/gvt: Get reference to KVM iff attachment

[Intel-gfx] [PATCH 23/27] KVM: x86/mmu: Bug the VM if write-tracking is used but not enabled

2022-12-22 Thread Sean Christopherson
Bug the VM if something attempts to write-track a gfn, but write-tracking isn't enabled. The VM is doomed (and KVM has an egregious bug) if KVM or KVMGT wants to shadow guest page tables but can't because write-tracking isn't enabled. Signed-off-by: Sean Christopherson --- arch/x86/kvm/mmu/page

[Intel-gfx] [PATCH 17/27] KVM: x86: Remove the unused page-track hook track_flush_slot()

2022-12-22 Thread Sean Christopherson
From: Yan Zhao Remove ->track_remove_slot(), there are no longer any users and it's unlikely a "flush" hook will ever be the correct API to provide to an external page-track user. Cc: Zhenyu Wang Suggested-by: Sean Christopherson Signed-off-by: Yan Zhao Signed-off-by: Sean Christopherson ---

[Intel-gfx] [PATCH 24/27] KVM: x86/mmu: Drop @slot param from exported/external page-track APIs

2022-12-22 Thread Sean Christopherson
Refactor KVM's exported/external page-track, a.k.a. write-track, APIs to take only the gfn and do the required memslot lookup in KVM proper. Forcing users of the APIs to get the memslot unnecessarily bleeds KVM internals into KVMGT and complicates usage of the APIs. No functional change intended.

[Intel-gfx] [PATCH 19/27] KVM: x86/mmu: Use page-track notifiers iff there are external users

2022-12-22 Thread Sean Christopherson
Disable the page-track notifier code at compile time if there are no external users, i.e. if CONFIG_KVM_EXTERNAL_WRITE_TRACKING=n. KVM itself now hooks emulated writes directly instead of relying on the page-track mechanism. Signed-off-by: Sean Christopherson --- arch/x86/include/asm/kvm_host.h

[Intel-gfx] [PATCH 21/27] KVM: x86/mmu: Rename page-track APIs to reflect the new reality

2022-12-22 Thread Sean Christopherson
Rename the page-track APIs to capture that they're all about tracking writes, now that the facade of supporting multiple modes is gone. Opportunstically replace "slot" with "gfn" in anticipation of removing the @slot param from the external APIs. No functional change intended. Signed-off-by: Sea

[Intel-gfx] [PATCH 20/27] KVM: x86/mmu: Drop infrastructure for multiple page-track modes

2022-12-22 Thread Sean Christopherson
Drop "support" for multiple page-track modes, as there is no evidence that array-based and refcounted metadata is the optimal solution for other modes, nor is there any evidence that other use cases, e.g. for access-tracking, will be a good fit for the page-track machinery in general. E.g. one pot

[Intel-gfx] [PATCH 18/27] KVM: x86/mmu: Move KVM-only page-track declarations to internal header

2022-12-22 Thread Sean Christopherson
Bury the declaration of the page-track helpers that are intended only for internal KVM use in a "private" header. In addition to guarding against unwanted usage of the internal-only helpers, dropping their definitions avoids exposing other structures that should be KVM-internal, e.g. for memslots.

[Intel-gfx] [PATCH 13/27] KVM: x86: Reject memslot MOVE operations if KVMGT is attached

2022-12-22 Thread Sean Christopherson
Disallow moving memslots if the VM has external page-track users, i.e. if KVMGT is being used to expose a virtual GPU to the guest, as KVM doesn't correctly handle moving memory regions. Note, this is potential ABI breakage! E.g. userspace could move regions that aren't shadowed by KVMGT without

[Intel-gfx] [PATCH 12/27] KVM: drm/i915/gvt: Drop @vcpu from KVM's ->track_write() hook

2022-12-22 Thread Sean Christopherson
Drop @vcpu from KVM's ->track_write() hook provided for external users of the page-track APIs now that KVM itself doesn't use the page-track mechanism. Signed-off-by: Sean Christopherson --- arch/x86/include/asm/kvm_page_track.h | 5 ++--- arch/x86/kvm/mmu/page_track.c | 2 +- drivers/

[Intel-gfx] [PATCH 15/27] KVM: x86: Add a new page-track hook to handle memslot deletion

2022-12-22 Thread Sean Christopherson
From: Yan Zhao Add a new page-track hook, track_remove_region(), that is called when a memslot DELETE operation is about to be committed. The "remove" hook will be used by KVMGT and will effectively replace the existing track_flush_slot() altogether now that KVM itself doesn't rely on the "flush

[Intel-gfx] [PATCH 16/27] drm/i915/gvt: switch from ->track_flush_slot() to ->track_remove_region()

2022-12-22 Thread Sean Christopherson
From: Yan Zhao Switch from the poorly named and flawed ->track_flush_slot() to the newly introduced ->track_remove_region(). From KVMGT's perspective, the two hooks are functionally equivalent, the only difference being that ->track_remove_region() is called only when KVM is 100% certain the mem

[Intel-gfx] [PATCH 07/27] drm/i915/gvt: Use an "unsigned long" to iterate over memslot gfns

2022-12-22 Thread Sean Christopherson
Use an "unsigned long" instead of an "int" when iterating over the gfns in a memslot. The number of pages in the memslot is tracked as an "unsigned long", e.g. KVMGT could theoretically break if a KVM memslot larger than 16TiB were deleted (2^32 * 4KiB). Signed-off-by: Sean Christopherson --- d

[Intel-gfx] [PATCH 09/27] drm/i915/gvt: Protect gfn hash table with dedicated mutex

2022-12-22 Thread Sean Christopherson
Add and use a new mutex, gfn_lock, to protect accesses to the hash table used to track which gfns are write-protected when shadowing the guest's GTT. This fixes a bug where kvmgt_page_track_write(), which doesn't hold kvm->mmu_lock, could race with intel_gvt_page_track_remove() and trigger a use-a

[Intel-gfx] [PATCH 10/27] KVM: x86/mmu: Don't rely on page-track mechanism to flush on memslot change

2022-12-22 Thread Sean Christopherson
Call kvm_mmu_zap_all_fast() directly when flushing a memslot instead of bounding through the page-track mechanism. KVM (unfortunately) needs to zap and flush all page tables on memslot DELETE/MOVE irrespective of whether KVM is shadowing guest page tables. This will allow changing KVM to register

[Intel-gfx] [PATCH 11/27] KVM: x86/mmu: Don't bounce through page-track mechanism for guest PTEs

2022-12-22 Thread Sean Christopherson
Don't use the generic page-track mechanism to handle writes to guest PTEs in KVM's MMU. KVM's MMU needs access to information that should not be exposed to external page-track users, e.g. KVM needs (for some definitions of "need") the vCPU to query the current paging mode, whereas external users,

[Intel-gfx] [PATCH 08/27] drm/i915/gvt: Hoist acquisition of vgpu_lock out to kvmgt_page_track_write()

2022-12-22 Thread Sean Christopherson
Host the acquisition of vgpu_lock from intel_vgpu_page_track_handler() out to its sole caller, kvmgt_page_track_write(). An upcoming fix will add a mutex to protect the gfn hash table that referenced by kvmgt_gfn_is_write_protected(), i.e. kvmgt_page_track_write() will need to acquire another lock

[Intel-gfx] [PATCH 06/27] drm/i915/gvt: Don't rely on KVM's gfn_to_pfn() to query possible 2M GTT

2022-12-22 Thread Sean Christopherson
Now that gvt_pin_guest_page() explicitly verifies the pinned PFN is a transparent hugepage page, don't use KVM's gfn_to_pfn() to pre-check if a 2M GTT entry is possible and instead just try to map the GFN with a 2MB entry. Using KVM to query pfn that is ultimately managed through VFIO is odd, and

[Intel-gfx] [PATCH 04/27] drm/i915/gvt: Verify VFIO-pinned page is THP when shadowing 2M gtt entry

2022-12-22 Thread Sean Christopherson
When shadowing a GTT entry with a 2M page, explicitly verify that the first page pinned by VFIO is a transparent hugepage instead of assuming that page observed by is_2MB_gtt_possible() is the same page pinned by vfio_pin_pages(). E.g. if userspace is doing something funky with the guest's memslot

[Intel-gfx] [PATCH 03/27] drm/i915/gvt: Incorporate KVM memslot info into check for 2MiB GTT entry

2022-12-22 Thread Sean Christopherson
Honor KVM's max allowed page size when determining whether or not a 2MiB GTT shadow page can be created for the guest. Querying KVM's max allowed size is somewhat odd as there's no strict requirement that KVM's memslots and VFIO's mappings are configured with the same gfn=>hva mapping, but the che

[Intel-gfx] [PATCH 05/27] drm/i915/gvt: Put the page reference obtained by KVM's gfn_to_pfn()

2022-12-22 Thread Sean Christopherson
Put the struct page reference acquired by gfn_to_pfn(), KVM's API is that the caller is ultimately responsible for dropping any reference. Note, kvm_release_pfn_clean() ensures the pfn is actually a refcounted struct page before trying to put any references. Fixes: b901b252b6cf ("drm/i915/gvt: Ad

[Intel-gfx] [PATCH 02/27] KVM: x86/mmu: Factor out helper to get max mapping size of a memslot

2022-12-22 Thread Sean Christopherson
Extract the memslot-related logic of kvm_mmu_max_mapping_level() into a new helper so that KVMGT can determine whether or not mapping a 2MiB page into the guest is (dis)allowed per KVM's memslots. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/mmu/mmu.c

[Intel-gfx] [PATCH 01/27] drm/i915/gvt: Verify pfn is "valid" before dereferencing "struct page"

2022-12-22 Thread Sean Christopherson
Check that the pfn found by gfn_to_pfn() is actually backed by "struct page" memory prior to retrieving and dereferencing the page. KVM supports backing guest memory with VM_PFNMAP, VM_IO, etc., and so there is no guarantee the pfn returned by gfn_to_pfn() has an associated "struct page". Fixes:

[Intel-gfx] [PATCH 00/27] drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups

2022-12-22 Thread Sean Christopherson
Fix a variety of found-by-inspection bugs in KVMGT, and overhaul KVM's page-track APIs to provide a leaner and cleaner interface. The motivation for this series is to (significantly) reduce the number of KVM APIs that KVMGT uses, with a long-term goal of making all kvm_host.h headers KVM-internal.

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dmc: Use unversioned firmware paths

2022-12-22 Thread Lucas De Marchi
On Thu, Dec 22, 2022 at 07:12:08PM -0300, Gustavo Sousa wrote: On Wed, Dec 21, 2022 at 04:23:45PM -0800, Lucas De Marchi wrote: On Wed, Dec 21, 2022 at 12:26:26PM +0200, Jani Nikula wrote: > On Tue, 20 Dec 2022, Gustavo Sousa wrote: > > As we do not require specific versions anymore, change the

[Intel-gfx] ✓ Fi.CI.IGT: success for Introduce __xchg, non-atomic xchg

2022-12-22 Thread Patchwork
== Series Details == Series: Introduce __xchg, non-atomic xchg URL : https://patchwork.freedesktop.org/series/112169/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522_full -> Patchwork_112169v1_full Summary --- **

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix same object multiple mmap memory leak

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: Fix same object multiple mmap memory leak URL : https://patchwork.freedesktop.org/series/112166/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12522_full -> Patchwork_112166v1_full Sum

[Intel-gfx] ✓ Fi.CI.IGT: success for Remove platform acronyms and stepping from comments

2022-12-22 Thread Patchwork
== Series Details == Series: Remove platform acronyms and stepping from comments URL : https://patchwork.freedesktop.org/series/112161/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522_full -> Patchwork_112161v1_full Sum

[Intel-gfx] ✓ Fi.CI.IGT: success for Enable HDCP2.x via GSC CS (rev4)

2022-12-22 Thread Patchwork
== Series Details == Series: Enable HDCP2.x via GSC CS (rev4) URL : https://patchwork.freedesktop.org/series/111876/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522_full -> Patchwork_111876v4_full Summary --- **S

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Initial Xe driver submission

2022-12-22 Thread Patchwork
== Series Details == Series: Initial Xe driver submission URL : https://patchwork.freedesktop.org/series/112189/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/1.0/series/112189/revisions/1/mbox/ not applied Applying: drm/suballoc: Introduce a generic suball

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/hdmi: Go for scrambling only if platform supports TMDS clock > 340MHz (rev3)

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/hdmi: Go for scrambling only if platform supports TMDS clock > 340MHz (rev3) URL : https://patchwork.freedesktop.org/series/111877/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522_full -> Patchwork_111877v3_full ==

[Intel-gfx] [RFC PATCH 17/20] drm/i915/display: Fix a use-after-free when intel_edp_init_connector fails

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst We enable the DP aux channel during probe, but may free the connector soon afterwards. Ensure the DP aux display power put is completed before everything is freed, to prevent a use-after-free in icl_aux_pw_to_phy(), called from icl_combo_phy_aux_power_well_disable. Signed

[Intel-gfx] [RFC PATCH 14/20] drm/i915/display: Remove all uncore mmio accesses in favor of intel_de

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/hsw_ips.c| 7 ++- drivers/gpu/drm/i915/display/intel_bios.c | 25 ++- drivers/gpu/drm/i915/display/intel_bw.c | 34 +++--- drivers/gpu/drm/i915/display/intel_cdclk.c|

[Intel-gfx] [RFC PATCH 13/20] drm/i915/display: Add more macros to remove all direct calls to uncore

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_de.h | 38 + 1 file changed, 38 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_de.h b/drivers/gpu/drm/i915/display/intel_de.h index 3dbd76fdabd6..3394044d281c

[Intel-gfx] [RFC PATCH 19/20] sound/hda: Allow XE as i915 replacement for sound

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Xe, is a new driver for Intel GPUs that supports both integrated and discrete platforms starting with Tiger Lake. Let's ensure sound can accept xe instead of i915 whenever that is in use. Cc: Kai Vehmanen Signed-off-by: Maarten Lankhorst --- sound/hda/hdac_i915.c

[Intel-gfx] [RFC PATCH 10/20] drm/ttm: Don't print error message if eviction was interrupted

2022-12-22 Thread Matthew Brost
From: Thomas Hellström Avoid printing an error message if eviction was interrupted by, for example, the user pressing CTRL-C. That may happen if eviction is waiting for something, like for example a free batch-buffer. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 3 ++- 1

[Intel-gfx] [RFC PATCH 18/20] drm/i915/display: Remaining changes to make xe compile

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Xe, the new Intel GPU driver, will re-use the i915 display. At least for now, the plan is to use symbolic links and adjust the build so we are building the display either for i915 or for xe. The display can be split out if needed. Also the compilation is optional at this

[Intel-gfx] [RFC PATCH 07/20] drm/sched: Submit job before starting TDR

2022-12-22 Thread Matthew Brost
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. Signed-off-by: Matthew Brost --- drivers/gpu/drm/scheduler/sched_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[Intel-gfx] [RFC PATCH 11/20] drm/i915: Remove gem and overlay frontbuffer tracking

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Frontbuffer update handling should be done explicitly by using dirtyfb calls only. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/i9xx_plane.c | 1 + drivers/gpu/drm/i915/display/intel_drrs.c | 1 + drivers/gpu/drm/i915/display/intel_fb.c

[Intel-gfx] [RFC PATCH 05/20] drm/sched: Add generic scheduler message interface

2022-12-22 Thread Matthew Brost
Add generic schedule message interface which sends messages to backend from the drm_gpu_scheduler main submission thread. The idea is some of these messages modify some state in drm_sched_entity which is also modified during submission. By scheduling these messages and submission in the same thread

[Intel-gfx] [RFC PATCH 20/20] mei/hdcp: Also enable for XE

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Xe, is a new driver for Intel GPUs that supports both integrated and discrete platforms starting with Tiger Lake. Let's ensure mei/hdcp can accept xe instead of i915 whenever that is in use. Cc: Tomas Winkler Signed-off-by: Maarten Lankhorst --- drivers/misc/mei/hdcp/K

[Intel-gfx] [RFC PATCH 16/20] drm/i915/regs: Set DISPLAY_MMIO_BASE to 0 for xe

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Only required for some old pre-gen9 platforms, not for Xe. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/display/intel_display_reg_defs.h | 4 2 files changed, 5 insertions(+), 1 deletion(-)

[Intel-gfx] [RFC PATCH 15/20] drm/i915: Rename find_section to find_bdb_section

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst This prevents a namespace collision on other archs. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_bios.c | 46 +++ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/

[Intel-gfx] [RFC PATCH 03/20] drm/radeon: Use the drm suballocation manager implementation.

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Use the generic suballocation helper. Note that the generic suballocator only allows a single alignment, so we may waste a few more bytes for radeon_semaphore, shouldn't be a big deal, could be re-added if needed. Also, similar to amdgpu, debug output changes slightly and

[Intel-gfx] [RFC PATCH 09/20] drm: Add a gpu page-table walker helper

2022-12-22 Thread Matthew Brost
From: Thomas Hellström Add a gpu page table walker similar in functionality to the cpu page-table walker in mm/pagewalk.c. This is made a drm helper in the hope that it might prove useful to other drivers, but we could of course make it single-driver only and rename the functions initially. Also

[Intel-gfx] [RFC PATCH 08/20] drm/sched: Add helper to set TDR timeout

2022-12-22 Thread Matthew Brost
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 encounter errors. Signed-off-by: Matthew Brost --- drivers/gpu/drm/scheduler/sched_main.c | 18 ++ include/

[Intel-gfx] [RFC PATCH 04/20] drm/sched: Convert drm scheduler to use a work queue rather than kthread

2022-12-22 Thread Matthew Brost
In XE, the new Intel GPU driver, a choice has made to have a 1 to 1 mapping between a drm_gpu_scheduler and drm_sched_entity. At first this seems a bit odd but let us explain the reasoning below. 1. In XE the submission order from multiple drm_sched_entity is not guaranteed to be the same completi

[Intel-gfx] [RFC PATCH 02/20] drm/amd: Convert amdgpu to use suballocation helper.

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Now that we have a generic suballocation helper, Use it in amdgpu. The debug output is slightly different and suballocation may be slightly more cpu-hungry. Signed-off-by: Maarten Lankhorst Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström --- drivers/

[Intel-gfx] [RFC PATCH 12/20] drm/i915/display: Neuter frontbuffer tracking harder

2022-12-22 Thread Matthew Brost
From: Maarten Lankhorst Remove intel_frontbuffer type, and use fb->bits. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_cursor.c | 6 +- drivers/gpu/drm/i915/display/intel_display.c | 4 +- .../drm/i915/display/intel_display_types.h| 8 +- drivers/gpu/drm/

[Intel-gfx] [RFC PATCH 06/20] drm/sched: Start run wq before TDR in drm_sched_start

2022-12-22 Thread Matthew Brost
If the TDR is set to a very small value it can fire before the run wq is started in the function drm_sched_start. The run wq is expected to running when the TDR fires, fix this ordering so this expectation is always met. Signed-off-by: Matthew Brost --- drivers/gpu/drm/scheduler/sched_main.c | 4

[Intel-gfx] [RFC PATCH 00/20] Initial Xe driver submission

2022-12-22 Thread Matthew Brost
Hello, This is a submission for Xe, a new driver for Intel GPUs that supports both integrated and discrete platforms starting with Tiger Lake (first platform with Intel Xe Architecture). The intention of this new driver is to have a fresh base to work from that is unencumbered by older platforms,

[Intel-gfx] [RFC PATCH 01/20] drm/suballoc: Introduce a generic suballocation manager

2022-12-22 Thread Matthew Brost
From: Thomas Hellström Initially we tried to leverage the amdgpu suballocation manager. It turnes out, however, that it tries extremely hard not to enable signalling on the fences that hold the memory up for freeing, which makes it hard to understand and to fix potential issues with it. So in a

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dmc: Use unversioned firmware paths

2022-12-22 Thread Gustavo Sousa
On Wed, Dec 21, 2022 at 04:23:45PM -0800, Lucas De Marchi wrote: > On Wed, Dec 21, 2022 at 12:26:26PM +0200, Jani Nikula wrote: > > On Tue, 20 Dec 2022, Gustavo Sousa wrote: > > > As we do not require specific versions anymore, change the convention > > > for blob filenames to stop using version n

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Flush power delayed put when connector init failed

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: Flush power delayed put when connector init failed URL : https://patchwork.freedesktop.org/series/112182/ State : success == Summary == CI Bug Log - changes from CI_DRM_12523 -> Patchwork_112182v1 Summ

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915/display/core: use intel_de_rmw if possible

2022-12-22 Thread Patchwork
== Series Details == Series: series starting with [v2,1/2] drm/i915/display/core: use intel_de_rmw if possible URL : https://patchwork.freedesktop.org/series/112171/ State : success == Summary == CI Bug Log - changes from CI_DRM_12523 -> Patchwork_112171v1

Re: [Intel-gfx] [PATCH] drm/i915: Flush power delayed put when connector init failed

2022-12-22 Thread Imre Deak
On Thu, Dec 22, 2022 at 09:18:04PM +0100, Maarten Lankhorst wrote: > When intel_dp_init_connector fails, some power wells used in dp aux > communication may not be completely disabled yet. This may result in a > null pointer dereference when icl_aux_pw_to_phy() is called from > icl_combo_phy_aux_po

[Intel-gfx] [PATCH] drm/i915: Flush power delayed put when connector init failed

2022-12-22 Thread Maarten Lankhorst
When intel_dp_init_connector fails, some power wells used in dp aux communication may not be completely disabled yet. This may result in a null pointer dereference when icl_aux_pw_to_phy() is called from icl_combo_phy_aux_power_well_disable() after the encoder and connector are already freed. Sign

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: vblank stuff

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: vblank stuff URL : https://patchwork.freedesktop.org/series/112170/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12523 -> Patchwork_112170v1 Summary --- **FAILURE** Serious

[Intel-gfx] ✓ Fi.CI.IGT: success for drm: Only select I2C_ALGOBIT for drivers that actually need it (rev2)

2022-12-22 Thread Patchwork
== Series Details == Series: drm: Only select I2C_ALGOBIT for drivers that actually need it (rev2) URL : https://patchwork.freedesktop.org/series/90163/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_90163v2_full =

[Intel-gfx] ✓ Fi.CI.BAT: success for Introduce __xchg, non-atomic xchg

2022-12-22 Thread Patchwork
== Series Details == Series: Introduce __xchg, non-atomic xchg URL : https://patchwork.freedesktop.org/series/112169/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522 -> Patchwork_112169v1 Summary --- **SUCCESS**

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Introduce __xchg, non-atomic xchg

2022-12-22 Thread Patchwork
== Series Details == Series: Introduce __xchg, non-atomic xchg URL : https://patchwork.freedesktop.org/series/112169/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fix same object multiple mmap memory leak

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: Fix same object multiple mmap memory leak URL : https://patchwork.freedesktop.org/series/112166/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522 -> Patchwork_112166v1 Summary -

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry (rev8)

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry (rev8) URL : https://patchwork.freedesktop.org/series/108732/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_108732v8_full =

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix same object multiple mmap memory leak

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: Fix same object multiple mmap memory leak URL : https://patchwork.freedesktop.org/series/112166/ State : warning == Summary == Error: dim checkpatch failed ac57a13bb1d3 drm/i915: Fix same object multiple mmap memory leak -:10: ERROR:GIT_COMMIT_ID: Please

[Intel-gfx] [PULL] drm-misc-fixes

2022-12-22 Thread Maxime Ripard
Hi, here's this week drm-misc-fixes PR Maxime drm-misc-fixes-2022-12-22: One fix for a use-after-free in panfrost, one to fix the error handling in dma_buf_export and one to fix a compile error with drm_plane_helper_atomic_check missing a definition for drm_atomic_state The following changes sin

[Intel-gfx] ✓ Fi.CI.BAT: success for Remove platform acronyms and stepping from comments

2022-12-22 Thread Patchwork
== Series Details == Series: Remove platform acronyms and stepping from comments URL : https://patchwork.freedesktop.org/series/112161/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522 -> Patchwork_112161v1 Summary -

[Intel-gfx] ✓ Fi.CI.IGT: success for i915/gvt: Replace one-element array with flexible-array member

2022-12-22 Thread Patchwork
== Series Details == Series: i915/gvt: Replace one-element array with flexible-array member URL : https://patchwork.freedesktop.org/series/112150/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_112150v1_full ==

Re: [Intel-gfx] [PATCH 00/19] Introduce __xchg, non-atomic xchg

2022-12-22 Thread Andrew Morton
On Thu, 22 Dec 2022 12:46:16 +0100 Andrzej Hajda wrote: > Hi all, > > I hope there will be place for such tiny helper in kernel. > Quick cocci analyze shows there is probably few thousands places > where it could be useful. So to clarify, the intent here is a simple readability cleanup for exi

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Remove platform acronyms and stepping from comments

2022-12-22 Thread Patchwork
== Series Details == Series: Remove platform acronyms and stepping from comments URL : https://patchwork.freedesktop.org/series/112161/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. +./arch/x86/include/asm

[Intel-gfx] ✓ Fi.CI.BAT: success for Enable HDCP2.x via GSC CS (rev4)

2022-12-22 Thread Patchwork
== Series Details == Series: Enable HDCP2.x via GSC CS (rev4) URL : https://patchwork.freedesktop.org/series/111876/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522 -> Patchwork_111876v4 Summary --- **SUCCESS**

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dsb: Remove check for dsb in dsb_commit

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/dsb: Remove check for dsb in dsb_commit URL : https://patchwork.freedesktop.org/series/112159/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12522 -> Patchwork_112159v1 Summary ---

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hdmi: Go for scrambling only if platform supports TMDS clock > 340MHz (rev3)

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/hdmi: Go for scrambling only if platform supports TMDS clock > 340MHz (rev3) URL : https://patchwork.freedesktop.org/series/111877/ State : success == Summary == CI Bug Log - changes from CI_DRM_12522 -> Patchwork_111877v3

[Intel-gfx] ✓ Fi.CI.IGT: success for Fixes for various UC related issues (rev2)

2022-12-22 Thread Patchwork
== Series Details == Series: Fixes for various UC related issues (rev2) URL : https://patchwork.freedesktop.org/series/112080/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_112080v2_full Summary

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable HDCP2.x via GSC CS (rev4)

2022-12-22 Thread Patchwork
== Series Details == Series: Enable HDCP2.x via GSC CS (rev4) URL : https://patchwork.freedesktop.org/series/111876/ State : warning == Summary == Error: dim checkpatch failed 50e4dfd0597f drm/i915/gsc: Create GSC request submission mechanism Traceback (most recent call last): File "scripts/

Re: [Intel-gfx] [PATCH 1/4] drm/i915/gt: Remove platform comments from workarounds

2022-12-22 Thread Lucas De Marchi
On Thu, Dec 22, 2022 at 10:27:00AM +, Tvrtko Ursulin wrote: On 22/12/2022 08:25, Lucas De Marchi wrote: The comments are redundant to the checks being done to apply the workarounds and very often get outdated as workarounds need to be extended to new platforms or steppings. Remove them alt

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v3,1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version (rev2)

2022-12-22 Thread Patchwork
== Series Details == Series: series starting with [v3,1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version (rev2) URL : https://patchwork.freedesktop.org/series/112121/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_112121v2_full =

Re: [Intel-gfx] LOOKS GOOD: Possible regression in drm/i915 driver: memleak

2022-12-22 Thread Mirsad Goran Todorovac
On 12/22/2022 09:04, Tvrtko Ursulin wrote: On 22/12/2022 00:12, Mirsad Goran Todorovac wrote: On 20. 12. 2022. 20:34, Mirsad Todorovac wrote: As I hear no reply from Tvrtko, and there is already 1d5h uptime with no leaks (but the kworker with memstick_check nag I couldn't bisect on the only

Re: [Intel-gfx] [PATCH 00/19] Introduce __xchg, non-atomic xchg

2022-12-22 Thread Andrzej Hajda
On 22.12.2022 15:12, Geert Uytterhoeven wrote: Hi Andrzej, Thanks for your series! On Thu, Dec 22, 2022 at 12:49 PM Andrzej Hajda wrote: I hope there will be place for such tiny helper in kernel. Quick cocci analyze shows there is probably few thousands places where it could be useful. I a

Re: [Intel-gfx] [PATCH 00/19] Introduce __xchg, non-atomic xchg

2022-12-22 Thread Geert Uytterhoeven
Hi Andrzej, Thanks for your series! On Thu, Dec 22, 2022 at 12:49 PM Andrzej Hajda wrote: > I hope there will be place for such tiny helper in kernel. > Quick cocci analyze shows there is probably few thousands places > where it could be useful. > I am not sure who is good person to review/ack s

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/display/vlv: fix pixel overlap register update (rev3)

2022-12-22 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915/display/vlv: fix pixel overlap register update (rev3) URL : https://patchwork.freedesktop.org/series/112045/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_112045v3_full ==

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/pxp: Add missing cleanup steps for PXP global-teardown

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/pxp: Add missing cleanup steps for PXP global-teardown URL : https://patchwork.freedesktop.org/series/112154/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12521 -> Patchwork_112154v1 S

Re: [Intel-gfx] [PATCH] drm/i915/gt: Reset twice

2022-12-22 Thread Andi Shyti
Hi GG, > > > > > > >  drivers/gpu/drm/i915/gt/intel_reset.c | 34 > > > > > > > ++- > > > > > > >  1 file changed, 28 insertions(+), 6 deletions(-) > > > > > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c > > > > > > > b/drivers/gpu/drm/i915/gt/intel

[Intel-gfx] [PATCH v2 2/2] drm/i915/display/misc: use intel_de_rmw if possible

2022-12-22 Thread Andrzej Hajda
The helper makes the code more compact and readable. Signed-off-by: Andrzej Hajda --- v2: fixed indentation --- drivers/gpu/drm/i915/display/g4x_dp.c | 12 ++-- drivers/gpu/drm/i915/display/g4x_hdmi.c | 8 +-- .../gpu/drm/i915/display/intel_backlight.c| 59 +++

[Intel-gfx] [PATCH v2 1/2] drm/i915/display/core: use intel_de_rmw if possible

2022-12-22 Thread Andrzej Hajda
The helper makes the code more compact and readable. Signed-off-by: Andrzej Hajda --- v2: fixed indentation --- drivers/gpu/drm/i915/display/intel_display.c | 22 +-- .../drm/i915/display/intel_display_power.c| 49 ++ .../i915/display/intel_display_power_well.c | 82 +++-- driv

[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Only select I2C_ALGOBIT for drivers that actually need it (rev2)

2022-12-22 Thread Patchwork
== Series Details == Series: drm: Only select I2C_ALGOBIT for drivers that actually need it (rev2) URL : https://patchwork.freedesktop.org/series/90163/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521 -> Patchwork_90163v2 ===

[Intel-gfx] ✓ Fi.CI.IGT: success for drm, fbdev: Remove apertures structure and FBINFO_MISC_FIRMWARE (rev2)

2022-12-22 Thread Patchwork
== Series Details == Series: drm, fbdev: Remove apertures structure and FBINFO_MISC_FIRMWARE (rev2) URL : https://patchwork.freedesktop.org/series/112069/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_112069v2_full ==

Re: [Intel-gfx] [PATCH 2/3] drm/i915/guc: Fix a static analysis warning

2022-12-22 Thread Ceraolo Spurio, Daniele
Reviewed-by: Daniele Ceraolo Spurio Daniele On 12/21/2022 8:30 PM, john.c.harri...@intel.com wrote: From: John Harrison A static analyser was complaining about not checking for null pointers. However, the location of the complaint can only be reached in the first place if said pointer is non

Re: [Intel-gfx] [PATCH 1/3] drm/i915/guc: Fix missing return code checks in submission init

2022-12-22 Thread Ceraolo Spurio, Daniele
On 12/21/2022 8:30 PM, john.c.harri...@intel.com wrote: From: John Harrison The CI results for the 'fast request' patch set (enables error return codes for fire-and-forget H2G messages) hit an issue with the KMD sending context submission requests on an invalid context. That was caused by a

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry (rev8)

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry (rev8) URL : https://patchwork.freedesktop.org/series/108732/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521 -> Patchwork_108732v8 S

Re: [Intel-gfx] [PATCH 18/19] linux/include: add non-atomic version of xchg

2022-12-22 Thread Andy Shevchenko
On Thu, Dec 22, 2022 at 12:46:34PM +0100, Andrzej Hajda wrote: > The pattern of setting variable with new value and returning old > one is very common in kernel. Usually atomicity of the operation > is not required, so xchg seems to be suboptimal and confusing in > such cases. FWIW, Reviewed-by: A

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Enable XE_HP 4Tile support

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915: Enable XE_HP 4Tile support URL : https://patchwork.freedesktop.org/series/112143/ State : success == Summary == CI Bug Log - changes from CI_DRM_12521_full -> Patchwork_112143v1_full Summary ---

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry (rev8)

2022-12-22 Thread Patchwork
== Series Details == Series: drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry (rev8) URL : https://patchwork.freedesktop.org/series/108732/ State : warning == Summary == Error: dim checkpatch failed c4caf92615d0 drm/i915/gvt: fix double free bug in split_2MB_gtt_entry -:73: CHECK:OPEN_

  1   2   >