[Intel-gfx] [PATCH v3] overflow: Introduce overflows_type() and castable_to_type()

2022-10-12 Thread Gwan-gyeong Mun
From: Kees Cook Implement a robust overflows_type() macro to test if a variable or constant value would overflow another variable or type. This can be used as a constant expression for static_assert() (which requires a constant expression[1][2]) when used on constant values. This must be construc

Re: [Intel-gfx] [PATCH] drm/i915: Allow panel fixed modes to have differing sync polarities

2022-10-12 Thread Jani Nikula
On Fri, 07 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Apparently some panels declare multiple modes with random > sync polarities. Seems a bit weird, but looks like Windows/GOP > doesn't care, so let follow suit and accept alternate fixed > modes regardless of their sync polarities.

[Intel-gfx] [PATCH v3 4/4] drm/i915: Fill in native_420 field

2022-10-12 Thread Suraj Kandpal
From: "Suraj Kandpal" Now that we have laid the groundwork for YUV420 Enablement we fill up native_420 field in vdsc_cfg and add appropriate checks wherever required. ---v2 -adding native_422 field as 0 [Vandita] -filling in second_line_bpg_offset, second_line_offset_adj and nsl_bpg_offset in vd

[Intel-gfx] [PATCH v3 1/4] drm/i915/dp: Check if DSC supports the given output_format

2022-10-12 Thread Suraj Kandpal
From: Ankit Nautiyal Go with DSC only if the given output_format is supported. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i91

[Intel-gfx] [PATCH v3 2/4] drm/i915: Adding the new registers for DSC

2022-10-12 Thread Suraj Kandpal
From: "Suraj Kandpal" Adding new DSC register which are introducted MTL onwards Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/i915_reg.h | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h i

[Intel-gfx] [PATCH v3 3/4] drm/i915: Enable YCbCr420 for VDSC

2022-10-12 Thread Suraj Kandpal
Implementation of VDSC for YCbCr420. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_qp_tables.c| 187 -- .../gpu/drm/i915/display/intel_qp_tables.h| 4 +- drivers/gpu/drm/i915/display/intel_vdsc.c | 4 +- 3 files changed, 180 insertions(+), 15 del

[Intel-gfx] [PATCH v3 0/4] Enable YCbCr420 for VDSC

2022-10-12 Thread Suraj Kandpal
This patch series aims to enable the YCbCr420 format for DSC. Changes are mostly compute params related for hdmi,dp and dsi along with the addition of new rc_tables for native_420 and corresponding changes to macros used to fetch them. ---v2 -adding fields missed for vdsc_cfg [Vandita] -adding cor

[Intel-gfx] [PATCH v2 4/4] drm/i915: Fill in native_420 field

2022-10-12 Thread Suraj Kandpal
From: "Suraj Kandpal" Now that we have laid the groundwork for YUV420 Enablement we fill up native_420 field in vdsc_cfg and add appropriate checks wherever required. ---v2 -adding native_422 field as 0 [Vandita] -filling in second_line_bpg_offset, second_line_offset_adj and nsl_bpg_offset in vd

[Intel-gfx] [PATCH v2 3/4] drm/i915: Enable YCbCr420 for VDSC

2022-10-12 Thread Suraj Kandpal
Implementation of VDSC for YCbCr420. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_qp_tables.c| 187 -- .../gpu/drm/i915/display/intel_qp_tables.h| 4 +- drivers/gpu/drm/i915/display/intel_vdsc.c | 4 +- 3 files changed, 180 insertions(+), 15 del

[Intel-gfx] [PATCH v2 2/4] drm/i915: Adding the new registers for DSC

2022-10-12 Thread Suraj Kandpal
From: "Suraj Kandpal" Adding new DSC register which are introducted MTL onwards Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/i915_reg.h | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h i

[Intel-gfx] [PATCH v2 1/4] drm/i915/dp: Check if DSC supports the given output_format

2022-10-12 Thread Suraj Kandpal
From: Ankit Nautiyal Go with DSC only if the given output_format is supported. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i91

[Intel-gfx] [PATCH v2 0/4] Enable YCbCr420 for VDSC

2022-10-12 Thread Suraj Kandpal
From: "Kandpal, Suraj" This patch series aims to enable the YCbCr420 format for DSC. Changes are mostly compute params related for hdmi,dp and dsi along with the addition of new rc_tables for native_420 and corresponding changes to macros used to fetch them. ---v2 -adding fields missed for vdsc_

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: prepare for uC loading on MTL (rev2)

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915: prepare for uC loading on MTL (rev2) URL : https://patchwork.freedesktop.org/series/108925/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12239_full -> Patchwork_108925v2_full Summary

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hdmi: Prune Interlaced modes for Display >= 12

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915/hdmi: Prune Interlaced modes for Display >= 12 URL : https://patchwork.freedesktop.org/series/109646/ State : success == Summary == CI Bug Log - changes from CI_DRM_12239 -> Patchwork_109646v1 Summary -

Re: [Intel-gfx] [PATCH] drm/i915/hdmi: Prune Interlaced modes for Display >= 12

2022-10-12 Thread Navare, Manasi
On Thu, Oct 13, 2022 at 10:41:24AM +0530, Ankit Nautiyal wrote: > Defeature Display Interlace support. > Support for Interlace modes is removed from Gen 12 onwards. > For DP we do not support interlace modes (except for very old > platforms). Pruning the interlaced modes for HDMI for Display >=12.

[Intel-gfx] [PATCH] drm/i915/hdmi: Prune Interlaced modes for Display >= 12

2022-10-12 Thread Ankit Nautiyal
Defeature Display Interlace support. Support for Interlace modes is removed from Gen 12 onwards. For DP we do not support interlace modes (except for very old platforms). Pruning the interlaced modes for HDMI for Display >=12. Bspec: 50490 Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/d

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/slpc: Use platform limits for min/max frequency

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915/slpc: Use platform limits for min/max frequency URL : https://patchwork.freedesktop.org/series/109632/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12238_full -> Patchwork_109632v1_full

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: prepare for uC loading on MTL (rev2)

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915: prepare for uC loading on MTL (rev2) URL : https://patchwork.freedesktop.org/series/108925/ State : success == Summary == CI Bug Log - changes from CI_DRM_12239 -> Patchwork_108925v2 Summary ---

[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: prepare for uC loading on MTL (rev2)

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915: prepare for uC loading on MTL (rev2) URL : https://patchwork.freedesktop.org/series/108925/ State : warning == Summary == Error: make htmldocs had i915 warnings Error: Cannot open file ./drivers/gpu/drm/i915/intel_wopcm.c WARNING: kernel-doc './scripts/ke

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: prepare for uC loading on MTL (rev2)

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915: prepare for uC loading on MTL (rev2) URL : https://patchwork.freedesktop.org/series/108925/ State : warning == Summary == Error: dim checkpatch failed 927847787d62 drm/i915/huc: only load HuC on GTs that have VCS engines b2f08a65b6df drm/i915/uc: fetch uc

[Intel-gfx] [PATCH v2 2/7] drm/i915/uc: fetch uc firmwares for each GT

2022-10-12 Thread Daniele Ceraolo Spurio
The FW binaries are independently loaded on each GT. On MTL, the memory is shared so we could potentially re-use a single allocation, but on discrete multi-gt platforms we are going to need independent copies, so it is easier to do the same on MTL as well, given that the amount of duplicated memory

[Intel-gfx] [PATCH v2 6/7] drm/i915/guc: define media GT GuC send regs

2022-10-12 Thread Daniele Ceraolo Spurio
The media GT shares the G-unit with the root GT, so a second set of communication registers is required for the media GuC. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 14 ++ dri

[Intel-gfx] [PATCH v2 7/7] drm/i915/guc: handle interrupts from media GuC

2022-10-12 Thread Daniele Ceraolo Spurio
The render and media GuCs share the same interrupt enable register, so we can no longer disable interrupts when we disable communication for one of the GuCs as this would impact the other GuC. Instead, we keep the interrupts always enabled in HW and use a variable in the GuC structure to determine

[Intel-gfx] [PATCH v2 3/7] drm/i915/uc: use different ggtt pin offsets for uc loads

2022-10-12 Thread Daniele Ceraolo Spurio
Our current FW loading process is the same for all FWs: - Pin FW to GGTT at the start of the ggtt->uc_fw node - Load the FW - Unpin This worked because we didn't have a case where 2 FWs would be loaded on the same GGTT at the same time. On MTL, however, this can happend if both GTs are reset at t

[Intel-gfx] [PATCH v2 5/7] drm/i915/mtl: Handle wopcm per-GT and limit calculations.

2022-10-12 Thread Daniele Ceraolo Spurio
From: Aravind Iddamsetty With MTL standalone media architecture the wopcm layout has changed with separate partitioning in WOPCM for GCD/GT GuC and SA Media GuC. The size of WOPCM is 4MB with lower 2MB for SA Media and upper 2MB for GCD/GT. +=+===> ++ <== WOPCM TOP

[Intel-gfx] [PATCH v2 4/7] drm/i915/guc: Add GuC deprivilege feature to MTL

2022-10-12 Thread Daniele Ceraolo Spurio
From: Stuart Summers MTL supports GuC deprivilege. Add the feature flag to this platform. Signed-off-by: Stuart Summers Cc: Radhakrishna Sripada Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --gi

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

2022-10-12 Thread Daniele Ceraolo Spurio
On MTL the primary GT doesn't have any media capabilities, so no video engines and no HuC. We must therefore skip the HuC fetch and load on that specific case. Given that other multi-GT platforms might have HuC on the primary GT, we can't just check for that and it is easier to instead check for th

[Intel-gfx] [PATCH v2 0/7] drm/i915: prepare for uC loading on MTL

2022-10-12 Thread Daniele Ceraolo Spurio
The introduction of the media GT brings a few changes for GuC/HuC. The main difference between the 2 GTs is that only the media one has the HuC, while both have the GuC. Also, the fact that both GTs use the same G-unit and GGTT means we now have parallel interrupt/communication paths. Lastly, WOPCM

[Intel-gfx] ✓ Fi.CI.IGT: success for Improve anti-pre-emption w/a for compute workloads (rev9)

2022-10-12 Thread Patchwork
== Series Details == Series: Improve anti-pre-emption w/a for compute workloads (rev9) URL : https://patchwork.freedesktop.org/series/100428/ State : success == Summary == CI Bug Log - changes from CI_DRM_12238_full -> Patchwork_100428v9_full ===

Re: [Intel-gfx] [PATCH v4 04/16] drm/i915/perf: Determine gen12 oa ctx offset at runtime

2022-10-12 Thread Dixit, Ashutosh
On Wed, 12 Oct 2022 15:27:27 -0700, Umesh Nerlige Ramappa wrote: > > +static u32 oa_context_image_offset(struct intel_context *ce, u32 reg) > +{ > + u32 offset, len = (ce->engine->context_size - PAGE_SIZE) / 4; > + u32 *state = ce->lrc_reg_state; > + > + for (offset = 0; offset < len; )

[Intel-gfx] ✗ Fi.CI.BAT: failure for Add DG2 OA support (rev6)

2022-10-12 Thread Patchwork
== Series Details == Series: Add DG2 OA support (rev6) URL : https://patchwork.freedesktop.org/series/107584/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12238 -> Patchwork_107584v6 Summary --- **FAILURE** Serio

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Add DG2 OA support (rev6)

2022-10-12 Thread Patchwork
== Series Details == Series: Add DG2 OA support (rev6) URL : https://patchwork.freedesktop.org/series/107584/ 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.CHECKPATCH: warning for Add DG2 OA support (rev6)

2022-10-12 Thread Patchwork
== Series Details == Series: Add DG2 OA support (rev6) URL : https://patchwork.freedesktop.org/series/107584/ State : warning == Summary == Error: dim checkpatch failed 417244c8ec48 drm/i915/perf: Fix OA filtering logic for GuC mode 09d47558b4c6 drm/i915/perf: Add 32-bit OAG and OAR formats fo

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: add wait and lock to i915_vma_move_to_active

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915: add wait and lock to i915_vma_move_to_active URL : https://patchwork.freedesktop.org/series/109620/ State : success == Summary == CI Bug Log - changes from CI_DRM_12238_full -> Patchwork_109620v1_full

[Intel-gfx] [PATCH v4 05/16] drm/i915/perf: Enable bytes per clock reporting in OA

2022-10-12 Thread Umesh Nerlige Ramappa
XEHPSDV and DG2 provide a way to configure bytes per clock vs commands per clock reporting. Enable bytes per clock setting on enabling OA. Bspec: 51762 Bspec: 52201 v2: - Fix commit msg (Ashutosh) - Fix checkpatch issues v3: - s/commands/bytes/ in code comment and commmit msg Signed-off-by: Ume

[Intel-gfx] [PATCH v4 06/16] drm/i915/perf: Simply use stream->ctx

2022-10-12 Thread Umesh Nerlige Ramappa
Earlier code used exclusive_stream to check for user passed context. Simplify this by accessing stream->ctx. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/g

[Intel-gfx] [PATCH v4 02/16] drm/i915/perf: Add 32-bit OAG and OAR formats for DG2

2022-10-12 Thread Umesh Nerlige Ramappa
Add new OA formats for DG2. MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18893 v2: - Update commit title (Ashutosh) - Coding style fixes (Lionel) - 64 bit OA formats need UMD changes in GPUvis, drop for now and send in a separate series with UMD changes v3: - Update commit mes

[Intel-gfx] [PATCH v4 13/16] drm/i915/perf: Save/restore EU flex counters across reset

2022-10-12 Thread Umesh Nerlige Ramappa
If a drm client is killed, then hw contexts used by the client are reset immediately. This reset clears the EU flex counter configuration. If an OA use case is running in parallel, it would start seeing zeroed eu counter values following the reset even if the drm client is restarted. Save/restore t

[Intel-gfx] [PATCH v4 10/16] drm/i915/perf: Store a pointer to oa_format in oa_buffer

2022-10-12 Thread Umesh Nerlige Ramappa
DG2 introduces OA reports with 64 bit report header fields. Perf OA would need more information about the OA format in order to process such reports. Store all OA format info in oa_buffer instead of just the size and format-id. v2: Drop format_size variable (Ashutosh) Signed-off-by: Umesh Nerlige

[Intel-gfx] [PATCH v4 12/16] drm/i915/perf: Apply Wa_18013179988

2022-10-12 Thread Umesh Nerlige Ramappa
OA reports in the OA buffer contain an OA timestamp field that helps user calculate delta between 2 OA reports. The calculation relies on the CS timestamp frequency to convert the timestamp value to nanoseconds. The CS timestamp frequency is a function of the CTC_SHIFT value in RPM_CONFIG0. In DG2

[Intel-gfx] [PATCH v4 15/16] drm/i915/perf: complete programming whitelisting for XEHPSDV

2022-10-12 Thread Umesh Nerlige Ramappa
From: Lionel Landwerlin We have an additional register to select which slices contribute to OAG/OAG counter increments. Signed-off-by: Lionel Landwerlin Signed-off-by: Matt Roper Reviewed-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c

[Intel-gfx] [PATCH v4 11/16] drm/i915/perf: Add Wa_1508761755:dg2

2022-10-12 Thread Umesh Nerlige Ramappa
Disable Clock gating in EU when gathering the events so that EU events are not lost. v2: Fix checkpatch issues Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/i915_perf.c| 23 +

[Intel-gfx] [PATCH v4 04/16] drm/i915/perf: Determine gen12 oa ctx offset at runtime

2022-10-12 Thread Umesh Nerlige Ramappa
Some SKUs of same gen12 platform may have different oactxctrl offsets. For gen12, determine oactxctrl offsets at runtime. v2: (Lionel) - Move MI definitions to intel_gpu_commands.h - Ensure __find_reg_in_lri does read past context image size v3: (Ashutosh) - Drop unnecessary use of double undersc

[Intel-gfx] [PATCH v4 01/16] drm/i915/perf: Fix OA filtering logic for GuC mode

2022-10-12 Thread Umesh Nerlige Ramappa
With GuC mode of submission, GuC is in control of defining the context id field that is part of the OA reports. To filter reports, UMD and KMD must know what sw context id was chosen by GuC. There is not interface between KMD and GuC to determine this, so read the upper-dword of EXECLIST_STATUS to

[Intel-gfx] [PATCH v4 08/16] drm/i915/perf: Replace gt->perf.lock with stream->lock for file ops

2022-10-12 Thread Umesh Nerlige Ramappa
With multi-gt, user can access multiple OA buffers concurrently. Use stream->lock instead of gt->perf.lock to serialize file operations. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_perf.c | 31 -- drivers/gpu/drm/i

[Intel-gfx] [PATCH v4 16/16] drm/i915/perf: Enable OA for DG2

2022-10-12 Thread Umesh Nerlige Ramappa
OA was disabled for DG2 as support was missing. Enable it back now. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_perf.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c

[Intel-gfx] [PATCH v4 07/16] drm/i915/perf: Move gt-specific data from i915->perf to gt->perf

2022-10-12 Thread Umesh Nerlige Ramappa
Make perf part of gt as the OAG buffer is specific to a gt. The refactor eventually simplifies programming the right OA buffer and the right HW registers when supporting multiple gts. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Reviewed-by: Ashutosh Dixit --- drivers/gp

[Intel-gfx] [PATCH v4 09/16] drm/i915/perf: Use gt-specific ggtt for OA and noa-wait buffers

2022-10-12 Thread Umesh Nerlige Ramappa
User passes uabi engine class and instance to the perf OA interface. Use gt corresponding to the engine to pin the buffers to the right ggtt. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 21 +++-- 1 file changed, 19 i

[Intel-gfx] [PATCH v4 14/16] drm/i915/guc: Support OA when Wa_16011777198 is enabled

2022-10-12 Thread Umesh Nerlige Ramappa
From: Vinay Belgaumkar On DG2, a w/a resets RCS/CCS before it goes into RC6. This breaks OA since OA does not expect engine resets during its use. Fix it by disabling RC6. v2: (Ashutosh) - Bring back slpc_unset_param helper - Update commit msg - Use with_intel_runtime_pm helper for set/unset v3

[Intel-gfx] [PATCH v4 03/16] drm/i915/perf: Fix noa wait predication for DG2

2022-10-12 Thread Umesh Nerlige Ramappa
Predication for batch buffer commands changed in XEHPSDV. MI_BATCH_BUFFER_START predicates based on MI_SET_PREDICATE_RESULT register. The MI_SET_PREDICATE_RESULT register can only be modified with MI_SET_PREDICATE command. When configured, the MI_SET_PREDICATE command sets MI_SET_PREDICATE_RESULT b

[Intel-gfx] [PATCH v4 00/16] Add DG2 OA support

2022-10-12 Thread Umesh Nerlige Ramappa
Add OA format support for DG2 and various fixes for DG2. This series has 2 uapi changes listed below: 1) drm/i915/perf: Add OAG and OAR formats for DG2 DG2 has new OA formats defined that can be selected by the user. The UMD changes that are consumed by GPUvis are: https://patchwork.freedesktop.

[Intel-gfx] [CI] PR for HuC 7.10.3

2022-10-12 Thread Daniele Ceraolo Spurio
The following changes since commit fdf1a65258522edf18a0a1768fbafa61ed07e598: linux-firmware: Update AMD cpu microcode (2022-09-30 17:33:35 -0400) are available in the Git repository at: git://anongit.freedesktop.org/drm/drm-firmware dg2_huc_7.10.3 for you to fetch changes up to 1655a5116858

Re: [Intel-gfx] [PATCH] drm/i915: add wait and lock to i915_vma_move_to_active

2022-10-12 Thread Andrzej Hajda
On 12.10.2022 16:38, Matthew Auld wrote: On 12/10/2022 13:43, Andrzej Hajda wrote: Since almost all calls to i915_vma_move_to_active are prepended with i915_request_await_object and many of them are surrounded with i915_vma_lock, let's put both into i915_vma_move_to_active and add i915_vma_mo

Re: [Intel-gfx] [PATCH 0/3] Add _PICK_EVEN_RANGES

2022-10-12 Thread Lucas De Marchi
On Wed, Oct 12, 2022 at 11:51:48AM +0300, Jani Nikula wrote: On Tue, 11 Oct 2022, Lucas De Marchi wrote: Add a new macro, _PICK_EVEN_RANGES, that supports using 2 address ranges. This should cover most of our needs for _MMIO_PLL3 and such. To show what is achieved with the new macro, convert so

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/slpc: Use platform limits for min/max frequency

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915/slpc: Use platform limits for min/max frequency URL : https://patchwork.freedesktop.org/series/109632/ State : success == Summary == CI Bug Log - changes from CI_DRM_12238 -> Patchwork_109632v1 Summary

[Intel-gfx] [PATCH] drm/i915/slpc: Use platform limits for min/max frequency

2022-10-12 Thread Vinay Belgaumkar
GuC will set the min/max frequencies to theoretical max on ATS-M. This will break kernel ABI, so limit min/max frequency to RP0(platform max) instead. Also modify the SLPC selftest to update the min frequency when we have a server part so that we can iterate between platform min and max. Signed-o

[Intel-gfx] ✗ Fi.CI.IGT: failure for Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes (rev4)

2022-10-12 Thread Patchwork
== Series Details == Series: Handle BPC for HDMI2.1 PCON without DSC1.2 sink and other fixes (rev4) URL : https://patchwork.freedesktop.org/series/107550/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12237_full -> Patchwork_107550v4_full ==

Re: [Intel-gfx] [PATCH v2 09/14] drm/i915/gt: Always use MCR functions on multicast registers

2022-10-12 Thread Balasubramani Vivekanandan
On 30.09.2022 17:45, Matt Roper wrote: > Rather than relying on the implicit behavior of intel_uncore_*() > functions, let's always use the intel_gt_mcr_*() functions to operate on > multicast/replicated registers. > > v2: > - Add TLB invalidation registers > > Signed-off-by: Matt Roper > --- >

Re: [Intel-gfx] [PATCH v3 04/16] drm/i915/perf: Determine gen12 oa ctx offset at runtime

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Umesh Nerlige Ramappa wrote: > On Tue, Oct 11, 2022 at 08:47:00PM +0300, Jani Nikula wrote: >>On Mon, 10 Oct 2022, Umesh Nerlige Ramappa >>wrote: >>> Some SKUs of same gen12 platform may have different oactxctrl >>> offsets. For gen12, determine oactxctrl offsets at runtime

Re: [Intel-gfx] [PATCH 10/22] drm/i915/audio: Make sure we write the whole ELD buffer

2022-10-12 Thread Jani Nikula
On Wed, 12 Oct 2022, Ville Syrjälä wrote: > On Wed, Oct 12, 2022 at 05:28:27PM +0300, Jani Nikula wrote: >> On Tue, 11 Oct 2022, Ville Syrjala wrote: >> > From: Ville Syrjälä >> > >> > Currently we only write as many dwords into the hardware >> > ELD buffers as drm_eld_size() tells us. That coul

[Intel-gfx] ✓ Fi.CI.BAT: success for Improve anti-pre-emption w/a for compute workloads (rev9)

2022-10-12 Thread Patchwork
== Series Details == Series: Improve anti-pre-emption w/a for compute workloads (rev9) URL : https://patchwork.freedesktop.org/series/100428/ State : success == Summary == CI Bug Log - changes from CI_DRM_12238 -> Patchwork_100428v9 Summary

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Improve anti-pre-emption w/a for compute workloads (rev9)

2022-10-12 Thread Patchwork
== Series Details == Series: Improve anti-pre-emption w/a for compute workloads (rev9) URL : https://patchwork.freedesktop.org/series/100428/ 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.CHECKPATCH: warning for Improve anti-pre-emption w/a for compute workloads (rev9)

2022-10-12 Thread Patchwork
== Series Details == Series: Improve anti-pre-emption w/a for compute workloads (rev9) URL : https://patchwork.freedesktop.org/series/100428/ State : warning == Summary == Error: dim checkpatch failed 9800096289da drm/i915/guc: Limit scheduling properties to avoid overflow -:45: CHECK:MACRO_AR

Re: [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on'

2022-10-12 Thread Dixit, Ashutosh
On Wed, 12 Oct 2022 02:48:30 -0700, Matthew Auld wrote: > > So with this change all the runtime pm stuff is disabled on dgfx? i.e > intel_runtime_pm_get() always returns zero or so? I guess it should always return non-zero (or the wakeref) since the device is always on...

Re: [Intel-gfx] [PATCH 21/22] drm/i915/audio: Include ELD in the state dump

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Include the ELD has a hex blob in the crtc state dump. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > .../drm/i915/display/intel_crtc_st

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: add wait and lock to i915_vma_move_to_active

2022-10-12 Thread Patchwork
== Series Details == Series: drm/i915: add wait and lock to i915_vma_move_to_active URL : https://patchwork.freedesktop.org/series/109620/ State : success == Summary == CI Bug Log - changes from CI_DRM_12238 -> Patchwork_109620v1 Summary --

Re: [Intel-gfx] [PATCH 20/22] drm/i915/audio: Hook up ELD into the state checker

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Have the state checker validate the ELD. For now we'll > just dump it out as a hex buffer on a mismatch, maybe > someone will get inspired to decode it properly at some > point... > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen

Re: [Intel-gfx] [PATCH v3 12/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-10-12 Thread Niranjana Vishwanathapura
On Wed, Oct 12, 2022 at 11:32:18AM +0100, Matthew Auld wrote: On 10/10/2022 07:58, Niranjana Vishwanathapura wrote: 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 hav

Re: [Intel-gfx] [PATCH 19/22] drm/i915/sdvo: Do ELD hardware readout

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Read out the ELD from the hw so the state checker can verify it. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/dis

Re: [Intel-gfx] [PATCH 16/22] drm/i915/audio: Hardware ELD readout

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Read out the ELD from the hardware buffer so that we can > hook up the state checker to validate it. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula

Re: [Intel-gfx] [PATCH 18/22] drm/i915/sdvo: Precompute the ELD

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Use the precomputed crtc_state->eld for audio setup on SDVO > just like we do with native HDMI. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula >

Re: [Intel-gfx] [PATCH 17/22] drm/i915/sdvo: Extract intel_sdvo_has_audio()

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Pull the SDVO audio state computaiton into a helper. *computation Reviewed-by: Jani Nikula > > This is almost identical to intel_hdmi_has_audio(), > except the sink capabilities are stored under intel_sdvo > rather than intel

Re: [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on'

2022-10-12 Thread Matthew Auld
On 12/10/2022 15:57, Rodrigo Vivi wrote: On Wed, Oct 12, 2022 at 10:48:30AM +0100, Matthew Auld wrote: On 12/10/2022 09:34, Anshuman Gupta wrote: DGFX platforms has lmem and cpu can access the lmem objects via mmap and i915 internal i915_gem_object_pin_map() for i915 own usages. Both of these m

Re: [Intel-gfx] [PATCH 15/22] drm/i915/audio: Precompute the ELD

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Stash the ELD into the crtc_state and precompute it. This gets > rid of the ugly ELD mutation during intel_audio_codec_enable(), > and opens the door for the state checker. Should note the functional change of disabling audio up

Re: [Intel-gfx] [PATCH 12/22] drm/i915/audio: Use intel_de_rmw() for most audio registers

2022-10-12 Thread Ville Syrjälä
On Wed, Oct 12, 2022 at 05:33:31PM +0300, Jani Nikula wrote: > On Tue, 11 Oct 2022, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > The audio code does a lot of RMW accesses. Utilize > > intel_de_rmw() to make that a bit less tedious. > > > > There are still some hand rolled RMW left, but th

Re: [Intel-gfx] [PATCH 10/22] drm/i915/audio: Make sure we write the whole ELD buffer

2022-10-12 Thread Ville Syrjälä
On Wed, Oct 12, 2022 at 05:28:27PM +0300, Jani Nikula wrote: > On Tue, 11 Oct 2022, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Currently we only write as many dwords into the hardware > > ELD buffers as drm_eld_size() tells us. That could mean the > > remainder of the hardware buffer is

Re: [Intel-gfx] [PATCH 14/22] drm/i915/audio: Do the vblank waits

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > The spec tells us to do a bunch of vblank waits in the audio > enable/disable sequences. Make it so. > > The FIXMEs are nonsense since we do the audio disable very > early and enable very late, so vblank interrupts are in fact >

Re: [Intel-gfx] [PATCH 13/22] drm/i915/audio: Split "ELD valid" vs. audio PD on hsw+

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > On the older platforms the audio presence detect bit is in > the port register, so it gets written outside audio codec hooks > and is this separate from the ELD valid toggling. Split the > operations into two steps on hsw+ to be

Re: [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on'

2022-10-12 Thread Rodrigo Vivi
On Wed, Oct 12, 2022 at 01:26:45PM +0300, Joonas Lahtinen wrote: > I think I commented on this already, but the patch subject should really be as > informative as possible like: "Disable PCI runtime PM on dGPUs" as that is > exactly > what the patch does. +1 here. > > Also bit unsure if the Fix

Re: [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on'

2022-10-12 Thread Rodrigo Vivi
On Wed, Oct 12, 2022 at 10:48:30AM +0100, Matthew Auld wrote: > On 12/10/2022 09:34, Anshuman Gupta wrote: > > DGFX platforms has lmem and cpu can access the lmem objects > > via mmap and i915 internal i915_gem_object_pin_map() for > > i915 own usages. Both of these methods has pre-requisite > > re

Re: [Intel-gfx] [PATCH] drm/i915/dgfx: Temporary hammer to keep autosuspend control 'on'

2022-10-12 Thread Rodrigo Vivi
On Wed, Oct 12, 2022 at 11:21:59AM +0200, Andi Shyti wrote: > Hi Anshuman, > > On Wed, Oct 12, 2022 at 02:04:02PM +0530, Anshuman Gupta wrote: > > DGFX platforms has lmem and cpu can access the lmem objects > > via mmap and i915 internal i915_gem_object_pin_map() for > > i915 own usages. Both of t

Re: [Intel-gfx] [PATCH 09/22] drm/i915/audio: Read ELD buffer size from hardware

2022-10-12 Thread Jani Nikula
On Wed, 12 Oct 2022, Jani Nikula wrote: > On Tue, 11 Oct 2022, Ville Syrjala wrote: >> From: Ville Syrjälä >> >> We currently read the ELD buffer size from hardware on g4x, >> but on ilk+ we just hardcode it to 84 bytes. Let's unify >> this and just do the hardware readout on all platforms, >> i

Re: [Intel-gfx] [PATCH 11/22] drm/i915/audio: Use u32* for ELD

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Make the eld pointer u32* so we don't have to do super > ugly casting in the code itself. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- >

Re: [Intel-gfx] [PATCH 09/22] drm/i915/audio: Read ELD buffer size from hardware

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > We currently read the ELD buffer size from hardware on g4x, > but on ilk+ we just hardcode it to 84 bytes. Let's unify > this and just do the hardware readout on all platforms, > in case the size changes in the future or somethin

Re: [Intel-gfx] [PATCH 08/22] drm/i915/audio: Nuke intel_eld_uptodate()

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > No idea why we do this ELD comparions on g4x before loading > the new ELD. Seems entirely pointless so just get rid of it. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä A

Re: [Intel-gfx] [PATCH 07/22] drm/i915/audio: Protect singleton register with a lock

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > On the "ilk" platforms AUD_CNTL_ST2 is a singleton. Protect > it with the audio mutex in case we ever want to do parallel > RMW access to it. > > Currently that should not happen since we only do audio > enable/disable from full

Re: [Intel-gfx] [PATCH] drm/i915: add wait and lock to i915_vma_move_to_active

2022-10-12 Thread Matthew Auld
On 12/10/2022 13:43, Andrzej Hajda wrote: Since almost all calls to i915_vma_move_to_active are prepended with i915_request_await_object and many of them are surrounded with i915_vma_lock, let's put both into i915_vma_move_to_active and add i915_vma_move_to_active_unlocked helper to handle non-lo

Re: [Intel-gfx] [PATCH 06/22] drm/i915/audio: Unify register bit naming

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Rename a few g4x bits to match the ibx+ bits. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/intel_audio.c

Re: [Intel-gfx] [PATCH 05/22] drm/i915/audio: Use REG_BIT() & co.

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Switch the audio registers to REG_BIT() & co. Also rename > G4X_ELDV and G4X_ELD_ADDR_MASK a bit to match the IBX > definitions. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjäl

Re: [Intel-gfx] [PATCH 04/22] drm/i915/audio: Exract struct ilk_audio_regs

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > The "ilk" audio codec codepaths have some duplicated code > to figure out the correct registers to use on each platform. > Extrat that into a single place. *extract Reviewed-by: Jani Nikula > > Cc: Chaitanya Kumar Borah > Cc

Re: [Intel-gfx] [PATCH 03/22] drm/i915/audio: Remove CL/BLC audio stuff

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > We don't use the audio code on crestline (CL) since it doesn't > support native HDMI output, and SDVO has it's own way of doing > audio. > > And Bearlake-C (BLC) doesn't even exist in the real world, so > no point it trying to de

Re: [Intel-gfx] [PATCH 02/22] drm/i915/audio: Nuke leftover ROUNDING_FACTOR

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Remove some leftovers I missed in commit > 2dd43144e824 ("drm/i915: Streamline the artihmetic") > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula >

Re: [Intel-gfx] [PATCH 01/22] drm/i915/audio: s/dev_priv/i915/

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Rename the 'dev_priv' variables to 'i915' in the audio code > to match modern style conventions. > > Cc: Chaitanya Kumar Borah > Cc: Kai Vehmanen > Cc: Takashi Iwai > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula >

Re: [Intel-gfx] [PATCH 12/22] drm/i915/audio: Use intel_de_rmw() for most audio registers

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > The audio code does a lot of RMW accesses. Utilize > intel_de_rmw() to make that a bit less tedious. > > There are still some hand rolled RMW left, but those have > a lot of code in between the read and write to calculate > the n

Re: [Intel-gfx] [PATCH 10/22] drm/i915/audio: Make sure we write the whole ELD buffer

2022-10-12 Thread Jani Nikula
On Tue, 11 Oct 2022, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we only write as many dwords into the hardware > ELD buffers as drm_eld_size() tells us. That could mean the > remainder of the hardware buffer is left with whatever > stale garbage it had before, which doesn't seem ent

Re: [Intel-gfx] [PATCH v2 22/22] drm/i915/audio: Resume HSW/BDW HDA controller around ELD access

2022-10-12 Thread Ville Syrjälä
On Wed, Oct 12, 2022 at 01:49:36PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > On HSW/BDW the hardware ELD buffer does not work if the controller > is suspended. I'm not 100% which thing in there is needed to make it > work (at least just forcing the controller into D0 with setpci is >

Re: [Intel-gfx] [PATCH v2] drm: split build lists one per line and sort

2022-10-12 Thread Jani Nikula
On Wed, 12 Oct 2022, Maxime Ripard wrote: > On Wed, Oct 12, 2022 at 03:32:32PM +0300, Jani Nikula wrote: >> On Tue, 11 Oct 2022, Jani Nikula wrote: >> > While it takes more vertical space, sorted build lists with one object >> > per line are arguably easier to manage, especially when there are >>

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for Improve anti-pre-emption w/a for compute workloads (rev8)

2022-10-12 Thread Tvrtko Ursulin
On 10/10/2022 20:44, John Harrison wrote: On 10/6/2022 15:20, Patchwork wrote: Project List - Patchwork *Patch Details* *Series:* Improve anti-pre-emption w/a for compute workloads (rev8) *URL:* https://patchwork.freedesktop.org/series/100428/ *State:*failure *Details:* https:/

Re: [Intel-gfx] [PATCH v2 22/22] drm/i915/audio: Resume HSW/BDW HDA controller around ELD access

2022-10-12 Thread Kai Vehmanen
Hi, On Wed, 12 Oct 2022, Kai Vehmanen wrote: > On Wed, 12 Oct 2022, Ville Syrjala wrote: > > > On HSW/BDW the hardware ELD buffer does not work if the controller > > is suspended. I'm not 100% which thing in there is needed to make it > > work (at least just forcing the controller into D0 with s

Re: [Intel-gfx] [PATCH v2] drm: split build lists one per line and sort

2022-10-12 Thread Maxime Ripard
On Wed, Oct 12, 2022 at 03:32:32PM +0300, Jani Nikula wrote: > On Tue, 11 Oct 2022, Jani Nikula wrote: > > While it takes more vertical space, sorted build lists with one object > > per line are arguably easier to manage, especially when there are > > conflicting changes. > > > > Split anything wi

  1   2   >